Skip to main content

google_cloud_securesourcemanager_v1/
builder.rs

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