Skip to main content

google_cloud_securesourcemanager_v1/
builder.rs

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