Skip to main content

google_cloud_securesourcemanager_v1/
builder.rs

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