Skip to main content

google_cloud_developerconnect_v1/
builder.rs

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