Skip to main content

google_cloud_securesourcemanager_v1/
builder.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
17/// Request and client builders for [SecureSourceManager][crate::client::SecureSourceManager].
18pub mod secure_source_manager {
19    use crate::Result;
20
21    /// A builder for [SecureSourceManager][crate::client::SecureSourceManager].
22    ///
23    /// ```
24    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
25    /// # use google_cloud_securesourcemanager_v1::*;
26    /// # use builder::secure_source_manager::ClientBuilder;
27    /// # use client::SecureSourceManager;
28    /// let builder : ClientBuilder = SecureSourceManager::builder();
29    /// let client = builder
30    ///     .with_endpoint("https://securesourcemanager.googleapis.com")
31    ///     .build().await?;
32    /// # Ok(()) }
33    /// ```
34    pub type ClientBuilder = crate::ClientBuilder<client::Factory, gaxi::options::Credentials>;
35
36    pub(crate) mod client {
37        use super::super::super::client::SecureSourceManager;
38        pub struct Factory;
39        impl crate::ClientFactory for Factory {
40            type Client = SecureSourceManager;
41            type Credentials = gaxi::options::Credentials;
42            async fn build(
43                self,
44                config: gaxi::options::ClientConfig,
45            ) -> crate::ClientBuilderResult<Self::Client> {
46                Self::Client::new(config).await
47            }
48        }
49    }
50
51    /// Common implementation for [crate::client::SecureSourceManager] request builders.
52    #[derive(Clone, Debug)]
53    pub(crate) struct RequestBuilder<R: std::default::Default> {
54        stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
55        request: R,
56        options: crate::RequestOptions,
57    }
58
59    impl<R> RequestBuilder<R>
60    where
61        R: std::default::Default,
62    {
63        pub(crate) fn new(
64            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
65        ) -> Self {
66            Self {
67                stub,
68                request: R::default(),
69                options: crate::RequestOptions::default(),
70            }
71        }
72    }
73
74    /// The request builder for [SecureSourceManager::list_instances][crate::client::SecureSourceManager::list_instances] calls.
75    ///
76    /// # Example
77    /// ```
78    /// # use google_cloud_securesourcemanager_v1::builder::secure_source_manager::ListInstances;
79    /// # async fn sample() -> google_cloud_securesourcemanager_v1::Result<()> {
80    /// use google_cloud_gax::paginator::ItemPaginator;
81    ///
82    /// let builder = prepare_request_builder();
83    /// let mut items = builder.by_item();
84    /// while let Some(result) = items.next().await {
85    ///   let item = result?;
86    /// }
87    /// # Ok(()) }
88    ///
89    /// fn prepare_request_builder() -> ListInstances {
90    ///   # panic!();
91    ///   // ... details omitted ...
92    /// }
93    /// ```
94    #[derive(Clone, Debug)]
95    pub struct ListInstances(RequestBuilder<crate::model::ListInstancesRequest>);
96
97    impl ListInstances {
98        pub(crate) fn new(
99            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
100        ) -> Self {
101            Self(RequestBuilder::new(stub))
102        }
103
104        /// Sets the full request, replacing any prior values.
105        pub fn with_request<V: Into<crate::model::ListInstancesRequest>>(mut self, v: V) -> Self {
106            self.0.request = v.into();
107            self
108        }
109
110        /// Sets all the options, replacing any prior values.
111        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
112            self.0.options = v.into();
113            self
114        }
115
116        /// Sends the request.
117        pub async fn send(self) -> Result<crate::model::ListInstancesResponse> {
118            (*self.0.stub)
119                .list_instances(self.0.request, self.0.options)
120                .await
121                .map(crate::Response::into_body)
122        }
123
124        /// Streams each page in the collection.
125        pub fn by_page(
126            self,
127        ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListInstancesResponse, crate::Error>
128        {
129            use std::clone::Clone;
130            let token = self.0.request.page_token.clone();
131            let execute = move |token: String| {
132                let mut builder = self.clone();
133                builder.0.request = builder.0.request.set_page_token(token);
134                builder.send()
135            };
136            google_cloud_gax::paginator::internal::new_paginator(token, execute)
137        }
138
139        /// Streams each item in the collection.
140        pub fn by_item(
141            self,
142        ) -> impl google_cloud_gax::paginator::ItemPaginator<
143            crate::model::ListInstancesResponse,
144            crate::Error,
145        > {
146            use google_cloud_gax::paginator::Paginator;
147            self.by_page().items()
148        }
149
150        /// Sets the value of [parent][crate::model::ListInstancesRequest::parent].
151        ///
152        /// This is a **required** field for requests.
153        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
154            self.0.request.parent = v.into();
155            self
156        }
157
158        /// Sets the value of [page_size][crate::model::ListInstancesRequest::page_size].
159        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
160            self.0.request.page_size = v.into();
161            self
162        }
163
164        /// Sets the value of [page_token][crate::model::ListInstancesRequest::page_token].
165        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
166            self.0.request.page_token = v.into();
167            self
168        }
169
170        /// Sets the value of [filter][crate::model::ListInstancesRequest::filter].
171        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
172            self.0.request.filter = v.into();
173            self
174        }
175
176        /// Sets the value of [order_by][crate::model::ListInstancesRequest::order_by].
177        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
178            self.0.request.order_by = v.into();
179            self
180        }
181    }
182
183    #[doc(hidden)]
184    impl crate::RequestBuilder for ListInstances {
185        fn request_options(&mut self) -> &mut crate::RequestOptions {
186            &mut self.0.options
187        }
188    }
189
190    /// The request builder for [SecureSourceManager::get_instance][crate::client::SecureSourceManager::get_instance] calls.
191    ///
192    /// # Example
193    /// ```
194    /// # use google_cloud_securesourcemanager_v1::builder::secure_source_manager::GetInstance;
195    /// # async fn sample() -> google_cloud_securesourcemanager_v1::Result<()> {
196    ///
197    /// let builder = prepare_request_builder();
198    /// let response = builder.send().await?;
199    /// # Ok(()) }
200    ///
201    /// fn prepare_request_builder() -> GetInstance {
202    ///   # panic!();
203    ///   // ... details omitted ...
204    /// }
205    /// ```
206    #[derive(Clone, Debug)]
207    pub struct GetInstance(RequestBuilder<crate::model::GetInstanceRequest>);
208
209    impl GetInstance {
210        pub(crate) fn new(
211            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
212        ) -> Self {
213            Self(RequestBuilder::new(stub))
214        }
215
216        /// Sets the full request, replacing any prior values.
217        pub fn with_request<V: Into<crate::model::GetInstanceRequest>>(mut self, v: V) -> Self {
218            self.0.request = v.into();
219            self
220        }
221
222        /// Sets all the options, replacing any prior values.
223        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
224            self.0.options = v.into();
225            self
226        }
227
228        /// Sends the request.
229        pub async fn send(self) -> Result<crate::model::Instance> {
230            (*self.0.stub)
231                .get_instance(self.0.request, self.0.options)
232                .await
233                .map(crate::Response::into_body)
234        }
235
236        /// Sets the value of [name][crate::model::GetInstanceRequest::name].
237        ///
238        /// This is a **required** field for requests.
239        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
240            self.0.request.name = v.into();
241            self
242        }
243    }
244
245    #[doc(hidden)]
246    impl crate::RequestBuilder for GetInstance {
247        fn request_options(&mut self) -> &mut crate::RequestOptions {
248            &mut self.0.options
249        }
250    }
251
252    /// The request builder for [SecureSourceManager::create_instance][crate::client::SecureSourceManager::create_instance] calls.
253    ///
254    /// # Example
255    /// ```
256    /// # use google_cloud_securesourcemanager_v1::builder::secure_source_manager::CreateInstance;
257    /// # async fn sample() -> google_cloud_securesourcemanager_v1::Result<()> {
258    /// use google_cloud_lro::Poller;
259    ///
260    /// let builder = prepare_request_builder();
261    /// let response = builder.poller().until_done().await?;
262    /// # Ok(()) }
263    ///
264    /// fn prepare_request_builder() -> CreateInstance {
265    ///   # panic!();
266    ///   // ... details omitted ...
267    /// }
268    /// ```
269    #[derive(Clone, Debug)]
270    pub struct CreateInstance(RequestBuilder<crate::model::CreateInstanceRequest>);
271
272    impl CreateInstance {
273        pub(crate) fn new(
274            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
275        ) -> Self {
276            Self(RequestBuilder::new(stub))
277        }
278
279        /// Sets the full request, replacing any prior values.
280        pub fn with_request<V: Into<crate::model::CreateInstanceRequest>>(mut self, v: V) -> Self {
281            self.0.request = v.into();
282            self
283        }
284
285        /// Sets all the options, replacing any prior values.
286        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
287            self.0.options = v.into();
288            self
289        }
290
291        /// Sends the request.
292        ///
293        /// # Long running operations
294        ///
295        /// This starts, but does not poll, a longrunning operation. More information
296        /// on [create_instance][crate::client::SecureSourceManager::create_instance].
297        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
298            (*self.0.stub)
299                .create_instance(self.0.request, self.0.options)
300                .await
301                .map(crate::Response::into_body)
302        }
303
304        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_instance`.
305        pub fn poller(
306            self,
307        ) -> impl google_cloud_lro::Poller<crate::model::Instance, crate::model::OperationMetadata>
308        {
309            type Operation = google_cloud_lro::internal::Operation<
310                crate::model::Instance,
311                crate::model::OperationMetadata,
312            >;
313            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
314            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
315            let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
316            if let Some(ref mut details) = poller_options.tracing {
317                details.method_name = "google_cloud_securesourcemanager_v1::client::SecureSourceManager::create_instance::until_done";
318            }
319
320            let stub = self.0.stub.clone();
321            let mut options = self.0.options.clone();
322            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
323            let query = move |name| {
324                let stub = stub.clone();
325                let options = options.clone();
326                async {
327                    let op = GetOperation::new(stub)
328                        .set_name(name)
329                        .with_options(options)
330                        .send()
331                        .await?;
332                    Ok(Operation::new(op))
333                }
334            };
335
336            let start = move || async {
337                let op = self.send().await?;
338                Ok(Operation::new(op))
339            };
340
341            use google_cloud_lro::internal::PollerExt;
342            {
343                google_cloud_lro::internal::new_poller(
344                    polling_error_policy,
345                    polling_backoff_policy,
346                    start,
347                    query,
348                )
349            }
350            .with_options(poller_options)
351        }
352
353        /// Sets the value of [parent][crate::model::CreateInstanceRequest::parent].
354        ///
355        /// This is a **required** field for requests.
356        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
357            self.0.request.parent = v.into();
358            self
359        }
360
361        /// Sets the value of [instance_id][crate::model::CreateInstanceRequest::instance_id].
362        ///
363        /// This is a **required** field for requests.
364        pub fn set_instance_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
365            self.0.request.instance_id = v.into();
366            self
367        }
368
369        /// Sets the value of [instance][crate::model::CreateInstanceRequest::instance].
370        ///
371        /// This is a **required** field for requests.
372        pub fn set_instance<T>(mut self, v: T) -> Self
373        where
374            T: std::convert::Into<crate::model::Instance>,
375        {
376            self.0.request.instance = std::option::Option::Some(v.into());
377            self
378        }
379
380        /// Sets or clears the value of [instance][crate::model::CreateInstanceRequest::instance].
381        ///
382        /// This is a **required** field for requests.
383        pub fn set_or_clear_instance<T>(mut self, v: std::option::Option<T>) -> Self
384        where
385            T: std::convert::Into<crate::model::Instance>,
386        {
387            self.0.request.instance = v.map(|x| x.into());
388            self
389        }
390
391        /// Sets the value of [request_id][crate::model::CreateInstanceRequest::request_id].
392        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
393            self.0.request.request_id = v.into();
394            self
395        }
396    }
397
398    #[doc(hidden)]
399    impl crate::RequestBuilder for CreateInstance {
400        fn request_options(&mut self) -> &mut crate::RequestOptions {
401            &mut self.0.options
402        }
403    }
404
405    /// The request builder for [SecureSourceManager::delete_instance][crate::client::SecureSourceManager::delete_instance] calls.
406    ///
407    /// # Example
408    /// ```
409    /// # use google_cloud_securesourcemanager_v1::builder::secure_source_manager::DeleteInstance;
410    /// # async fn sample() -> google_cloud_securesourcemanager_v1::Result<()> {
411    /// use google_cloud_lro::Poller;
412    ///
413    /// let builder = prepare_request_builder();
414    /// let response = builder.poller().until_done().await?;
415    /// # Ok(()) }
416    ///
417    /// fn prepare_request_builder() -> DeleteInstance {
418    ///   # panic!();
419    ///   // ... details omitted ...
420    /// }
421    /// ```
422    #[derive(Clone, Debug)]
423    pub struct DeleteInstance(RequestBuilder<crate::model::DeleteInstanceRequest>);
424
425    impl DeleteInstance {
426        pub(crate) fn new(
427            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
428        ) -> Self {
429            Self(RequestBuilder::new(stub))
430        }
431
432        /// Sets the full request, replacing any prior values.
433        pub fn with_request<V: Into<crate::model::DeleteInstanceRequest>>(mut self, v: V) -> Self {
434            self.0.request = v.into();
435            self
436        }
437
438        /// Sets all the options, replacing any prior values.
439        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
440            self.0.options = v.into();
441            self
442        }
443
444        /// Sends the request.
445        ///
446        /// # Long running operations
447        ///
448        /// This starts, but does not poll, a longrunning operation. More information
449        /// on [delete_instance][crate::client::SecureSourceManager::delete_instance].
450        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
451            (*self.0.stub)
452                .delete_instance(self.0.request, self.0.options)
453                .await
454                .map(crate::Response::into_body)
455        }
456
457        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_instance`.
458        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
459            type Operation =
460                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
461            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
462            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
463            let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
464            if let Some(ref mut details) = poller_options.tracing {
465                details.method_name = "google_cloud_securesourcemanager_v1::client::SecureSourceManager::delete_instance::until_done";
466            }
467
468            let stub = self.0.stub.clone();
469            let mut options = self.0.options.clone();
470            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
471            let query = move |name| {
472                let stub = stub.clone();
473                let options = options.clone();
474                async {
475                    let op = GetOperation::new(stub)
476                        .set_name(name)
477                        .with_options(options)
478                        .send()
479                        .await?;
480                    Ok(Operation::new(op))
481                }
482            };
483
484            let start = move || async {
485                let op = self.send().await?;
486                Ok(Operation::new(op))
487            };
488
489            use google_cloud_lro::internal::PollerExt;
490            {
491                google_cloud_lro::internal::new_unit_response_poller(
492                    polling_error_policy,
493                    polling_backoff_policy,
494                    start,
495                    query,
496                )
497            }
498            .with_options(poller_options)
499        }
500
501        /// Sets the value of [name][crate::model::DeleteInstanceRequest::name].
502        ///
503        /// This is a **required** field for requests.
504        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
505            self.0.request.name = v.into();
506            self
507        }
508
509        /// Sets the value of [request_id][crate::model::DeleteInstanceRequest::request_id].
510        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
511            self.0.request.request_id = v.into();
512            self
513        }
514
515        /// Sets the value of [force][crate::model::DeleteInstanceRequest::force].
516        pub fn set_force<T: Into<bool>>(mut self, v: T) -> Self {
517            self.0.request.force = v.into();
518            self
519        }
520    }
521
522    #[doc(hidden)]
523    impl crate::RequestBuilder for DeleteInstance {
524        fn request_options(&mut self) -> &mut crate::RequestOptions {
525            &mut self.0.options
526        }
527    }
528
529    /// The request builder for [SecureSourceManager::list_repositories][crate::client::SecureSourceManager::list_repositories] calls.
530    ///
531    /// # Example
532    /// ```
533    /// # use google_cloud_securesourcemanager_v1::builder::secure_source_manager::ListRepositories;
534    /// # async fn sample() -> google_cloud_securesourcemanager_v1::Result<()> {
535    /// use google_cloud_gax::paginator::ItemPaginator;
536    ///
537    /// let builder = prepare_request_builder();
538    /// let mut items = builder.by_item();
539    /// while let Some(result) = items.next().await {
540    ///   let item = result?;
541    /// }
542    /// # Ok(()) }
543    ///
544    /// fn prepare_request_builder() -> ListRepositories {
545    ///   # panic!();
546    ///   // ... details omitted ...
547    /// }
548    /// ```
549    #[derive(Clone, Debug)]
550    pub struct ListRepositories(RequestBuilder<crate::model::ListRepositoriesRequest>);
551
552    impl ListRepositories {
553        pub(crate) fn new(
554            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
555        ) -> Self {
556            Self(RequestBuilder::new(stub))
557        }
558
559        /// Sets the full request, replacing any prior values.
560        pub fn with_request<V: Into<crate::model::ListRepositoriesRequest>>(
561            mut self,
562            v: V,
563        ) -> Self {
564            self.0.request = v.into();
565            self
566        }
567
568        /// Sets all the options, replacing any prior values.
569        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
570            self.0.options = v.into();
571            self
572        }
573
574        /// Sends the request.
575        pub async fn send(self) -> Result<crate::model::ListRepositoriesResponse> {
576            (*self.0.stub)
577                .list_repositories(self.0.request, self.0.options)
578                .await
579                .map(crate::Response::into_body)
580        }
581
582        /// Streams each page in the collection.
583        pub fn by_page(
584            self,
585        ) -> impl google_cloud_gax::paginator::Paginator<
586            crate::model::ListRepositoriesResponse,
587            crate::Error,
588        > {
589            use std::clone::Clone;
590            let token = self.0.request.page_token.clone();
591            let execute = move |token: String| {
592                let mut builder = self.clone();
593                builder.0.request = builder.0.request.set_page_token(token);
594                builder.send()
595            };
596            google_cloud_gax::paginator::internal::new_paginator(token, execute)
597        }
598
599        /// Streams each item in the collection.
600        pub fn by_item(
601            self,
602        ) -> impl google_cloud_gax::paginator::ItemPaginator<
603            crate::model::ListRepositoriesResponse,
604            crate::Error,
605        > {
606            use google_cloud_gax::paginator::Paginator;
607            self.by_page().items()
608        }
609
610        /// Sets the value of [parent][crate::model::ListRepositoriesRequest::parent].
611        ///
612        /// This is a **required** field for requests.
613        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
614            self.0.request.parent = v.into();
615            self
616        }
617
618        /// Sets the value of [page_size][crate::model::ListRepositoriesRequest::page_size].
619        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
620            self.0.request.page_size = v.into();
621            self
622        }
623
624        /// Sets the value of [page_token][crate::model::ListRepositoriesRequest::page_token].
625        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
626            self.0.request.page_token = v.into();
627            self
628        }
629
630        /// Sets the value of [filter][crate::model::ListRepositoriesRequest::filter].
631        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
632            self.0.request.filter = v.into();
633            self
634        }
635
636        /// Sets the value of [instance][crate::model::ListRepositoriesRequest::instance].
637        pub fn set_instance<T: Into<std::string::String>>(mut self, v: T) -> Self {
638            self.0.request.instance = v.into();
639            self
640        }
641    }
642
643    #[doc(hidden)]
644    impl crate::RequestBuilder for ListRepositories {
645        fn request_options(&mut self) -> &mut crate::RequestOptions {
646            &mut self.0.options
647        }
648    }
649
650    /// The request builder for [SecureSourceManager::get_repository][crate::client::SecureSourceManager::get_repository] calls.
651    ///
652    /// # Example
653    /// ```
654    /// # use google_cloud_securesourcemanager_v1::builder::secure_source_manager::GetRepository;
655    /// # async fn sample() -> google_cloud_securesourcemanager_v1::Result<()> {
656    ///
657    /// let builder = prepare_request_builder();
658    /// let response = builder.send().await?;
659    /// # Ok(()) }
660    ///
661    /// fn prepare_request_builder() -> GetRepository {
662    ///   # panic!();
663    ///   // ... details omitted ...
664    /// }
665    /// ```
666    #[derive(Clone, Debug)]
667    pub struct GetRepository(RequestBuilder<crate::model::GetRepositoryRequest>);
668
669    impl GetRepository {
670        pub(crate) fn new(
671            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
672        ) -> Self {
673            Self(RequestBuilder::new(stub))
674        }
675
676        /// Sets the full request, replacing any prior values.
677        pub fn with_request<V: Into<crate::model::GetRepositoryRequest>>(mut self, v: V) -> Self {
678            self.0.request = v.into();
679            self
680        }
681
682        /// Sets all the options, replacing any prior values.
683        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
684            self.0.options = v.into();
685            self
686        }
687
688        /// Sends the request.
689        pub async fn send(self) -> Result<crate::model::Repository> {
690            (*self.0.stub)
691                .get_repository(self.0.request, self.0.options)
692                .await
693                .map(crate::Response::into_body)
694        }
695
696        /// Sets the value of [name][crate::model::GetRepositoryRequest::name].
697        ///
698        /// This is a **required** field for requests.
699        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
700            self.0.request.name = v.into();
701            self
702        }
703    }
704
705    #[doc(hidden)]
706    impl crate::RequestBuilder for GetRepository {
707        fn request_options(&mut self) -> &mut crate::RequestOptions {
708            &mut self.0.options
709        }
710    }
711
712    /// The request builder for [SecureSourceManager::create_repository][crate::client::SecureSourceManager::create_repository] calls.
713    ///
714    /// # Example
715    /// ```
716    /// # use google_cloud_securesourcemanager_v1::builder::secure_source_manager::CreateRepository;
717    /// # async fn sample() -> google_cloud_securesourcemanager_v1::Result<()> {
718    /// use google_cloud_lro::Poller;
719    ///
720    /// let builder = prepare_request_builder();
721    /// let response = builder.poller().until_done().await?;
722    /// # Ok(()) }
723    ///
724    /// fn prepare_request_builder() -> CreateRepository {
725    ///   # panic!();
726    ///   // ... details omitted ...
727    /// }
728    /// ```
729    #[derive(Clone, Debug)]
730    pub struct CreateRepository(RequestBuilder<crate::model::CreateRepositoryRequest>);
731
732    impl CreateRepository {
733        pub(crate) fn new(
734            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
735        ) -> Self {
736            Self(RequestBuilder::new(stub))
737        }
738
739        /// Sets the full request, replacing any prior values.
740        pub fn with_request<V: Into<crate::model::CreateRepositoryRequest>>(
741            mut self,
742            v: V,
743        ) -> Self {
744            self.0.request = v.into();
745            self
746        }
747
748        /// Sets all the options, replacing any prior values.
749        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
750            self.0.options = v.into();
751            self
752        }
753
754        /// Sends the request.
755        ///
756        /// # Long running operations
757        ///
758        /// This starts, but does not poll, a longrunning operation. More information
759        /// on [create_repository][crate::client::SecureSourceManager::create_repository].
760        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
761            (*self.0.stub)
762                .create_repository(self.0.request, self.0.options)
763                .await
764                .map(crate::Response::into_body)
765        }
766
767        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_repository`.
768        pub fn poller(
769            self,
770        ) -> impl google_cloud_lro::Poller<crate::model::Repository, crate::model::OperationMetadata>
771        {
772            type Operation = google_cloud_lro::internal::Operation<
773                crate::model::Repository,
774                crate::model::OperationMetadata,
775            >;
776            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
777            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
778            let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
779            if let Some(ref mut details) = poller_options.tracing {
780                details.method_name = "google_cloud_securesourcemanager_v1::client::SecureSourceManager::create_repository::until_done";
781            }
782
783            let stub = self.0.stub.clone();
784            let mut options = self.0.options.clone();
785            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
786            let query = move |name| {
787                let stub = stub.clone();
788                let options = options.clone();
789                async {
790                    let op = GetOperation::new(stub)
791                        .set_name(name)
792                        .with_options(options)
793                        .send()
794                        .await?;
795                    Ok(Operation::new(op))
796                }
797            };
798
799            let start = move || async {
800                let op = self.send().await?;
801                Ok(Operation::new(op))
802            };
803
804            use google_cloud_lro::internal::PollerExt;
805            {
806                google_cloud_lro::internal::new_poller(
807                    polling_error_policy,
808                    polling_backoff_policy,
809                    start,
810                    query,
811                )
812            }
813            .with_options(poller_options)
814        }
815
816        /// Sets the value of [parent][crate::model::CreateRepositoryRequest::parent].
817        ///
818        /// This is a **required** field for requests.
819        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
820            self.0.request.parent = v.into();
821            self
822        }
823
824        /// Sets the value of [repository][crate::model::CreateRepositoryRequest::repository].
825        ///
826        /// This is a **required** field for requests.
827        pub fn set_repository<T>(mut self, v: T) -> Self
828        where
829            T: std::convert::Into<crate::model::Repository>,
830        {
831            self.0.request.repository = std::option::Option::Some(v.into());
832            self
833        }
834
835        /// Sets or clears the value of [repository][crate::model::CreateRepositoryRequest::repository].
836        ///
837        /// This is a **required** field for requests.
838        pub fn set_or_clear_repository<T>(mut self, v: std::option::Option<T>) -> Self
839        where
840            T: std::convert::Into<crate::model::Repository>,
841        {
842            self.0.request.repository = v.map(|x| x.into());
843            self
844        }
845
846        /// Sets the value of [repository_id][crate::model::CreateRepositoryRequest::repository_id].
847        ///
848        /// This is a **required** field for requests.
849        pub fn set_repository_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
850            self.0.request.repository_id = v.into();
851            self
852        }
853    }
854
855    #[doc(hidden)]
856    impl crate::RequestBuilder for CreateRepository {
857        fn request_options(&mut self) -> &mut crate::RequestOptions {
858            &mut self.0.options
859        }
860    }
861
862    /// The request builder for [SecureSourceManager::update_repository][crate::client::SecureSourceManager::update_repository] calls.
863    ///
864    /// # Example
865    /// ```
866    /// # use google_cloud_securesourcemanager_v1::builder::secure_source_manager::UpdateRepository;
867    /// # async fn sample() -> google_cloud_securesourcemanager_v1::Result<()> {
868    /// use google_cloud_lro::Poller;
869    ///
870    /// let builder = prepare_request_builder();
871    /// let response = builder.poller().until_done().await?;
872    /// # Ok(()) }
873    ///
874    /// fn prepare_request_builder() -> UpdateRepository {
875    ///   # panic!();
876    ///   // ... details omitted ...
877    /// }
878    /// ```
879    #[derive(Clone, Debug)]
880    pub struct UpdateRepository(RequestBuilder<crate::model::UpdateRepositoryRequest>);
881
882    impl UpdateRepository {
883        pub(crate) fn new(
884            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
885        ) -> Self {
886            Self(RequestBuilder::new(stub))
887        }
888
889        /// Sets the full request, replacing any prior values.
890        pub fn with_request<V: Into<crate::model::UpdateRepositoryRequest>>(
891            mut self,
892            v: V,
893        ) -> Self {
894            self.0.request = v.into();
895            self
896        }
897
898        /// Sets all the options, replacing any prior values.
899        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
900            self.0.options = v.into();
901            self
902        }
903
904        /// Sends the request.
905        ///
906        /// # Long running operations
907        ///
908        /// This starts, but does not poll, a longrunning operation. More information
909        /// on [update_repository][crate::client::SecureSourceManager::update_repository].
910        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
911            (*self.0.stub)
912                .update_repository(self.0.request, self.0.options)
913                .await
914                .map(crate::Response::into_body)
915        }
916
917        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_repository`.
918        pub fn poller(
919            self,
920        ) -> impl google_cloud_lro::Poller<crate::model::Repository, crate::model::OperationMetadata>
921        {
922            type Operation = google_cloud_lro::internal::Operation<
923                crate::model::Repository,
924                crate::model::OperationMetadata,
925            >;
926            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
927            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
928            let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
929            if let Some(ref mut details) = poller_options.tracing {
930                details.method_name = "google_cloud_securesourcemanager_v1::client::SecureSourceManager::update_repository::until_done";
931            }
932
933            let stub = self.0.stub.clone();
934            let mut options = self.0.options.clone();
935            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
936            let query = move |name| {
937                let stub = stub.clone();
938                let options = options.clone();
939                async {
940                    let op = GetOperation::new(stub)
941                        .set_name(name)
942                        .with_options(options)
943                        .send()
944                        .await?;
945                    Ok(Operation::new(op))
946                }
947            };
948
949            let start = move || async {
950                let op = self.send().await?;
951                Ok(Operation::new(op))
952            };
953
954            use google_cloud_lro::internal::PollerExt;
955            {
956                google_cloud_lro::internal::new_poller(
957                    polling_error_policy,
958                    polling_backoff_policy,
959                    start,
960                    query,
961                )
962            }
963            .with_options(poller_options)
964        }
965
966        /// Sets the value of [update_mask][crate::model::UpdateRepositoryRequest::update_mask].
967        pub fn set_update_mask<T>(mut self, v: T) -> Self
968        where
969            T: std::convert::Into<wkt::FieldMask>,
970        {
971            self.0.request.update_mask = std::option::Option::Some(v.into());
972            self
973        }
974
975        /// Sets or clears the value of [update_mask][crate::model::UpdateRepositoryRequest::update_mask].
976        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
977        where
978            T: std::convert::Into<wkt::FieldMask>,
979        {
980            self.0.request.update_mask = v.map(|x| x.into());
981            self
982        }
983
984        /// Sets the value of [repository][crate::model::UpdateRepositoryRequest::repository].
985        ///
986        /// This is a **required** field for requests.
987        pub fn set_repository<T>(mut self, v: T) -> Self
988        where
989            T: std::convert::Into<crate::model::Repository>,
990        {
991            self.0.request.repository = std::option::Option::Some(v.into());
992            self
993        }
994
995        /// Sets or clears the value of [repository][crate::model::UpdateRepositoryRequest::repository].
996        ///
997        /// This is a **required** field for requests.
998        pub fn set_or_clear_repository<T>(mut self, v: std::option::Option<T>) -> Self
999        where
1000            T: std::convert::Into<crate::model::Repository>,
1001        {
1002            self.0.request.repository = v.map(|x| x.into());
1003            self
1004        }
1005
1006        /// Sets the value of [validate_only][crate::model::UpdateRepositoryRequest::validate_only].
1007        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
1008            self.0.request.validate_only = v.into();
1009            self
1010        }
1011    }
1012
1013    #[doc(hidden)]
1014    impl crate::RequestBuilder for UpdateRepository {
1015        fn request_options(&mut self) -> &mut crate::RequestOptions {
1016            &mut self.0.options
1017        }
1018    }
1019
1020    /// The request builder for [SecureSourceManager::delete_repository][crate::client::SecureSourceManager::delete_repository] calls.
1021    ///
1022    /// # Example
1023    /// ```
1024    /// # use google_cloud_securesourcemanager_v1::builder::secure_source_manager::DeleteRepository;
1025    /// # async fn sample() -> google_cloud_securesourcemanager_v1::Result<()> {
1026    /// use google_cloud_lro::Poller;
1027    ///
1028    /// let builder = prepare_request_builder();
1029    /// let response = builder.poller().until_done().await?;
1030    /// # Ok(()) }
1031    ///
1032    /// fn prepare_request_builder() -> DeleteRepository {
1033    ///   # panic!();
1034    ///   // ... details omitted ...
1035    /// }
1036    /// ```
1037    #[derive(Clone, Debug)]
1038    pub struct DeleteRepository(RequestBuilder<crate::model::DeleteRepositoryRequest>);
1039
1040    impl DeleteRepository {
1041        pub(crate) fn new(
1042            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
1043        ) -> Self {
1044            Self(RequestBuilder::new(stub))
1045        }
1046
1047        /// Sets the full request, replacing any prior values.
1048        pub fn with_request<V: Into<crate::model::DeleteRepositoryRequest>>(
1049            mut self,
1050            v: V,
1051        ) -> Self {
1052            self.0.request = v.into();
1053            self
1054        }
1055
1056        /// Sets all the options, replacing any prior values.
1057        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1058            self.0.options = v.into();
1059            self
1060        }
1061
1062        /// Sends the request.
1063        ///
1064        /// # Long running operations
1065        ///
1066        /// This starts, but does not poll, a longrunning operation. More information
1067        /// on [delete_repository][crate::client::SecureSourceManager::delete_repository].
1068        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
1069            (*self.0.stub)
1070                .delete_repository(self.0.request, self.0.options)
1071                .await
1072                .map(crate::Response::into_body)
1073        }
1074
1075        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_repository`.
1076        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
1077            type Operation =
1078                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
1079            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1080            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1081            let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
1082            if let Some(ref mut details) = poller_options.tracing {
1083                details.method_name = "google_cloud_securesourcemanager_v1::client::SecureSourceManager::delete_repository::until_done";
1084            }
1085
1086            let stub = self.0.stub.clone();
1087            let mut options = self.0.options.clone();
1088            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
1089            let query = move |name| {
1090                let stub = stub.clone();
1091                let options = options.clone();
1092                async {
1093                    let op = GetOperation::new(stub)
1094                        .set_name(name)
1095                        .with_options(options)
1096                        .send()
1097                        .await?;
1098                    Ok(Operation::new(op))
1099                }
1100            };
1101
1102            let start = move || async {
1103                let op = self.send().await?;
1104                Ok(Operation::new(op))
1105            };
1106
1107            use google_cloud_lro::internal::PollerExt;
1108            {
1109                google_cloud_lro::internal::new_unit_response_poller(
1110                    polling_error_policy,
1111                    polling_backoff_policy,
1112                    start,
1113                    query,
1114                )
1115            }
1116            .with_options(poller_options)
1117        }
1118
1119        /// Sets the value of [name][crate::model::DeleteRepositoryRequest::name].
1120        ///
1121        /// This is a **required** field for requests.
1122        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1123            self.0.request.name = v.into();
1124            self
1125        }
1126
1127        /// Sets the value of [allow_missing][crate::model::DeleteRepositoryRequest::allow_missing].
1128        pub fn set_allow_missing<T: Into<bool>>(mut self, v: T) -> Self {
1129            self.0.request.allow_missing = v.into();
1130            self
1131        }
1132    }
1133
1134    #[doc(hidden)]
1135    impl crate::RequestBuilder for DeleteRepository {
1136        fn request_options(&mut self) -> &mut crate::RequestOptions {
1137            &mut self.0.options
1138        }
1139    }
1140
1141    /// The request builder for [SecureSourceManager::list_hooks][crate::client::SecureSourceManager::list_hooks] calls.
1142    ///
1143    /// # Example
1144    /// ```
1145    /// # use google_cloud_securesourcemanager_v1::builder::secure_source_manager::ListHooks;
1146    /// # async fn sample() -> google_cloud_securesourcemanager_v1::Result<()> {
1147    /// use google_cloud_gax::paginator::ItemPaginator;
1148    ///
1149    /// let builder = prepare_request_builder();
1150    /// let mut items = builder.by_item();
1151    /// while let Some(result) = items.next().await {
1152    ///   let item = result?;
1153    /// }
1154    /// # Ok(()) }
1155    ///
1156    /// fn prepare_request_builder() -> ListHooks {
1157    ///   # panic!();
1158    ///   // ... details omitted ...
1159    /// }
1160    /// ```
1161    #[derive(Clone, Debug)]
1162    pub struct ListHooks(RequestBuilder<crate::model::ListHooksRequest>);
1163
1164    impl ListHooks {
1165        pub(crate) fn new(
1166            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
1167        ) -> Self {
1168            Self(RequestBuilder::new(stub))
1169        }
1170
1171        /// Sets the full request, replacing any prior values.
1172        pub fn with_request<V: Into<crate::model::ListHooksRequest>>(mut self, v: V) -> Self {
1173            self.0.request = v.into();
1174            self
1175        }
1176
1177        /// Sets all the options, replacing any prior values.
1178        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1179            self.0.options = v.into();
1180            self
1181        }
1182
1183        /// Sends the request.
1184        pub async fn send(self) -> Result<crate::model::ListHooksResponse> {
1185            (*self.0.stub)
1186                .list_hooks(self.0.request, self.0.options)
1187                .await
1188                .map(crate::Response::into_body)
1189        }
1190
1191        /// Streams each page in the collection.
1192        pub fn by_page(
1193            self,
1194        ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListHooksResponse, crate::Error>
1195        {
1196            use std::clone::Clone;
1197            let token = self.0.request.page_token.clone();
1198            let execute = move |token: String| {
1199                let mut builder = self.clone();
1200                builder.0.request = builder.0.request.set_page_token(token);
1201                builder.send()
1202            };
1203            google_cloud_gax::paginator::internal::new_paginator(token, execute)
1204        }
1205
1206        /// Streams each item in the collection.
1207        pub fn by_item(
1208            self,
1209        ) -> impl google_cloud_gax::paginator::ItemPaginator<crate::model::ListHooksResponse, crate::Error>
1210        {
1211            use google_cloud_gax::paginator::Paginator;
1212            self.by_page().items()
1213        }
1214
1215        /// Sets the value of [parent][crate::model::ListHooksRequest::parent].
1216        ///
1217        /// This is a **required** field for requests.
1218        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1219            self.0.request.parent = v.into();
1220            self
1221        }
1222
1223        /// Sets the value of [page_size][crate::model::ListHooksRequest::page_size].
1224        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1225            self.0.request.page_size = v.into();
1226            self
1227        }
1228
1229        /// Sets the value of [page_token][crate::model::ListHooksRequest::page_token].
1230        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1231            self.0.request.page_token = v.into();
1232            self
1233        }
1234    }
1235
1236    #[doc(hidden)]
1237    impl crate::RequestBuilder for ListHooks {
1238        fn request_options(&mut self) -> &mut crate::RequestOptions {
1239            &mut self.0.options
1240        }
1241    }
1242
1243    /// The request builder for [SecureSourceManager::get_hook][crate::client::SecureSourceManager::get_hook] calls.
1244    ///
1245    /// # Example
1246    /// ```
1247    /// # use google_cloud_securesourcemanager_v1::builder::secure_source_manager::GetHook;
1248    /// # async fn sample() -> google_cloud_securesourcemanager_v1::Result<()> {
1249    ///
1250    /// let builder = prepare_request_builder();
1251    /// let response = builder.send().await?;
1252    /// # Ok(()) }
1253    ///
1254    /// fn prepare_request_builder() -> GetHook {
1255    ///   # panic!();
1256    ///   // ... details omitted ...
1257    /// }
1258    /// ```
1259    #[derive(Clone, Debug)]
1260    pub struct GetHook(RequestBuilder<crate::model::GetHookRequest>);
1261
1262    impl GetHook {
1263        pub(crate) fn new(
1264            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
1265        ) -> Self {
1266            Self(RequestBuilder::new(stub))
1267        }
1268
1269        /// Sets the full request, replacing any prior values.
1270        pub fn with_request<V: Into<crate::model::GetHookRequest>>(mut self, v: V) -> Self {
1271            self.0.request = v.into();
1272            self
1273        }
1274
1275        /// Sets all the options, replacing any prior values.
1276        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1277            self.0.options = v.into();
1278            self
1279        }
1280
1281        /// Sends the request.
1282        pub async fn send(self) -> Result<crate::model::Hook> {
1283            (*self.0.stub)
1284                .get_hook(self.0.request, self.0.options)
1285                .await
1286                .map(crate::Response::into_body)
1287        }
1288
1289        /// Sets the value of [name][crate::model::GetHookRequest::name].
1290        ///
1291        /// This is a **required** field for requests.
1292        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1293            self.0.request.name = v.into();
1294            self
1295        }
1296    }
1297
1298    #[doc(hidden)]
1299    impl crate::RequestBuilder for GetHook {
1300        fn request_options(&mut self) -> &mut crate::RequestOptions {
1301            &mut self.0.options
1302        }
1303    }
1304
1305    /// The request builder for [SecureSourceManager::create_hook][crate::client::SecureSourceManager::create_hook] calls.
1306    ///
1307    /// # Example
1308    /// ```
1309    /// # use google_cloud_securesourcemanager_v1::builder::secure_source_manager::CreateHook;
1310    /// # async fn sample() -> google_cloud_securesourcemanager_v1::Result<()> {
1311    /// use google_cloud_lro::Poller;
1312    ///
1313    /// let builder = prepare_request_builder();
1314    /// let response = builder.poller().until_done().await?;
1315    /// # Ok(()) }
1316    ///
1317    /// fn prepare_request_builder() -> CreateHook {
1318    ///   # panic!();
1319    ///   // ... details omitted ...
1320    /// }
1321    /// ```
1322    #[derive(Clone, Debug)]
1323    pub struct CreateHook(RequestBuilder<crate::model::CreateHookRequest>);
1324
1325    impl CreateHook {
1326        pub(crate) fn new(
1327            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
1328        ) -> Self {
1329            Self(RequestBuilder::new(stub))
1330        }
1331
1332        /// Sets the full request, replacing any prior values.
1333        pub fn with_request<V: Into<crate::model::CreateHookRequest>>(mut self, v: V) -> Self {
1334            self.0.request = v.into();
1335            self
1336        }
1337
1338        /// Sets all the options, replacing any prior values.
1339        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1340            self.0.options = v.into();
1341            self
1342        }
1343
1344        /// Sends the request.
1345        ///
1346        /// # Long running operations
1347        ///
1348        /// This starts, but does not poll, a longrunning operation. More information
1349        /// on [create_hook][crate::client::SecureSourceManager::create_hook].
1350        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
1351            (*self.0.stub)
1352                .create_hook(self.0.request, self.0.options)
1353                .await
1354                .map(crate::Response::into_body)
1355        }
1356
1357        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_hook`.
1358        pub fn poller(
1359            self,
1360        ) -> impl google_cloud_lro::Poller<crate::model::Hook, crate::model::OperationMetadata>
1361        {
1362            type Operation = google_cloud_lro::internal::Operation<
1363                crate::model::Hook,
1364                crate::model::OperationMetadata,
1365            >;
1366            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1367            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1368            let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
1369            if let Some(ref mut details) = poller_options.tracing {
1370                details.method_name = "google_cloud_securesourcemanager_v1::client::SecureSourceManager::create_hook::until_done";
1371            }
1372
1373            let stub = self.0.stub.clone();
1374            let mut options = self.0.options.clone();
1375            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
1376            let query = move |name| {
1377                let stub = stub.clone();
1378                let options = options.clone();
1379                async {
1380                    let op = GetOperation::new(stub)
1381                        .set_name(name)
1382                        .with_options(options)
1383                        .send()
1384                        .await?;
1385                    Ok(Operation::new(op))
1386                }
1387            };
1388
1389            let start = move || async {
1390                let op = self.send().await?;
1391                Ok(Operation::new(op))
1392            };
1393
1394            use google_cloud_lro::internal::PollerExt;
1395            {
1396                google_cloud_lro::internal::new_poller(
1397                    polling_error_policy,
1398                    polling_backoff_policy,
1399                    start,
1400                    query,
1401                )
1402            }
1403            .with_options(poller_options)
1404        }
1405
1406        /// Sets the value of [parent][crate::model::CreateHookRequest::parent].
1407        ///
1408        /// This is a **required** field for requests.
1409        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1410            self.0.request.parent = v.into();
1411            self
1412        }
1413
1414        /// Sets the value of [hook][crate::model::CreateHookRequest::hook].
1415        ///
1416        /// This is a **required** field for requests.
1417        pub fn set_hook<T>(mut self, v: T) -> Self
1418        where
1419            T: std::convert::Into<crate::model::Hook>,
1420        {
1421            self.0.request.hook = std::option::Option::Some(v.into());
1422            self
1423        }
1424
1425        /// Sets or clears the value of [hook][crate::model::CreateHookRequest::hook].
1426        ///
1427        /// This is a **required** field for requests.
1428        pub fn set_or_clear_hook<T>(mut self, v: std::option::Option<T>) -> Self
1429        where
1430            T: std::convert::Into<crate::model::Hook>,
1431        {
1432            self.0.request.hook = v.map(|x| x.into());
1433            self
1434        }
1435
1436        /// Sets the value of [hook_id][crate::model::CreateHookRequest::hook_id].
1437        ///
1438        /// This is a **required** field for requests.
1439        pub fn set_hook_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1440            self.0.request.hook_id = v.into();
1441            self
1442        }
1443    }
1444
1445    #[doc(hidden)]
1446    impl crate::RequestBuilder for CreateHook {
1447        fn request_options(&mut self) -> &mut crate::RequestOptions {
1448            &mut self.0.options
1449        }
1450    }
1451
1452    /// The request builder for [SecureSourceManager::update_hook][crate::client::SecureSourceManager::update_hook] calls.
1453    ///
1454    /// # Example
1455    /// ```
1456    /// # use google_cloud_securesourcemanager_v1::builder::secure_source_manager::UpdateHook;
1457    /// # async fn sample() -> google_cloud_securesourcemanager_v1::Result<()> {
1458    /// use google_cloud_lro::Poller;
1459    ///
1460    /// let builder = prepare_request_builder();
1461    /// let response = builder.poller().until_done().await?;
1462    /// # Ok(()) }
1463    ///
1464    /// fn prepare_request_builder() -> UpdateHook {
1465    ///   # panic!();
1466    ///   // ... details omitted ...
1467    /// }
1468    /// ```
1469    #[derive(Clone, Debug)]
1470    pub struct UpdateHook(RequestBuilder<crate::model::UpdateHookRequest>);
1471
1472    impl UpdateHook {
1473        pub(crate) fn new(
1474            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
1475        ) -> Self {
1476            Self(RequestBuilder::new(stub))
1477        }
1478
1479        /// Sets the full request, replacing any prior values.
1480        pub fn with_request<V: Into<crate::model::UpdateHookRequest>>(mut self, v: V) -> Self {
1481            self.0.request = v.into();
1482            self
1483        }
1484
1485        /// Sets all the options, replacing any prior values.
1486        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1487            self.0.options = v.into();
1488            self
1489        }
1490
1491        /// Sends the request.
1492        ///
1493        /// # Long running operations
1494        ///
1495        /// This starts, but does not poll, a longrunning operation. More information
1496        /// on [update_hook][crate::client::SecureSourceManager::update_hook].
1497        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
1498            (*self.0.stub)
1499                .update_hook(self.0.request, self.0.options)
1500                .await
1501                .map(crate::Response::into_body)
1502        }
1503
1504        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_hook`.
1505        pub fn poller(
1506            self,
1507        ) -> impl google_cloud_lro::Poller<crate::model::Hook, crate::model::OperationMetadata>
1508        {
1509            type Operation = google_cloud_lro::internal::Operation<
1510                crate::model::Hook,
1511                crate::model::OperationMetadata,
1512            >;
1513            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1514            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1515            let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
1516            if let Some(ref mut details) = poller_options.tracing {
1517                details.method_name = "google_cloud_securesourcemanager_v1::client::SecureSourceManager::update_hook::until_done";
1518            }
1519
1520            let stub = self.0.stub.clone();
1521            let mut options = self.0.options.clone();
1522            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
1523            let query = move |name| {
1524                let stub = stub.clone();
1525                let options = options.clone();
1526                async {
1527                    let op = GetOperation::new(stub)
1528                        .set_name(name)
1529                        .with_options(options)
1530                        .send()
1531                        .await?;
1532                    Ok(Operation::new(op))
1533                }
1534            };
1535
1536            let start = move || async {
1537                let op = self.send().await?;
1538                Ok(Operation::new(op))
1539            };
1540
1541            use google_cloud_lro::internal::PollerExt;
1542            {
1543                google_cloud_lro::internal::new_poller(
1544                    polling_error_policy,
1545                    polling_backoff_policy,
1546                    start,
1547                    query,
1548                )
1549            }
1550            .with_options(poller_options)
1551        }
1552
1553        /// Sets the value of [update_mask][crate::model::UpdateHookRequest::update_mask].
1554        pub fn set_update_mask<T>(mut self, v: T) -> Self
1555        where
1556            T: std::convert::Into<wkt::FieldMask>,
1557        {
1558            self.0.request.update_mask = std::option::Option::Some(v.into());
1559            self
1560        }
1561
1562        /// Sets or clears the value of [update_mask][crate::model::UpdateHookRequest::update_mask].
1563        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
1564        where
1565            T: std::convert::Into<wkt::FieldMask>,
1566        {
1567            self.0.request.update_mask = v.map(|x| x.into());
1568            self
1569        }
1570
1571        /// Sets the value of [hook][crate::model::UpdateHookRequest::hook].
1572        ///
1573        /// This is a **required** field for requests.
1574        pub fn set_hook<T>(mut self, v: T) -> Self
1575        where
1576            T: std::convert::Into<crate::model::Hook>,
1577        {
1578            self.0.request.hook = std::option::Option::Some(v.into());
1579            self
1580        }
1581
1582        /// Sets or clears the value of [hook][crate::model::UpdateHookRequest::hook].
1583        ///
1584        /// This is a **required** field for requests.
1585        pub fn set_or_clear_hook<T>(mut self, v: std::option::Option<T>) -> Self
1586        where
1587            T: std::convert::Into<crate::model::Hook>,
1588        {
1589            self.0.request.hook = v.map(|x| x.into());
1590            self
1591        }
1592    }
1593
1594    #[doc(hidden)]
1595    impl crate::RequestBuilder for UpdateHook {
1596        fn request_options(&mut self) -> &mut crate::RequestOptions {
1597            &mut self.0.options
1598        }
1599    }
1600
1601    /// The request builder for [SecureSourceManager::delete_hook][crate::client::SecureSourceManager::delete_hook] calls.
1602    ///
1603    /// # Example
1604    /// ```
1605    /// # use google_cloud_securesourcemanager_v1::builder::secure_source_manager::DeleteHook;
1606    /// # async fn sample() -> google_cloud_securesourcemanager_v1::Result<()> {
1607    /// use google_cloud_lro::Poller;
1608    ///
1609    /// let builder = prepare_request_builder();
1610    /// let response = builder.poller().until_done().await?;
1611    /// # Ok(()) }
1612    ///
1613    /// fn prepare_request_builder() -> DeleteHook {
1614    ///   # panic!();
1615    ///   // ... details omitted ...
1616    /// }
1617    /// ```
1618    #[derive(Clone, Debug)]
1619    pub struct DeleteHook(RequestBuilder<crate::model::DeleteHookRequest>);
1620
1621    impl DeleteHook {
1622        pub(crate) fn new(
1623            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
1624        ) -> Self {
1625            Self(RequestBuilder::new(stub))
1626        }
1627
1628        /// Sets the full request, replacing any prior values.
1629        pub fn with_request<V: Into<crate::model::DeleteHookRequest>>(mut self, v: V) -> Self {
1630            self.0.request = v.into();
1631            self
1632        }
1633
1634        /// Sets all the options, replacing any prior values.
1635        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1636            self.0.options = v.into();
1637            self
1638        }
1639
1640        /// Sends the request.
1641        ///
1642        /// # Long running operations
1643        ///
1644        /// This starts, but does not poll, a longrunning operation. More information
1645        /// on [delete_hook][crate::client::SecureSourceManager::delete_hook].
1646        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
1647            (*self.0.stub)
1648                .delete_hook(self.0.request, self.0.options)
1649                .await
1650                .map(crate::Response::into_body)
1651        }
1652
1653        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_hook`.
1654        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
1655            type Operation =
1656                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
1657            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1658            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1659            let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
1660            if let Some(ref mut details) = poller_options.tracing {
1661                details.method_name = "google_cloud_securesourcemanager_v1::client::SecureSourceManager::delete_hook::until_done";
1662            }
1663
1664            let stub = self.0.stub.clone();
1665            let mut options = self.0.options.clone();
1666            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
1667            let query = move |name| {
1668                let stub = stub.clone();
1669                let options = options.clone();
1670                async {
1671                    let op = GetOperation::new(stub)
1672                        .set_name(name)
1673                        .with_options(options)
1674                        .send()
1675                        .await?;
1676                    Ok(Operation::new(op))
1677                }
1678            };
1679
1680            let start = move || async {
1681                let op = self.send().await?;
1682                Ok(Operation::new(op))
1683            };
1684
1685            use google_cloud_lro::internal::PollerExt;
1686            {
1687                google_cloud_lro::internal::new_unit_response_poller(
1688                    polling_error_policy,
1689                    polling_backoff_policy,
1690                    start,
1691                    query,
1692                )
1693            }
1694            .with_options(poller_options)
1695        }
1696
1697        /// Sets the value of [name][crate::model::DeleteHookRequest::name].
1698        ///
1699        /// This is a **required** field for requests.
1700        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1701            self.0.request.name = v.into();
1702            self
1703        }
1704    }
1705
1706    #[doc(hidden)]
1707    impl crate::RequestBuilder for DeleteHook {
1708        fn request_options(&mut self) -> &mut crate::RequestOptions {
1709            &mut self.0.options
1710        }
1711    }
1712
1713    /// The request builder for [SecureSourceManager::get_iam_policy_repo][crate::client::SecureSourceManager::get_iam_policy_repo] calls.
1714    ///
1715    /// # Example
1716    /// ```
1717    /// # use google_cloud_securesourcemanager_v1::builder::secure_source_manager::GetIamPolicyRepo;
1718    /// # async fn sample() -> google_cloud_securesourcemanager_v1::Result<()> {
1719    ///
1720    /// let builder = prepare_request_builder();
1721    /// let response = builder.send().await?;
1722    /// # Ok(()) }
1723    ///
1724    /// fn prepare_request_builder() -> GetIamPolicyRepo {
1725    ///   # panic!();
1726    ///   // ... details omitted ...
1727    /// }
1728    /// ```
1729    #[derive(Clone, Debug)]
1730    pub struct GetIamPolicyRepo(RequestBuilder<google_cloud_iam_v1::model::GetIamPolicyRequest>);
1731
1732    impl GetIamPolicyRepo {
1733        pub(crate) fn new(
1734            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
1735        ) -> Self {
1736            Self(RequestBuilder::new(stub))
1737        }
1738
1739        /// Sets the full request, replacing any prior values.
1740        pub fn with_request<V: Into<google_cloud_iam_v1::model::GetIamPolicyRequest>>(
1741            mut self,
1742            v: V,
1743        ) -> Self {
1744            self.0.request = v.into();
1745            self
1746        }
1747
1748        /// Sets all the options, replacing any prior values.
1749        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1750            self.0.options = v.into();
1751            self
1752        }
1753
1754        /// Sends the request.
1755        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
1756            (*self.0.stub)
1757                .get_iam_policy_repo(self.0.request, self.0.options)
1758                .await
1759                .map(crate::Response::into_body)
1760        }
1761
1762        /// Sets the value of [resource][google_cloud_iam_v1::model::GetIamPolicyRequest::resource].
1763        ///
1764        /// This is a **required** field for requests.
1765        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
1766            self.0.request.resource = v.into();
1767            self
1768        }
1769
1770        /// Sets the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
1771        pub fn set_options<T>(mut self, v: T) -> Self
1772        where
1773            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
1774        {
1775            self.0.request.options = std::option::Option::Some(v.into());
1776            self
1777        }
1778
1779        /// Sets or clears the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
1780        pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
1781        where
1782            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
1783        {
1784            self.0.request.options = v.map(|x| x.into());
1785            self
1786        }
1787    }
1788
1789    #[doc(hidden)]
1790    impl crate::RequestBuilder for GetIamPolicyRepo {
1791        fn request_options(&mut self) -> &mut crate::RequestOptions {
1792            &mut self.0.options
1793        }
1794    }
1795
1796    /// The request builder for [SecureSourceManager::set_iam_policy_repo][crate::client::SecureSourceManager::set_iam_policy_repo] calls.
1797    ///
1798    /// # Example
1799    /// ```
1800    /// # use google_cloud_securesourcemanager_v1::builder::secure_source_manager::SetIamPolicyRepo;
1801    /// # async fn sample() -> google_cloud_securesourcemanager_v1::Result<()> {
1802    ///
1803    /// let builder = prepare_request_builder();
1804    /// let response = builder.send().await?;
1805    /// # Ok(()) }
1806    ///
1807    /// fn prepare_request_builder() -> SetIamPolicyRepo {
1808    ///   # panic!();
1809    ///   // ... details omitted ...
1810    /// }
1811    /// ```
1812    #[derive(Clone, Debug)]
1813    pub struct SetIamPolicyRepo(RequestBuilder<google_cloud_iam_v1::model::SetIamPolicyRequest>);
1814
1815    impl SetIamPolicyRepo {
1816        pub(crate) fn new(
1817            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
1818        ) -> Self {
1819            Self(RequestBuilder::new(stub))
1820        }
1821
1822        /// Sets the full request, replacing any prior values.
1823        pub fn with_request<V: Into<google_cloud_iam_v1::model::SetIamPolicyRequest>>(
1824            mut self,
1825            v: V,
1826        ) -> Self {
1827            self.0.request = v.into();
1828            self
1829        }
1830
1831        /// Sets all the options, replacing any prior values.
1832        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1833            self.0.options = v.into();
1834            self
1835        }
1836
1837        /// Sends the request.
1838        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
1839            (*self.0.stub)
1840                .set_iam_policy_repo(self.0.request, self.0.options)
1841                .await
1842                .map(crate::Response::into_body)
1843        }
1844
1845        /// Sets the value of [resource][google_cloud_iam_v1::model::SetIamPolicyRequest::resource].
1846        ///
1847        /// This is a **required** field for requests.
1848        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
1849            self.0.request.resource = v.into();
1850            self
1851        }
1852
1853        /// Sets the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
1854        ///
1855        /// This is a **required** field for requests.
1856        pub fn set_policy<T>(mut self, v: T) -> Self
1857        where
1858            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
1859        {
1860            self.0.request.policy = std::option::Option::Some(v.into());
1861            self
1862        }
1863
1864        /// Sets or clears the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
1865        ///
1866        /// This is a **required** field for requests.
1867        pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
1868        where
1869            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
1870        {
1871            self.0.request.policy = v.map(|x| x.into());
1872            self
1873        }
1874
1875        /// Sets the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
1876        pub fn set_update_mask<T>(mut self, v: T) -> Self
1877        where
1878            T: std::convert::Into<wkt::FieldMask>,
1879        {
1880            self.0.request.update_mask = std::option::Option::Some(v.into());
1881            self
1882        }
1883
1884        /// Sets or clears the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
1885        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
1886        where
1887            T: std::convert::Into<wkt::FieldMask>,
1888        {
1889            self.0.request.update_mask = v.map(|x| x.into());
1890            self
1891        }
1892    }
1893
1894    #[doc(hidden)]
1895    impl crate::RequestBuilder for SetIamPolicyRepo {
1896        fn request_options(&mut self) -> &mut crate::RequestOptions {
1897            &mut self.0.options
1898        }
1899    }
1900
1901    /// The request builder for [SecureSourceManager::test_iam_permissions_repo][crate::client::SecureSourceManager::test_iam_permissions_repo] calls.
1902    ///
1903    /// # Example
1904    /// ```
1905    /// # use google_cloud_securesourcemanager_v1::builder::secure_source_manager::TestIamPermissionsRepo;
1906    /// # async fn sample() -> google_cloud_securesourcemanager_v1::Result<()> {
1907    ///
1908    /// let builder = prepare_request_builder();
1909    /// let response = builder.send().await?;
1910    /// # Ok(()) }
1911    ///
1912    /// fn prepare_request_builder() -> TestIamPermissionsRepo {
1913    ///   # panic!();
1914    ///   // ... details omitted ...
1915    /// }
1916    /// ```
1917    #[derive(Clone, Debug)]
1918    pub struct TestIamPermissionsRepo(
1919        RequestBuilder<google_cloud_iam_v1::model::TestIamPermissionsRequest>,
1920    );
1921
1922    impl TestIamPermissionsRepo {
1923        pub(crate) fn new(
1924            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
1925        ) -> Self {
1926            Self(RequestBuilder::new(stub))
1927        }
1928
1929        /// Sets the full request, replacing any prior values.
1930        pub fn with_request<V: Into<google_cloud_iam_v1::model::TestIamPermissionsRequest>>(
1931            mut self,
1932            v: V,
1933        ) -> Self {
1934            self.0.request = v.into();
1935            self
1936        }
1937
1938        /// Sets all the options, replacing any prior values.
1939        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1940            self.0.options = v.into();
1941            self
1942        }
1943
1944        /// Sends the request.
1945        pub async fn send(self) -> Result<google_cloud_iam_v1::model::TestIamPermissionsResponse> {
1946            (*self.0.stub)
1947                .test_iam_permissions_repo(self.0.request, self.0.options)
1948                .await
1949                .map(crate::Response::into_body)
1950        }
1951
1952        /// Sets the value of [resource][google_cloud_iam_v1::model::TestIamPermissionsRequest::resource].
1953        ///
1954        /// This is a **required** field for requests.
1955        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
1956            self.0.request.resource = v.into();
1957            self
1958        }
1959
1960        /// Sets the value of [permissions][google_cloud_iam_v1::model::TestIamPermissionsRequest::permissions].
1961        ///
1962        /// This is a **required** field for requests.
1963        pub fn set_permissions<T, V>(mut self, v: T) -> Self
1964        where
1965            T: std::iter::IntoIterator<Item = V>,
1966            V: std::convert::Into<std::string::String>,
1967        {
1968            use std::iter::Iterator;
1969            self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
1970            self
1971        }
1972    }
1973
1974    #[doc(hidden)]
1975    impl crate::RequestBuilder for TestIamPermissionsRepo {
1976        fn request_options(&mut self) -> &mut crate::RequestOptions {
1977            &mut self.0.options
1978        }
1979    }
1980
1981    /// The request builder for [SecureSourceManager::create_branch_rule][crate::client::SecureSourceManager::create_branch_rule] calls.
1982    ///
1983    /// # Example
1984    /// ```
1985    /// # use google_cloud_securesourcemanager_v1::builder::secure_source_manager::CreateBranchRule;
1986    /// # async fn sample() -> google_cloud_securesourcemanager_v1::Result<()> {
1987    /// use google_cloud_lro::Poller;
1988    ///
1989    /// let builder = prepare_request_builder();
1990    /// let response = builder.poller().until_done().await?;
1991    /// # Ok(()) }
1992    ///
1993    /// fn prepare_request_builder() -> CreateBranchRule {
1994    ///   # panic!();
1995    ///   // ... details omitted ...
1996    /// }
1997    /// ```
1998    #[derive(Clone, Debug)]
1999    pub struct CreateBranchRule(RequestBuilder<crate::model::CreateBranchRuleRequest>);
2000
2001    impl CreateBranchRule {
2002        pub(crate) fn new(
2003            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
2004        ) -> Self {
2005            Self(RequestBuilder::new(stub))
2006        }
2007
2008        /// Sets the full request, replacing any prior values.
2009        pub fn with_request<V: Into<crate::model::CreateBranchRuleRequest>>(
2010            mut self,
2011            v: V,
2012        ) -> Self {
2013            self.0.request = v.into();
2014            self
2015        }
2016
2017        /// Sets all the options, replacing any prior values.
2018        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2019            self.0.options = v.into();
2020            self
2021        }
2022
2023        /// Sends the request.
2024        ///
2025        /// # Long running operations
2026        ///
2027        /// This starts, but does not poll, a longrunning operation. More information
2028        /// on [create_branch_rule][crate::client::SecureSourceManager::create_branch_rule].
2029        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
2030            (*self.0.stub)
2031                .create_branch_rule(self.0.request, self.0.options)
2032                .await
2033                .map(crate::Response::into_body)
2034        }
2035
2036        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_branch_rule`.
2037        pub fn poller(
2038            self,
2039        ) -> impl google_cloud_lro::Poller<crate::model::BranchRule, crate::model::OperationMetadata>
2040        {
2041            type Operation = google_cloud_lro::internal::Operation<
2042                crate::model::BranchRule,
2043                crate::model::OperationMetadata,
2044            >;
2045            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2046            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2047            let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
2048            if let Some(ref mut details) = poller_options.tracing {
2049                details.method_name = "google_cloud_securesourcemanager_v1::client::SecureSourceManager::create_branch_rule::until_done";
2050            }
2051
2052            let stub = self.0.stub.clone();
2053            let mut options = self.0.options.clone();
2054            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
2055            let query = move |name| {
2056                let stub = stub.clone();
2057                let options = options.clone();
2058                async {
2059                    let op = GetOperation::new(stub)
2060                        .set_name(name)
2061                        .with_options(options)
2062                        .send()
2063                        .await?;
2064                    Ok(Operation::new(op))
2065                }
2066            };
2067
2068            let start = move || async {
2069                let op = self.send().await?;
2070                Ok(Operation::new(op))
2071            };
2072
2073            use google_cloud_lro::internal::PollerExt;
2074            {
2075                google_cloud_lro::internal::new_poller(
2076                    polling_error_policy,
2077                    polling_backoff_policy,
2078                    start,
2079                    query,
2080                )
2081            }
2082            .with_options(poller_options)
2083        }
2084
2085        /// Sets the value of [parent][crate::model::CreateBranchRuleRequest::parent].
2086        ///
2087        /// This is a **required** field for requests.
2088        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2089            self.0.request.parent = v.into();
2090            self
2091        }
2092
2093        /// Sets the value of [branch_rule][crate::model::CreateBranchRuleRequest::branch_rule].
2094        ///
2095        /// This is a **required** field for requests.
2096        pub fn set_branch_rule<T>(mut self, v: T) -> Self
2097        where
2098            T: std::convert::Into<crate::model::BranchRule>,
2099        {
2100            self.0.request.branch_rule = std::option::Option::Some(v.into());
2101            self
2102        }
2103
2104        /// Sets or clears the value of [branch_rule][crate::model::CreateBranchRuleRequest::branch_rule].
2105        ///
2106        /// This is a **required** field for requests.
2107        pub fn set_or_clear_branch_rule<T>(mut self, v: std::option::Option<T>) -> Self
2108        where
2109            T: std::convert::Into<crate::model::BranchRule>,
2110        {
2111            self.0.request.branch_rule = v.map(|x| x.into());
2112            self
2113        }
2114
2115        /// Sets the value of [branch_rule_id][crate::model::CreateBranchRuleRequest::branch_rule_id].
2116        ///
2117        /// This is a **required** field for requests.
2118        pub fn set_branch_rule_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2119            self.0.request.branch_rule_id = v.into();
2120            self
2121        }
2122    }
2123
2124    #[doc(hidden)]
2125    impl crate::RequestBuilder for CreateBranchRule {
2126        fn request_options(&mut self) -> &mut crate::RequestOptions {
2127            &mut self.0.options
2128        }
2129    }
2130
2131    /// The request builder for [SecureSourceManager::list_branch_rules][crate::client::SecureSourceManager::list_branch_rules] calls.
2132    ///
2133    /// # Example
2134    /// ```
2135    /// # use google_cloud_securesourcemanager_v1::builder::secure_source_manager::ListBranchRules;
2136    /// # async fn sample() -> google_cloud_securesourcemanager_v1::Result<()> {
2137    /// use google_cloud_gax::paginator::ItemPaginator;
2138    ///
2139    /// let builder = prepare_request_builder();
2140    /// let mut items = builder.by_item();
2141    /// while let Some(result) = items.next().await {
2142    ///   let item = result?;
2143    /// }
2144    /// # Ok(()) }
2145    ///
2146    /// fn prepare_request_builder() -> ListBranchRules {
2147    ///   # panic!();
2148    ///   // ... details omitted ...
2149    /// }
2150    /// ```
2151    #[derive(Clone, Debug)]
2152    pub struct ListBranchRules(RequestBuilder<crate::model::ListBranchRulesRequest>);
2153
2154    impl ListBranchRules {
2155        pub(crate) fn new(
2156            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
2157        ) -> Self {
2158            Self(RequestBuilder::new(stub))
2159        }
2160
2161        /// Sets the full request, replacing any prior values.
2162        pub fn with_request<V: Into<crate::model::ListBranchRulesRequest>>(mut self, v: V) -> Self {
2163            self.0.request = v.into();
2164            self
2165        }
2166
2167        /// Sets all the options, replacing any prior values.
2168        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2169            self.0.options = v.into();
2170            self
2171        }
2172
2173        /// Sends the request.
2174        pub async fn send(self) -> Result<crate::model::ListBranchRulesResponse> {
2175            (*self.0.stub)
2176                .list_branch_rules(self.0.request, self.0.options)
2177                .await
2178                .map(crate::Response::into_body)
2179        }
2180
2181        /// Streams each page in the collection.
2182        pub fn by_page(
2183            self,
2184        ) -> impl google_cloud_gax::paginator::Paginator<
2185            crate::model::ListBranchRulesResponse,
2186            crate::Error,
2187        > {
2188            use std::clone::Clone;
2189            let token = self.0.request.page_token.clone();
2190            let execute = move |token: String| {
2191                let mut builder = self.clone();
2192                builder.0.request = builder.0.request.set_page_token(token);
2193                builder.send()
2194            };
2195            google_cloud_gax::paginator::internal::new_paginator(token, execute)
2196        }
2197
2198        /// Streams each item in the collection.
2199        pub fn by_item(
2200            self,
2201        ) -> impl google_cloud_gax::paginator::ItemPaginator<
2202            crate::model::ListBranchRulesResponse,
2203            crate::Error,
2204        > {
2205            use google_cloud_gax::paginator::Paginator;
2206            self.by_page().items()
2207        }
2208
2209        /// Sets the value of [parent][crate::model::ListBranchRulesRequest::parent].
2210        ///
2211        /// This is a **required** field for requests.
2212        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2213            self.0.request.parent = v.into();
2214            self
2215        }
2216
2217        /// Sets the value of [page_size][crate::model::ListBranchRulesRequest::page_size].
2218        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2219            self.0.request.page_size = v.into();
2220            self
2221        }
2222
2223        /// Sets the value of [page_token][crate::model::ListBranchRulesRequest::page_token].
2224        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2225            self.0.request.page_token = v.into();
2226            self
2227        }
2228    }
2229
2230    #[doc(hidden)]
2231    impl crate::RequestBuilder for ListBranchRules {
2232        fn request_options(&mut self) -> &mut crate::RequestOptions {
2233            &mut self.0.options
2234        }
2235    }
2236
2237    /// The request builder for [SecureSourceManager::get_branch_rule][crate::client::SecureSourceManager::get_branch_rule] calls.
2238    ///
2239    /// # Example
2240    /// ```
2241    /// # use google_cloud_securesourcemanager_v1::builder::secure_source_manager::GetBranchRule;
2242    /// # async fn sample() -> google_cloud_securesourcemanager_v1::Result<()> {
2243    ///
2244    /// let builder = prepare_request_builder();
2245    /// let response = builder.send().await?;
2246    /// # Ok(()) }
2247    ///
2248    /// fn prepare_request_builder() -> GetBranchRule {
2249    ///   # panic!();
2250    ///   // ... details omitted ...
2251    /// }
2252    /// ```
2253    #[derive(Clone, Debug)]
2254    pub struct GetBranchRule(RequestBuilder<crate::model::GetBranchRuleRequest>);
2255
2256    impl GetBranchRule {
2257        pub(crate) fn new(
2258            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
2259        ) -> Self {
2260            Self(RequestBuilder::new(stub))
2261        }
2262
2263        /// Sets the full request, replacing any prior values.
2264        pub fn with_request<V: Into<crate::model::GetBranchRuleRequest>>(mut self, v: V) -> Self {
2265            self.0.request = v.into();
2266            self
2267        }
2268
2269        /// Sets all the options, replacing any prior values.
2270        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2271            self.0.options = v.into();
2272            self
2273        }
2274
2275        /// Sends the request.
2276        pub async fn send(self) -> Result<crate::model::BranchRule> {
2277            (*self.0.stub)
2278                .get_branch_rule(self.0.request, self.0.options)
2279                .await
2280                .map(crate::Response::into_body)
2281        }
2282
2283        /// Sets the value of [name][crate::model::GetBranchRuleRequest::name].
2284        ///
2285        /// This is a **required** field for requests.
2286        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2287            self.0.request.name = v.into();
2288            self
2289        }
2290    }
2291
2292    #[doc(hidden)]
2293    impl crate::RequestBuilder for GetBranchRule {
2294        fn request_options(&mut self) -> &mut crate::RequestOptions {
2295            &mut self.0.options
2296        }
2297    }
2298
2299    /// The request builder for [SecureSourceManager::update_branch_rule][crate::client::SecureSourceManager::update_branch_rule] calls.
2300    ///
2301    /// # Example
2302    /// ```
2303    /// # use google_cloud_securesourcemanager_v1::builder::secure_source_manager::UpdateBranchRule;
2304    /// # async fn sample() -> google_cloud_securesourcemanager_v1::Result<()> {
2305    /// use google_cloud_lro::Poller;
2306    ///
2307    /// let builder = prepare_request_builder();
2308    /// let response = builder.poller().until_done().await?;
2309    /// # Ok(()) }
2310    ///
2311    /// fn prepare_request_builder() -> UpdateBranchRule {
2312    ///   # panic!();
2313    ///   // ... details omitted ...
2314    /// }
2315    /// ```
2316    #[derive(Clone, Debug)]
2317    pub struct UpdateBranchRule(RequestBuilder<crate::model::UpdateBranchRuleRequest>);
2318
2319    impl UpdateBranchRule {
2320        pub(crate) fn new(
2321            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
2322        ) -> Self {
2323            Self(RequestBuilder::new(stub))
2324        }
2325
2326        /// Sets the full request, replacing any prior values.
2327        pub fn with_request<V: Into<crate::model::UpdateBranchRuleRequest>>(
2328            mut self,
2329            v: V,
2330        ) -> Self {
2331            self.0.request = v.into();
2332            self
2333        }
2334
2335        /// Sets all the options, replacing any prior values.
2336        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2337            self.0.options = v.into();
2338            self
2339        }
2340
2341        /// Sends the request.
2342        ///
2343        /// # Long running operations
2344        ///
2345        /// This starts, but does not poll, a longrunning operation. More information
2346        /// on [update_branch_rule][crate::client::SecureSourceManager::update_branch_rule].
2347        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
2348            (*self.0.stub)
2349                .update_branch_rule(self.0.request, self.0.options)
2350                .await
2351                .map(crate::Response::into_body)
2352        }
2353
2354        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_branch_rule`.
2355        pub fn poller(
2356            self,
2357        ) -> impl google_cloud_lro::Poller<crate::model::BranchRule, crate::model::OperationMetadata>
2358        {
2359            type Operation = google_cloud_lro::internal::Operation<
2360                crate::model::BranchRule,
2361                crate::model::OperationMetadata,
2362            >;
2363            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2364            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2365            let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
2366            if let Some(ref mut details) = poller_options.tracing {
2367                details.method_name = "google_cloud_securesourcemanager_v1::client::SecureSourceManager::update_branch_rule::until_done";
2368            }
2369
2370            let stub = self.0.stub.clone();
2371            let mut options = self.0.options.clone();
2372            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
2373            let query = move |name| {
2374                let stub = stub.clone();
2375                let options = options.clone();
2376                async {
2377                    let op = GetOperation::new(stub)
2378                        .set_name(name)
2379                        .with_options(options)
2380                        .send()
2381                        .await?;
2382                    Ok(Operation::new(op))
2383                }
2384            };
2385
2386            let start = move || async {
2387                let op = self.send().await?;
2388                Ok(Operation::new(op))
2389            };
2390
2391            use google_cloud_lro::internal::PollerExt;
2392            {
2393                google_cloud_lro::internal::new_poller(
2394                    polling_error_policy,
2395                    polling_backoff_policy,
2396                    start,
2397                    query,
2398                )
2399            }
2400            .with_options(poller_options)
2401        }
2402
2403        /// Sets the value of [branch_rule][crate::model::UpdateBranchRuleRequest::branch_rule].
2404        ///
2405        /// This is a **required** field for requests.
2406        pub fn set_branch_rule<T>(mut self, v: T) -> Self
2407        where
2408            T: std::convert::Into<crate::model::BranchRule>,
2409        {
2410            self.0.request.branch_rule = std::option::Option::Some(v.into());
2411            self
2412        }
2413
2414        /// Sets or clears the value of [branch_rule][crate::model::UpdateBranchRuleRequest::branch_rule].
2415        ///
2416        /// This is a **required** field for requests.
2417        pub fn set_or_clear_branch_rule<T>(mut self, v: std::option::Option<T>) -> Self
2418        where
2419            T: std::convert::Into<crate::model::BranchRule>,
2420        {
2421            self.0.request.branch_rule = v.map(|x| x.into());
2422            self
2423        }
2424
2425        /// Sets the value of [validate_only][crate::model::UpdateBranchRuleRequest::validate_only].
2426        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
2427            self.0.request.validate_only = v.into();
2428            self
2429        }
2430
2431        /// Sets the value of [update_mask][crate::model::UpdateBranchRuleRequest::update_mask].
2432        pub fn set_update_mask<T>(mut self, v: T) -> Self
2433        where
2434            T: std::convert::Into<wkt::FieldMask>,
2435        {
2436            self.0.request.update_mask = std::option::Option::Some(v.into());
2437            self
2438        }
2439
2440        /// Sets or clears the value of [update_mask][crate::model::UpdateBranchRuleRequest::update_mask].
2441        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
2442        where
2443            T: std::convert::Into<wkt::FieldMask>,
2444        {
2445            self.0.request.update_mask = v.map(|x| x.into());
2446            self
2447        }
2448    }
2449
2450    #[doc(hidden)]
2451    impl crate::RequestBuilder for UpdateBranchRule {
2452        fn request_options(&mut self) -> &mut crate::RequestOptions {
2453            &mut self.0.options
2454        }
2455    }
2456
2457    /// The request builder for [SecureSourceManager::delete_branch_rule][crate::client::SecureSourceManager::delete_branch_rule] calls.
2458    ///
2459    /// # Example
2460    /// ```
2461    /// # use google_cloud_securesourcemanager_v1::builder::secure_source_manager::DeleteBranchRule;
2462    /// # async fn sample() -> google_cloud_securesourcemanager_v1::Result<()> {
2463    /// use google_cloud_lro::Poller;
2464    ///
2465    /// let builder = prepare_request_builder();
2466    /// let response = builder.poller().until_done().await?;
2467    /// # Ok(()) }
2468    ///
2469    /// fn prepare_request_builder() -> DeleteBranchRule {
2470    ///   # panic!();
2471    ///   // ... details omitted ...
2472    /// }
2473    /// ```
2474    #[derive(Clone, Debug)]
2475    pub struct DeleteBranchRule(RequestBuilder<crate::model::DeleteBranchRuleRequest>);
2476
2477    impl DeleteBranchRule {
2478        pub(crate) fn new(
2479            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
2480        ) -> Self {
2481            Self(RequestBuilder::new(stub))
2482        }
2483
2484        /// Sets the full request, replacing any prior values.
2485        pub fn with_request<V: Into<crate::model::DeleteBranchRuleRequest>>(
2486            mut self,
2487            v: V,
2488        ) -> Self {
2489            self.0.request = v.into();
2490            self
2491        }
2492
2493        /// Sets all the options, replacing any prior values.
2494        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2495            self.0.options = v.into();
2496            self
2497        }
2498
2499        /// Sends the request.
2500        ///
2501        /// # Long running operations
2502        ///
2503        /// This starts, but does not poll, a longrunning operation. More information
2504        /// on [delete_branch_rule][crate::client::SecureSourceManager::delete_branch_rule].
2505        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
2506            (*self.0.stub)
2507                .delete_branch_rule(self.0.request, self.0.options)
2508                .await
2509                .map(crate::Response::into_body)
2510        }
2511
2512        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_branch_rule`.
2513        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
2514            type Operation =
2515                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
2516            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2517            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2518            let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
2519            if let Some(ref mut details) = poller_options.tracing {
2520                details.method_name = "google_cloud_securesourcemanager_v1::client::SecureSourceManager::delete_branch_rule::until_done";
2521            }
2522
2523            let stub = self.0.stub.clone();
2524            let mut options = self.0.options.clone();
2525            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
2526            let query = move |name| {
2527                let stub = stub.clone();
2528                let options = options.clone();
2529                async {
2530                    let op = GetOperation::new(stub)
2531                        .set_name(name)
2532                        .with_options(options)
2533                        .send()
2534                        .await?;
2535                    Ok(Operation::new(op))
2536                }
2537            };
2538
2539            let start = move || async {
2540                let op = self.send().await?;
2541                Ok(Operation::new(op))
2542            };
2543
2544            use google_cloud_lro::internal::PollerExt;
2545            {
2546                google_cloud_lro::internal::new_unit_response_poller(
2547                    polling_error_policy,
2548                    polling_backoff_policy,
2549                    start,
2550                    query,
2551                )
2552            }
2553            .with_options(poller_options)
2554        }
2555
2556        /// Sets the value of [name][crate::model::DeleteBranchRuleRequest::name].
2557        ///
2558        /// This is a **required** field for requests.
2559        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2560            self.0.request.name = v.into();
2561            self
2562        }
2563
2564        /// Sets the value of [allow_missing][crate::model::DeleteBranchRuleRequest::allow_missing].
2565        pub fn set_allow_missing<T: Into<bool>>(mut self, v: T) -> Self {
2566            self.0.request.allow_missing = v.into();
2567            self
2568        }
2569    }
2570
2571    #[doc(hidden)]
2572    impl crate::RequestBuilder for DeleteBranchRule {
2573        fn request_options(&mut self) -> &mut crate::RequestOptions {
2574            &mut self.0.options
2575        }
2576    }
2577
2578    /// The request builder for [SecureSourceManager::create_pull_request][crate::client::SecureSourceManager::create_pull_request] calls.
2579    ///
2580    /// # Example
2581    /// ```
2582    /// # use google_cloud_securesourcemanager_v1::builder::secure_source_manager::CreatePullRequest;
2583    /// # async fn sample() -> google_cloud_securesourcemanager_v1::Result<()> {
2584    /// use google_cloud_lro::Poller;
2585    ///
2586    /// let builder = prepare_request_builder();
2587    /// let response = builder.poller().until_done().await?;
2588    /// # Ok(()) }
2589    ///
2590    /// fn prepare_request_builder() -> CreatePullRequest {
2591    ///   # panic!();
2592    ///   // ... details omitted ...
2593    /// }
2594    /// ```
2595    #[derive(Clone, Debug)]
2596    pub struct CreatePullRequest(RequestBuilder<crate::model::CreatePullRequestRequest>);
2597
2598    impl CreatePullRequest {
2599        pub(crate) fn new(
2600            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
2601        ) -> Self {
2602            Self(RequestBuilder::new(stub))
2603        }
2604
2605        /// Sets the full request, replacing any prior values.
2606        pub fn with_request<V: Into<crate::model::CreatePullRequestRequest>>(
2607            mut self,
2608            v: V,
2609        ) -> Self {
2610            self.0.request = v.into();
2611            self
2612        }
2613
2614        /// Sets all the options, replacing any prior values.
2615        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2616            self.0.options = v.into();
2617            self
2618        }
2619
2620        /// Sends the request.
2621        ///
2622        /// # Long running operations
2623        ///
2624        /// This starts, but does not poll, a longrunning operation. More information
2625        /// on [create_pull_request][crate::client::SecureSourceManager::create_pull_request].
2626        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
2627            (*self.0.stub)
2628                .create_pull_request(self.0.request, self.0.options)
2629                .await
2630                .map(crate::Response::into_body)
2631        }
2632
2633        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_pull_request`.
2634        pub fn poller(
2635            self,
2636        ) -> impl google_cloud_lro::Poller<crate::model::PullRequest, crate::model::OperationMetadata>
2637        {
2638            type Operation = google_cloud_lro::internal::Operation<
2639                crate::model::PullRequest,
2640                crate::model::OperationMetadata,
2641            >;
2642            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2643            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2644            let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
2645            if let Some(ref mut details) = poller_options.tracing {
2646                details.method_name = "google_cloud_securesourcemanager_v1::client::SecureSourceManager::create_pull_request::until_done";
2647            }
2648
2649            let stub = self.0.stub.clone();
2650            let mut options = self.0.options.clone();
2651            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
2652            let query = move |name| {
2653                let stub = stub.clone();
2654                let options = options.clone();
2655                async {
2656                    let op = GetOperation::new(stub)
2657                        .set_name(name)
2658                        .with_options(options)
2659                        .send()
2660                        .await?;
2661                    Ok(Operation::new(op))
2662                }
2663            };
2664
2665            let start = move || async {
2666                let op = self.send().await?;
2667                Ok(Operation::new(op))
2668            };
2669
2670            use google_cloud_lro::internal::PollerExt;
2671            {
2672                google_cloud_lro::internal::new_poller(
2673                    polling_error_policy,
2674                    polling_backoff_policy,
2675                    start,
2676                    query,
2677                )
2678            }
2679            .with_options(poller_options)
2680        }
2681
2682        /// Sets the value of [parent][crate::model::CreatePullRequestRequest::parent].
2683        ///
2684        /// This is a **required** field for requests.
2685        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2686            self.0.request.parent = v.into();
2687            self
2688        }
2689
2690        /// Sets the value of [pull_request][crate::model::CreatePullRequestRequest::pull_request].
2691        ///
2692        /// This is a **required** field for requests.
2693        pub fn set_pull_request<T>(mut self, v: T) -> Self
2694        where
2695            T: std::convert::Into<crate::model::PullRequest>,
2696        {
2697            self.0.request.pull_request = std::option::Option::Some(v.into());
2698            self
2699        }
2700
2701        /// Sets or clears the value of [pull_request][crate::model::CreatePullRequestRequest::pull_request].
2702        ///
2703        /// This is a **required** field for requests.
2704        pub fn set_or_clear_pull_request<T>(mut self, v: std::option::Option<T>) -> Self
2705        where
2706            T: std::convert::Into<crate::model::PullRequest>,
2707        {
2708            self.0.request.pull_request = v.map(|x| x.into());
2709            self
2710        }
2711    }
2712
2713    #[doc(hidden)]
2714    impl crate::RequestBuilder for CreatePullRequest {
2715        fn request_options(&mut self) -> &mut crate::RequestOptions {
2716            &mut self.0.options
2717        }
2718    }
2719
2720    /// The request builder for [SecureSourceManager::get_pull_request][crate::client::SecureSourceManager::get_pull_request] calls.
2721    ///
2722    /// # Example
2723    /// ```
2724    /// # use google_cloud_securesourcemanager_v1::builder::secure_source_manager::GetPullRequest;
2725    /// # async fn sample() -> google_cloud_securesourcemanager_v1::Result<()> {
2726    ///
2727    /// let builder = prepare_request_builder();
2728    /// let response = builder.send().await?;
2729    /// # Ok(()) }
2730    ///
2731    /// fn prepare_request_builder() -> GetPullRequest {
2732    ///   # panic!();
2733    ///   // ... details omitted ...
2734    /// }
2735    /// ```
2736    #[derive(Clone, Debug)]
2737    pub struct GetPullRequest(RequestBuilder<crate::model::GetPullRequestRequest>);
2738
2739    impl GetPullRequest {
2740        pub(crate) fn new(
2741            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
2742        ) -> Self {
2743            Self(RequestBuilder::new(stub))
2744        }
2745
2746        /// Sets the full request, replacing any prior values.
2747        pub fn with_request<V: Into<crate::model::GetPullRequestRequest>>(mut self, v: V) -> Self {
2748            self.0.request = v.into();
2749            self
2750        }
2751
2752        /// Sets all the options, replacing any prior values.
2753        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2754            self.0.options = v.into();
2755            self
2756        }
2757
2758        /// Sends the request.
2759        pub async fn send(self) -> Result<crate::model::PullRequest> {
2760            (*self.0.stub)
2761                .get_pull_request(self.0.request, self.0.options)
2762                .await
2763                .map(crate::Response::into_body)
2764        }
2765
2766        /// Sets the value of [name][crate::model::GetPullRequestRequest::name].
2767        ///
2768        /// This is a **required** field for requests.
2769        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2770            self.0.request.name = v.into();
2771            self
2772        }
2773    }
2774
2775    #[doc(hidden)]
2776    impl crate::RequestBuilder for GetPullRequest {
2777        fn request_options(&mut self) -> &mut crate::RequestOptions {
2778            &mut self.0.options
2779        }
2780    }
2781
2782    /// The request builder for [SecureSourceManager::list_pull_requests][crate::client::SecureSourceManager::list_pull_requests] calls.
2783    ///
2784    /// # Example
2785    /// ```
2786    /// # use google_cloud_securesourcemanager_v1::builder::secure_source_manager::ListPullRequests;
2787    /// # async fn sample() -> google_cloud_securesourcemanager_v1::Result<()> {
2788    /// use google_cloud_gax::paginator::ItemPaginator;
2789    ///
2790    /// let builder = prepare_request_builder();
2791    /// let mut items = builder.by_item();
2792    /// while let Some(result) = items.next().await {
2793    ///   let item = result?;
2794    /// }
2795    /// # Ok(()) }
2796    ///
2797    /// fn prepare_request_builder() -> ListPullRequests {
2798    ///   # panic!();
2799    ///   // ... details omitted ...
2800    /// }
2801    /// ```
2802    #[derive(Clone, Debug)]
2803    pub struct ListPullRequests(RequestBuilder<crate::model::ListPullRequestsRequest>);
2804
2805    impl ListPullRequests {
2806        pub(crate) fn new(
2807            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
2808        ) -> Self {
2809            Self(RequestBuilder::new(stub))
2810        }
2811
2812        /// Sets the full request, replacing any prior values.
2813        pub fn with_request<V: Into<crate::model::ListPullRequestsRequest>>(
2814            mut self,
2815            v: V,
2816        ) -> Self {
2817            self.0.request = v.into();
2818            self
2819        }
2820
2821        /// Sets all the options, replacing any prior values.
2822        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2823            self.0.options = v.into();
2824            self
2825        }
2826
2827        /// Sends the request.
2828        pub async fn send(self) -> Result<crate::model::ListPullRequestsResponse> {
2829            (*self.0.stub)
2830                .list_pull_requests(self.0.request, self.0.options)
2831                .await
2832                .map(crate::Response::into_body)
2833        }
2834
2835        /// Streams each page in the collection.
2836        pub fn by_page(
2837            self,
2838        ) -> impl google_cloud_gax::paginator::Paginator<
2839            crate::model::ListPullRequestsResponse,
2840            crate::Error,
2841        > {
2842            use std::clone::Clone;
2843            let token = self.0.request.page_token.clone();
2844            let execute = move |token: String| {
2845                let mut builder = self.clone();
2846                builder.0.request = builder.0.request.set_page_token(token);
2847                builder.send()
2848            };
2849            google_cloud_gax::paginator::internal::new_paginator(token, execute)
2850        }
2851
2852        /// Streams each item in the collection.
2853        pub fn by_item(
2854            self,
2855        ) -> impl google_cloud_gax::paginator::ItemPaginator<
2856            crate::model::ListPullRequestsResponse,
2857            crate::Error,
2858        > {
2859            use google_cloud_gax::paginator::Paginator;
2860            self.by_page().items()
2861        }
2862
2863        /// Sets the value of [parent][crate::model::ListPullRequestsRequest::parent].
2864        ///
2865        /// This is a **required** field for requests.
2866        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2867            self.0.request.parent = v.into();
2868            self
2869        }
2870
2871        /// Sets the value of [page_size][crate::model::ListPullRequestsRequest::page_size].
2872        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2873            self.0.request.page_size = v.into();
2874            self
2875        }
2876
2877        /// Sets the value of [page_token][crate::model::ListPullRequestsRequest::page_token].
2878        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2879            self.0.request.page_token = v.into();
2880            self
2881        }
2882    }
2883
2884    #[doc(hidden)]
2885    impl crate::RequestBuilder for ListPullRequests {
2886        fn request_options(&mut self) -> &mut crate::RequestOptions {
2887            &mut self.0.options
2888        }
2889    }
2890
2891    /// The request builder for [SecureSourceManager::update_pull_request][crate::client::SecureSourceManager::update_pull_request] calls.
2892    ///
2893    /// # Example
2894    /// ```
2895    /// # use google_cloud_securesourcemanager_v1::builder::secure_source_manager::UpdatePullRequest;
2896    /// # async fn sample() -> google_cloud_securesourcemanager_v1::Result<()> {
2897    /// use google_cloud_lro::Poller;
2898    ///
2899    /// let builder = prepare_request_builder();
2900    /// let response = builder.poller().until_done().await?;
2901    /// # Ok(()) }
2902    ///
2903    /// fn prepare_request_builder() -> UpdatePullRequest {
2904    ///   # panic!();
2905    ///   // ... details omitted ...
2906    /// }
2907    /// ```
2908    #[derive(Clone, Debug)]
2909    pub struct UpdatePullRequest(RequestBuilder<crate::model::UpdatePullRequestRequest>);
2910
2911    impl UpdatePullRequest {
2912        pub(crate) fn new(
2913            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
2914        ) -> Self {
2915            Self(RequestBuilder::new(stub))
2916        }
2917
2918        /// Sets the full request, replacing any prior values.
2919        pub fn with_request<V: Into<crate::model::UpdatePullRequestRequest>>(
2920            mut self,
2921            v: V,
2922        ) -> Self {
2923            self.0.request = v.into();
2924            self
2925        }
2926
2927        /// Sets all the options, replacing any prior values.
2928        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2929            self.0.options = v.into();
2930            self
2931        }
2932
2933        /// Sends the request.
2934        ///
2935        /// # Long running operations
2936        ///
2937        /// This starts, but does not poll, a longrunning operation. More information
2938        /// on [update_pull_request][crate::client::SecureSourceManager::update_pull_request].
2939        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
2940            (*self.0.stub)
2941                .update_pull_request(self.0.request, self.0.options)
2942                .await
2943                .map(crate::Response::into_body)
2944        }
2945
2946        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_pull_request`.
2947        pub fn poller(
2948            self,
2949        ) -> impl google_cloud_lro::Poller<crate::model::PullRequest, crate::model::OperationMetadata>
2950        {
2951            type Operation = google_cloud_lro::internal::Operation<
2952                crate::model::PullRequest,
2953                crate::model::OperationMetadata,
2954            >;
2955            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2956            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2957            let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
2958            if let Some(ref mut details) = poller_options.tracing {
2959                details.method_name = "google_cloud_securesourcemanager_v1::client::SecureSourceManager::update_pull_request::until_done";
2960            }
2961
2962            let stub = self.0.stub.clone();
2963            let mut options = self.0.options.clone();
2964            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
2965            let query = move |name| {
2966                let stub = stub.clone();
2967                let options = options.clone();
2968                async {
2969                    let op = GetOperation::new(stub)
2970                        .set_name(name)
2971                        .with_options(options)
2972                        .send()
2973                        .await?;
2974                    Ok(Operation::new(op))
2975                }
2976            };
2977
2978            let start = move || async {
2979                let op = self.send().await?;
2980                Ok(Operation::new(op))
2981            };
2982
2983            use google_cloud_lro::internal::PollerExt;
2984            {
2985                google_cloud_lro::internal::new_poller(
2986                    polling_error_policy,
2987                    polling_backoff_policy,
2988                    start,
2989                    query,
2990                )
2991            }
2992            .with_options(poller_options)
2993        }
2994
2995        /// Sets the value of [pull_request][crate::model::UpdatePullRequestRequest::pull_request].
2996        ///
2997        /// This is a **required** field for requests.
2998        pub fn set_pull_request<T>(mut self, v: T) -> Self
2999        where
3000            T: std::convert::Into<crate::model::PullRequest>,
3001        {
3002            self.0.request.pull_request = std::option::Option::Some(v.into());
3003            self
3004        }
3005
3006        /// Sets or clears the value of [pull_request][crate::model::UpdatePullRequestRequest::pull_request].
3007        ///
3008        /// This is a **required** field for requests.
3009        pub fn set_or_clear_pull_request<T>(mut self, v: std::option::Option<T>) -> Self
3010        where
3011            T: std::convert::Into<crate::model::PullRequest>,
3012        {
3013            self.0.request.pull_request = v.map(|x| x.into());
3014            self
3015        }
3016
3017        /// Sets the value of [update_mask][crate::model::UpdatePullRequestRequest::update_mask].
3018        pub fn set_update_mask<T>(mut self, v: T) -> Self
3019        where
3020            T: std::convert::Into<wkt::FieldMask>,
3021        {
3022            self.0.request.update_mask = std::option::Option::Some(v.into());
3023            self
3024        }
3025
3026        /// Sets or clears the value of [update_mask][crate::model::UpdatePullRequestRequest::update_mask].
3027        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
3028        where
3029            T: std::convert::Into<wkt::FieldMask>,
3030        {
3031            self.0.request.update_mask = v.map(|x| x.into());
3032            self
3033        }
3034    }
3035
3036    #[doc(hidden)]
3037    impl crate::RequestBuilder for UpdatePullRequest {
3038        fn request_options(&mut self) -> &mut crate::RequestOptions {
3039            &mut self.0.options
3040        }
3041    }
3042
3043    /// The request builder for [SecureSourceManager::merge_pull_request][crate::client::SecureSourceManager::merge_pull_request] calls.
3044    ///
3045    /// # Example
3046    /// ```
3047    /// # use google_cloud_securesourcemanager_v1::builder::secure_source_manager::MergePullRequest;
3048    /// # async fn sample() -> google_cloud_securesourcemanager_v1::Result<()> {
3049    /// use google_cloud_lro::Poller;
3050    ///
3051    /// let builder = prepare_request_builder();
3052    /// let response = builder.poller().until_done().await?;
3053    /// # Ok(()) }
3054    ///
3055    /// fn prepare_request_builder() -> MergePullRequest {
3056    ///   # panic!();
3057    ///   // ... details omitted ...
3058    /// }
3059    /// ```
3060    #[derive(Clone, Debug)]
3061    pub struct MergePullRequest(RequestBuilder<crate::model::MergePullRequestRequest>);
3062
3063    impl MergePullRequest {
3064        pub(crate) fn new(
3065            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
3066        ) -> Self {
3067            Self(RequestBuilder::new(stub))
3068        }
3069
3070        /// Sets the full request, replacing any prior values.
3071        pub fn with_request<V: Into<crate::model::MergePullRequestRequest>>(
3072            mut self,
3073            v: V,
3074        ) -> Self {
3075            self.0.request = v.into();
3076            self
3077        }
3078
3079        /// Sets all the options, replacing any prior values.
3080        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3081            self.0.options = v.into();
3082            self
3083        }
3084
3085        /// Sends the request.
3086        ///
3087        /// # Long running operations
3088        ///
3089        /// This starts, but does not poll, a longrunning operation. More information
3090        /// on [merge_pull_request][crate::client::SecureSourceManager::merge_pull_request].
3091        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
3092            (*self.0.stub)
3093                .merge_pull_request(self.0.request, self.0.options)
3094                .await
3095                .map(crate::Response::into_body)
3096        }
3097
3098        /// Creates a [Poller][google_cloud_lro::Poller] to work with `merge_pull_request`.
3099        pub fn poller(
3100            self,
3101        ) -> impl google_cloud_lro::Poller<crate::model::PullRequest, crate::model::OperationMetadata>
3102        {
3103            type Operation = google_cloud_lro::internal::Operation<
3104                crate::model::PullRequest,
3105                crate::model::OperationMetadata,
3106            >;
3107            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3108            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3109            let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
3110            if let Some(ref mut details) = poller_options.tracing {
3111                details.method_name = "google_cloud_securesourcemanager_v1::client::SecureSourceManager::merge_pull_request::until_done";
3112            }
3113
3114            let stub = self.0.stub.clone();
3115            let mut options = self.0.options.clone();
3116            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
3117            let query = move |name| {
3118                let stub = stub.clone();
3119                let options = options.clone();
3120                async {
3121                    let op = GetOperation::new(stub)
3122                        .set_name(name)
3123                        .with_options(options)
3124                        .send()
3125                        .await?;
3126                    Ok(Operation::new(op))
3127                }
3128            };
3129
3130            let start = move || async {
3131                let op = self.send().await?;
3132                Ok(Operation::new(op))
3133            };
3134
3135            use google_cloud_lro::internal::PollerExt;
3136            {
3137                google_cloud_lro::internal::new_poller(
3138                    polling_error_policy,
3139                    polling_backoff_policy,
3140                    start,
3141                    query,
3142                )
3143            }
3144            .with_options(poller_options)
3145        }
3146
3147        /// Sets the value of [name][crate::model::MergePullRequestRequest::name].
3148        ///
3149        /// This is a **required** field for requests.
3150        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3151            self.0.request.name = v.into();
3152            self
3153        }
3154    }
3155
3156    #[doc(hidden)]
3157    impl crate::RequestBuilder for MergePullRequest {
3158        fn request_options(&mut self) -> &mut crate::RequestOptions {
3159            &mut self.0.options
3160        }
3161    }
3162
3163    /// The request builder for [SecureSourceManager::open_pull_request][crate::client::SecureSourceManager::open_pull_request] calls.
3164    ///
3165    /// # Example
3166    /// ```
3167    /// # use google_cloud_securesourcemanager_v1::builder::secure_source_manager::OpenPullRequest;
3168    /// # async fn sample() -> google_cloud_securesourcemanager_v1::Result<()> {
3169    /// use google_cloud_lro::Poller;
3170    ///
3171    /// let builder = prepare_request_builder();
3172    /// let response = builder.poller().until_done().await?;
3173    /// # Ok(()) }
3174    ///
3175    /// fn prepare_request_builder() -> OpenPullRequest {
3176    ///   # panic!();
3177    ///   // ... details omitted ...
3178    /// }
3179    /// ```
3180    #[derive(Clone, Debug)]
3181    pub struct OpenPullRequest(RequestBuilder<crate::model::OpenPullRequestRequest>);
3182
3183    impl OpenPullRequest {
3184        pub(crate) fn new(
3185            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
3186        ) -> Self {
3187            Self(RequestBuilder::new(stub))
3188        }
3189
3190        /// Sets the full request, replacing any prior values.
3191        pub fn with_request<V: Into<crate::model::OpenPullRequestRequest>>(mut self, v: V) -> Self {
3192            self.0.request = v.into();
3193            self
3194        }
3195
3196        /// Sets all the options, replacing any prior values.
3197        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3198            self.0.options = v.into();
3199            self
3200        }
3201
3202        /// Sends the request.
3203        ///
3204        /// # Long running operations
3205        ///
3206        /// This starts, but does not poll, a longrunning operation. More information
3207        /// on [open_pull_request][crate::client::SecureSourceManager::open_pull_request].
3208        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
3209            (*self.0.stub)
3210                .open_pull_request(self.0.request, self.0.options)
3211                .await
3212                .map(crate::Response::into_body)
3213        }
3214
3215        /// Creates a [Poller][google_cloud_lro::Poller] to work with `open_pull_request`.
3216        pub fn poller(
3217            self,
3218        ) -> impl google_cloud_lro::Poller<crate::model::PullRequest, crate::model::OperationMetadata>
3219        {
3220            type Operation = google_cloud_lro::internal::Operation<
3221                crate::model::PullRequest,
3222                crate::model::OperationMetadata,
3223            >;
3224            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3225            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3226            let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
3227            if let Some(ref mut details) = poller_options.tracing {
3228                details.method_name = "google_cloud_securesourcemanager_v1::client::SecureSourceManager::open_pull_request::until_done";
3229            }
3230
3231            let stub = self.0.stub.clone();
3232            let mut options = self.0.options.clone();
3233            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
3234            let query = move |name| {
3235                let stub = stub.clone();
3236                let options = options.clone();
3237                async {
3238                    let op = GetOperation::new(stub)
3239                        .set_name(name)
3240                        .with_options(options)
3241                        .send()
3242                        .await?;
3243                    Ok(Operation::new(op))
3244                }
3245            };
3246
3247            let start = move || async {
3248                let op = self.send().await?;
3249                Ok(Operation::new(op))
3250            };
3251
3252            use google_cloud_lro::internal::PollerExt;
3253            {
3254                google_cloud_lro::internal::new_poller(
3255                    polling_error_policy,
3256                    polling_backoff_policy,
3257                    start,
3258                    query,
3259                )
3260            }
3261            .with_options(poller_options)
3262        }
3263
3264        /// Sets the value of [name][crate::model::OpenPullRequestRequest::name].
3265        ///
3266        /// This is a **required** field for requests.
3267        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3268            self.0.request.name = v.into();
3269            self
3270        }
3271    }
3272
3273    #[doc(hidden)]
3274    impl crate::RequestBuilder for OpenPullRequest {
3275        fn request_options(&mut self) -> &mut crate::RequestOptions {
3276            &mut self.0.options
3277        }
3278    }
3279
3280    /// The request builder for [SecureSourceManager::close_pull_request][crate::client::SecureSourceManager::close_pull_request] calls.
3281    ///
3282    /// # Example
3283    /// ```
3284    /// # use google_cloud_securesourcemanager_v1::builder::secure_source_manager::ClosePullRequest;
3285    /// # async fn sample() -> google_cloud_securesourcemanager_v1::Result<()> {
3286    /// use google_cloud_lro::Poller;
3287    ///
3288    /// let builder = prepare_request_builder();
3289    /// let response = builder.poller().until_done().await?;
3290    /// # Ok(()) }
3291    ///
3292    /// fn prepare_request_builder() -> ClosePullRequest {
3293    ///   # panic!();
3294    ///   // ... details omitted ...
3295    /// }
3296    /// ```
3297    #[derive(Clone, Debug)]
3298    pub struct ClosePullRequest(RequestBuilder<crate::model::ClosePullRequestRequest>);
3299
3300    impl ClosePullRequest {
3301        pub(crate) fn new(
3302            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
3303        ) -> Self {
3304            Self(RequestBuilder::new(stub))
3305        }
3306
3307        /// Sets the full request, replacing any prior values.
3308        pub fn with_request<V: Into<crate::model::ClosePullRequestRequest>>(
3309            mut self,
3310            v: V,
3311        ) -> Self {
3312            self.0.request = v.into();
3313            self
3314        }
3315
3316        /// Sets all the options, replacing any prior values.
3317        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3318            self.0.options = v.into();
3319            self
3320        }
3321
3322        /// Sends the request.
3323        ///
3324        /// # Long running operations
3325        ///
3326        /// This starts, but does not poll, a longrunning operation. More information
3327        /// on [close_pull_request][crate::client::SecureSourceManager::close_pull_request].
3328        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
3329            (*self.0.stub)
3330                .close_pull_request(self.0.request, self.0.options)
3331                .await
3332                .map(crate::Response::into_body)
3333        }
3334
3335        /// Creates a [Poller][google_cloud_lro::Poller] to work with `close_pull_request`.
3336        pub fn poller(
3337            self,
3338        ) -> impl google_cloud_lro::Poller<crate::model::PullRequest, crate::model::OperationMetadata>
3339        {
3340            type Operation = google_cloud_lro::internal::Operation<
3341                crate::model::PullRequest,
3342                crate::model::OperationMetadata,
3343            >;
3344            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3345            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3346            let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
3347            if let Some(ref mut details) = poller_options.tracing {
3348                details.method_name = "google_cloud_securesourcemanager_v1::client::SecureSourceManager::close_pull_request::until_done";
3349            }
3350
3351            let stub = self.0.stub.clone();
3352            let mut options = self.0.options.clone();
3353            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
3354            let query = move |name| {
3355                let stub = stub.clone();
3356                let options = options.clone();
3357                async {
3358                    let op = GetOperation::new(stub)
3359                        .set_name(name)
3360                        .with_options(options)
3361                        .send()
3362                        .await?;
3363                    Ok(Operation::new(op))
3364                }
3365            };
3366
3367            let start = move || async {
3368                let op = self.send().await?;
3369                Ok(Operation::new(op))
3370            };
3371
3372            use google_cloud_lro::internal::PollerExt;
3373            {
3374                google_cloud_lro::internal::new_poller(
3375                    polling_error_policy,
3376                    polling_backoff_policy,
3377                    start,
3378                    query,
3379                )
3380            }
3381            .with_options(poller_options)
3382        }
3383
3384        /// Sets the value of [name][crate::model::ClosePullRequestRequest::name].
3385        ///
3386        /// This is a **required** field for requests.
3387        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3388            self.0.request.name = v.into();
3389            self
3390        }
3391    }
3392
3393    #[doc(hidden)]
3394    impl crate::RequestBuilder for ClosePullRequest {
3395        fn request_options(&mut self) -> &mut crate::RequestOptions {
3396            &mut self.0.options
3397        }
3398    }
3399
3400    /// The request builder for [SecureSourceManager::list_pull_request_file_diffs][crate::client::SecureSourceManager::list_pull_request_file_diffs] calls.
3401    ///
3402    /// # Example
3403    /// ```
3404    /// # use google_cloud_securesourcemanager_v1::builder::secure_source_manager::ListPullRequestFileDiffs;
3405    /// # async fn sample() -> google_cloud_securesourcemanager_v1::Result<()> {
3406    /// use google_cloud_gax::paginator::ItemPaginator;
3407    ///
3408    /// let builder = prepare_request_builder();
3409    /// let mut items = builder.by_item();
3410    /// while let Some(result) = items.next().await {
3411    ///   let item = result?;
3412    /// }
3413    /// # Ok(()) }
3414    ///
3415    /// fn prepare_request_builder() -> ListPullRequestFileDiffs {
3416    ///   # panic!();
3417    ///   // ... details omitted ...
3418    /// }
3419    /// ```
3420    #[derive(Clone, Debug)]
3421    pub struct ListPullRequestFileDiffs(
3422        RequestBuilder<crate::model::ListPullRequestFileDiffsRequest>,
3423    );
3424
3425    impl ListPullRequestFileDiffs {
3426        pub(crate) fn new(
3427            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
3428        ) -> Self {
3429            Self(RequestBuilder::new(stub))
3430        }
3431
3432        /// Sets the full request, replacing any prior values.
3433        pub fn with_request<V: Into<crate::model::ListPullRequestFileDiffsRequest>>(
3434            mut self,
3435            v: V,
3436        ) -> Self {
3437            self.0.request = v.into();
3438            self
3439        }
3440
3441        /// Sets all the options, replacing any prior values.
3442        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3443            self.0.options = v.into();
3444            self
3445        }
3446
3447        /// Sends the request.
3448        pub async fn send(self) -> Result<crate::model::ListPullRequestFileDiffsResponse> {
3449            (*self.0.stub)
3450                .list_pull_request_file_diffs(self.0.request, self.0.options)
3451                .await
3452                .map(crate::Response::into_body)
3453        }
3454
3455        /// Streams each page in the collection.
3456        pub fn by_page(
3457            self,
3458        ) -> impl google_cloud_gax::paginator::Paginator<
3459            crate::model::ListPullRequestFileDiffsResponse,
3460            crate::Error,
3461        > {
3462            use std::clone::Clone;
3463            let token = self.0.request.page_token.clone();
3464            let execute = move |token: String| {
3465                let mut builder = self.clone();
3466                builder.0.request = builder.0.request.set_page_token(token);
3467                builder.send()
3468            };
3469            google_cloud_gax::paginator::internal::new_paginator(token, execute)
3470        }
3471
3472        /// Streams each item in the collection.
3473        pub fn by_item(
3474            self,
3475        ) -> impl google_cloud_gax::paginator::ItemPaginator<
3476            crate::model::ListPullRequestFileDiffsResponse,
3477            crate::Error,
3478        > {
3479            use google_cloud_gax::paginator::Paginator;
3480            self.by_page().items()
3481        }
3482
3483        /// Sets the value of [name][crate::model::ListPullRequestFileDiffsRequest::name].
3484        ///
3485        /// This is a **required** field for requests.
3486        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3487            self.0.request.name = v.into();
3488            self
3489        }
3490
3491        /// Sets the value of [page_size][crate::model::ListPullRequestFileDiffsRequest::page_size].
3492        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
3493            self.0.request.page_size = v.into();
3494            self
3495        }
3496
3497        /// Sets the value of [page_token][crate::model::ListPullRequestFileDiffsRequest::page_token].
3498        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
3499            self.0.request.page_token = v.into();
3500            self
3501        }
3502    }
3503
3504    #[doc(hidden)]
3505    impl crate::RequestBuilder for ListPullRequestFileDiffs {
3506        fn request_options(&mut self) -> &mut crate::RequestOptions {
3507            &mut self.0.options
3508        }
3509    }
3510
3511    /// The request builder for [SecureSourceManager::fetch_tree][crate::client::SecureSourceManager::fetch_tree] calls.
3512    ///
3513    /// # Example
3514    /// ```
3515    /// # use google_cloud_securesourcemanager_v1::builder::secure_source_manager::FetchTree;
3516    /// # async fn sample() -> google_cloud_securesourcemanager_v1::Result<()> {
3517    /// use google_cloud_gax::paginator::ItemPaginator;
3518    ///
3519    /// let builder = prepare_request_builder();
3520    /// let mut items = builder.by_item();
3521    /// while let Some(result) = items.next().await {
3522    ///   let item = result?;
3523    /// }
3524    /// # Ok(()) }
3525    ///
3526    /// fn prepare_request_builder() -> FetchTree {
3527    ///   # panic!();
3528    ///   // ... details omitted ...
3529    /// }
3530    /// ```
3531    #[derive(Clone, Debug)]
3532    pub struct FetchTree(RequestBuilder<crate::model::FetchTreeRequest>);
3533
3534    impl FetchTree {
3535        pub(crate) fn new(
3536            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
3537        ) -> Self {
3538            Self(RequestBuilder::new(stub))
3539        }
3540
3541        /// Sets the full request, replacing any prior values.
3542        pub fn with_request<V: Into<crate::model::FetchTreeRequest>>(mut self, v: V) -> Self {
3543            self.0.request = v.into();
3544            self
3545        }
3546
3547        /// Sets all the options, replacing any prior values.
3548        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3549            self.0.options = v.into();
3550            self
3551        }
3552
3553        /// Sends the request.
3554        pub async fn send(self) -> Result<crate::model::FetchTreeResponse> {
3555            (*self.0.stub)
3556                .fetch_tree(self.0.request, self.0.options)
3557                .await
3558                .map(crate::Response::into_body)
3559        }
3560
3561        /// Streams each page in the collection.
3562        pub fn by_page(
3563            self,
3564        ) -> impl google_cloud_gax::paginator::Paginator<crate::model::FetchTreeResponse, crate::Error>
3565        {
3566            use std::clone::Clone;
3567            let token = self.0.request.page_token.clone();
3568            let execute = move |token: String| {
3569                let mut builder = self.clone();
3570                builder.0.request = builder.0.request.set_page_token(token);
3571                builder.send()
3572            };
3573            google_cloud_gax::paginator::internal::new_paginator(token, execute)
3574        }
3575
3576        /// Streams each item in the collection.
3577        pub fn by_item(
3578            self,
3579        ) -> impl google_cloud_gax::paginator::ItemPaginator<crate::model::FetchTreeResponse, crate::Error>
3580        {
3581            use google_cloud_gax::paginator::Paginator;
3582            self.by_page().items()
3583        }
3584
3585        /// Sets the value of [repository][crate::model::FetchTreeRequest::repository].
3586        ///
3587        /// This is a **required** field for requests.
3588        pub fn set_repository<T: Into<std::string::String>>(mut self, v: T) -> Self {
3589            self.0.request.repository = v.into();
3590            self
3591        }
3592
3593        /// Sets the value of [r#ref][crate::model::FetchTreeRequest::ref].
3594        pub fn set_ref<T: Into<std::string::String>>(mut self, v: T) -> Self {
3595            self.0.request.r#ref = v.into();
3596            self
3597        }
3598
3599        /// Sets the value of [recursive][crate::model::FetchTreeRequest::recursive].
3600        pub fn set_recursive<T: Into<bool>>(mut self, v: T) -> Self {
3601            self.0.request.recursive = v.into();
3602            self
3603        }
3604
3605        /// Sets the value of [page_size][crate::model::FetchTreeRequest::page_size].
3606        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
3607            self.0.request.page_size = v.into();
3608            self
3609        }
3610
3611        /// Sets the value of [page_token][crate::model::FetchTreeRequest::page_token].
3612        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
3613            self.0.request.page_token = v.into();
3614            self
3615        }
3616    }
3617
3618    #[doc(hidden)]
3619    impl crate::RequestBuilder for FetchTree {
3620        fn request_options(&mut self) -> &mut crate::RequestOptions {
3621            &mut self.0.options
3622        }
3623    }
3624
3625    /// The request builder for [SecureSourceManager::fetch_blob][crate::client::SecureSourceManager::fetch_blob] calls.
3626    ///
3627    /// # Example
3628    /// ```
3629    /// # use google_cloud_securesourcemanager_v1::builder::secure_source_manager::FetchBlob;
3630    /// # async fn sample() -> google_cloud_securesourcemanager_v1::Result<()> {
3631    ///
3632    /// let builder = prepare_request_builder();
3633    /// let response = builder.send().await?;
3634    /// # Ok(()) }
3635    ///
3636    /// fn prepare_request_builder() -> FetchBlob {
3637    ///   # panic!();
3638    ///   // ... details omitted ...
3639    /// }
3640    /// ```
3641    #[derive(Clone, Debug)]
3642    pub struct FetchBlob(RequestBuilder<crate::model::FetchBlobRequest>);
3643
3644    impl FetchBlob {
3645        pub(crate) fn new(
3646            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
3647        ) -> Self {
3648            Self(RequestBuilder::new(stub))
3649        }
3650
3651        /// Sets the full request, replacing any prior values.
3652        pub fn with_request<V: Into<crate::model::FetchBlobRequest>>(mut self, v: V) -> Self {
3653            self.0.request = v.into();
3654            self
3655        }
3656
3657        /// Sets all the options, replacing any prior values.
3658        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3659            self.0.options = v.into();
3660            self
3661        }
3662
3663        /// Sends the request.
3664        pub async fn send(self) -> Result<crate::model::FetchBlobResponse> {
3665            (*self.0.stub)
3666                .fetch_blob(self.0.request, self.0.options)
3667                .await
3668                .map(crate::Response::into_body)
3669        }
3670
3671        /// Sets the value of [repository][crate::model::FetchBlobRequest::repository].
3672        ///
3673        /// This is a **required** field for requests.
3674        pub fn set_repository<T: Into<std::string::String>>(mut self, v: T) -> Self {
3675            self.0.request.repository = v.into();
3676            self
3677        }
3678
3679        /// Sets the value of [sha][crate::model::FetchBlobRequest::sha].
3680        ///
3681        /// This is a **required** field for requests.
3682        pub fn set_sha<T: Into<std::string::String>>(mut self, v: T) -> Self {
3683            self.0.request.sha = v.into();
3684            self
3685        }
3686    }
3687
3688    #[doc(hidden)]
3689    impl crate::RequestBuilder for FetchBlob {
3690        fn request_options(&mut self) -> &mut crate::RequestOptions {
3691            &mut self.0.options
3692        }
3693    }
3694
3695    /// The request builder for [SecureSourceManager::fetch_refs][crate::client::SecureSourceManager::fetch_refs] calls.
3696    ///
3697    /// # Example
3698    /// ```
3699    /// # use google_cloud_securesourcemanager_v1::builder::secure_source_manager::FetchRefs;
3700    /// # async fn sample() -> google_cloud_securesourcemanager_v1::Result<()> {
3701    /// use google_cloud_gax::paginator::ItemPaginator;
3702    ///
3703    /// let builder = prepare_request_builder();
3704    /// let mut items = builder.by_item();
3705    /// while let Some(result) = items.next().await {
3706    ///   let item = result?;
3707    /// }
3708    /// # Ok(()) }
3709    ///
3710    /// fn prepare_request_builder() -> FetchRefs {
3711    ///   # panic!();
3712    ///   // ... details omitted ...
3713    /// }
3714    /// ```
3715    #[derive(Clone, Debug)]
3716    pub struct FetchRefs(RequestBuilder<crate::model::FetchRefsRequest>);
3717
3718    impl FetchRefs {
3719        pub(crate) fn new(
3720            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
3721        ) -> Self {
3722            Self(RequestBuilder::new(stub))
3723        }
3724
3725        /// Sets the full request, replacing any prior values.
3726        pub fn with_request<V: Into<crate::model::FetchRefsRequest>>(mut self, v: V) -> Self {
3727            self.0.request = v.into();
3728            self
3729        }
3730
3731        /// Sets all the options, replacing any prior values.
3732        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3733            self.0.options = v.into();
3734            self
3735        }
3736
3737        /// Sends the request.
3738        pub async fn send(self) -> Result<crate::model::FetchRefsResponse> {
3739            (*self.0.stub)
3740                .fetch_refs(self.0.request, self.0.options)
3741                .await
3742                .map(crate::Response::into_body)
3743        }
3744
3745        /// Streams each page in the collection.
3746        pub fn by_page(
3747            self,
3748        ) -> impl google_cloud_gax::paginator::Paginator<crate::model::FetchRefsResponse, crate::Error>
3749        {
3750            use std::clone::Clone;
3751            let token = self.0.request.page_token.clone();
3752            let execute = move |token: String| {
3753                let mut builder = self.clone();
3754                builder.0.request = builder.0.request.set_page_token(token);
3755                builder.send()
3756            };
3757            google_cloud_gax::paginator::internal::new_paginator(token, execute)
3758        }
3759
3760        /// Streams each item in the collection.
3761        pub fn by_item(
3762            self,
3763        ) -> impl google_cloud_gax::paginator::ItemPaginator<crate::model::FetchRefsResponse, crate::Error>
3764        {
3765            use google_cloud_gax::paginator::Paginator;
3766            self.by_page().items()
3767        }
3768
3769        /// Sets the value of [repository][crate::model::FetchRefsRequest::repository].
3770        ///
3771        /// This is a **required** field for requests.
3772        pub fn set_repository<T: Into<std::string::String>>(mut self, v: T) -> Self {
3773            self.0.request.repository = v.into();
3774            self
3775        }
3776
3777        /// Sets the value of [r#type][crate::model::FetchRefsRequest::type].
3778        pub fn set_type<T: Into<crate::model::r#ref::RefType>>(mut self, v: T) -> Self {
3779            self.0.request.r#type = v.into();
3780            self
3781        }
3782
3783        /// Sets the value of [page_size][crate::model::FetchRefsRequest::page_size].
3784        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
3785            self.0.request.page_size = v.into();
3786            self
3787        }
3788
3789        /// Sets the value of [page_token][crate::model::FetchRefsRequest::page_token].
3790        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
3791            self.0.request.page_token = v.into();
3792            self
3793        }
3794    }
3795
3796    #[doc(hidden)]
3797    impl crate::RequestBuilder for FetchRefs {
3798        fn request_options(&mut self) -> &mut crate::RequestOptions {
3799            &mut self.0.options
3800        }
3801    }
3802
3803    /// The request builder for [SecureSourceManager::create_issue][crate::client::SecureSourceManager::create_issue] calls.
3804    ///
3805    /// # Example
3806    /// ```
3807    /// # use google_cloud_securesourcemanager_v1::builder::secure_source_manager::CreateIssue;
3808    /// # async fn sample() -> google_cloud_securesourcemanager_v1::Result<()> {
3809    /// use google_cloud_lro::Poller;
3810    ///
3811    /// let builder = prepare_request_builder();
3812    /// let response = builder.poller().until_done().await?;
3813    /// # Ok(()) }
3814    ///
3815    /// fn prepare_request_builder() -> CreateIssue {
3816    ///   # panic!();
3817    ///   // ... details omitted ...
3818    /// }
3819    /// ```
3820    #[derive(Clone, Debug)]
3821    pub struct CreateIssue(RequestBuilder<crate::model::CreateIssueRequest>);
3822
3823    impl CreateIssue {
3824        pub(crate) fn new(
3825            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
3826        ) -> Self {
3827            Self(RequestBuilder::new(stub))
3828        }
3829
3830        /// Sets the full request, replacing any prior values.
3831        pub fn with_request<V: Into<crate::model::CreateIssueRequest>>(mut self, v: V) -> Self {
3832            self.0.request = v.into();
3833            self
3834        }
3835
3836        /// Sets all the options, replacing any prior values.
3837        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3838            self.0.options = v.into();
3839            self
3840        }
3841
3842        /// Sends the request.
3843        ///
3844        /// # Long running operations
3845        ///
3846        /// This starts, but does not poll, a longrunning operation. More information
3847        /// on [create_issue][crate::client::SecureSourceManager::create_issue].
3848        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
3849            (*self.0.stub)
3850                .create_issue(self.0.request, self.0.options)
3851                .await
3852                .map(crate::Response::into_body)
3853        }
3854
3855        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_issue`.
3856        pub fn poller(
3857            self,
3858        ) -> impl google_cloud_lro::Poller<crate::model::Issue, crate::model::OperationMetadata>
3859        {
3860            type Operation = google_cloud_lro::internal::Operation<
3861                crate::model::Issue,
3862                crate::model::OperationMetadata,
3863            >;
3864            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3865            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3866            let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
3867            if let Some(ref mut details) = poller_options.tracing {
3868                details.method_name = "google_cloud_securesourcemanager_v1::client::SecureSourceManager::create_issue::until_done";
3869            }
3870
3871            let stub = self.0.stub.clone();
3872            let mut options = self.0.options.clone();
3873            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
3874            let query = move |name| {
3875                let stub = stub.clone();
3876                let options = options.clone();
3877                async {
3878                    let op = GetOperation::new(stub)
3879                        .set_name(name)
3880                        .with_options(options)
3881                        .send()
3882                        .await?;
3883                    Ok(Operation::new(op))
3884                }
3885            };
3886
3887            let start = move || async {
3888                let op = self.send().await?;
3889                Ok(Operation::new(op))
3890            };
3891
3892            use google_cloud_lro::internal::PollerExt;
3893            {
3894                google_cloud_lro::internal::new_poller(
3895                    polling_error_policy,
3896                    polling_backoff_policy,
3897                    start,
3898                    query,
3899                )
3900            }
3901            .with_options(poller_options)
3902        }
3903
3904        /// Sets the value of [parent][crate::model::CreateIssueRequest::parent].
3905        ///
3906        /// This is a **required** field for requests.
3907        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3908            self.0.request.parent = v.into();
3909            self
3910        }
3911
3912        /// Sets the value of [issue][crate::model::CreateIssueRequest::issue].
3913        ///
3914        /// This is a **required** field for requests.
3915        pub fn set_issue<T>(mut self, v: T) -> Self
3916        where
3917            T: std::convert::Into<crate::model::Issue>,
3918        {
3919            self.0.request.issue = std::option::Option::Some(v.into());
3920            self
3921        }
3922
3923        /// Sets or clears the value of [issue][crate::model::CreateIssueRequest::issue].
3924        ///
3925        /// This is a **required** field for requests.
3926        pub fn set_or_clear_issue<T>(mut self, v: std::option::Option<T>) -> Self
3927        where
3928            T: std::convert::Into<crate::model::Issue>,
3929        {
3930            self.0.request.issue = v.map(|x| x.into());
3931            self
3932        }
3933    }
3934
3935    #[doc(hidden)]
3936    impl crate::RequestBuilder for CreateIssue {
3937        fn request_options(&mut self) -> &mut crate::RequestOptions {
3938            &mut self.0.options
3939        }
3940    }
3941
3942    /// The request builder for [SecureSourceManager::get_issue][crate::client::SecureSourceManager::get_issue] calls.
3943    ///
3944    /// # Example
3945    /// ```
3946    /// # use google_cloud_securesourcemanager_v1::builder::secure_source_manager::GetIssue;
3947    /// # async fn sample() -> google_cloud_securesourcemanager_v1::Result<()> {
3948    ///
3949    /// let builder = prepare_request_builder();
3950    /// let response = builder.send().await?;
3951    /// # Ok(()) }
3952    ///
3953    /// fn prepare_request_builder() -> GetIssue {
3954    ///   # panic!();
3955    ///   // ... details omitted ...
3956    /// }
3957    /// ```
3958    #[derive(Clone, Debug)]
3959    pub struct GetIssue(RequestBuilder<crate::model::GetIssueRequest>);
3960
3961    impl GetIssue {
3962        pub(crate) fn new(
3963            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
3964        ) -> Self {
3965            Self(RequestBuilder::new(stub))
3966        }
3967
3968        /// Sets the full request, replacing any prior values.
3969        pub fn with_request<V: Into<crate::model::GetIssueRequest>>(mut self, v: V) -> Self {
3970            self.0.request = v.into();
3971            self
3972        }
3973
3974        /// Sets all the options, replacing any prior values.
3975        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3976            self.0.options = v.into();
3977            self
3978        }
3979
3980        /// Sends the request.
3981        pub async fn send(self) -> Result<crate::model::Issue> {
3982            (*self.0.stub)
3983                .get_issue(self.0.request, self.0.options)
3984                .await
3985                .map(crate::Response::into_body)
3986        }
3987
3988        /// Sets the value of [name][crate::model::GetIssueRequest::name].
3989        ///
3990        /// This is a **required** field for requests.
3991        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3992            self.0.request.name = v.into();
3993            self
3994        }
3995    }
3996
3997    #[doc(hidden)]
3998    impl crate::RequestBuilder for GetIssue {
3999        fn request_options(&mut self) -> &mut crate::RequestOptions {
4000            &mut self.0.options
4001        }
4002    }
4003
4004    /// The request builder for [SecureSourceManager::list_issues][crate::client::SecureSourceManager::list_issues] calls.
4005    ///
4006    /// # Example
4007    /// ```
4008    /// # use google_cloud_securesourcemanager_v1::builder::secure_source_manager::ListIssues;
4009    /// # async fn sample() -> google_cloud_securesourcemanager_v1::Result<()> {
4010    /// use google_cloud_gax::paginator::ItemPaginator;
4011    ///
4012    /// let builder = prepare_request_builder();
4013    /// let mut items = builder.by_item();
4014    /// while let Some(result) = items.next().await {
4015    ///   let item = result?;
4016    /// }
4017    /// # Ok(()) }
4018    ///
4019    /// fn prepare_request_builder() -> ListIssues {
4020    ///   # panic!();
4021    ///   // ... details omitted ...
4022    /// }
4023    /// ```
4024    #[derive(Clone, Debug)]
4025    pub struct ListIssues(RequestBuilder<crate::model::ListIssuesRequest>);
4026
4027    impl ListIssues {
4028        pub(crate) fn new(
4029            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
4030        ) -> Self {
4031            Self(RequestBuilder::new(stub))
4032        }
4033
4034        /// Sets the full request, replacing any prior values.
4035        pub fn with_request<V: Into<crate::model::ListIssuesRequest>>(mut self, v: V) -> Self {
4036            self.0.request = v.into();
4037            self
4038        }
4039
4040        /// Sets all the options, replacing any prior values.
4041        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4042            self.0.options = v.into();
4043            self
4044        }
4045
4046        /// Sends the request.
4047        pub async fn send(self) -> Result<crate::model::ListIssuesResponse> {
4048            (*self.0.stub)
4049                .list_issues(self.0.request, self.0.options)
4050                .await
4051                .map(crate::Response::into_body)
4052        }
4053
4054        /// Streams each page in the collection.
4055        pub fn by_page(
4056            self,
4057        ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListIssuesResponse, crate::Error>
4058        {
4059            use std::clone::Clone;
4060            let token = self.0.request.page_token.clone();
4061            let execute = move |token: String| {
4062                let mut builder = self.clone();
4063                builder.0.request = builder.0.request.set_page_token(token);
4064                builder.send()
4065            };
4066            google_cloud_gax::paginator::internal::new_paginator(token, execute)
4067        }
4068
4069        /// Streams each item in the collection.
4070        pub fn by_item(
4071            self,
4072        ) -> impl google_cloud_gax::paginator::ItemPaginator<
4073            crate::model::ListIssuesResponse,
4074            crate::Error,
4075        > {
4076            use google_cloud_gax::paginator::Paginator;
4077            self.by_page().items()
4078        }
4079
4080        /// Sets the value of [parent][crate::model::ListIssuesRequest::parent].
4081        ///
4082        /// This is a **required** field for requests.
4083        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
4084            self.0.request.parent = v.into();
4085            self
4086        }
4087
4088        /// Sets the value of [page_size][crate::model::ListIssuesRequest::page_size].
4089        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
4090            self.0.request.page_size = v.into();
4091            self
4092        }
4093
4094        /// Sets the value of [page_token][crate::model::ListIssuesRequest::page_token].
4095        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
4096            self.0.request.page_token = v.into();
4097            self
4098        }
4099
4100        /// Sets the value of [filter][crate::model::ListIssuesRequest::filter].
4101        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
4102            self.0.request.filter = v.into();
4103            self
4104        }
4105    }
4106
4107    #[doc(hidden)]
4108    impl crate::RequestBuilder for ListIssues {
4109        fn request_options(&mut self) -> &mut crate::RequestOptions {
4110            &mut self.0.options
4111        }
4112    }
4113
4114    /// The request builder for [SecureSourceManager::update_issue][crate::client::SecureSourceManager::update_issue] calls.
4115    ///
4116    /// # Example
4117    /// ```
4118    /// # use google_cloud_securesourcemanager_v1::builder::secure_source_manager::UpdateIssue;
4119    /// # async fn sample() -> google_cloud_securesourcemanager_v1::Result<()> {
4120    /// use google_cloud_lro::Poller;
4121    ///
4122    /// let builder = prepare_request_builder();
4123    /// let response = builder.poller().until_done().await?;
4124    /// # Ok(()) }
4125    ///
4126    /// fn prepare_request_builder() -> UpdateIssue {
4127    ///   # panic!();
4128    ///   // ... details omitted ...
4129    /// }
4130    /// ```
4131    #[derive(Clone, Debug)]
4132    pub struct UpdateIssue(RequestBuilder<crate::model::UpdateIssueRequest>);
4133
4134    impl UpdateIssue {
4135        pub(crate) fn new(
4136            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
4137        ) -> Self {
4138            Self(RequestBuilder::new(stub))
4139        }
4140
4141        /// Sets the full request, replacing any prior values.
4142        pub fn with_request<V: Into<crate::model::UpdateIssueRequest>>(mut self, v: V) -> Self {
4143            self.0.request = v.into();
4144            self
4145        }
4146
4147        /// Sets all the options, replacing any prior values.
4148        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4149            self.0.options = v.into();
4150            self
4151        }
4152
4153        /// Sends the request.
4154        ///
4155        /// # Long running operations
4156        ///
4157        /// This starts, but does not poll, a longrunning operation. More information
4158        /// on [update_issue][crate::client::SecureSourceManager::update_issue].
4159        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
4160            (*self.0.stub)
4161                .update_issue(self.0.request, self.0.options)
4162                .await
4163                .map(crate::Response::into_body)
4164        }
4165
4166        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_issue`.
4167        pub fn poller(
4168            self,
4169        ) -> impl google_cloud_lro::Poller<crate::model::Issue, crate::model::OperationMetadata>
4170        {
4171            type Operation = google_cloud_lro::internal::Operation<
4172                crate::model::Issue,
4173                crate::model::OperationMetadata,
4174            >;
4175            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4176            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4177            let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
4178            if let Some(ref mut details) = poller_options.tracing {
4179                details.method_name = "google_cloud_securesourcemanager_v1::client::SecureSourceManager::update_issue::until_done";
4180            }
4181
4182            let stub = self.0.stub.clone();
4183            let mut options = self.0.options.clone();
4184            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
4185            let query = move |name| {
4186                let stub = stub.clone();
4187                let options = options.clone();
4188                async {
4189                    let op = GetOperation::new(stub)
4190                        .set_name(name)
4191                        .with_options(options)
4192                        .send()
4193                        .await?;
4194                    Ok(Operation::new(op))
4195                }
4196            };
4197
4198            let start = move || async {
4199                let op = self.send().await?;
4200                Ok(Operation::new(op))
4201            };
4202
4203            use google_cloud_lro::internal::PollerExt;
4204            {
4205                google_cloud_lro::internal::new_poller(
4206                    polling_error_policy,
4207                    polling_backoff_policy,
4208                    start,
4209                    query,
4210                )
4211            }
4212            .with_options(poller_options)
4213        }
4214
4215        /// Sets the value of [issue][crate::model::UpdateIssueRequest::issue].
4216        ///
4217        /// This is a **required** field for requests.
4218        pub fn set_issue<T>(mut self, v: T) -> Self
4219        where
4220            T: std::convert::Into<crate::model::Issue>,
4221        {
4222            self.0.request.issue = std::option::Option::Some(v.into());
4223            self
4224        }
4225
4226        /// Sets or clears the value of [issue][crate::model::UpdateIssueRequest::issue].
4227        ///
4228        /// This is a **required** field for requests.
4229        pub fn set_or_clear_issue<T>(mut self, v: std::option::Option<T>) -> Self
4230        where
4231            T: std::convert::Into<crate::model::Issue>,
4232        {
4233            self.0.request.issue = v.map(|x| x.into());
4234            self
4235        }
4236
4237        /// Sets the value of [update_mask][crate::model::UpdateIssueRequest::update_mask].
4238        pub fn set_update_mask<T>(mut self, v: T) -> Self
4239        where
4240            T: std::convert::Into<wkt::FieldMask>,
4241        {
4242            self.0.request.update_mask = std::option::Option::Some(v.into());
4243            self
4244        }
4245
4246        /// Sets or clears the value of [update_mask][crate::model::UpdateIssueRequest::update_mask].
4247        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
4248        where
4249            T: std::convert::Into<wkt::FieldMask>,
4250        {
4251            self.0.request.update_mask = v.map(|x| x.into());
4252            self
4253        }
4254    }
4255
4256    #[doc(hidden)]
4257    impl crate::RequestBuilder for UpdateIssue {
4258        fn request_options(&mut self) -> &mut crate::RequestOptions {
4259            &mut self.0.options
4260        }
4261    }
4262
4263    /// The request builder for [SecureSourceManager::delete_issue][crate::client::SecureSourceManager::delete_issue] calls.
4264    ///
4265    /// # Example
4266    /// ```
4267    /// # use google_cloud_securesourcemanager_v1::builder::secure_source_manager::DeleteIssue;
4268    /// # async fn sample() -> google_cloud_securesourcemanager_v1::Result<()> {
4269    /// use google_cloud_lro::Poller;
4270    ///
4271    /// let builder = prepare_request_builder();
4272    /// let response = builder.poller().until_done().await?;
4273    /// # Ok(()) }
4274    ///
4275    /// fn prepare_request_builder() -> DeleteIssue {
4276    ///   # panic!();
4277    ///   // ... details omitted ...
4278    /// }
4279    /// ```
4280    #[derive(Clone, Debug)]
4281    pub struct DeleteIssue(RequestBuilder<crate::model::DeleteIssueRequest>);
4282
4283    impl DeleteIssue {
4284        pub(crate) fn new(
4285            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
4286        ) -> Self {
4287            Self(RequestBuilder::new(stub))
4288        }
4289
4290        /// Sets the full request, replacing any prior values.
4291        pub fn with_request<V: Into<crate::model::DeleteIssueRequest>>(mut self, v: V) -> Self {
4292            self.0.request = v.into();
4293            self
4294        }
4295
4296        /// Sets all the options, replacing any prior values.
4297        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4298            self.0.options = v.into();
4299            self
4300        }
4301
4302        /// Sends the request.
4303        ///
4304        /// # Long running operations
4305        ///
4306        /// This starts, but does not poll, a longrunning operation. More information
4307        /// on [delete_issue][crate::client::SecureSourceManager::delete_issue].
4308        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
4309            (*self.0.stub)
4310                .delete_issue(self.0.request, self.0.options)
4311                .await
4312                .map(crate::Response::into_body)
4313        }
4314
4315        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_issue`.
4316        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
4317            type Operation =
4318                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
4319            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4320            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4321            let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
4322            if let Some(ref mut details) = poller_options.tracing {
4323                details.method_name = "google_cloud_securesourcemanager_v1::client::SecureSourceManager::delete_issue::until_done";
4324            }
4325
4326            let stub = self.0.stub.clone();
4327            let mut options = self.0.options.clone();
4328            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
4329            let query = move |name| {
4330                let stub = stub.clone();
4331                let options = options.clone();
4332                async {
4333                    let op = GetOperation::new(stub)
4334                        .set_name(name)
4335                        .with_options(options)
4336                        .send()
4337                        .await?;
4338                    Ok(Operation::new(op))
4339                }
4340            };
4341
4342            let start = move || async {
4343                let op = self.send().await?;
4344                Ok(Operation::new(op))
4345            };
4346
4347            use google_cloud_lro::internal::PollerExt;
4348            {
4349                google_cloud_lro::internal::new_unit_response_poller(
4350                    polling_error_policy,
4351                    polling_backoff_policy,
4352                    start,
4353                    query,
4354                )
4355            }
4356            .with_options(poller_options)
4357        }
4358
4359        /// Sets the value of [name][crate::model::DeleteIssueRequest::name].
4360        ///
4361        /// This is a **required** field for requests.
4362        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4363            self.0.request.name = v.into();
4364            self
4365        }
4366
4367        /// Sets the value of [etag][crate::model::DeleteIssueRequest::etag].
4368        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
4369            self.0.request.etag = v.into();
4370            self
4371        }
4372    }
4373
4374    #[doc(hidden)]
4375    impl crate::RequestBuilder for DeleteIssue {
4376        fn request_options(&mut self) -> &mut crate::RequestOptions {
4377            &mut self.0.options
4378        }
4379    }
4380
4381    /// The request builder for [SecureSourceManager::open_issue][crate::client::SecureSourceManager::open_issue] calls.
4382    ///
4383    /// # Example
4384    /// ```
4385    /// # use google_cloud_securesourcemanager_v1::builder::secure_source_manager::OpenIssue;
4386    /// # async fn sample() -> google_cloud_securesourcemanager_v1::Result<()> {
4387    /// use google_cloud_lro::Poller;
4388    ///
4389    /// let builder = prepare_request_builder();
4390    /// let response = builder.poller().until_done().await?;
4391    /// # Ok(()) }
4392    ///
4393    /// fn prepare_request_builder() -> OpenIssue {
4394    ///   # panic!();
4395    ///   // ... details omitted ...
4396    /// }
4397    /// ```
4398    #[derive(Clone, Debug)]
4399    pub struct OpenIssue(RequestBuilder<crate::model::OpenIssueRequest>);
4400
4401    impl OpenIssue {
4402        pub(crate) fn new(
4403            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
4404        ) -> Self {
4405            Self(RequestBuilder::new(stub))
4406        }
4407
4408        /// Sets the full request, replacing any prior values.
4409        pub fn with_request<V: Into<crate::model::OpenIssueRequest>>(mut self, v: V) -> Self {
4410            self.0.request = v.into();
4411            self
4412        }
4413
4414        /// Sets all the options, replacing any prior values.
4415        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4416            self.0.options = v.into();
4417            self
4418        }
4419
4420        /// Sends the request.
4421        ///
4422        /// # Long running operations
4423        ///
4424        /// This starts, but does not poll, a longrunning operation. More information
4425        /// on [open_issue][crate::client::SecureSourceManager::open_issue].
4426        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
4427            (*self.0.stub)
4428                .open_issue(self.0.request, self.0.options)
4429                .await
4430                .map(crate::Response::into_body)
4431        }
4432
4433        /// Creates a [Poller][google_cloud_lro::Poller] to work with `open_issue`.
4434        pub fn poller(
4435            self,
4436        ) -> impl google_cloud_lro::Poller<crate::model::Issue, crate::model::OperationMetadata>
4437        {
4438            type Operation = google_cloud_lro::internal::Operation<
4439                crate::model::Issue,
4440                crate::model::OperationMetadata,
4441            >;
4442            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4443            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4444            let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
4445            if let Some(ref mut details) = poller_options.tracing {
4446                details.method_name = "google_cloud_securesourcemanager_v1::client::SecureSourceManager::open_issue::until_done";
4447            }
4448
4449            let stub = self.0.stub.clone();
4450            let mut options = self.0.options.clone();
4451            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
4452            let query = move |name| {
4453                let stub = stub.clone();
4454                let options = options.clone();
4455                async {
4456                    let op = GetOperation::new(stub)
4457                        .set_name(name)
4458                        .with_options(options)
4459                        .send()
4460                        .await?;
4461                    Ok(Operation::new(op))
4462                }
4463            };
4464
4465            let start = move || async {
4466                let op = self.send().await?;
4467                Ok(Operation::new(op))
4468            };
4469
4470            use google_cloud_lro::internal::PollerExt;
4471            {
4472                google_cloud_lro::internal::new_poller(
4473                    polling_error_policy,
4474                    polling_backoff_policy,
4475                    start,
4476                    query,
4477                )
4478            }
4479            .with_options(poller_options)
4480        }
4481
4482        /// Sets the value of [name][crate::model::OpenIssueRequest::name].
4483        ///
4484        /// This is a **required** field for requests.
4485        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4486            self.0.request.name = v.into();
4487            self
4488        }
4489
4490        /// Sets the value of [etag][crate::model::OpenIssueRequest::etag].
4491        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
4492            self.0.request.etag = v.into();
4493            self
4494        }
4495    }
4496
4497    #[doc(hidden)]
4498    impl crate::RequestBuilder for OpenIssue {
4499        fn request_options(&mut self) -> &mut crate::RequestOptions {
4500            &mut self.0.options
4501        }
4502    }
4503
4504    /// The request builder for [SecureSourceManager::close_issue][crate::client::SecureSourceManager::close_issue] calls.
4505    ///
4506    /// # Example
4507    /// ```
4508    /// # use google_cloud_securesourcemanager_v1::builder::secure_source_manager::CloseIssue;
4509    /// # async fn sample() -> google_cloud_securesourcemanager_v1::Result<()> {
4510    /// use google_cloud_lro::Poller;
4511    ///
4512    /// let builder = prepare_request_builder();
4513    /// let response = builder.poller().until_done().await?;
4514    /// # Ok(()) }
4515    ///
4516    /// fn prepare_request_builder() -> CloseIssue {
4517    ///   # panic!();
4518    ///   // ... details omitted ...
4519    /// }
4520    /// ```
4521    #[derive(Clone, Debug)]
4522    pub struct CloseIssue(RequestBuilder<crate::model::CloseIssueRequest>);
4523
4524    impl CloseIssue {
4525        pub(crate) fn new(
4526            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
4527        ) -> Self {
4528            Self(RequestBuilder::new(stub))
4529        }
4530
4531        /// Sets the full request, replacing any prior values.
4532        pub fn with_request<V: Into<crate::model::CloseIssueRequest>>(mut self, v: V) -> Self {
4533            self.0.request = v.into();
4534            self
4535        }
4536
4537        /// Sets all the options, replacing any prior values.
4538        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4539            self.0.options = v.into();
4540            self
4541        }
4542
4543        /// Sends the request.
4544        ///
4545        /// # Long running operations
4546        ///
4547        /// This starts, but does not poll, a longrunning operation. More information
4548        /// on [close_issue][crate::client::SecureSourceManager::close_issue].
4549        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
4550            (*self.0.stub)
4551                .close_issue(self.0.request, self.0.options)
4552                .await
4553                .map(crate::Response::into_body)
4554        }
4555
4556        /// Creates a [Poller][google_cloud_lro::Poller] to work with `close_issue`.
4557        pub fn poller(
4558            self,
4559        ) -> impl google_cloud_lro::Poller<crate::model::Issue, crate::model::OperationMetadata>
4560        {
4561            type Operation = google_cloud_lro::internal::Operation<
4562                crate::model::Issue,
4563                crate::model::OperationMetadata,
4564            >;
4565            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4566            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4567            let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
4568            if let Some(ref mut details) = poller_options.tracing {
4569                details.method_name = "google_cloud_securesourcemanager_v1::client::SecureSourceManager::close_issue::until_done";
4570            }
4571
4572            let stub = self.0.stub.clone();
4573            let mut options = self.0.options.clone();
4574            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
4575            let query = move |name| {
4576                let stub = stub.clone();
4577                let options = options.clone();
4578                async {
4579                    let op = GetOperation::new(stub)
4580                        .set_name(name)
4581                        .with_options(options)
4582                        .send()
4583                        .await?;
4584                    Ok(Operation::new(op))
4585                }
4586            };
4587
4588            let start = move || async {
4589                let op = self.send().await?;
4590                Ok(Operation::new(op))
4591            };
4592
4593            use google_cloud_lro::internal::PollerExt;
4594            {
4595                google_cloud_lro::internal::new_poller(
4596                    polling_error_policy,
4597                    polling_backoff_policy,
4598                    start,
4599                    query,
4600                )
4601            }
4602            .with_options(poller_options)
4603        }
4604
4605        /// Sets the value of [name][crate::model::CloseIssueRequest::name].
4606        ///
4607        /// This is a **required** field for requests.
4608        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4609            self.0.request.name = v.into();
4610            self
4611        }
4612
4613        /// Sets the value of [etag][crate::model::CloseIssueRequest::etag].
4614        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
4615            self.0.request.etag = v.into();
4616            self
4617        }
4618    }
4619
4620    #[doc(hidden)]
4621    impl crate::RequestBuilder for CloseIssue {
4622        fn request_options(&mut self) -> &mut crate::RequestOptions {
4623            &mut self.0.options
4624        }
4625    }
4626
4627    /// The request builder for [SecureSourceManager::get_pull_request_comment][crate::client::SecureSourceManager::get_pull_request_comment] calls.
4628    ///
4629    /// # Example
4630    /// ```
4631    /// # use google_cloud_securesourcemanager_v1::builder::secure_source_manager::GetPullRequestComment;
4632    /// # async fn sample() -> google_cloud_securesourcemanager_v1::Result<()> {
4633    ///
4634    /// let builder = prepare_request_builder();
4635    /// let response = builder.send().await?;
4636    /// # Ok(()) }
4637    ///
4638    /// fn prepare_request_builder() -> GetPullRequestComment {
4639    ///   # panic!();
4640    ///   // ... details omitted ...
4641    /// }
4642    /// ```
4643    #[derive(Clone, Debug)]
4644    pub struct GetPullRequestComment(RequestBuilder<crate::model::GetPullRequestCommentRequest>);
4645
4646    impl GetPullRequestComment {
4647        pub(crate) fn new(
4648            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
4649        ) -> Self {
4650            Self(RequestBuilder::new(stub))
4651        }
4652
4653        /// Sets the full request, replacing any prior values.
4654        pub fn with_request<V: Into<crate::model::GetPullRequestCommentRequest>>(
4655            mut self,
4656            v: V,
4657        ) -> Self {
4658            self.0.request = v.into();
4659            self
4660        }
4661
4662        /// Sets all the options, replacing any prior values.
4663        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4664            self.0.options = v.into();
4665            self
4666        }
4667
4668        /// Sends the request.
4669        pub async fn send(self) -> Result<crate::model::PullRequestComment> {
4670            (*self.0.stub)
4671                .get_pull_request_comment(self.0.request, self.0.options)
4672                .await
4673                .map(crate::Response::into_body)
4674        }
4675
4676        /// Sets the value of [name][crate::model::GetPullRequestCommentRequest::name].
4677        ///
4678        /// This is a **required** field for requests.
4679        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4680            self.0.request.name = v.into();
4681            self
4682        }
4683    }
4684
4685    #[doc(hidden)]
4686    impl crate::RequestBuilder for GetPullRequestComment {
4687        fn request_options(&mut self) -> &mut crate::RequestOptions {
4688            &mut self.0.options
4689        }
4690    }
4691
4692    /// The request builder for [SecureSourceManager::list_pull_request_comments][crate::client::SecureSourceManager::list_pull_request_comments] calls.
4693    ///
4694    /// # Example
4695    /// ```
4696    /// # use google_cloud_securesourcemanager_v1::builder::secure_source_manager::ListPullRequestComments;
4697    /// # async fn sample() -> google_cloud_securesourcemanager_v1::Result<()> {
4698    /// use google_cloud_gax::paginator::ItemPaginator;
4699    ///
4700    /// let builder = prepare_request_builder();
4701    /// let mut items = builder.by_item();
4702    /// while let Some(result) = items.next().await {
4703    ///   let item = result?;
4704    /// }
4705    /// # Ok(()) }
4706    ///
4707    /// fn prepare_request_builder() -> ListPullRequestComments {
4708    ///   # panic!();
4709    ///   // ... details omitted ...
4710    /// }
4711    /// ```
4712    #[derive(Clone, Debug)]
4713    pub struct ListPullRequestComments(
4714        RequestBuilder<crate::model::ListPullRequestCommentsRequest>,
4715    );
4716
4717    impl ListPullRequestComments {
4718        pub(crate) fn new(
4719            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
4720        ) -> Self {
4721            Self(RequestBuilder::new(stub))
4722        }
4723
4724        /// Sets the full request, replacing any prior values.
4725        pub fn with_request<V: Into<crate::model::ListPullRequestCommentsRequest>>(
4726            mut self,
4727            v: V,
4728        ) -> Self {
4729            self.0.request = v.into();
4730            self
4731        }
4732
4733        /// Sets all the options, replacing any prior values.
4734        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4735            self.0.options = v.into();
4736            self
4737        }
4738
4739        /// Sends the request.
4740        pub async fn send(self) -> Result<crate::model::ListPullRequestCommentsResponse> {
4741            (*self.0.stub)
4742                .list_pull_request_comments(self.0.request, self.0.options)
4743                .await
4744                .map(crate::Response::into_body)
4745        }
4746
4747        /// Streams each page in the collection.
4748        pub fn by_page(
4749            self,
4750        ) -> impl google_cloud_gax::paginator::Paginator<
4751            crate::model::ListPullRequestCommentsResponse,
4752            crate::Error,
4753        > {
4754            use std::clone::Clone;
4755            let token = self.0.request.page_token.clone();
4756            let execute = move |token: String| {
4757                let mut builder = self.clone();
4758                builder.0.request = builder.0.request.set_page_token(token);
4759                builder.send()
4760            };
4761            google_cloud_gax::paginator::internal::new_paginator(token, execute)
4762        }
4763
4764        /// Streams each item in the collection.
4765        pub fn by_item(
4766            self,
4767        ) -> impl google_cloud_gax::paginator::ItemPaginator<
4768            crate::model::ListPullRequestCommentsResponse,
4769            crate::Error,
4770        > {
4771            use google_cloud_gax::paginator::Paginator;
4772            self.by_page().items()
4773        }
4774
4775        /// Sets the value of [parent][crate::model::ListPullRequestCommentsRequest::parent].
4776        ///
4777        /// This is a **required** field for requests.
4778        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
4779            self.0.request.parent = v.into();
4780            self
4781        }
4782
4783        /// Sets the value of [page_size][crate::model::ListPullRequestCommentsRequest::page_size].
4784        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
4785            self.0.request.page_size = v.into();
4786            self
4787        }
4788
4789        /// Sets the value of [page_token][crate::model::ListPullRequestCommentsRequest::page_token].
4790        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
4791            self.0.request.page_token = v.into();
4792            self
4793        }
4794    }
4795
4796    #[doc(hidden)]
4797    impl crate::RequestBuilder for ListPullRequestComments {
4798        fn request_options(&mut self) -> &mut crate::RequestOptions {
4799            &mut self.0.options
4800        }
4801    }
4802
4803    /// The request builder for [SecureSourceManager::create_pull_request_comment][crate::client::SecureSourceManager::create_pull_request_comment] calls.
4804    ///
4805    /// # Example
4806    /// ```
4807    /// # use google_cloud_securesourcemanager_v1::builder::secure_source_manager::CreatePullRequestComment;
4808    /// # async fn sample() -> google_cloud_securesourcemanager_v1::Result<()> {
4809    /// use google_cloud_lro::Poller;
4810    ///
4811    /// let builder = prepare_request_builder();
4812    /// let response = builder.poller().until_done().await?;
4813    /// # Ok(()) }
4814    ///
4815    /// fn prepare_request_builder() -> CreatePullRequestComment {
4816    ///   # panic!();
4817    ///   // ... details omitted ...
4818    /// }
4819    /// ```
4820    #[derive(Clone, Debug)]
4821    pub struct CreatePullRequestComment(
4822        RequestBuilder<crate::model::CreatePullRequestCommentRequest>,
4823    );
4824
4825    impl CreatePullRequestComment {
4826        pub(crate) fn new(
4827            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
4828        ) -> Self {
4829            Self(RequestBuilder::new(stub))
4830        }
4831
4832        /// Sets the full request, replacing any prior values.
4833        pub fn with_request<V: Into<crate::model::CreatePullRequestCommentRequest>>(
4834            mut self,
4835            v: V,
4836        ) -> Self {
4837            self.0.request = v.into();
4838            self
4839        }
4840
4841        /// Sets all the options, replacing any prior values.
4842        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4843            self.0.options = v.into();
4844            self
4845        }
4846
4847        /// Sends the request.
4848        ///
4849        /// # Long running operations
4850        ///
4851        /// This starts, but does not poll, a longrunning operation. More information
4852        /// on [create_pull_request_comment][crate::client::SecureSourceManager::create_pull_request_comment].
4853        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
4854            (*self.0.stub)
4855                .create_pull_request_comment(self.0.request, self.0.options)
4856                .await
4857                .map(crate::Response::into_body)
4858        }
4859
4860        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_pull_request_comment`.
4861        pub fn poller(
4862            self,
4863        ) -> impl google_cloud_lro::Poller<
4864            crate::model::PullRequestComment,
4865            crate::model::OperationMetadata,
4866        > {
4867            type Operation = google_cloud_lro::internal::Operation<
4868                crate::model::PullRequestComment,
4869                crate::model::OperationMetadata,
4870            >;
4871            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4872            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4873            let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
4874            if let Some(ref mut details) = poller_options.tracing {
4875                details.method_name = "google_cloud_securesourcemanager_v1::client::SecureSourceManager::create_pull_request_comment::until_done";
4876            }
4877
4878            let stub = self.0.stub.clone();
4879            let mut options = self.0.options.clone();
4880            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
4881            let query = move |name| {
4882                let stub = stub.clone();
4883                let options = options.clone();
4884                async {
4885                    let op = GetOperation::new(stub)
4886                        .set_name(name)
4887                        .with_options(options)
4888                        .send()
4889                        .await?;
4890                    Ok(Operation::new(op))
4891                }
4892            };
4893
4894            let start = move || async {
4895                let op = self.send().await?;
4896                Ok(Operation::new(op))
4897            };
4898
4899            use google_cloud_lro::internal::PollerExt;
4900            {
4901                google_cloud_lro::internal::new_poller(
4902                    polling_error_policy,
4903                    polling_backoff_policy,
4904                    start,
4905                    query,
4906                )
4907            }
4908            .with_options(poller_options)
4909        }
4910
4911        /// Sets the value of [parent][crate::model::CreatePullRequestCommentRequest::parent].
4912        ///
4913        /// This is a **required** field for requests.
4914        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
4915            self.0.request.parent = v.into();
4916            self
4917        }
4918
4919        /// Sets the value of [pull_request_comment][crate::model::CreatePullRequestCommentRequest::pull_request_comment].
4920        ///
4921        /// This is a **required** field for requests.
4922        pub fn set_pull_request_comment<T>(mut self, v: T) -> Self
4923        where
4924            T: std::convert::Into<crate::model::PullRequestComment>,
4925        {
4926            self.0.request.pull_request_comment = std::option::Option::Some(v.into());
4927            self
4928        }
4929
4930        /// Sets or clears the value of [pull_request_comment][crate::model::CreatePullRequestCommentRequest::pull_request_comment].
4931        ///
4932        /// This is a **required** field for requests.
4933        pub fn set_or_clear_pull_request_comment<T>(mut self, v: std::option::Option<T>) -> Self
4934        where
4935            T: std::convert::Into<crate::model::PullRequestComment>,
4936        {
4937            self.0.request.pull_request_comment = v.map(|x| x.into());
4938            self
4939        }
4940    }
4941
4942    #[doc(hidden)]
4943    impl crate::RequestBuilder for CreatePullRequestComment {
4944        fn request_options(&mut self) -> &mut crate::RequestOptions {
4945            &mut self.0.options
4946        }
4947    }
4948
4949    /// The request builder for [SecureSourceManager::update_pull_request_comment][crate::client::SecureSourceManager::update_pull_request_comment] calls.
4950    ///
4951    /// # Example
4952    /// ```
4953    /// # use google_cloud_securesourcemanager_v1::builder::secure_source_manager::UpdatePullRequestComment;
4954    /// # async fn sample() -> google_cloud_securesourcemanager_v1::Result<()> {
4955    /// use google_cloud_lro::Poller;
4956    ///
4957    /// let builder = prepare_request_builder();
4958    /// let response = builder.poller().until_done().await?;
4959    /// # Ok(()) }
4960    ///
4961    /// fn prepare_request_builder() -> UpdatePullRequestComment {
4962    ///   # panic!();
4963    ///   // ... details omitted ...
4964    /// }
4965    /// ```
4966    #[derive(Clone, Debug)]
4967    pub struct UpdatePullRequestComment(
4968        RequestBuilder<crate::model::UpdatePullRequestCommentRequest>,
4969    );
4970
4971    impl UpdatePullRequestComment {
4972        pub(crate) fn new(
4973            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
4974        ) -> Self {
4975            Self(RequestBuilder::new(stub))
4976        }
4977
4978        /// Sets the full request, replacing any prior values.
4979        pub fn with_request<V: Into<crate::model::UpdatePullRequestCommentRequest>>(
4980            mut self,
4981            v: V,
4982        ) -> Self {
4983            self.0.request = v.into();
4984            self
4985        }
4986
4987        /// Sets all the options, replacing any prior values.
4988        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4989            self.0.options = v.into();
4990            self
4991        }
4992
4993        /// Sends the request.
4994        ///
4995        /// # Long running operations
4996        ///
4997        /// This starts, but does not poll, a longrunning operation. More information
4998        /// on [update_pull_request_comment][crate::client::SecureSourceManager::update_pull_request_comment].
4999        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
5000            (*self.0.stub)
5001                .update_pull_request_comment(self.0.request, self.0.options)
5002                .await
5003                .map(crate::Response::into_body)
5004        }
5005
5006        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_pull_request_comment`.
5007        pub fn poller(
5008            self,
5009        ) -> impl google_cloud_lro::Poller<
5010            crate::model::PullRequestComment,
5011            crate::model::OperationMetadata,
5012        > {
5013            type Operation = google_cloud_lro::internal::Operation<
5014                crate::model::PullRequestComment,
5015                crate::model::OperationMetadata,
5016            >;
5017            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
5018            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
5019            let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
5020            if let Some(ref mut details) = poller_options.tracing {
5021                details.method_name = "google_cloud_securesourcemanager_v1::client::SecureSourceManager::update_pull_request_comment::until_done";
5022            }
5023
5024            let stub = self.0.stub.clone();
5025            let mut options = self.0.options.clone();
5026            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
5027            let query = move |name| {
5028                let stub = stub.clone();
5029                let options = options.clone();
5030                async {
5031                    let op = GetOperation::new(stub)
5032                        .set_name(name)
5033                        .with_options(options)
5034                        .send()
5035                        .await?;
5036                    Ok(Operation::new(op))
5037                }
5038            };
5039
5040            let start = move || async {
5041                let op = self.send().await?;
5042                Ok(Operation::new(op))
5043            };
5044
5045            use google_cloud_lro::internal::PollerExt;
5046            {
5047                google_cloud_lro::internal::new_poller(
5048                    polling_error_policy,
5049                    polling_backoff_policy,
5050                    start,
5051                    query,
5052                )
5053            }
5054            .with_options(poller_options)
5055        }
5056
5057        /// Sets the value of [pull_request_comment][crate::model::UpdatePullRequestCommentRequest::pull_request_comment].
5058        ///
5059        /// This is a **required** field for requests.
5060        pub fn set_pull_request_comment<T>(mut self, v: T) -> Self
5061        where
5062            T: std::convert::Into<crate::model::PullRequestComment>,
5063        {
5064            self.0.request.pull_request_comment = std::option::Option::Some(v.into());
5065            self
5066        }
5067
5068        /// Sets or clears the value of [pull_request_comment][crate::model::UpdatePullRequestCommentRequest::pull_request_comment].
5069        ///
5070        /// This is a **required** field for requests.
5071        pub fn set_or_clear_pull_request_comment<T>(mut self, v: std::option::Option<T>) -> Self
5072        where
5073            T: std::convert::Into<crate::model::PullRequestComment>,
5074        {
5075            self.0.request.pull_request_comment = v.map(|x| x.into());
5076            self
5077        }
5078
5079        /// Sets the value of [update_mask][crate::model::UpdatePullRequestCommentRequest::update_mask].
5080        pub fn set_update_mask<T>(mut self, v: T) -> Self
5081        where
5082            T: std::convert::Into<wkt::FieldMask>,
5083        {
5084            self.0.request.update_mask = std::option::Option::Some(v.into());
5085            self
5086        }
5087
5088        /// Sets or clears the value of [update_mask][crate::model::UpdatePullRequestCommentRequest::update_mask].
5089        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
5090        where
5091            T: std::convert::Into<wkt::FieldMask>,
5092        {
5093            self.0.request.update_mask = v.map(|x| x.into());
5094            self
5095        }
5096    }
5097
5098    #[doc(hidden)]
5099    impl crate::RequestBuilder for UpdatePullRequestComment {
5100        fn request_options(&mut self) -> &mut crate::RequestOptions {
5101            &mut self.0.options
5102        }
5103    }
5104
5105    /// The request builder for [SecureSourceManager::delete_pull_request_comment][crate::client::SecureSourceManager::delete_pull_request_comment] calls.
5106    ///
5107    /// # Example
5108    /// ```
5109    /// # use google_cloud_securesourcemanager_v1::builder::secure_source_manager::DeletePullRequestComment;
5110    /// # async fn sample() -> google_cloud_securesourcemanager_v1::Result<()> {
5111    /// use google_cloud_lro::Poller;
5112    ///
5113    /// let builder = prepare_request_builder();
5114    /// let response = builder.poller().until_done().await?;
5115    /// # Ok(()) }
5116    ///
5117    /// fn prepare_request_builder() -> DeletePullRequestComment {
5118    ///   # panic!();
5119    ///   // ... details omitted ...
5120    /// }
5121    /// ```
5122    #[derive(Clone, Debug)]
5123    pub struct DeletePullRequestComment(
5124        RequestBuilder<crate::model::DeletePullRequestCommentRequest>,
5125    );
5126
5127    impl DeletePullRequestComment {
5128        pub(crate) fn new(
5129            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
5130        ) -> Self {
5131            Self(RequestBuilder::new(stub))
5132        }
5133
5134        /// Sets the full request, replacing any prior values.
5135        pub fn with_request<V: Into<crate::model::DeletePullRequestCommentRequest>>(
5136            mut self,
5137            v: V,
5138        ) -> Self {
5139            self.0.request = v.into();
5140            self
5141        }
5142
5143        /// Sets all the options, replacing any prior values.
5144        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5145            self.0.options = v.into();
5146            self
5147        }
5148
5149        /// Sends the request.
5150        ///
5151        /// # Long running operations
5152        ///
5153        /// This starts, but does not poll, a longrunning operation. More information
5154        /// on [delete_pull_request_comment][crate::client::SecureSourceManager::delete_pull_request_comment].
5155        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
5156            (*self.0.stub)
5157                .delete_pull_request_comment(self.0.request, self.0.options)
5158                .await
5159                .map(crate::Response::into_body)
5160        }
5161
5162        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_pull_request_comment`.
5163        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
5164            type Operation =
5165                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
5166            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
5167            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
5168            let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
5169            if let Some(ref mut details) = poller_options.tracing {
5170                details.method_name = "google_cloud_securesourcemanager_v1::client::SecureSourceManager::delete_pull_request_comment::until_done";
5171            }
5172
5173            let stub = self.0.stub.clone();
5174            let mut options = self.0.options.clone();
5175            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
5176            let query = move |name| {
5177                let stub = stub.clone();
5178                let options = options.clone();
5179                async {
5180                    let op = GetOperation::new(stub)
5181                        .set_name(name)
5182                        .with_options(options)
5183                        .send()
5184                        .await?;
5185                    Ok(Operation::new(op))
5186                }
5187            };
5188
5189            let start = move || async {
5190                let op = self.send().await?;
5191                Ok(Operation::new(op))
5192            };
5193
5194            use google_cloud_lro::internal::PollerExt;
5195            {
5196                google_cloud_lro::internal::new_unit_response_poller(
5197                    polling_error_policy,
5198                    polling_backoff_policy,
5199                    start,
5200                    query,
5201                )
5202            }
5203            .with_options(poller_options)
5204        }
5205
5206        /// Sets the value of [name][crate::model::DeletePullRequestCommentRequest::name].
5207        ///
5208        /// This is a **required** field for requests.
5209        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5210            self.0.request.name = v.into();
5211            self
5212        }
5213    }
5214
5215    #[doc(hidden)]
5216    impl crate::RequestBuilder for DeletePullRequestComment {
5217        fn request_options(&mut self) -> &mut crate::RequestOptions {
5218            &mut self.0.options
5219        }
5220    }
5221
5222    /// The request builder for [SecureSourceManager::batch_create_pull_request_comments][crate::client::SecureSourceManager::batch_create_pull_request_comments] calls.
5223    ///
5224    /// # Example
5225    /// ```
5226    /// # use google_cloud_securesourcemanager_v1::builder::secure_source_manager::BatchCreatePullRequestComments;
5227    /// # async fn sample() -> google_cloud_securesourcemanager_v1::Result<()> {
5228    /// use google_cloud_lro::Poller;
5229    ///
5230    /// let builder = prepare_request_builder();
5231    /// let response = builder.poller().until_done().await?;
5232    /// # Ok(()) }
5233    ///
5234    /// fn prepare_request_builder() -> BatchCreatePullRequestComments {
5235    ///   # panic!();
5236    ///   // ... details omitted ...
5237    /// }
5238    /// ```
5239    #[derive(Clone, Debug)]
5240    pub struct BatchCreatePullRequestComments(
5241        RequestBuilder<crate::model::BatchCreatePullRequestCommentsRequest>,
5242    );
5243
5244    impl BatchCreatePullRequestComments {
5245        pub(crate) fn new(
5246            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
5247        ) -> Self {
5248            Self(RequestBuilder::new(stub))
5249        }
5250
5251        /// Sets the full request, replacing any prior values.
5252        pub fn with_request<V: Into<crate::model::BatchCreatePullRequestCommentsRequest>>(
5253            mut self,
5254            v: V,
5255        ) -> Self {
5256            self.0.request = v.into();
5257            self
5258        }
5259
5260        /// Sets all the options, replacing any prior values.
5261        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5262            self.0.options = v.into();
5263            self
5264        }
5265
5266        /// Sends the request.
5267        ///
5268        /// # Long running operations
5269        ///
5270        /// This starts, but does not poll, a longrunning operation. More information
5271        /// on [batch_create_pull_request_comments][crate::client::SecureSourceManager::batch_create_pull_request_comments].
5272        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
5273            (*self.0.stub)
5274                .batch_create_pull_request_comments(self.0.request, self.0.options)
5275                .await
5276                .map(crate::Response::into_body)
5277        }
5278
5279        /// Creates a [Poller][google_cloud_lro::Poller] to work with `batch_create_pull_request_comments`.
5280        pub fn poller(
5281            self,
5282        ) -> impl google_cloud_lro::Poller<
5283            crate::model::BatchCreatePullRequestCommentsResponse,
5284            crate::model::OperationMetadata,
5285        > {
5286            type Operation = google_cloud_lro::internal::Operation<
5287                crate::model::BatchCreatePullRequestCommentsResponse,
5288                crate::model::OperationMetadata,
5289            >;
5290            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
5291            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
5292            let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
5293            if let Some(ref mut details) = poller_options.tracing {
5294                details.method_name = "google_cloud_securesourcemanager_v1::client::SecureSourceManager::batch_create_pull_request_comments::until_done";
5295            }
5296
5297            let stub = self.0.stub.clone();
5298            let mut options = self.0.options.clone();
5299            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
5300            let query = move |name| {
5301                let stub = stub.clone();
5302                let options = options.clone();
5303                async {
5304                    let op = GetOperation::new(stub)
5305                        .set_name(name)
5306                        .with_options(options)
5307                        .send()
5308                        .await?;
5309                    Ok(Operation::new(op))
5310                }
5311            };
5312
5313            let start = move || async {
5314                let op = self.send().await?;
5315                Ok(Operation::new(op))
5316            };
5317
5318            use google_cloud_lro::internal::PollerExt;
5319            {
5320                google_cloud_lro::internal::new_poller(
5321                    polling_error_policy,
5322                    polling_backoff_policy,
5323                    start,
5324                    query,
5325                )
5326            }
5327            .with_options(poller_options)
5328        }
5329
5330        /// Sets the value of [parent][crate::model::BatchCreatePullRequestCommentsRequest::parent].
5331        ///
5332        /// This is a **required** field for requests.
5333        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5334            self.0.request.parent = v.into();
5335            self
5336        }
5337
5338        /// Sets the value of [requests][crate::model::BatchCreatePullRequestCommentsRequest::requests].
5339        ///
5340        /// This is a **required** field for requests.
5341        pub fn set_requests<T, V>(mut self, v: T) -> Self
5342        where
5343            T: std::iter::IntoIterator<Item = V>,
5344            V: std::convert::Into<crate::model::CreatePullRequestCommentRequest>,
5345        {
5346            use std::iter::Iterator;
5347            self.0.request.requests = v.into_iter().map(|i| i.into()).collect();
5348            self
5349        }
5350    }
5351
5352    #[doc(hidden)]
5353    impl crate::RequestBuilder for BatchCreatePullRequestComments {
5354        fn request_options(&mut self) -> &mut crate::RequestOptions {
5355            &mut self.0.options
5356        }
5357    }
5358
5359    /// The request builder for [SecureSourceManager::resolve_pull_request_comments][crate::client::SecureSourceManager::resolve_pull_request_comments] calls.
5360    ///
5361    /// # Example
5362    /// ```
5363    /// # use google_cloud_securesourcemanager_v1::builder::secure_source_manager::ResolvePullRequestComments;
5364    /// # async fn sample() -> google_cloud_securesourcemanager_v1::Result<()> {
5365    /// use google_cloud_lro::Poller;
5366    ///
5367    /// let builder = prepare_request_builder();
5368    /// let response = builder.poller().until_done().await?;
5369    /// # Ok(()) }
5370    ///
5371    /// fn prepare_request_builder() -> ResolvePullRequestComments {
5372    ///   # panic!();
5373    ///   // ... details omitted ...
5374    /// }
5375    /// ```
5376    #[derive(Clone, Debug)]
5377    pub struct ResolvePullRequestComments(
5378        RequestBuilder<crate::model::ResolvePullRequestCommentsRequest>,
5379    );
5380
5381    impl ResolvePullRequestComments {
5382        pub(crate) fn new(
5383            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
5384        ) -> Self {
5385            Self(RequestBuilder::new(stub))
5386        }
5387
5388        /// Sets the full request, replacing any prior values.
5389        pub fn with_request<V: Into<crate::model::ResolvePullRequestCommentsRequest>>(
5390            mut self,
5391            v: V,
5392        ) -> Self {
5393            self.0.request = v.into();
5394            self
5395        }
5396
5397        /// Sets all the options, replacing any prior values.
5398        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5399            self.0.options = v.into();
5400            self
5401        }
5402
5403        /// Sends the request.
5404        ///
5405        /// # Long running operations
5406        ///
5407        /// This starts, but does not poll, a longrunning operation. More information
5408        /// on [resolve_pull_request_comments][crate::client::SecureSourceManager::resolve_pull_request_comments].
5409        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
5410            (*self.0.stub)
5411                .resolve_pull_request_comments(self.0.request, self.0.options)
5412                .await
5413                .map(crate::Response::into_body)
5414        }
5415
5416        /// Creates a [Poller][google_cloud_lro::Poller] to work with `resolve_pull_request_comments`.
5417        pub fn poller(
5418            self,
5419        ) -> impl google_cloud_lro::Poller<
5420            crate::model::ResolvePullRequestCommentsResponse,
5421            crate::model::OperationMetadata,
5422        > {
5423            type Operation = google_cloud_lro::internal::Operation<
5424                crate::model::ResolvePullRequestCommentsResponse,
5425                crate::model::OperationMetadata,
5426            >;
5427            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
5428            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
5429            let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
5430            if let Some(ref mut details) = poller_options.tracing {
5431                details.method_name = "google_cloud_securesourcemanager_v1::client::SecureSourceManager::resolve_pull_request_comments::until_done";
5432            }
5433
5434            let stub = self.0.stub.clone();
5435            let mut options = self.0.options.clone();
5436            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
5437            let query = move |name| {
5438                let stub = stub.clone();
5439                let options = options.clone();
5440                async {
5441                    let op = GetOperation::new(stub)
5442                        .set_name(name)
5443                        .with_options(options)
5444                        .send()
5445                        .await?;
5446                    Ok(Operation::new(op))
5447                }
5448            };
5449
5450            let start = move || async {
5451                let op = self.send().await?;
5452                Ok(Operation::new(op))
5453            };
5454
5455            use google_cloud_lro::internal::PollerExt;
5456            {
5457                google_cloud_lro::internal::new_poller(
5458                    polling_error_policy,
5459                    polling_backoff_policy,
5460                    start,
5461                    query,
5462                )
5463            }
5464            .with_options(poller_options)
5465        }
5466
5467        /// Sets the value of [parent][crate::model::ResolvePullRequestCommentsRequest::parent].
5468        ///
5469        /// This is a **required** field for requests.
5470        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5471            self.0.request.parent = v.into();
5472            self
5473        }
5474
5475        /// Sets the value of [names][crate::model::ResolvePullRequestCommentsRequest::names].
5476        ///
5477        /// This is a **required** field for requests.
5478        pub fn set_names<T, V>(mut self, v: T) -> Self
5479        where
5480            T: std::iter::IntoIterator<Item = V>,
5481            V: std::convert::Into<std::string::String>,
5482        {
5483            use std::iter::Iterator;
5484            self.0.request.names = v.into_iter().map(|i| i.into()).collect();
5485            self
5486        }
5487
5488        /// Sets the value of [auto_fill][crate::model::ResolvePullRequestCommentsRequest::auto_fill].
5489        pub fn set_auto_fill<T: Into<bool>>(mut self, v: T) -> Self {
5490            self.0.request.auto_fill = v.into();
5491            self
5492        }
5493    }
5494
5495    #[doc(hidden)]
5496    impl crate::RequestBuilder for ResolvePullRequestComments {
5497        fn request_options(&mut self) -> &mut crate::RequestOptions {
5498            &mut self.0.options
5499        }
5500    }
5501
5502    /// The request builder for [SecureSourceManager::unresolve_pull_request_comments][crate::client::SecureSourceManager::unresolve_pull_request_comments] calls.
5503    ///
5504    /// # Example
5505    /// ```
5506    /// # use google_cloud_securesourcemanager_v1::builder::secure_source_manager::UnresolvePullRequestComments;
5507    /// # async fn sample() -> google_cloud_securesourcemanager_v1::Result<()> {
5508    /// use google_cloud_lro::Poller;
5509    ///
5510    /// let builder = prepare_request_builder();
5511    /// let response = builder.poller().until_done().await?;
5512    /// # Ok(()) }
5513    ///
5514    /// fn prepare_request_builder() -> UnresolvePullRequestComments {
5515    ///   # panic!();
5516    ///   // ... details omitted ...
5517    /// }
5518    /// ```
5519    #[derive(Clone, Debug)]
5520    pub struct UnresolvePullRequestComments(
5521        RequestBuilder<crate::model::UnresolvePullRequestCommentsRequest>,
5522    );
5523
5524    impl UnresolvePullRequestComments {
5525        pub(crate) fn new(
5526            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
5527        ) -> Self {
5528            Self(RequestBuilder::new(stub))
5529        }
5530
5531        /// Sets the full request, replacing any prior values.
5532        pub fn with_request<V: Into<crate::model::UnresolvePullRequestCommentsRequest>>(
5533            mut self,
5534            v: V,
5535        ) -> Self {
5536            self.0.request = v.into();
5537            self
5538        }
5539
5540        /// Sets all the options, replacing any prior values.
5541        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5542            self.0.options = v.into();
5543            self
5544        }
5545
5546        /// Sends the request.
5547        ///
5548        /// # Long running operations
5549        ///
5550        /// This starts, but does not poll, a longrunning operation. More information
5551        /// on [unresolve_pull_request_comments][crate::client::SecureSourceManager::unresolve_pull_request_comments].
5552        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
5553            (*self.0.stub)
5554                .unresolve_pull_request_comments(self.0.request, self.0.options)
5555                .await
5556                .map(crate::Response::into_body)
5557        }
5558
5559        /// Creates a [Poller][google_cloud_lro::Poller] to work with `unresolve_pull_request_comments`.
5560        pub fn poller(
5561            self,
5562        ) -> impl google_cloud_lro::Poller<
5563            crate::model::UnresolvePullRequestCommentsResponse,
5564            crate::model::OperationMetadata,
5565        > {
5566            type Operation = google_cloud_lro::internal::Operation<
5567                crate::model::UnresolvePullRequestCommentsResponse,
5568                crate::model::OperationMetadata,
5569            >;
5570            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
5571            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
5572            let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
5573            if let Some(ref mut details) = poller_options.tracing {
5574                details.method_name = "google_cloud_securesourcemanager_v1::client::SecureSourceManager::unresolve_pull_request_comments::until_done";
5575            }
5576
5577            let stub = self.0.stub.clone();
5578            let mut options = self.0.options.clone();
5579            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
5580            let query = move |name| {
5581                let stub = stub.clone();
5582                let options = options.clone();
5583                async {
5584                    let op = GetOperation::new(stub)
5585                        .set_name(name)
5586                        .with_options(options)
5587                        .send()
5588                        .await?;
5589                    Ok(Operation::new(op))
5590                }
5591            };
5592
5593            let start = move || async {
5594                let op = self.send().await?;
5595                Ok(Operation::new(op))
5596            };
5597
5598            use google_cloud_lro::internal::PollerExt;
5599            {
5600                google_cloud_lro::internal::new_poller(
5601                    polling_error_policy,
5602                    polling_backoff_policy,
5603                    start,
5604                    query,
5605                )
5606            }
5607            .with_options(poller_options)
5608        }
5609
5610        /// Sets the value of [parent][crate::model::UnresolvePullRequestCommentsRequest::parent].
5611        ///
5612        /// This is a **required** field for requests.
5613        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5614            self.0.request.parent = v.into();
5615            self
5616        }
5617
5618        /// Sets the value of [names][crate::model::UnresolvePullRequestCommentsRequest::names].
5619        ///
5620        /// This is a **required** field for requests.
5621        pub fn set_names<T, V>(mut self, v: T) -> Self
5622        where
5623            T: std::iter::IntoIterator<Item = V>,
5624            V: std::convert::Into<std::string::String>,
5625        {
5626            use std::iter::Iterator;
5627            self.0.request.names = v.into_iter().map(|i| i.into()).collect();
5628            self
5629        }
5630
5631        /// Sets the value of [auto_fill][crate::model::UnresolvePullRequestCommentsRequest::auto_fill].
5632        pub fn set_auto_fill<T: Into<bool>>(mut self, v: T) -> Self {
5633            self.0.request.auto_fill = v.into();
5634            self
5635        }
5636    }
5637
5638    #[doc(hidden)]
5639    impl crate::RequestBuilder for UnresolvePullRequestComments {
5640        fn request_options(&mut self) -> &mut crate::RequestOptions {
5641            &mut self.0.options
5642        }
5643    }
5644
5645    /// The request builder for [SecureSourceManager::create_issue_comment][crate::client::SecureSourceManager::create_issue_comment] calls.
5646    ///
5647    /// # Example
5648    /// ```
5649    /// # use google_cloud_securesourcemanager_v1::builder::secure_source_manager::CreateIssueComment;
5650    /// # async fn sample() -> google_cloud_securesourcemanager_v1::Result<()> {
5651    /// use google_cloud_lro::Poller;
5652    ///
5653    /// let builder = prepare_request_builder();
5654    /// let response = builder.poller().until_done().await?;
5655    /// # Ok(()) }
5656    ///
5657    /// fn prepare_request_builder() -> CreateIssueComment {
5658    ///   # panic!();
5659    ///   // ... details omitted ...
5660    /// }
5661    /// ```
5662    #[derive(Clone, Debug)]
5663    pub struct CreateIssueComment(RequestBuilder<crate::model::CreateIssueCommentRequest>);
5664
5665    impl CreateIssueComment {
5666        pub(crate) fn new(
5667            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
5668        ) -> Self {
5669            Self(RequestBuilder::new(stub))
5670        }
5671
5672        /// Sets the full request, replacing any prior values.
5673        pub fn with_request<V: Into<crate::model::CreateIssueCommentRequest>>(
5674            mut self,
5675            v: V,
5676        ) -> Self {
5677            self.0.request = v.into();
5678            self
5679        }
5680
5681        /// Sets all the options, replacing any prior values.
5682        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5683            self.0.options = v.into();
5684            self
5685        }
5686
5687        /// Sends the request.
5688        ///
5689        /// # Long running operations
5690        ///
5691        /// This starts, but does not poll, a longrunning operation. More information
5692        /// on [create_issue_comment][crate::client::SecureSourceManager::create_issue_comment].
5693        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
5694            (*self.0.stub)
5695                .create_issue_comment(self.0.request, self.0.options)
5696                .await
5697                .map(crate::Response::into_body)
5698        }
5699
5700        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_issue_comment`.
5701        pub fn poller(
5702            self,
5703        ) -> impl google_cloud_lro::Poller<crate::model::IssueComment, crate::model::OperationMetadata>
5704        {
5705            type Operation = google_cloud_lro::internal::Operation<
5706                crate::model::IssueComment,
5707                crate::model::OperationMetadata,
5708            >;
5709            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
5710            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
5711            let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
5712            if let Some(ref mut details) = poller_options.tracing {
5713                details.method_name = "google_cloud_securesourcemanager_v1::client::SecureSourceManager::create_issue_comment::until_done";
5714            }
5715
5716            let stub = self.0.stub.clone();
5717            let mut options = self.0.options.clone();
5718            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
5719            let query = move |name| {
5720                let stub = stub.clone();
5721                let options = options.clone();
5722                async {
5723                    let op = GetOperation::new(stub)
5724                        .set_name(name)
5725                        .with_options(options)
5726                        .send()
5727                        .await?;
5728                    Ok(Operation::new(op))
5729                }
5730            };
5731
5732            let start = move || async {
5733                let op = self.send().await?;
5734                Ok(Operation::new(op))
5735            };
5736
5737            use google_cloud_lro::internal::PollerExt;
5738            {
5739                google_cloud_lro::internal::new_poller(
5740                    polling_error_policy,
5741                    polling_backoff_policy,
5742                    start,
5743                    query,
5744                )
5745            }
5746            .with_options(poller_options)
5747        }
5748
5749        /// Sets the value of [parent][crate::model::CreateIssueCommentRequest::parent].
5750        ///
5751        /// This is a **required** field for requests.
5752        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5753            self.0.request.parent = v.into();
5754            self
5755        }
5756
5757        /// Sets the value of [issue_comment][crate::model::CreateIssueCommentRequest::issue_comment].
5758        ///
5759        /// This is a **required** field for requests.
5760        pub fn set_issue_comment<T>(mut self, v: T) -> Self
5761        where
5762            T: std::convert::Into<crate::model::IssueComment>,
5763        {
5764            self.0.request.issue_comment = std::option::Option::Some(v.into());
5765            self
5766        }
5767
5768        /// Sets or clears the value of [issue_comment][crate::model::CreateIssueCommentRequest::issue_comment].
5769        ///
5770        /// This is a **required** field for requests.
5771        pub fn set_or_clear_issue_comment<T>(mut self, v: std::option::Option<T>) -> Self
5772        where
5773            T: std::convert::Into<crate::model::IssueComment>,
5774        {
5775            self.0.request.issue_comment = v.map(|x| x.into());
5776            self
5777        }
5778    }
5779
5780    #[doc(hidden)]
5781    impl crate::RequestBuilder for CreateIssueComment {
5782        fn request_options(&mut self) -> &mut crate::RequestOptions {
5783            &mut self.0.options
5784        }
5785    }
5786
5787    /// The request builder for [SecureSourceManager::get_issue_comment][crate::client::SecureSourceManager::get_issue_comment] calls.
5788    ///
5789    /// # Example
5790    /// ```
5791    /// # use google_cloud_securesourcemanager_v1::builder::secure_source_manager::GetIssueComment;
5792    /// # async fn sample() -> google_cloud_securesourcemanager_v1::Result<()> {
5793    ///
5794    /// let builder = prepare_request_builder();
5795    /// let response = builder.send().await?;
5796    /// # Ok(()) }
5797    ///
5798    /// fn prepare_request_builder() -> GetIssueComment {
5799    ///   # panic!();
5800    ///   // ... details omitted ...
5801    /// }
5802    /// ```
5803    #[derive(Clone, Debug)]
5804    pub struct GetIssueComment(RequestBuilder<crate::model::GetIssueCommentRequest>);
5805
5806    impl GetIssueComment {
5807        pub(crate) fn new(
5808            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
5809        ) -> Self {
5810            Self(RequestBuilder::new(stub))
5811        }
5812
5813        /// Sets the full request, replacing any prior values.
5814        pub fn with_request<V: Into<crate::model::GetIssueCommentRequest>>(mut self, v: V) -> Self {
5815            self.0.request = v.into();
5816            self
5817        }
5818
5819        /// Sets all the options, replacing any prior values.
5820        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5821            self.0.options = v.into();
5822            self
5823        }
5824
5825        /// Sends the request.
5826        pub async fn send(self) -> Result<crate::model::IssueComment> {
5827            (*self.0.stub)
5828                .get_issue_comment(self.0.request, self.0.options)
5829                .await
5830                .map(crate::Response::into_body)
5831        }
5832
5833        /// Sets the value of [name][crate::model::GetIssueCommentRequest::name].
5834        ///
5835        /// This is a **required** field for requests.
5836        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5837            self.0.request.name = v.into();
5838            self
5839        }
5840    }
5841
5842    #[doc(hidden)]
5843    impl crate::RequestBuilder for GetIssueComment {
5844        fn request_options(&mut self) -> &mut crate::RequestOptions {
5845            &mut self.0.options
5846        }
5847    }
5848
5849    /// The request builder for [SecureSourceManager::list_issue_comments][crate::client::SecureSourceManager::list_issue_comments] calls.
5850    ///
5851    /// # Example
5852    /// ```
5853    /// # use google_cloud_securesourcemanager_v1::builder::secure_source_manager::ListIssueComments;
5854    /// # async fn sample() -> google_cloud_securesourcemanager_v1::Result<()> {
5855    /// use google_cloud_gax::paginator::ItemPaginator;
5856    ///
5857    /// let builder = prepare_request_builder();
5858    /// let mut items = builder.by_item();
5859    /// while let Some(result) = items.next().await {
5860    ///   let item = result?;
5861    /// }
5862    /// # Ok(()) }
5863    ///
5864    /// fn prepare_request_builder() -> ListIssueComments {
5865    ///   # panic!();
5866    ///   // ... details omitted ...
5867    /// }
5868    /// ```
5869    #[derive(Clone, Debug)]
5870    pub struct ListIssueComments(RequestBuilder<crate::model::ListIssueCommentsRequest>);
5871
5872    impl ListIssueComments {
5873        pub(crate) fn new(
5874            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
5875        ) -> Self {
5876            Self(RequestBuilder::new(stub))
5877        }
5878
5879        /// Sets the full request, replacing any prior values.
5880        pub fn with_request<V: Into<crate::model::ListIssueCommentsRequest>>(
5881            mut self,
5882            v: V,
5883        ) -> Self {
5884            self.0.request = v.into();
5885            self
5886        }
5887
5888        /// Sets all the options, replacing any prior values.
5889        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5890            self.0.options = v.into();
5891            self
5892        }
5893
5894        /// Sends the request.
5895        pub async fn send(self) -> Result<crate::model::ListIssueCommentsResponse> {
5896            (*self.0.stub)
5897                .list_issue_comments(self.0.request, self.0.options)
5898                .await
5899                .map(crate::Response::into_body)
5900        }
5901
5902        /// Streams each page in the collection.
5903        pub fn by_page(
5904            self,
5905        ) -> impl google_cloud_gax::paginator::Paginator<
5906            crate::model::ListIssueCommentsResponse,
5907            crate::Error,
5908        > {
5909            use std::clone::Clone;
5910            let token = self.0.request.page_token.clone();
5911            let execute = move |token: String| {
5912                let mut builder = self.clone();
5913                builder.0.request = builder.0.request.set_page_token(token);
5914                builder.send()
5915            };
5916            google_cloud_gax::paginator::internal::new_paginator(token, execute)
5917        }
5918
5919        /// Streams each item in the collection.
5920        pub fn by_item(
5921            self,
5922        ) -> impl google_cloud_gax::paginator::ItemPaginator<
5923            crate::model::ListIssueCommentsResponse,
5924            crate::Error,
5925        > {
5926            use google_cloud_gax::paginator::Paginator;
5927            self.by_page().items()
5928        }
5929
5930        /// Sets the value of [parent][crate::model::ListIssueCommentsRequest::parent].
5931        ///
5932        /// This is a **required** field for requests.
5933        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5934            self.0.request.parent = v.into();
5935            self
5936        }
5937
5938        /// Sets the value of [page_size][crate::model::ListIssueCommentsRequest::page_size].
5939        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
5940            self.0.request.page_size = v.into();
5941            self
5942        }
5943
5944        /// Sets the value of [page_token][crate::model::ListIssueCommentsRequest::page_token].
5945        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
5946            self.0.request.page_token = v.into();
5947            self
5948        }
5949    }
5950
5951    #[doc(hidden)]
5952    impl crate::RequestBuilder for ListIssueComments {
5953        fn request_options(&mut self) -> &mut crate::RequestOptions {
5954            &mut self.0.options
5955        }
5956    }
5957
5958    /// The request builder for [SecureSourceManager::update_issue_comment][crate::client::SecureSourceManager::update_issue_comment] calls.
5959    ///
5960    /// # Example
5961    /// ```
5962    /// # use google_cloud_securesourcemanager_v1::builder::secure_source_manager::UpdateIssueComment;
5963    /// # async fn sample() -> google_cloud_securesourcemanager_v1::Result<()> {
5964    /// use google_cloud_lro::Poller;
5965    ///
5966    /// let builder = prepare_request_builder();
5967    /// let response = builder.poller().until_done().await?;
5968    /// # Ok(()) }
5969    ///
5970    /// fn prepare_request_builder() -> UpdateIssueComment {
5971    ///   # panic!();
5972    ///   // ... details omitted ...
5973    /// }
5974    /// ```
5975    #[derive(Clone, Debug)]
5976    pub struct UpdateIssueComment(RequestBuilder<crate::model::UpdateIssueCommentRequest>);
5977
5978    impl UpdateIssueComment {
5979        pub(crate) fn new(
5980            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
5981        ) -> Self {
5982            Self(RequestBuilder::new(stub))
5983        }
5984
5985        /// Sets the full request, replacing any prior values.
5986        pub fn with_request<V: Into<crate::model::UpdateIssueCommentRequest>>(
5987            mut self,
5988            v: V,
5989        ) -> Self {
5990            self.0.request = v.into();
5991            self
5992        }
5993
5994        /// Sets all the options, replacing any prior values.
5995        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5996            self.0.options = v.into();
5997            self
5998        }
5999
6000        /// Sends the request.
6001        ///
6002        /// # Long running operations
6003        ///
6004        /// This starts, but does not poll, a longrunning operation. More information
6005        /// on [update_issue_comment][crate::client::SecureSourceManager::update_issue_comment].
6006        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
6007            (*self.0.stub)
6008                .update_issue_comment(self.0.request, self.0.options)
6009                .await
6010                .map(crate::Response::into_body)
6011        }
6012
6013        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_issue_comment`.
6014        pub fn poller(
6015            self,
6016        ) -> impl google_cloud_lro::Poller<crate::model::IssueComment, crate::model::OperationMetadata>
6017        {
6018            type Operation = google_cloud_lro::internal::Operation<
6019                crate::model::IssueComment,
6020                crate::model::OperationMetadata,
6021            >;
6022            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6023            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6024            let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
6025            if let Some(ref mut details) = poller_options.tracing {
6026                details.method_name = "google_cloud_securesourcemanager_v1::client::SecureSourceManager::update_issue_comment::until_done";
6027            }
6028
6029            let stub = self.0.stub.clone();
6030            let mut options = self.0.options.clone();
6031            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
6032            let query = move |name| {
6033                let stub = stub.clone();
6034                let options = options.clone();
6035                async {
6036                    let op = GetOperation::new(stub)
6037                        .set_name(name)
6038                        .with_options(options)
6039                        .send()
6040                        .await?;
6041                    Ok(Operation::new(op))
6042                }
6043            };
6044
6045            let start = move || async {
6046                let op = self.send().await?;
6047                Ok(Operation::new(op))
6048            };
6049
6050            use google_cloud_lro::internal::PollerExt;
6051            {
6052                google_cloud_lro::internal::new_poller(
6053                    polling_error_policy,
6054                    polling_backoff_policy,
6055                    start,
6056                    query,
6057                )
6058            }
6059            .with_options(poller_options)
6060        }
6061
6062        /// Sets the value of [issue_comment][crate::model::UpdateIssueCommentRequest::issue_comment].
6063        ///
6064        /// This is a **required** field for requests.
6065        pub fn set_issue_comment<T>(mut self, v: T) -> Self
6066        where
6067            T: std::convert::Into<crate::model::IssueComment>,
6068        {
6069            self.0.request.issue_comment = std::option::Option::Some(v.into());
6070            self
6071        }
6072
6073        /// Sets or clears the value of [issue_comment][crate::model::UpdateIssueCommentRequest::issue_comment].
6074        ///
6075        /// This is a **required** field for requests.
6076        pub fn set_or_clear_issue_comment<T>(mut self, v: std::option::Option<T>) -> Self
6077        where
6078            T: std::convert::Into<crate::model::IssueComment>,
6079        {
6080            self.0.request.issue_comment = v.map(|x| x.into());
6081            self
6082        }
6083
6084        /// Sets the value of [update_mask][crate::model::UpdateIssueCommentRequest::update_mask].
6085        pub fn set_update_mask<T>(mut self, v: T) -> Self
6086        where
6087            T: std::convert::Into<wkt::FieldMask>,
6088        {
6089            self.0.request.update_mask = std::option::Option::Some(v.into());
6090            self
6091        }
6092
6093        /// Sets or clears the value of [update_mask][crate::model::UpdateIssueCommentRequest::update_mask].
6094        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
6095        where
6096            T: std::convert::Into<wkt::FieldMask>,
6097        {
6098            self.0.request.update_mask = v.map(|x| x.into());
6099            self
6100        }
6101    }
6102
6103    #[doc(hidden)]
6104    impl crate::RequestBuilder for UpdateIssueComment {
6105        fn request_options(&mut self) -> &mut crate::RequestOptions {
6106            &mut self.0.options
6107        }
6108    }
6109
6110    /// The request builder for [SecureSourceManager::delete_issue_comment][crate::client::SecureSourceManager::delete_issue_comment] calls.
6111    ///
6112    /// # Example
6113    /// ```
6114    /// # use google_cloud_securesourcemanager_v1::builder::secure_source_manager::DeleteIssueComment;
6115    /// # async fn sample() -> google_cloud_securesourcemanager_v1::Result<()> {
6116    /// use google_cloud_lro::Poller;
6117    ///
6118    /// let builder = prepare_request_builder();
6119    /// let response = builder.poller().until_done().await?;
6120    /// # Ok(()) }
6121    ///
6122    /// fn prepare_request_builder() -> DeleteIssueComment {
6123    ///   # panic!();
6124    ///   // ... details omitted ...
6125    /// }
6126    /// ```
6127    #[derive(Clone, Debug)]
6128    pub struct DeleteIssueComment(RequestBuilder<crate::model::DeleteIssueCommentRequest>);
6129
6130    impl DeleteIssueComment {
6131        pub(crate) fn new(
6132            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
6133        ) -> Self {
6134            Self(RequestBuilder::new(stub))
6135        }
6136
6137        /// Sets the full request, replacing any prior values.
6138        pub fn with_request<V: Into<crate::model::DeleteIssueCommentRequest>>(
6139            mut self,
6140            v: V,
6141        ) -> Self {
6142            self.0.request = v.into();
6143            self
6144        }
6145
6146        /// Sets all the options, replacing any prior values.
6147        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6148            self.0.options = v.into();
6149            self
6150        }
6151
6152        /// Sends the request.
6153        ///
6154        /// # Long running operations
6155        ///
6156        /// This starts, but does not poll, a longrunning operation. More information
6157        /// on [delete_issue_comment][crate::client::SecureSourceManager::delete_issue_comment].
6158        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
6159            (*self.0.stub)
6160                .delete_issue_comment(self.0.request, self.0.options)
6161                .await
6162                .map(crate::Response::into_body)
6163        }
6164
6165        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_issue_comment`.
6166        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
6167            type Operation =
6168                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
6169            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6170            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6171            let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
6172            if let Some(ref mut details) = poller_options.tracing {
6173                details.method_name = "google_cloud_securesourcemanager_v1::client::SecureSourceManager::delete_issue_comment::until_done";
6174            }
6175
6176            let stub = self.0.stub.clone();
6177            let mut options = self.0.options.clone();
6178            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
6179            let query = move |name| {
6180                let stub = stub.clone();
6181                let options = options.clone();
6182                async {
6183                    let op = GetOperation::new(stub)
6184                        .set_name(name)
6185                        .with_options(options)
6186                        .send()
6187                        .await?;
6188                    Ok(Operation::new(op))
6189                }
6190            };
6191
6192            let start = move || async {
6193                let op = self.send().await?;
6194                Ok(Operation::new(op))
6195            };
6196
6197            use google_cloud_lro::internal::PollerExt;
6198            {
6199                google_cloud_lro::internal::new_unit_response_poller(
6200                    polling_error_policy,
6201                    polling_backoff_policy,
6202                    start,
6203                    query,
6204                )
6205            }
6206            .with_options(poller_options)
6207        }
6208
6209        /// Sets the value of [name][crate::model::DeleteIssueCommentRequest::name].
6210        ///
6211        /// This is a **required** field for requests.
6212        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6213            self.0.request.name = v.into();
6214            self
6215        }
6216    }
6217
6218    #[doc(hidden)]
6219    impl crate::RequestBuilder for DeleteIssueComment {
6220        fn request_options(&mut self) -> &mut crate::RequestOptions {
6221            &mut self.0.options
6222        }
6223    }
6224
6225    /// The request builder for [SecureSourceManager::list_locations][crate::client::SecureSourceManager::list_locations] calls.
6226    ///
6227    /// # Example
6228    /// ```
6229    /// # use google_cloud_securesourcemanager_v1::builder::secure_source_manager::ListLocations;
6230    /// # async fn sample() -> google_cloud_securesourcemanager_v1::Result<()> {
6231    /// use google_cloud_gax::paginator::ItemPaginator;
6232    ///
6233    /// let builder = prepare_request_builder();
6234    /// let mut items = builder.by_item();
6235    /// while let Some(result) = items.next().await {
6236    ///   let item = result?;
6237    /// }
6238    /// # Ok(()) }
6239    ///
6240    /// fn prepare_request_builder() -> ListLocations {
6241    ///   # panic!();
6242    ///   // ... details omitted ...
6243    /// }
6244    /// ```
6245    #[derive(Clone, Debug)]
6246    pub struct ListLocations(RequestBuilder<google_cloud_location::model::ListLocationsRequest>);
6247
6248    impl ListLocations {
6249        pub(crate) fn new(
6250            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
6251        ) -> Self {
6252            Self(RequestBuilder::new(stub))
6253        }
6254
6255        /// Sets the full request, replacing any prior values.
6256        pub fn with_request<V: Into<google_cloud_location::model::ListLocationsRequest>>(
6257            mut self,
6258            v: V,
6259        ) -> Self {
6260            self.0.request = v.into();
6261            self
6262        }
6263
6264        /// Sets all the options, replacing any prior values.
6265        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6266            self.0.options = v.into();
6267            self
6268        }
6269
6270        /// Sends the request.
6271        pub async fn send(self) -> Result<google_cloud_location::model::ListLocationsResponse> {
6272            (*self.0.stub)
6273                .list_locations(self.0.request, self.0.options)
6274                .await
6275                .map(crate::Response::into_body)
6276        }
6277
6278        /// Streams each page in the collection.
6279        pub fn by_page(
6280            self,
6281        ) -> impl google_cloud_gax::paginator::Paginator<
6282            google_cloud_location::model::ListLocationsResponse,
6283            crate::Error,
6284        > {
6285            use std::clone::Clone;
6286            let token = self.0.request.page_token.clone();
6287            let execute = move |token: String| {
6288                let mut builder = self.clone();
6289                builder.0.request = builder.0.request.set_page_token(token);
6290                builder.send()
6291            };
6292            google_cloud_gax::paginator::internal::new_paginator(token, execute)
6293        }
6294
6295        /// Streams each item in the collection.
6296        pub fn by_item(
6297            self,
6298        ) -> impl google_cloud_gax::paginator::ItemPaginator<
6299            google_cloud_location::model::ListLocationsResponse,
6300            crate::Error,
6301        > {
6302            use google_cloud_gax::paginator::Paginator;
6303            self.by_page().items()
6304        }
6305
6306        /// Sets the value of [name][google_cloud_location::model::ListLocationsRequest::name].
6307        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6308            self.0.request.name = v.into();
6309            self
6310        }
6311
6312        /// Sets the value of [filter][google_cloud_location::model::ListLocationsRequest::filter].
6313        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
6314            self.0.request.filter = v.into();
6315            self
6316        }
6317
6318        /// Sets the value of [page_size][google_cloud_location::model::ListLocationsRequest::page_size].
6319        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
6320            self.0.request.page_size = v.into();
6321            self
6322        }
6323
6324        /// Sets the value of [page_token][google_cloud_location::model::ListLocationsRequest::page_token].
6325        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
6326            self.0.request.page_token = v.into();
6327            self
6328        }
6329    }
6330
6331    #[doc(hidden)]
6332    impl crate::RequestBuilder for ListLocations {
6333        fn request_options(&mut self) -> &mut crate::RequestOptions {
6334            &mut self.0.options
6335        }
6336    }
6337
6338    /// The request builder for [SecureSourceManager::get_location][crate::client::SecureSourceManager::get_location] calls.
6339    ///
6340    /// # Example
6341    /// ```
6342    /// # use google_cloud_securesourcemanager_v1::builder::secure_source_manager::GetLocation;
6343    /// # async fn sample() -> google_cloud_securesourcemanager_v1::Result<()> {
6344    ///
6345    /// let builder = prepare_request_builder();
6346    /// let response = builder.send().await?;
6347    /// # Ok(()) }
6348    ///
6349    /// fn prepare_request_builder() -> GetLocation {
6350    ///   # panic!();
6351    ///   // ... details omitted ...
6352    /// }
6353    /// ```
6354    #[derive(Clone, Debug)]
6355    pub struct GetLocation(RequestBuilder<google_cloud_location::model::GetLocationRequest>);
6356
6357    impl GetLocation {
6358        pub(crate) fn new(
6359            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
6360        ) -> Self {
6361            Self(RequestBuilder::new(stub))
6362        }
6363
6364        /// Sets the full request, replacing any prior values.
6365        pub fn with_request<V: Into<google_cloud_location::model::GetLocationRequest>>(
6366            mut self,
6367            v: V,
6368        ) -> Self {
6369            self.0.request = v.into();
6370            self
6371        }
6372
6373        /// Sets all the options, replacing any prior values.
6374        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6375            self.0.options = v.into();
6376            self
6377        }
6378
6379        /// Sends the request.
6380        pub async fn send(self) -> Result<google_cloud_location::model::Location> {
6381            (*self.0.stub)
6382                .get_location(self.0.request, self.0.options)
6383                .await
6384                .map(crate::Response::into_body)
6385        }
6386
6387        /// Sets the value of [name][google_cloud_location::model::GetLocationRequest::name].
6388        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6389            self.0.request.name = v.into();
6390            self
6391        }
6392    }
6393
6394    #[doc(hidden)]
6395    impl crate::RequestBuilder for GetLocation {
6396        fn request_options(&mut self) -> &mut crate::RequestOptions {
6397            &mut self.0.options
6398        }
6399    }
6400
6401    /// The request builder for [SecureSourceManager::set_iam_policy][crate::client::SecureSourceManager::set_iam_policy] calls.
6402    ///
6403    /// # Example
6404    /// ```
6405    /// # use google_cloud_securesourcemanager_v1::builder::secure_source_manager::SetIamPolicy;
6406    /// # async fn sample() -> google_cloud_securesourcemanager_v1::Result<()> {
6407    ///
6408    /// let builder = prepare_request_builder();
6409    /// let response = builder.send().await?;
6410    /// # Ok(()) }
6411    ///
6412    /// fn prepare_request_builder() -> SetIamPolicy {
6413    ///   # panic!();
6414    ///   // ... details omitted ...
6415    /// }
6416    /// ```
6417    #[derive(Clone, Debug)]
6418    pub struct SetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::SetIamPolicyRequest>);
6419
6420    impl SetIamPolicy {
6421        pub(crate) fn new(
6422            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
6423        ) -> Self {
6424            Self(RequestBuilder::new(stub))
6425        }
6426
6427        /// Sets the full request, replacing any prior values.
6428        pub fn with_request<V: Into<google_cloud_iam_v1::model::SetIamPolicyRequest>>(
6429            mut self,
6430            v: V,
6431        ) -> Self {
6432            self.0.request = v.into();
6433            self
6434        }
6435
6436        /// Sets all the options, replacing any prior values.
6437        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6438            self.0.options = v.into();
6439            self
6440        }
6441
6442        /// Sends the request.
6443        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
6444            (*self.0.stub)
6445                .set_iam_policy(self.0.request, self.0.options)
6446                .await
6447                .map(crate::Response::into_body)
6448        }
6449
6450        /// Sets the value of [resource][google_cloud_iam_v1::model::SetIamPolicyRequest::resource].
6451        ///
6452        /// This is a **required** field for requests.
6453        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
6454            self.0.request.resource = v.into();
6455            self
6456        }
6457
6458        /// Sets the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
6459        ///
6460        /// This is a **required** field for requests.
6461        pub fn set_policy<T>(mut self, v: T) -> Self
6462        where
6463            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
6464        {
6465            self.0.request.policy = std::option::Option::Some(v.into());
6466            self
6467        }
6468
6469        /// Sets or clears the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
6470        ///
6471        /// This is a **required** field for requests.
6472        pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
6473        where
6474            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
6475        {
6476            self.0.request.policy = v.map(|x| x.into());
6477            self
6478        }
6479
6480        /// Sets the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
6481        pub fn set_update_mask<T>(mut self, v: T) -> Self
6482        where
6483            T: std::convert::Into<wkt::FieldMask>,
6484        {
6485            self.0.request.update_mask = std::option::Option::Some(v.into());
6486            self
6487        }
6488
6489        /// Sets or clears the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
6490        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
6491        where
6492            T: std::convert::Into<wkt::FieldMask>,
6493        {
6494            self.0.request.update_mask = v.map(|x| x.into());
6495            self
6496        }
6497    }
6498
6499    #[doc(hidden)]
6500    impl crate::RequestBuilder for SetIamPolicy {
6501        fn request_options(&mut self) -> &mut crate::RequestOptions {
6502            &mut self.0.options
6503        }
6504    }
6505
6506    /// The request builder for [SecureSourceManager::get_iam_policy][crate::client::SecureSourceManager::get_iam_policy] calls.
6507    ///
6508    /// # Example
6509    /// ```
6510    /// # use google_cloud_securesourcemanager_v1::builder::secure_source_manager::GetIamPolicy;
6511    /// # async fn sample() -> google_cloud_securesourcemanager_v1::Result<()> {
6512    ///
6513    /// let builder = prepare_request_builder();
6514    /// let response = builder.send().await?;
6515    /// # Ok(()) }
6516    ///
6517    /// fn prepare_request_builder() -> GetIamPolicy {
6518    ///   # panic!();
6519    ///   // ... details omitted ...
6520    /// }
6521    /// ```
6522    #[derive(Clone, Debug)]
6523    pub struct GetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::GetIamPolicyRequest>);
6524
6525    impl GetIamPolicy {
6526        pub(crate) fn new(
6527            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
6528        ) -> Self {
6529            Self(RequestBuilder::new(stub))
6530        }
6531
6532        /// Sets the full request, replacing any prior values.
6533        pub fn with_request<V: Into<google_cloud_iam_v1::model::GetIamPolicyRequest>>(
6534            mut self,
6535            v: V,
6536        ) -> Self {
6537            self.0.request = v.into();
6538            self
6539        }
6540
6541        /// Sets all the options, replacing any prior values.
6542        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6543            self.0.options = v.into();
6544            self
6545        }
6546
6547        /// Sends the request.
6548        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
6549            (*self.0.stub)
6550                .get_iam_policy(self.0.request, self.0.options)
6551                .await
6552                .map(crate::Response::into_body)
6553        }
6554
6555        /// Sets the value of [resource][google_cloud_iam_v1::model::GetIamPolicyRequest::resource].
6556        ///
6557        /// This is a **required** field for requests.
6558        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
6559            self.0.request.resource = v.into();
6560            self
6561        }
6562
6563        /// Sets the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
6564        pub fn set_options<T>(mut self, v: T) -> Self
6565        where
6566            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
6567        {
6568            self.0.request.options = std::option::Option::Some(v.into());
6569            self
6570        }
6571
6572        /// Sets or clears the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
6573        pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
6574        where
6575            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
6576        {
6577            self.0.request.options = v.map(|x| x.into());
6578            self
6579        }
6580    }
6581
6582    #[doc(hidden)]
6583    impl crate::RequestBuilder for GetIamPolicy {
6584        fn request_options(&mut self) -> &mut crate::RequestOptions {
6585            &mut self.0.options
6586        }
6587    }
6588
6589    /// The request builder for [SecureSourceManager::test_iam_permissions][crate::client::SecureSourceManager::test_iam_permissions] calls.
6590    ///
6591    /// # Example
6592    /// ```
6593    /// # use google_cloud_securesourcemanager_v1::builder::secure_source_manager::TestIamPermissions;
6594    /// # async fn sample() -> google_cloud_securesourcemanager_v1::Result<()> {
6595    ///
6596    /// let builder = prepare_request_builder();
6597    /// let response = builder.send().await?;
6598    /// # Ok(()) }
6599    ///
6600    /// fn prepare_request_builder() -> TestIamPermissions {
6601    ///   # panic!();
6602    ///   // ... details omitted ...
6603    /// }
6604    /// ```
6605    #[derive(Clone, Debug)]
6606    pub struct TestIamPermissions(
6607        RequestBuilder<google_cloud_iam_v1::model::TestIamPermissionsRequest>,
6608    );
6609
6610    impl TestIamPermissions {
6611        pub(crate) fn new(
6612            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
6613        ) -> Self {
6614            Self(RequestBuilder::new(stub))
6615        }
6616
6617        /// Sets the full request, replacing any prior values.
6618        pub fn with_request<V: Into<google_cloud_iam_v1::model::TestIamPermissionsRequest>>(
6619            mut self,
6620            v: V,
6621        ) -> Self {
6622            self.0.request = v.into();
6623            self
6624        }
6625
6626        /// Sets all the options, replacing any prior values.
6627        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6628            self.0.options = v.into();
6629            self
6630        }
6631
6632        /// Sends the request.
6633        pub async fn send(self) -> Result<google_cloud_iam_v1::model::TestIamPermissionsResponse> {
6634            (*self.0.stub)
6635                .test_iam_permissions(self.0.request, self.0.options)
6636                .await
6637                .map(crate::Response::into_body)
6638        }
6639
6640        /// Sets the value of [resource][google_cloud_iam_v1::model::TestIamPermissionsRequest::resource].
6641        ///
6642        /// This is a **required** field for requests.
6643        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
6644            self.0.request.resource = v.into();
6645            self
6646        }
6647
6648        /// Sets the value of [permissions][google_cloud_iam_v1::model::TestIamPermissionsRequest::permissions].
6649        ///
6650        /// This is a **required** field for requests.
6651        pub fn set_permissions<T, V>(mut self, v: T) -> Self
6652        where
6653            T: std::iter::IntoIterator<Item = V>,
6654            V: std::convert::Into<std::string::String>,
6655        {
6656            use std::iter::Iterator;
6657            self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
6658            self
6659        }
6660    }
6661
6662    #[doc(hidden)]
6663    impl crate::RequestBuilder for TestIamPermissions {
6664        fn request_options(&mut self) -> &mut crate::RequestOptions {
6665            &mut self.0.options
6666        }
6667    }
6668
6669    /// The request builder for [SecureSourceManager::list_operations][crate::client::SecureSourceManager::list_operations] calls.
6670    ///
6671    /// # Example
6672    /// ```
6673    /// # use google_cloud_securesourcemanager_v1::builder::secure_source_manager::ListOperations;
6674    /// # async fn sample() -> google_cloud_securesourcemanager_v1::Result<()> {
6675    /// use google_cloud_gax::paginator::ItemPaginator;
6676    ///
6677    /// let builder = prepare_request_builder();
6678    /// let mut items = builder.by_item();
6679    /// while let Some(result) = items.next().await {
6680    ///   let item = result?;
6681    /// }
6682    /// # Ok(()) }
6683    ///
6684    /// fn prepare_request_builder() -> ListOperations {
6685    ///   # panic!();
6686    ///   // ... details omitted ...
6687    /// }
6688    /// ```
6689    #[derive(Clone, Debug)]
6690    pub struct ListOperations(
6691        RequestBuilder<google_cloud_longrunning::model::ListOperationsRequest>,
6692    );
6693
6694    impl ListOperations {
6695        pub(crate) fn new(
6696            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
6697        ) -> Self {
6698            Self(RequestBuilder::new(stub))
6699        }
6700
6701        /// Sets the full request, replacing any prior values.
6702        pub fn with_request<V: Into<google_cloud_longrunning::model::ListOperationsRequest>>(
6703            mut self,
6704            v: V,
6705        ) -> Self {
6706            self.0.request = v.into();
6707            self
6708        }
6709
6710        /// Sets all the options, replacing any prior values.
6711        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6712            self.0.options = v.into();
6713            self
6714        }
6715
6716        /// Sends the request.
6717        pub async fn send(self) -> Result<google_cloud_longrunning::model::ListOperationsResponse> {
6718            (*self.0.stub)
6719                .list_operations(self.0.request, self.0.options)
6720                .await
6721                .map(crate::Response::into_body)
6722        }
6723
6724        /// Streams each page in the collection.
6725        pub fn by_page(
6726            self,
6727        ) -> impl google_cloud_gax::paginator::Paginator<
6728            google_cloud_longrunning::model::ListOperationsResponse,
6729            crate::Error,
6730        > {
6731            use std::clone::Clone;
6732            let token = self.0.request.page_token.clone();
6733            let execute = move |token: String| {
6734                let mut builder = self.clone();
6735                builder.0.request = builder.0.request.set_page_token(token);
6736                builder.send()
6737            };
6738            google_cloud_gax::paginator::internal::new_paginator(token, execute)
6739        }
6740
6741        /// Streams each item in the collection.
6742        pub fn by_item(
6743            self,
6744        ) -> impl google_cloud_gax::paginator::ItemPaginator<
6745            google_cloud_longrunning::model::ListOperationsResponse,
6746            crate::Error,
6747        > {
6748            use google_cloud_gax::paginator::Paginator;
6749            self.by_page().items()
6750        }
6751
6752        /// Sets the value of [name][google_cloud_longrunning::model::ListOperationsRequest::name].
6753        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6754            self.0.request.name = v.into();
6755            self
6756        }
6757
6758        /// Sets the value of [filter][google_cloud_longrunning::model::ListOperationsRequest::filter].
6759        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
6760            self.0.request.filter = v.into();
6761            self
6762        }
6763
6764        /// Sets the value of [page_size][google_cloud_longrunning::model::ListOperationsRequest::page_size].
6765        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
6766            self.0.request.page_size = v.into();
6767            self
6768        }
6769
6770        /// Sets the value of [page_token][google_cloud_longrunning::model::ListOperationsRequest::page_token].
6771        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
6772            self.0.request.page_token = v.into();
6773            self
6774        }
6775
6776        /// Sets the value of [return_partial_success][google_cloud_longrunning::model::ListOperationsRequest::return_partial_success].
6777        pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
6778            self.0.request.return_partial_success = v.into();
6779            self
6780        }
6781    }
6782
6783    #[doc(hidden)]
6784    impl crate::RequestBuilder for ListOperations {
6785        fn request_options(&mut self) -> &mut crate::RequestOptions {
6786            &mut self.0.options
6787        }
6788    }
6789
6790    /// The request builder for [SecureSourceManager::get_operation][crate::client::SecureSourceManager::get_operation] calls.
6791    ///
6792    /// # Example
6793    /// ```
6794    /// # use google_cloud_securesourcemanager_v1::builder::secure_source_manager::GetOperation;
6795    /// # async fn sample() -> google_cloud_securesourcemanager_v1::Result<()> {
6796    ///
6797    /// let builder = prepare_request_builder();
6798    /// let response = builder.send().await?;
6799    /// # Ok(()) }
6800    ///
6801    /// fn prepare_request_builder() -> GetOperation {
6802    ///   # panic!();
6803    ///   // ... details omitted ...
6804    /// }
6805    /// ```
6806    #[derive(Clone, Debug)]
6807    pub struct GetOperation(RequestBuilder<google_cloud_longrunning::model::GetOperationRequest>);
6808
6809    impl GetOperation {
6810        pub(crate) fn new(
6811            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
6812        ) -> Self {
6813            Self(RequestBuilder::new(stub))
6814        }
6815
6816        /// Sets the full request, replacing any prior values.
6817        pub fn with_request<V: Into<google_cloud_longrunning::model::GetOperationRequest>>(
6818            mut self,
6819            v: V,
6820        ) -> Self {
6821            self.0.request = v.into();
6822            self
6823        }
6824
6825        /// Sets all the options, replacing any prior values.
6826        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6827            self.0.options = v.into();
6828            self
6829        }
6830
6831        /// Sends the request.
6832        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
6833            (*self.0.stub)
6834                .get_operation(self.0.request, self.0.options)
6835                .await
6836                .map(crate::Response::into_body)
6837        }
6838
6839        /// Sets the value of [name][google_cloud_longrunning::model::GetOperationRequest::name].
6840        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6841            self.0.request.name = v.into();
6842            self
6843        }
6844    }
6845
6846    #[doc(hidden)]
6847    impl crate::RequestBuilder for GetOperation {
6848        fn request_options(&mut self) -> &mut crate::RequestOptions {
6849            &mut self.0.options
6850        }
6851    }
6852
6853    /// The request builder for [SecureSourceManager::delete_operation][crate::client::SecureSourceManager::delete_operation] calls.
6854    ///
6855    /// # Example
6856    /// ```
6857    /// # use google_cloud_securesourcemanager_v1::builder::secure_source_manager::DeleteOperation;
6858    /// # async fn sample() -> google_cloud_securesourcemanager_v1::Result<()> {
6859    ///
6860    /// let builder = prepare_request_builder();
6861    /// let response = builder.send().await?;
6862    /// # Ok(()) }
6863    ///
6864    /// fn prepare_request_builder() -> DeleteOperation {
6865    ///   # panic!();
6866    ///   // ... details omitted ...
6867    /// }
6868    /// ```
6869    #[derive(Clone, Debug)]
6870    pub struct DeleteOperation(
6871        RequestBuilder<google_cloud_longrunning::model::DeleteOperationRequest>,
6872    );
6873
6874    impl DeleteOperation {
6875        pub(crate) fn new(
6876            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
6877        ) -> Self {
6878            Self(RequestBuilder::new(stub))
6879        }
6880
6881        /// Sets the full request, replacing any prior values.
6882        pub fn with_request<V: Into<google_cloud_longrunning::model::DeleteOperationRequest>>(
6883            mut self,
6884            v: V,
6885        ) -> Self {
6886            self.0.request = v.into();
6887            self
6888        }
6889
6890        /// Sets all the options, replacing any prior values.
6891        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6892            self.0.options = v.into();
6893            self
6894        }
6895
6896        /// Sends the request.
6897        pub async fn send(self) -> Result<()> {
6898            (*self.0.stub)
6899                .delete_operation(self.0.request, self.0.options)
6900                .await
6901                .map(crate::Response::into_body)
6902        }
6903
6904        /// Sets the value of [name][google_cloud_longrunning::model::DeleteOperationRequest::name].
6905        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6906            self.0.request.name = v.into();
6907            self
6908        }
6909    }
6910
6911    #[doc(hidden)]
6912    impl crate::RequestBuilder for DeleteOperation {
6913        fn request_options(&mut self) -> &mut crate::RequestOptions {
6914            &mut self.0.options
6915        }
6916    }
6917
6918    /// The request builder for [SecureSourceManager::cancel_operation][crate::client::SecureSourceManager::cancel_operation] calls.
6919    ///
6920    /// # Example
6921    /// ```
6922    /// # use google_cloud_securesourcemanager_v1::builder::secure_source_manager::CancelOperation;
6923    /// # async fn sample() -> google_cloud_securesourcemanager_v1::Result<()> {
6924    ///
6925    /// let builder = prepare_request_builder();
6926    /// let response = builder.send().await?;
6927    /// # Ok(()) }
6928    ///
6929    /// fn prepare_request_builder() -> CancelOperation {
6930    ///   # panic!();
6931    ///   // ... details omitted ...
6932    /// }
6933    /// ```
6934    #[derive(Clone, Debug)]
6935    pub struct CancelOperation(
6936        RequestBuilder<google_cloud_longrunning::model::CancelOperationRequest>,
6937    );
6938
6939    impl CancelOperation {
6940        pub(crate) fn new(
6941            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
6942        ) -> Self {
6943            Self(RequestBuilder::new(stub))
6944        }
6945
6946        /// Sets the full request, replacing any prior values.
6947        pub fn with_request<V: Into<google_cloud_longrunning::model::CancelOperationRequest>>(
6948            mut self,
6949            v: V,
6950        ) -> Self {
6951            self.0.request = v.into();
6952            self
6953        }
6954
6955        /// Sets all the options, replacing any prior values.
6956        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6957            self.0.options = v.into();
6958            self
6959        }
6960
6961        /// Sends the request.
6962        pub async fn send(self) -> Result<()> {
6963            (*self.0.stub)
6964                .cancel_operation(self.0.request, self.0.options)
6965                .await
6966                .map(crate::Response::into_body)
6967        }
6968
6969        /// Sets the value of [name][google_cloud_longrunning::model::CancelOperationRequest::name].
6970        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6971            self.0.request.name = v.into();
6972            self
6973        }
6974    }
6975
6976    #[doc(hidden)]
6977    impl crate::RequestBuilder for CancelOperation {
6978        fn request_options(&mut self) -> &mut crate::RequestOptions {
6979            &mut self.0.options
6980        }
6981    }
6982}