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