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