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
17pub mod developer_connect {
18    use crate::Result;
19
20    /// A builder for [DeveloperConnect][crate::client::DeveloperConnect].
21    ///
22    /// ```
23    /// # tokio_test::block_on(async {
24    /// # use google_cloud_developerconnect_v1::*;
25    /// # use builder::developer_connect::ClientBuilder;
26    /// # use client::DeveloperConnect;
27    /// let builder : ClientBuilder = DeveloperConnect::builder();
28    /// let client = builder
29    ///     .with_endpoint("https://developerconnect.googleapis.com")
30    ///     .build().await?;
31    /// # gax::client_builder::Result::<()>::Ok(()) });
32    /// ```
33    pub type ClientBuilder =
34        gax::client_builder::ClientBuilder<client::Factory, gaxi::options::Credentials>;
35
36    pub(crate) mod client {
37        use super::super::super::client::DeveloperConnect;
38        pub struct Factory;
39        impl gax::client_builder::internal::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            ) -> gax::client_builder::Result<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: gax::options::RequestOptions,
57    }
58
59    impl<R> RequestBuilder<R>
60    where
61        R: std::default::Default,
62    {
63        pub(crate) fn new(
64            stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
65        ) -> Self {
66            Self {
67                stub,
68                request: R::default(),
69                options: gax::options::RequestOptions::default(),
70            }
71        }
72    }
73
74    /// The request builder for [DeveloperConnect::list_connections][crate::client::DeveloperConnect::list_connections] calls.
75    ///
76    /// # Example
77    /// ```no_run
78    /// # use google_cloud_developerconnect_v1::builder;
79    /// use builder::developer_connect::ListConnections;
80    /// # tokio_test::block_on(async {
81    /// use gax::paginator::ItemPaginator;
82    ///
83    /// let builder = prepare_request_builder();
84    /// let mut items = builder.by_item();
85    /// while let Some(result) = items.next().await {
86    ///   let item = result?;
87    /// }
88    /// # gax::Result::<()>::Ok(()) });
89    ///
90    /// fn prepare_request_builder() -> ListConnections {
91    ///   # panic!();
92    ///   // ... details omitted ...
93    /// }
94    /// ```
95    #[derive(Clone, Debug)]
96    pub struct ListConnections(RequestBuilder<crate::model::ListConnectionsRequest>);
97
98    impl ListConnections {
99        pub(crate) fn new(
100            stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
101        ) -> Self {
102            Self(RequestBuilder::new(stub))
103        }
104
105        /// Sets the full request, replacing any prior values.
106        pub fn with_request<V: Into<crate::model::ListConnectionsRequest>>(mut self, v: V) -> Self {
107            self.0.request = v.into();
108            self
109        }
110
111        /// Sets all the options, replacing any prior values.
112        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
113            self.0.options = v.into();
114            self
115        }
116
117        /// Sends the request.
118        pub async fn send(self) -> Result<crate::model::ListConnectionsResponse> {
119            (*self.0.stub)
120                .list_connections(self.0.request, self.0.options)
121                .await
122                .map(gax::response::Response::into_body)
123        }
124
125        /// Streams each page in the collection.
126        pub fn by_page(
127            self,
128        ) -> impl gax::paginator::Paginator<crate::model::ListConnectionsResponse, gax::error::Error>
129        {
130            use std::clone::Clone;
131            let token = self.0.request.page_token.clone();
132            let execute = move |token: String| {
133                let mut builder = self.clone();
134                builder.0.request = builder.0.request.set_page_token(token);
135                builder.send()
136            };
137            gax::paginator::internal::new_paginator(token, execute)
138        }
139
140        /// Streams each item in the collection.
141        pub fn by_item(
142            self,
143        ) -> impl gax::paginator::ItemPaginator<crate::model::ListConnectionsResponse, gax::error::Error>
144        {
145            use gax::paginator::Paginator;
146            self.by_page().items()
147        }
148
149        /// Sets the value of [parent][crate::model::ListConnectionsRequest::parent].
150        ///
151        /// This is a **required** field for requests.
152        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
153            self.0.request.parent = v.into();
154            self
155        }
156
157        /// Sets the value of [page_size][crate::model::ListConnectionsRequest::page_size].
158        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
159            self.0.request.page_size = v.into();
160            self
161        }
162
163        /// Sets the value of [page_token][crate::model::ListConnectionsRequest::page_token].
164        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
165            self.0.request.page_token = v.into();
166            self
167        }
168
169        /// Sets the value of [filter][crate::model::ListConnectionsRequest::filter].
170        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
171            self.0.request.filter = v.into();
172            self
173        }
174
175        /// Sets the value of [order_by][crate::model::ListConnectionsRequest::order_by].
176        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
177            self.0.request.order_by = v.into();
178            self
179        }
180    }
181
182    #[doc(hidden)]
183    impl gax::options::internal::RequestBuilder for ListConnections {
184        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
185            &mut self.0.options
186        }
187    }
188
189    /// The request builder for [DeveloperConnect::get_connection][crate::client::DeveloperConnect::get_connection] calls.
190    ///
191    /// # Example
192    /// ```no_run
193    /// # use google_cloud_developerconnect_v1::builder;
194    /// use builder::developer_connect::GetConnection;
195    /// # tokio_test::block_on(async {
196    ///
197    /// let builder = prepare_request_builder();
198    /// let response = builder.send().await?;
199    /// # gax::Result::<()>::Ok(()) });
200    ///
201    /// fn prepare_request_builder() -> GetConnection {
202    ///   # panic!();
203    ///   // ... details omitted ...
204    /// }
205    /// ```
206    #[derive(Clone, Debug)]
207    pub struct GetConnection(RequestBuilder<crate::model::GetConnectionRequest>);
208
209    impl GetConnection {
210        pub(crate) fn new(
211            stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
212        ) -> Self {
213            Self(RequestBuilder::new(stub))
214        }
215
216        /// Sets the full request, replacing any prior values.
217        pub fn with_request<V: Into<crate::model::GetConnectionRequest>>(mut self, v: V) -> Self {
218            self.0.request = v.into();
219            self
220        }
221
222        /// Sets all the options, replacing any prior values.
223        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
224            self.0.options = v.into();
225            self
226        }
227
228        /// Sends the request.
229        pub async fn send(self) -> Result<crate::model::Connection> {
230            (*self.0.stub)
231                .get_connection(self.0.request, self.0.options)
232                .await
233                .map(gax::response::Response::into_body)
234        }
235
236        /// Sets the value of [name][crate::model::GetConnectionRequest::name].
237        ///
238        /// This is a **required** field for requests.
239        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
240            self.0.request.name = v.into();
241            self
242        }
243    }
244
245    #[doc(hidden)]
246    impl gax::options::internal::RequestBuilder for GetConnection {
247        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
248            &mut self.0.options
249        }
250    }
251
252    /// The request builder for [DeveloperConnect::create_connection][crate::client::DeveloperConnect::create_connection] calls.
253    ///
254    /// # Example
255    /// ```no_run
256    /// # use google_cloud_developerconnect_v1::builder;
257    /// use builder::developer_connect::CreateConnection;
258    /// # tokio_test::block_on(async {
259    /// use lro::Poller;
260    ///
261    /// let builder = prepare_request_builder();
262    /// let response = builder.poller().until_done().await?;
263    /// # gax::Result::<()>::Ok(()) });
264    ///
265    /// fn prepare_request_builder() -> CreateConnection {
266    ///   # panic!();
267    ///   // ... details omitted ...
268    /// }
269    /// ```
270    #[derive(Clone, Debug)]
271    pub struct CreateConnection(RequestBuilder<crate::model::CreateConnectionRequest>);
272
273    impl CreateConnection {
274        pub(crate) fn new(
275            stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
276        ) -> Self {
277            Self(RequestBuilder::new(stub))
278        }
279
280        /// Sets the full request, replacing any prior values.
281        pub fn with_request<V: Into<crate::model::CreateConnectionRequest>>(
282            mut self,
283            v: V,
284        ) -> Self {
285            self.0.request = v.into();
286            self
287        }
288
289        /// Sets all the options, replacing any prior values.
290        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
291            self.0.options = v.into();
292            self
293        }
294
295        /// Sends the request.
296        ///
297        /// # Long running operations
298        ///
299        /// This starts, but does not poll, a longrunning operation. More information
300        /// on [create_connection][crate::client::DeveloperConnect::create_connection].
301        pub async fn send(self) -> Result<longrunning::model::Operation> {
302            (*self.0.stub)
303                .create_connection(self.0.request, self.0.options)
304                .await
305                .map(gax::response::Response::into_body)
306        }
307
308        /// Creates a [Poller][lro::Poller] to work with `create_connection`.
309        pub fn poller(
310            self,
311        ) -> impl lro::Poller<crate::model::Connection, crate::model::OperationMetadata> {
312            type Operation =
313                lro::internal::Operation<crate::model::Connection, crate::model::OperationMetadata>;
314            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
315            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
316
317            let stub = self.0.stub.clone();
318            let mut options = self.0.options.clone();
319            options.set_retry_policy(gax::retry_policy::NeverRetry);
320            let query = move |name| {
321                let stub = stub.clone();
322                let options = options.clone();
323                async {
324                    let op = GetOperation::new(stub)
325                        .set_name(name)
326                        .with_options(options)
327                        .send()
328                        .await?;
329                    Ok(Operation::new(op))
330                }
331            };
332
333            let start = move || async {
334                let op = self.send().await?;
335                Ok(Operation::new(op))
336            };
337
338            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
339        }
340
341        /// Sets the value of [parent][crate::model::CreateConnectionRequest::parent].
342        ///
343        /// This is a **required** field for requests.
344        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
345            self.0.request.parent = v.into();
346            self
347        }
348
349        /// Sets the value of [connection_id][crate::model::CreateConnectionRequest::connection_id].
350        ///
351        /// This is a **required** field for requests.
352        pub fn set_connection_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
353            self.0.request.connection_id = v.into();
354            self
355        }
356
357        /// Sets the value of [connection][crate::model::CreateConnectionRequest::connection].
358        ///
359        /// This is a **required** field for requests.
360        pub fn set_connection<T>(mut self, v: T) -> Self
361        where
362            T: std::convert::Into<crate::model::Connection>,
363        {
364            self.0.request.connection = std::option::Option::Some(v.into());
365            self
366        }
367
368        /// Sets or clears the value of [connection][crate::model::CreateConnectionRequest::connection].
369        ///
370        /// This is a **required** field for requests.
371        pub fn set_or_clear_connection<T>(mut self, v: std::option::Option<T>) -> Self
372        where
373            T: std::convert::Into<crate::model::Connection>,
374        {
375            self.0.request.connection = v.map(|x| x.into());
376            self
377        }
378
379        /// Sets the value of [request_id][crate::model::CreateConnectionRequest::request_id].
380        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
381            self.0.request.request_id = v.into();
382            self
383        }
384
385        /// Sets the value of [validate_only][crate::model::CreateConnectionRequest::validate_only].
386        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
387            self.0.request.validate_only = v.into();
388            self
389        }
390    }
391
392    #[doc(hidden)]
393    impl gax::options::internal::RequestBuilder for CreateConnection {
394        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
395            &mut self.0.options
396        }
397    }
398
399    /// The request builder for [DeveloperConnect::update_connection][crate::client::DeveloperConnect::update_connection] calls.
400    ///
401    /// # Example
402    /// ```no_run
403    /// # use google_cloud_developerconnect_v1::builder;
404    /// use builder::developer_connect::UpdateConnection;
405    /// # tokio_test::block_on(async {
406    /// use lro::Poller;
407    ///
408    /// let builder = prepare_request_builder();
409    /// let response = builder.poller().until_done().await?;
410    /// # gax::Result::<()>::Ok(()) });
411    ///
412    /// fn prepare_request_builder() -> UpdateConnection {
413    ///   # panic!();
414    ///   // ... details omitted ...
415    /// }
416    /// ```
417    #[derive(Clone, Debug)]
418    pub struct UpdateConnection(RequestBuilder<crate::model::UpdateConnectionRequest>);
419
420    impl UpdateConnection {
421        pub(crate) fn new(
422            stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
423        ) -> Self {
424            Self(RequestBuilder::new(stub))
425        }
426
427        /// Sets the full request, replacing any prior values.
428        pub fn with_request<V: Into<crate::model::UpdateConnectionRequest>>(
429            mut self,
430            v: V,
431        ) -> Self {
432            self.0.request = v.into();
433            self
434        }
435
436        /// Sets all the options, replacing any prior values.
437        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
438            self.0.options = v.into();
439            self
440        }
441
442        /// Sends the request.
443        ///
444        /// # Long running operations
445        ///
446        /// This starts, but does not poll, a longrunning operation. More information
447        /// on [update_connection][crate::client::DeveloperConnect::update_connection].
448        pub async fn send(self) -> Result<longrunning::model::Operation> {
449            (*self.0.stub)
450                .update_connection(self.0.request, self.0.options)
451                .await
452                .map(gax::response::Response::into_body)
453        }
454
455        /// Creates a [Poller][lro::Poller] to work with `update_connection`.
456        pub fn poller(
457            self,
458        ) -> impl lro::Poller<crate::model::Connection, crate::model::OperationMetadata> {
459            type Operation =
460                lro::internal::Operation<crate::model::Connection, crate::model::OperationMetadata>;
461            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
462            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
463
464            let stub = self.0.stub.clone();
465            let mut options = self.0.options.clone();
466            options.set_retry_policy(gax::retry_policy::NeverRetry);
467            let query = move |name| {
468                let stub = stub.clone();
469                let options = options.clone();
470                async {
471                    let op = GetOperation::new(stub)
472                        .set_name(name)
473                        .with_options(options)
474                        .send()
475                        .await?;
476                    Ok(Operation::new(op))
477                }
478            };
479
480            let start = move || async {
481                let op = self.send().await?;
482                Ok(Operation::new(op))
483            };
484
485            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
486        }
487
488        /// Sets the value of [update_mask][crate::model::UpdateConnectionRequest::update_mask].
489        ///
490        /// This is a **required** field for requests.
491        pub fn set_update_mask<T>(mut self, v: T) -> Self
492        where
493            T: std::convert::Into<wkt::FieldMask>,
494        {
495            self.0.request.update_mask = std::option::Option::Some(v.into());
496            self
497        }
498
499        /// Sets or clears the value of [update_mask][crate::model::UpdateConnectionRequest::update_mask].
500        ///
501        /// This is a **required** field for requests.
502        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
503        where
504            T: std::convert::Into<wkt::FieldMask>,
505        {
506            self.0.request.update_mask = v.map(|x| x.into());
507            self
508        }
509
510        /// Sets the value of [connection][crate::model::UpdateConnectionRequest::connection].
511        ///
512        /// This is a **required** field for requests.
513        pub fn set_connection<T>(mut self, v: T) -> Self
514        where
515            T: std::convert::Into<crate::model::Connection>,
516        {
517            self.0.request.connection = std::option::Option::Some(v.into());
518            self
519        }
520
521        /// Sets or clears the value of [connection][crate::model::UpdateConnectionRequest::connection].
522        ///
523        /// This is a **required** field for requests.
524        pub fn set_or_clear_connection<T>(mut self, v: std::option::Option<T>) -> Self
525        where
526            T: std::convert::Into<crate::model::Connection>,
527        {
528            self.0.request.connection = v.map(|x| x.into());
529            self
530        }
531
532        /// Sets the value of [request_id][crate::model::UpdateConnectionRequest::request_id].
533        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
534            self.0.request.request_id = v.into();
535            self
536        }
537
538        /// Sets the value of [allow_missing][crate::model::UpdateConnectionRequest::allow_missing].
539        pub fn set_allow_missing<T: Into<bool>>(mut self, v: T) -> Self {
540            self.0.request.allow_missing = v.into();
541            self
542        }
543
544        /// Sets the value of [validate_only][crate::model::UpdateConnectionRequest::validate_only].
545        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
546            self.0.request.validate_only = v.into();
547            self
548        }
549    }
550
551    #[doc(hidden)]
552    impl gax::options::internal::RequestBuilder for UpdateConnection {
553        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
554            &mut self.0.options
555        }
556    }
557
558    /// The request builder for [DeveloperConnect::delete_connection][crate::client::DeveloperConnect::delete_connection] calls.
559    ///
560    /// # Example
561    /// ```no_run
562    /// # use google_cloud_developerconnect_v1::builder;
563    /// use builder::developer_connect::DeleteConnection;
564    /// # tokio_test::block_on(async {
565    /// use lro::Poller;
566    ///
567    /// let builder = prepare_request_builder();
568    /// let response = builder.poller().until_done().await?;
569    /// # gax::Result::<()>::Ok(()) });
570    ///
571    /// fn prepare_request_builder() -> DeleteConnection {
572    ///   # panic!();
573    ///   // ... details omitted ...
574    /// }
575    /// ```
576    #[derive(Clone, Debug)]
577    pub struct DeleteConnection(RequestBuilder<crate::model::DeleteConnectionRequest>);
578
579    impl DeleteConnection {
580        pub(crate) fn new(
581            stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
582        ) -> Self {
583            Self(RequestBuilder::new(stub))
584        }
585
586        /// Sets the full request, replacing any prior values.
587        pub fn with_request<V: Into<crate::model::DeleteConnectionRequest>>(
588            mut self,
589            v: V,
590        ) -> Self {
591            self.0.request = v.into();
592            self
593        }
594
595        /// Sets all the options, replacing any prior values.
596        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
597            self.0.options = v.into();
598            self
599        }
600
601        /// Sends the request.
602        ///
603        /// # Long running operations
604        ///
605        /// This starts, but does not poll, a longrunning operation. More information
606        /// on [delete_connection][crate::client::DeveloperConnect::delete_connection].
607        pub async fn send(self) -> Result<longrunning::model::Operation> {
608            (*self.0.stub)
609                .delete_connection(self.0.request, self.0.options)
610                .await
611                .map(gax::response::Response::into_body)
612        }
613
614        /// Creates a [Poller][lro::Poller] to work with `delete_connection`.
615        pub fn poller(self) -> impl lro::Poller<(), crate::model::OperationMetadata> {
616            type Operation = lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
617            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
618            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
619
620            let stub = self.0.stub.clone();
621            let mut options = self.0.options.clone();
622            options.set_retry_policy(gax::retry_policy::NeverRetry);
623            let query = move |name| {
624                let stub = stub.clone();
625                let options = options.clone();
626                async {
627                    let op = GetOperation::new(stub)
628                        .set_name(name)
629                        .with_options(options)
630                        .send()
631                        .await?;
632                    Ok(Operation::new(op))
633                }
634            };
635
636            let start = move || async {
637                let op = self.send().await?;
638                Ok(Operation::new(op))
639            };
640
641            lro::internal::new_unit_response_poller(
642                polling_error_policy,
643                polling_backoff_policy,
644                start,
645                query,
646            )
647        }
648
649        /// Sets the value of [name][crate::model::DeleteConnectionRequest::name].
650        ///
651        /// This is a **required** field for requests.
652        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
653            self.0.request.name = v.into();
654            self
655        }
656
657        /// Sets the value of [request_id][crate::model::DeleteConnectionRequest::request_id].
658        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
659            self.0.request.request_id = v.into();
660            self
661        }
662
663        /// Sets the value of [validate_only][crate::model::DeleteConnectionRequest::validate_only].
664        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
665            self.0.request.validate_only = v.into();
666            self
667        }
668
669        /// Sets the value of [etag][crate::model::DeleteConnectionRequest::etag].
670        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
671            self.0.request.etag = v.into();
672            self
673        }
674    }
675
676    #[doc(hidden)]
677    impl gax::options::internal::RequestBuilder for DeleteConnection {
678        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
679            &mut self.0.options
680        }
681    }
682
683    /// The request builder for [DeveloperConnect::create_git_repository_link][crate::client::DeveloperConnect::create_git_repository_link] calls.
684    ///
685    /// # Example
686    /// ```no_run
687    /// # use google_cloud_developerconnect_v1::builder;
688    /// use builder::developer_connect::CreateGitRepositoryLink;
689    /// # tokio_test::block_on(async {
690    /// use lro::Poller;
691    ///
692    /// let builder = prepare_request_builder();
693    /// let response = builder.poller().until_done().await?;
694    /// # gax::Result::<()>::Ok(()) });
695    ///
696    /// fn prepare_request_builder() -> CreateGitRepositoryLink {
697    ///   # panic!();
698    ///   // ... details omitted ...
699    /// }
700    /// ```
701    #[derive(Clone, Debug)]
702    pub struct CreateGitRepositoryLink(
703        RequestBuilder<crate::model::CreateGitRepositoryLinkRequest>,
704    );
705
706    impl CreateGitRepositoryLink {
707        pub(crate) fn new(
708            stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
709        ) -> Self {
710            Self(RequestBuilder::new(stub))
711        }
712
713        /// Sets the full request, replacing any prior values.
714        pub fn with_request<V: Into<crate::model::CreateGitRepositoryLinkRequest>>(
715            mut self,
716            v: V,
717        ) -> Self {
718            self.0.request = v.into();
719            self
720        }
721
722        /// Sets all the options, replacing any prior values.
723        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
724            self.0.options = v.into();
725            self
726        }
727
728        /// Sends the request.
729        ///
730        /// # Long running operations
731        ///
732        /// This starts, but does not poll, a longrunning operation. More information
733        /// on [create_git_repository_link][crate::client::DeveloperConnect::create_git_repository_link].
734        pub async fn send(self) -> Result<longrunning::model::Operation> {
735            (*self.0.stub)
736                .create_git_repository_link(self.0.request, self.0.options)
737                .await
738                .map(gax::response::Response::into_body)
739        }
740
741        /// Creates a [Poller][lro::Poller] to work with `create_git_repository_link`.
742        pub fn poller(
743            self,
744        ) -> impl lro::Poller<crate::model::GitRepositoryLink, crate::model::OperationMetadata>
745        {
746            type Operation = lro::internal::Operation<
747                crate::model::GitRepositoryLink,
748                crate::model::OperationMetadata,
749            >;
750            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
751            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
752
753            let stub = self.0.stub.clone();
754            let mut options = self.0.options.clone();
755            options.set_retry_policy(gax::retry_policy::NeverRetry);
756            let query = move |name| {
757                let stub = stub.clone();
758                let options = options.clone();
759                async {
760                    let op = GetOperation::new(stub)
761                        .set_name(name)
762                        .with_options(options)
763                        .send()
764                        .await?;
765                    Ok(Operation::new(op))
766                }
767            };
768
769            let start = move || async {
770                let op = self.send().await?;
771                Ok(Operation::new(op))
772            };
773
774            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
775        }
776
777        /// Sets the value of [parent][crate::model::CreateGitRepositoryLinkRequest::parent].
778        ///
779        /// This is a **required** field for requests.
780        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
781            self.0.request.parent = v.into();
782            self
783        }
784
785        /// Sets the value of [git_repository_link][crate::model::CreateGitRepositoryLinkRequest::git_repository_link].
786        ///
787        /// This is a **required** field for requests.
788        pub fn set_git_repository_link<T>(mut self, v: T) -> Self
789        where
790            T: std::convert::Into<crate::model::GitRepositoryLink>,
791        {
792            self.0.request.git_repository_link = std::option::Option::Some(v.into());
793            self
794        }
795
796        /// Sets or clears the value of [git_repository_link][crate::model::CreateGitRepositoryLinkRequest::git_repository_link].
797        ///
798        /// This is a **required** field for requests.
799        pub fn set_or_clear_git_repository_link<T>(mut self, v: std::option::Option<T>) -> Self
800        where
801            T: std::convert::Into<crate::model::GitRepositoryLink>,
802        {
803            self.0.request.git_repository_link = v.map(|x| x.into());
804            self
805        }
806
807        /// Sets the value of [git_repository_link_id][crate::model::CreateGitRepositoryLinkRequest::git_repository_link_id].
808        ///
809        /// This is a **required** field for requests.
810        pub fn set_git_repository_link_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
811            self.0.request.git_repository_link_id = v.into();
812            self
813        }
814
815        /// Sets the value of [request_id][crate::model::CreateGitRepositoryLinkRequest::request_id].
816        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
817            self.0.request.request_id = v.into();
818            self
819        }
820
821        /// Sets the value of [validate_only][crate::model::CreateGitRepositoryLinkRequest::validate_only].
822        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
823            self.0.request.validate_only = v.into();
824            self
825        }
826    }
827
828    #[doc(hidden)]
829    impl gax::options::internal::RequestBuilder for CreateGitRepositoryLink {
830        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
831            &mut self.0.options
832        }
833    }
834
835    /// The request builder for [DeveloperConnect::delete_git_repository_link][crate::client::DeveloperConnect::delete_git_repository_link] calls.
836    ///
837    /// # Example
838    /// ```no_run
839    /// # use google_cloud_developerconnect_v1::builder;
840    /// use builder::developer_connect::DeleteGitRepositoryLink;
841    /// # tokio_test::block_on(async {
842    /// use lro::Poller;
843    ///
844    /// let builder = prepare_request_builder();
845    /// let response = builder.poller().until_done().await?;
846    /// # gax::Result::<()>::Ok(()) });
847    ///
848    /// fn prepare_request_builder() -> DeleteGitRepositoryLink {
849    ///   # panic!();
850    ///   // ... details omitted ...
851    /// }
852    /// ```
853    #[derive(Clone, Debug)]
854    pub struct DeleteGitRepositoryLink(
855        RequestBuilder<crate::model::DeleteGitRepositoryLinkRequest>,
856    );
857
858    impl DeleteGitRepositoryLink {
859        pub(crate) fn new(
860            stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
861        ) -> Self {
862            Self(RequestBuilder::new(stub))
863        }
864
865        /// Sets the full request, replacing any prior values.
866        pub fn with_request<V: Into<crate::model::DeleteGitRepositoryLinkRequest>>(
867            mut self,
868            v: V,
869        ) -> Self {
870            self.0.request = v.into();
871            self
872        }
873
874        /// Sets all the options, replacing any prior values.
875        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
876            self.0.options = v.into();
877            self
878        }
879
880        /// Sends the request.
881        ///
882        /// # Long running operations
883        ///
884        /// This starts, but does not poll, a longrunning operation. More information
885        /// on [delete_git_repository_link][crate::client::DeveloperConnect::delete_git_repository_link].
886        pub async fn send(self) -> Result<longrunning::model::Operation> {
887            (*self.0.stub)
888                .delete_git_repository_link(self.0.request, self.0.options)
889                .await
890                .map(gax::response::Response::into_body)
891        }
892
893        /// Creates a [Poller][lro::Poller] to work with `delete_git_repository_link`.
894        pub fn poller(self) -> impl lro::Poller<(), crate::model::OperationMetadata> {
895            type Operation = lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
896            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
897            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
898
899            let stub = self.0.stub.clone();
900            let mut options = self.0.options.clone();
901            options.set_retry_policy(gax::retry_policy::NeverRetry);
902            let query = move |name| {
903                let stub = stub.clone();
904                let options = options.clone();
905                async {
906                    let op = GetOperation::new(stub)
907                        .set_name(name)
908                        .with_options(options)
909                        .send()
910                        .await?;
911                    Ok(Operation::new(op))
912                }
913            };
914
915            let start = move || async {
916                let op = self.send().await?;
917                Ok(Operation::new(op))
918            };
919
920            lro::internal::new_unit_response_poller(
921                polling_error_policy,
922                polling_backoff_policy,
923                start,
924                query,
925            )
926        }
927
928        /// Sets the value of [name][crate::model::DeleteGitRepositoryLinkRequest::name].
929        ///
930        /// This is a **required** field for requests.
931        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
932            self.0.request.name = v.into();
933            self
934        }
935
936        /// Sets the value of [request_id][crate::model::DeleteGitRepositoryLinkRequest::request_id].
937        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
938            self.0.request.request_id = v.into();
939            self
940        }
941
942        /// Sets the value of [validate_only][crate::model::DeleteGitRepositoryLinkRequest::validate_only].
943        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
944            self.0.request.validate_only = v.into();
945            self
946        }
947
948        /// Sets the value of [etag][crate::model::DeleteGitRepositoryLinkRequest::etag].
949        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
950            self.0.request.etag = v.into();
951            self
952        }
953    }
954
955    #[doc(hidden)]
956    impl gax::options::internal::RequestBuilder for DeleteGitRepositoryLink {
957        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
958            &mut self.0.options
959        }
960    }
961
962    /// The request builder for [DeveloperConnect::list_git_repository_links][crate::client::DeveloperConnect::list_git_repository_links] calls.
963    ///
964    /// # Example
965    /// ```no_run
966    /// # use google_cloud_developerconnect_v1::builder;
967    /// use builder::developer_connect::ListGitRepositoryLinks;
968    /// # tokio_test::block_on(async {
969    /// use gax::paginator::ItemPaginator;
970    ///
971    /// let builder = prepare_request_builder();
972    /// let mut items = builder.by_item();
973    /// while let Some(result) = items.next().await {
974    ///   let item = result?;
975    /// }
976    /// # gax::Result::<()>::Ok(()) });
977    ///
978    /// fn prepare_request_builder() -> ListGitRepositoryLinks {
979    ///   # panic!();
980    ///   // ... details omitted ...
981    /// }
982    /// ```
983    #[derive(Clone, Debug)]
984    pub struct ListGitRepositoryLinks(RequestBuilder<crate::model::ListGitRepositoryLinksRequest>);
985
986    impl ListGitRepositoryLinks {
987        pub(crate) fn new(
988            stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
989        ) -> Self {
990            Self(RequestBuilder::new(stub))
991        }
992
993        /// Sets the full request, replacing any prior values.
994        pub fn with_request<V: Into<crate::model::ListGitRepositoryLinksRequest>>(
995            mut self,
996            v: V,
997        ) -> Self {
998            self.0.request = v.into();
999            self
1000        }
1001
1002        /// Sets all the options, replacing any prior values.
1003        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1004            self.0.options = v.into();
1005            self
1006        }
1007
1008        /// Sends the request.
1009        pub async fn send(self) -> Result<crate::model::ListGitRepositoryLinksResponse> {
1010            (*self.0.stub)
1011                .list_git_repository_links(self.0.request, self.0.options)
1012                .await
1013                .map(gax::response::Response::into_body)
1014        }
1015
1016        /// Streams each page in the collection.
1017        pub fn by_page(
1018            self,
1019        ) -> impl gax::paginator::Paginator<
1020            crate::model::ListGitRepositoryLinksResponse,
1021            gax::error::Error,
1022        > {
1023            use std::clone::Clone;
1024            let token = self.0.request.page_token.clone();
1025            let execute = move |token: String| {
1026                let mut builder = self.clone();
1027                builder.0.request = builder.0.request.set_page_token(token);
1028                builder.send()
1029            };
1030            gax::paginator::internal::new_paginator(token, execute)
1031        }
1032
1033        /// Streams each item in the collection.
1034        pub fn by_item(
1035            self,
1036        ) -> impl gax::paginator::ItemPaginator<
1037            crate::model::ListGitRepositoryLinksResponse,
1038            gax::error::Error,
1039        > {
1040            use gax::paginator::Paginator;
1041            self.by_page().items()
1042        }
1043
1044        /// Sets the value of [parent][crate::model::ListGitRepositoryLinksRequest::parent].
1045        ///
1046        /// This is a **required** field for requests.
1047        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1048            self.0.request.parent = v.into();
1049            self
1050        }
1051
1052        /// Sets the value of [page_size][crate::model::ListGitRepositoryLinksRequest::page_size].
1053        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1054            self.0.request.page_size = v.into();
1055            self
1056        }
1057
1058        /// Sets the value of [page_token][crate::model::ListGitRepositoryLinksRequest::page_token].
1059        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1060            self.0.request.page_token = v.into();
1061            self
1062        }
1063
1064        /// Sets the value of [filter][crate::model::ListGitRepositoryLinksRequest::filter].
1065        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
1066            self.0.request.filter = v.into();
1067            self
1068        }
1069
1070        /// Sets the value of [order_by][crate::model::ListGitRepositoryLinksRequest::order_by].
1071        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
1072            self.0.request.order_by = v.into();
1073            self
1074        }
1075    }
1076
1077    #[doc(hidden)]
1078    impl gax::options::internal::RequestBuilder for ListGitRepositoryLinks {
1079        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1080            &mut self.0.options
1081        }
1082    }
1083
1084    /// The request builder for [DeveloperConnect::get_git_repository_link][crate::client::DeveloperConnect::get_git_repository_link] calls.
1085    ///
1086    /// # Example
1087    /// ```no_run
1088    /// # use google_cloud_developerconnect_v1::builder;
1089    /// use builder::developer_connect::GetGitRepositoryLink;
1090    /// # tokio_test::block_on(async {
1091    ///
1092    /// let builder = prepare_request_builder();
1093    /// let response = builder.send().await?;
1094    /// # gax::Result::<()>::Ok(()) });
1095    ///
1096    /// fn prepare_request_builder() -> GetGitRepositoryLink {
1097    ///   # panic!();
1098    ///   // ... details omitted ...
1099    /// }
1100    /// ```
1101    #[derive(Clone, Debug)]
1102    pub struct GetGitRepositoryLink(RequestBuilder<crate::model::GetGitRepositoryLinkRequest>);
1103
1104    impl GetGitRepositoryLink {
1105        pub(crate) fn new(
1106            stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
1107        ) -> Self {
1108            Self(RequestBuilder::new(stub))
1109        }
1110
1111        /// Sets the full request, replacing any prior values.
1112        pub fn with_request<V: Into<crate::model::GetGitRepositoryLinkRequest>>(
1113            mut self,
1114            v: V,
1115        ) -> Self {
1116            self.0.request = v.into();
1117            self
1118        }
1119
1120        /// Sets all the options, replacing any prior values.
1121        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1122            self.0.options = v.into();
1123            self
1124        }
1125
1126        /// Sends the request.
1127        pub async fn send(self) -> Result<crate::model::GitRepositoryLink> {
1128            (*self.0.stub)
1129                .get_git_repository_link(self.0.request, self.0.options)
1130                .await
1131                .map(gax::response::Response::into_body)
1132        }
1133
1134        /// Sets the value of [name][crate::model::GetGitRepositoryLinkRequest::name].
1135        ///
1136        /// This is a **required** field for requests.
1137        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1138            self.0.request.name = v.into();
1139            self
1140        }
1141    }
1142
1143    #[doc(hidden)]
1144    impl gax::options::internal::RequestBuilder for GetGitRepositoryLink {
1145        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1146            &mut self.0.options
1147        }
1148    }
1149
1150    /// The request builder for [DeveloperConnect::fetch_read_write_token][crate::client::DeveloperConnect::fetch_read_write_token] calls.
1151    ///
1152    /// # Example
1153    /// ```no_run
1154    /// # use google_cloud_developerconnect_v1::builder;
1155    /// use builder::developer_connect::FetchReadWriteToken;
1156    /// # tokio_test::block_on(async {
1157    ///
1158    /// let builder = prepare_request_builder();
1159    /// let response = builder.send().await?;
1160    /// # gax::Result::<()>::Ok(()) });
1161    ///
1162    /// fn prepare_request_builder() -> FetchReadWriteToken {
1163    ///   # panic!();
1164    ///   // ... details omitted ...
1165    /// }
1166    /// ```
1167    #[derive(Clone, Debug)]
1168    pub struct FetchReadWriteToken(RequestBuilder<crate::model::FetchReadWriteTokenRequest>);
1169
1170    impl FetchReadWriteToken {
1171        pub(crate) fn new(
1172            stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
1173        ) -> Self {
1174            Self(RequestBuilder::new(stub))
1175        }
1176
1177        /// Sets the full request, replacing any prior values.
1178        pub fn with_request<V: Into<crate::model::FetchReadWriteTokenRequest>>(
1179            mut self,
1180            v: V,
1181        ) -> Self {
1182            self.0.request = v.into();
1183            self
1184        }
1185
1186        /// Sets all the options, replacing any prior values.
1187        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1188            self.0.options = v.into();
1189            self
1190        }
1191
1192        /// Sends the request.
1193        pub async fn send(self) -> Result<crate::model::FetchReadWriteTokenResponse> {
1194            (*self.0.stub)
1195                .fetch_read_write_token(self.0.request, self.0.options)
1196                .await
1197                .map(gax::response::Response::into_body)
1198        }
1199
1200        /// Sets the value of [git_repository_link][crate::model::FetchReadWriteTokenRequest::git_repository_link].
1201        ///
1202        /// This is a **required** field for requests.
1203        pub fn set_git_repository_link<T: Into<std::string::String>>(mut self, v: T) -> Self {
1204            self.0.request.git_repository_link = v.into();
1205            self
1206        }
1207    }
1208
1209    #[doc(hidden)]
1210    impl gax::options::internal::RequestBuilder for FetchReadWriteToken {
1211        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1212            &mut self.0.options
1213        }
1214    }
1215
1216    /// The request builder for [DeveloperConnect::fetch_read_token][crate::client::DeveloperConnect::fetch_read_token] calls.
1217    ///
1218    /// # Example
1219    /// ```no_run
1220    /// # use google_cloud_developerconnect_v1::builder;
1221    /// use builder::developer_connect::FetchReadToken;
1222    /// # tokio_test::block_on(async {
1223    ///
1224    /// let builder = prepare_request_builder();
1225    /// let response = builder.send().await?;
1226    /// # gax::Result::<()>::Ok(()) });
1227    ///
1228    /// fn prepare_request_builder() -> FetchReadToken {
1229    ///   # panic!();
1230    ///   // ... details omitted ...
1231    /// }
1232    /// ```
1233    #[derive(Clone, Debug)]
1234    pub struct FetchReadToken(RequestBuilder<crate::model::FetchReadTokenRequest>);
1235
1236    impl FetchReadToken {
1237        pub(crate) fn new(
1238            stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
1239        ) -> Self {
1240            Self(RequestBuilder::new(stub))
1241        }
1242
1243        /// Sets the full request, replacing any prior values.
1244        pub fn with_request<V: Into<crate::model::FetchReadTokenRequest>>(mut self, v: V) -> Self {
1245            self.0.request = v.into();
1246            self
1247        }
1248
1249        /// Sets all the options, replacing any prior values.
1250        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1251            self.0.options = v.into();
1252            self
1253        }
1254
1255        /// Sends the request.
1256        pub async fn send(self) -> Result<crate::model::FetchReadTokenResponse> {
1257            (*self.0.stub)
1258                .fetch_read_token(self.0.request, self.0.options)
1259                .await
1260                .map(gax::response::Response::into_body)
1261        }
1262
1263        /// Sets the value of [git_repository_link][crate::model::FetchReadTokenRequest::git_repository_link].
1264        ///
1265        /// This is a **required** field for requests.
1266        pub fn set_git_repository_link<T: Into<std::string::String>>(mut self, v: T) -> Self {
1267            self.0.request.git_repository_link = v.into();
1268            self
1269        }
1270    }
1271
1272    #[doc(hidden)]
1273    impl gax::options::internal::RequestBuilder for FetchReadToken {
1274        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1275            &mut self.0.options
1276        }
1277    }
1278
1279    /// The request builder for [DeveloperConnect::fetch_linkable_git_repositories][crate::client::DeveloperConnect::fetch_linkable_git_repositories] calls.
1280    ///
1281    /// # Example
1282    /// ```no_run
1283    /// # use google_cloud_developerconnect_v1::builder;
1284    /// use builder::developer_connect::FetchLinkableGitRepositories;
1285    /// # tokio_test::block_on(async {
1286    /// use gax::paginator::ItemPaginator;
1287    ///
1288    /// let builder = prepare_request_builder();
1289    /// let mut items = builder.by_item();
1290    /// while let Some(result) = items.next().await {
1291    ///   let item = result?;
1292    /// }
1293    /// # gax::Result::<()>::Ok(()) });
1294    ///
1295    /// fn prepare_request_builder() -> FetchLinkableGitRepositories {
1296    ///   # panic!();
1297    ///   // ... details omitted ...
1298    /// }
1299    /// ```
1300    #[derive(Clone, Debug)]
1301    pub struct FetchLinkableGitRepositories(
1302        RequestBuilder<crate::model::FetchLinkableGitRepositoriesRequest>,
1303    );
1304
1305    impl FetchLinkableGitRepositories {
1306        pub(crate) fn new(
1307            stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
1308        ) -> Self {
1309            Self(RequestBuilder::new(stub))
1310        }
1311
1312        /// Sets the full request, replacing any prior values.
1313        pub fn with_request<V: Into<crate::model::FetchLinkableGitRepositoriesRequest>>(
1314            mut self,
1315            v: V,
1316        ) -> Self {
1317            self.0.request = v.into();
1318            self
1319        }
1320
1321        /// Sets all the options, replacing any prior values.
1322        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1323            self.0.options = v.into();
1324            self
1325        }
1326
1327        /// Sends the request.
1328        pub async fn send(self) -> Result<crate::model::FetchLinkableGitRepositoriesResponse> {
1329            (*self.0.stub)
1330                .fetch_linkable_git_repositories(self.0.request, self.0.options)
1331                .await
1332                .map(gax::response::Response::into_body)
1333        }
1334
1335        /// Streams each page in the collection.
1336        pub fn by_page(
1337            self,
1338        ) -> impl gax::paginator::Paginator<
1339            crate::model::FetchLinkableGitRepositoriesResponse,
1340            gax::error::Error,
1341        > {
1342            use std::clone::Clone;
1343            let token = self.0.request.page_token.clone();
1344            let execute = move |token: String| {
1345                let mut builder = self.clone();
1346                builder.0.request = builder.0.request.set_page_token(token);
1347                builder.send()
1348            };
1349            gax::paginator::internal::new_paginator(token, execute)
1350        }
1351
1352        /// Streams each item in the collection.
1353        pub fn by_item(
1354            self,
1355        ) -> impl gax::paginator::ItemPaginator<
1356            crate::model::FetchLinkableGitRepositoriesResponse,
1357            gax::error::Error,
1358        > {
1359            use gax::paginator::Paginator;
1360            self.by_page().items()
1361        }
1362
1363        /// Sets the value of [connection][crate::model::FetchLinkableGitRepositoriesRequest::connection].
1364        ///
1365        /// This is a **required** field for requests.
1366        pub fn set_connection<T: Into<std::string::String>>(mut self, v: T) -> Self {
1367            self.0.request.connection = v.into();
1368            self
1369        }
1370
1371        /// Sets the value of [page_size][crate::model::FetchLinkableGitRepositoriesRequest::page_size].
1372        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1373            self.0.request.page_size = v.into();
1374            self
1375        }
1376
1377        /// Sets the value of [page_token][crate::model::FetchLinkableGitRepositoriesRequest::page_token].
1378        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1379            self.0.request.page_token = v.into();
1380            self
1381        }
1382    }
1383
1384    #[doc(hidden)]
1385    impl gax::options::internal::RequestBuilder for FetchLinkableGitRepositories {
1386        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1387            &mut self.0.options
1388        }
1389    }
1390
1391    /// The request builder for [DeveloperConnect::fetch_git_hub_installations][crate::client::DeveloperConnect::fetch_git_hub_installations] calls.
1392    ///
1393    /// # Example
1394    /// ```no_run
1395    /// # use google_cloud_developerconnect_v1::builder;
1396    /// use builder::developer_connect::FetchGitHubInstallations;
1397    /// # tokio_test::block_on(async {
1398    ///
1399    /// let builder = prepare_request_builder();
1400    /// let response = builder.send().await?;
1401    /// # gax::Result::<()>::Ok(()) });
1402    ///
1403    /// fn prepare_request_builder() -> FetchGitHubInstallations {
1404    ///   # panic!();
1405    ///   // ... details omitted ...
1406    /// }
1407    /// ```
1408    #[derive(Clone, Debug)]
1409    pub struct FetchGitHubInstallations(
1410        RequestBuilder<crate::model::FetchGitHubInstallationsRequest>,
1411    );
1412
1413    impl FetchGitHubInstallations {
1414        pub(crate) fn new(
1415            stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
1416        ) -> Self {
1417            Self(RequestBuilder::new(stub))
1418        }
1419
1420        /// Sets the full request, replacing any prior values.
1421        pub fn with_request<V: Into<crate::model::FetchGitHubInstallationsRequest>>(
1422            mut self,
1423            v: V,
1424        ) -> Self {
1425            self.0.request = v.into();
1426            self
1427        }
1428
1429        /// Sets all the options, replacing any prior values.
1430        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1431            self.0.options = v.into();
1432            self
1433        }
1434
1435        /// Sends the request.
1436        pub async fn send(self) -> Result<crate::model::FetchGitHubInstallationsResponse> {
1437            (*self.0.stub)
1438                .fetch_git_hub_installations(self.0.request, self.0.options)
1439                .await
1440                .map(gax::response::Response::into_body)
1441        }
1442
1443        /// Sets the value of [connection][crate::model::FetchGitHubInstallationsRequest::connection].
1444        ///
1445        /// This is a **required** field for requests.
1446        pub fn set_connection<T: Into<std::string::String>>(mut self, v: T) -> Self {
1447            self.0.request.connection = v.into();
1448            self
1449        }
1450    }
1451
1452    #[doc(hidden)]
1453    impl gax::options::internal::RequestBuilder for FetchGitHubInstallations {
1454        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1455            &mut self.0.options
1456        }
1457    }
1458
1459    /// The request builder for [DeveloperConnect::fetch_git_refs][crate::client::DeveloperConnect::fetch_git_refs] calls.
1460    ///
1461    /// # Example
1462    /// ```no_run
1463    /// # use google_cloud_developerconnect_v1::builder;
1464    /// use builder::developer_connect::FetchGitRefs;
1465    /// # tokio_test::block_on(async {
1466    ///
1467    /// let builder = prepare_request_builder();
1468    /// let response = builder.send().await?;
1469    /// # gax::Result::<()>::Ok(()) });
1470    ///
1471    /// fn prepare_request_builder() -> FetchGitRefs {
1472    ///   # panic!();
1473    ///   // ... details omitted ...
1474    /// }
1475    /// ```
1476    #[derive(Clone, Debug)]
1477    pub struct FetchGitRefs(RequestBuilder<crate::model::FetchGitRefsRequest>);
1478
1479    impl FetchGitRefs {
1480        pub(crate) fn new(
1481            stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
1482        ) -> Self {
1483            Self(RequestBuilder::new(stub))
1484        }
1485
1486        /// Sets the full request, replacing any prior values.
1487        pub fn with_request<V: Into<crate::model::FetchGitRefsRequest>>(mut self, v: V) -> Self {
1488            self.0.request = v.into();
1489            self
1490        }
1491
1492        /// Sets all the options, replacing any prior values.
1493        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1494            self.0.options = v.into();
1495            self
1496        }
1497
1498        /// Sends the request.
1499        pub async fn send(self) -> Result<crate::model::FetchGitRefsResponse> {
1500            (*self.0.stub)
1501                .fetch_git_refs(self.0.request, self.0.options)
1502                .await
1503                .map(gax::response::Response::into_body)
1504        }
1505
1506        /// Sets the value of [git_repository_link][crate::model::FetchGitRefsRequest::git_repository_link].
1507        ///
1508        /// This is a **required** field for requests.
1509        pub fn set_git_repository_link<T: Into<std::string::String>>(mut self, v: T) -> Self {
1510            self.0.request.git_repository_link = v.into();
1511            self
1512        }
1513
1514        /// Sets the value of [ref_type][crate::model::FetchGitRefsRequest::ref_type].
1515        ///
1516        /// This is a **required** field for requests.
1517        pub fn set_ref_type<T: Into<crate::model::fetch_git_refs_request::RefType>>(
1518            mut self,
1519            v: T,
1520        ) -> Self {
1521            self.0.request.ref_type = v.into();
1522            self
1523        }
1524
1525        /// Sets the value of [page_size][crate::model::FetchGitRefsRequest::page_size].
1526        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1527            self.0.request.page_size = v.into();
1528            self
1529        }
1530
1531        /// Sets the value of [page_token][crate::model::FetchGitRefsRequest::page_token].
1532        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1533            self.0.request.page_token = v.into();
1534            self
1535        }
1536    }
1537
1538    #[doc(hidden)]
1539    impl gax::options::internal::RequestBuilder for FetchGitRefs {
1540        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1541            &mut self.0.options
1542        }
1543    }
1544
1545    /// The request builder for [DeveloperConnect::list_account_connectors][crate::client::DeveloperConnect::list_account_connectors] calls.
1546    ///
1547    /// # Example
1548    /// ```no_run
1549    /// # use google_cloud_developerconnect_v1::builder;
1550    /// use builder::developer_connect::ListAccountConnectors;
1551    /// # tokio_test::block_on(async {
1552    /// use gax::paginator::ItemPaginator;
1553    ///
1554    /// let builder = prepare_request_builder();
1555    /// let mut items = builder.by_item();
1556    /// while let Some(result) = items.next().await {
1557    ///   let item = result?;
1558    /// }
1559    /// # gax::Result::<()>::Ok(()) });
1560    ///
1561    /// fn prepare_request_builder() -> ListAccountConnectors {
1562    ///   # panic!();
1563    ///   // ... details omitted ...
1564    /// }
1565    /// ```
1566    #[derive(Clone, Debug)]
1567    pub struct ListAccountConnectors(RequestBuilder<crate::model::ListAccountConnectorsRequest>);
1568
1569    impl ListAccountConnectors {
1570        pub(crate) fn new(
1571            stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
1572        ) -> Self {
1573            Self(RequestBuilder::new(stub))
1574        }
1575
1576        /// Sets the full request, replacing any prior values.
1577        pub fn with_request<V: Into<crate::model::ListAccountConnectorsRequest>>(
1578            mut self,
1579            v: V,
1580        ) -> Self {
1581            self.0.request = v.into();
1582            self
1583        }
1584
1585        /// Sets all the options, replacing any prior values.
1586        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1587            self.0.options = v.into();
1588            self
1589        }
1590
1591        /// Sends the request.
1592        pub async fn send(self) -> Result<crate::model::ListAccountConnectorsResponse> {
1593            (*self.0.stub)
1594                .list_account_connectors(self.0.request, self.0.options)
1595                .await
1596                .map(gax::response::Response::into_body)
1597        }
1598
1599        /// Streams each page in the collection.
1600        pub fn by_page(
1601            self,
1602        ) -> impl gax::paginator::Paginator<crate::model::ListAccountConnectorsResponse, gax::error::Error>
1603        {
1604            use std::clone::Clone;
1605            let token = self.0.request.page_token.clone();
1606            let execute = move |token: String| {
1607                let mut builder = self.clone();
1608                builder.0.request = builder.0.request.set_page_token(token);
1609                builder.send()
1610            };
1611            gax::paginator::internal::new_paginator(token, execute)
1612        }
1613
1614        /// Streams each item in the collection.
1615        pub fn by_item(
1616            self,
1617        ) -> impl gax::paginator::ItemPaginator<
1618            crate::model::ListAccountConnectorsResponse,
1619            gax::error::Error,
1620        > {
1621            use gax::paginator::Paginator;
1622            self.by_page().items()
1623        }
1624
1625        /// Sets the value of [parent][crate::model::ListAccountConnectorsRequest::parent].
1626        ///
1627        /// This is a **required** field for requests.
1628        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1629            self.0.request.parent = v.into();
1630            self
1631        }
1632
1633        /// Sets the value of [page_size][crate::model::ListAccountConnectorsRequest::page_size].
1634        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1635            self.0.request.page_size = v.into();
1636            self
1637        }
1638
1639        /// Sets the value of [page_token][crate::model::ListAccountConnectorsRequest::page_token].
1640        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1641            self.0.request.page_token = v.into();
1642            self
1643        }
1644
1645        /// Sets the value of [filter][crate::model::ListAccountConnectorsRequest::filter].
1646        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
1647            self.0.request.filter = v.into();
1648            self
1649        }
1650
1651        /// Sets the value of [order_by][crate::model::ListAccountConnectorsRequest::order_by].
1652        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
1653            self.0.request.order_by = v.into();
1654            self
1655        }
1656    }
1657
1658    #[doc(hidden)]
1659    impl gax::options::internal::RequestBuilder for ListAccountConnectors {
1660        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1661            &mut self.0.options
1662        }
1663    }
1664
1665    /// The request builder for [DeveloperConnect::get_account_connector][crate::client::DeveloperConnect::get_account_connector] calls.
1666    ///
1667    /// # Example
1668    /// ```no_run
1669    /// # use google_cloud_developerconnect_v1::builder;
1670    /// use builder::developer_connect::GetAccountConnector;
1671    /// # tokio_test::block_on(async {
1672    ///
1673    /// let builder = prepare_request_builder();
1674    /// let response = builder.send().await?;
1675    /// # gax::Result::<()>::Ok(()) });
1676    ///
1677    /// fn prepare_request_builder() -> GetAccountConnector {
1678    ///   # panic!();
1679    ///   // ... details omitted ...
1680    /// }
1681    /// ```
1682    #[derive(Clone, Debug)]
1683    pub struct GetAccountConnector(RequestBuilder<crate::model::GetAccountConnectorRequest>);
1684
1685    impl GetAccountConnector {
1686        pub(crate) fn new(
1687            stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
1688        ) -> Self {
1689            Self(RequestBuilder::new(stub))
1690        }
1691
1692        /// Sets the full request, replacing any prior values.
1693        pub fn with_request<V: Into<crate::model::GetAccountConnectorRequest>>(
1694            mut self,
1695            v: V,
1696        ) -> Self {
1697            self.0.request = v.into();
1698            self
1699        }
1700
1701        /// Sets all the options, replacing any prior values.
1702        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1703            self.0.options = v.into();
1704            self
1705        }
1706
1707        /// Sends the request.
1708        pub async fn send(self) -> Result<crate::model::AccountConnector> {
1709            (*self.0.stub)
1710                .get_account_connector(self.0.request, self.0.options)
1711                .await
1712                .map(gax::response::Response::into_body)
1713        }
1714
1715        /// Sets the value of [name][crate::model::GetAccountConnectorRequest::name].
1716        ///
1717        /// This is a **required** field for requests.
1718        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1719            self.0.request.name = v.into();
1720            self
1721        }
1722    }
1723
1724    #[doc(hidden)]
1725    impl gax::options::internal::RequestBuilder for GetAccountConnector {
1726        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1727            &mut self.0.options
1728        }
1729    }
1730
1731    /// The request builder for [DeveloperConnect::create_account_connector][crate::client::DeveloperConnect::create_account_connector] calls.
1732    ///
1733    /// # Example
1734    /// ```no_run
1735    /// # use google_cloud_developerconnect_v1::builder;
1736    /// use builder::developer_connect::CreateAccountConnector;
1737    /// # tokio_test::block_on(async {
1738    /// use lro::Poller;
1739    ///
1740    /// let builder = prepare_request_builder();
1741    /// let response = builder.poller().until_done().await?;
1742    /// # gax::Result::<()>::Ok(()) });
1743    ///
1744    /// fn prepare_request_builder() -> CreateAccountConnector {
1745    ///   # panic!();
1746    ///   // ... details omitted ...
1747    /// }
1748    /// ```
1749    #[derive(Clone, Debug)]
1750    pub struct CreateAccountConnector(RequestBuilder<crate::model::CreateAccountConnectorRequest>);
1751
1752    impl CreateAccountConnector {
1753        pub(crate) fn new(
1754            stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
1755        ) -> Self {
1756            Self(RequestBuilder::new(stub))
1757        }
1758
1759        /// Sets the full request, replacing any prior values.
1760        pub fn with_request<V: Into<crate::model::CreateAccountConnectorRequest>>(
1761            mut self,
1762            v: V,
1763        ) -> Self {
1764            self.0.request = v.into();
1765            self
1766        }
1767
1768        /// Sets all the options, replacing any prior values.
1769        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1770            self.0.options = v.into();
1771            self
1772        }
1773
1774        /// Sends the request.
1775        ///
1776        /// # Long running operations
1777        ///
1778        /// This starts, but does not poll, a longrunning operation. More information
1779        /// on [create_account_connector][crate::client::DeveloperConnect::create_account_connector].
1780        pub async fn send(self) -> Result<longrunning::model::Operation> {
1781            (*self.0.stub)
1782                .create_account_connector(self.0.request, self.0.options)
1783                .await
1784                .map(gax::response::Response::into_body)
1785        }
1786
1787        /// Creates a [Poller][lro::Poller] to work with `create_account_connector`.
1788        pub fn poller(
1789            self,
1790        ) -> impl lro::Poller<crate::model::AccountConnector, crate::model::OperationMetadata>
1791        {
1792            type Operation = lro::internal::Operation<
1793                crate::model::AccountConnector,
1794                crate::model::OperationMetadata,
1795            >;
1796            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1797            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1798
1799            let stub = self.0.stub.clone();
1800            let mut options = self.0.options.clone();
1801            options.set_retry_policy(gax::retry_policy::NeverRetry);
1802            let query = move |name| {
1803                let stub = stub.clone();
1804                let options = options.clone();
1805                async {
1806                    let op = GetOperation::new(stub)
1807                        .set_name(name)
1808                        .with_options(options)
1809                        .send()
1810                        .await?;
1811                    Ok(Operation::new(op))
1812                }
1813            };
1814
1815            let start = move || async {
1816                let op = self.send().await?;
1817                Ok(Operation::new(op))
1818            };
1819
1820            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
1821        }
1822
1823        /// Sets the value of [parent][crate::model::CreateAccountConnectorRequest::parent].
1824        ///
1825        /// This is a **required** field for requests.
1826        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1827            self.0.request.parent = v.into();
1828            self
1829        }
1830
1831        /// Sets the value of [account_connector_id][crate::model::CreateAccountConnectorRequest::account_connector_id].
1832        ///
1833        /// This is a **required** field for requests.
1834        pub fn set_account_connector_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1835            self.0.request.account_connector_id = v.into();
1836            self
1837        }
1838
1839        /// Sets the value of [account_connector][crate::model::CreateAccountConnectorRequest::account_connector].
1840        ///
1841        /// This is a **required** field for requests.
1842        pub fn set_account_connector<T>(mut self, v: T) -> Self
1843        where
1844            T: std::convert::Into<crate::model::AccountConnector>,
1845        {
1846            self.0.request.account_connector = std::option::Option::Some(v.into());
1847            self
1848        }
1849
1850        /// Sets or clears the value of [account_connector][crate::model::CreateAccountConnectorRequest::account_connector].
1851        ///
1852        /// This is a **required** field for requests.
1853        pub fn set_or_clear_account_connector<T>(mut self, v: std::option::Option<T>) -> Self
1854        where
1855            T: std::convert::Into<crate::model::AccountConnector>,
1856        {
1857            self.0.request.account_connector = v.map(|x| x.into());
1858            self
1859        }
1860
1861        /// Sets the value of [request_id][crate::model::CreateAccountConnectorRequest::request_id].
1862        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1863            self.0.request.request_id = v.into();
1864            self
1865        }
1866
1867        /// Sets the value of [validate_only][crate::model::CreateAccountConnectorRequest::validate_only].
1868        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
1869            self.0.request.validate_only = v.into();
1870            self
1871        }
1872    }
1873
1874    #[doc(hidden)]
1875    impl gax::options::internal::RequestBuilder for CreateAccountConnector {
1876        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1877            &mut self.0.options
1878        }
1879    }
1880
1881    /// The request builder for [DeveloperConnect::update_account_connector][crate::client::DeveloperConnect::update_account_connector] calls.
1882    ///
1883    /// # Example
1884    /// ```no_run
1885    /// # use google_cloud_developerconnect_v1::builder;
1886    /// use builder::developer_connect::UpdateAccountConnector;
1887    /// # tokio_test::block_on(async {
1888    /// use lro::Poller;
1889    ///
1890    /// let builder = prepare_request_builder();
1891    /// let response = builder.poller().until_done().await?;
1892    /// # gax::Result::<()>::Ok(()) });
1893    ///
1894    /// fn prepare_request_builder() -> UpdateAccountConnector {
1895    ///   # panic!();
1896    ///   // ... details omitted ...
1897    /// }
1898    /// ```
1899    #[derive(Clone, Debug)]
1900    pub struct UpdateAccountConnector(RequestBuilder<crate::model::UpdateAccountConnectorRequest>);
1901
1902    impl UpdateAccountConnector {
1903        pub(crate) fn new(
1904            stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
1905        ) -> Self {
1906            Self(RequestBuilder::new(stub))
1907        }
1908
1909        /// Sets the full request, replacing any prior values.
1910        pub fn with_request<V: Into<crate::model::UpdateAccountConnectorRequest>>(
1911            mut self,
1912            v: V,
1913        ) -> Self {
1914            self.0.request = v.into();
1915            self
1916        }
1917
1918        /// Sets all the options, replacing any prior values.
1919        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1920            self.0.options = v.into();
1921            self
1922        }
1923
1924        /// Sends the request.
1925        ///
1926        /// # Long running operations
1927        ///
1928        /// This starts, but does not poll, a longrunning operation. More information
1929        /// on [update_account_connector][crate::client::DeveloperConnect::update_account_connector].
1930        pub async fn send(self) -> Result<longrunning::model::Operation> {
1931            (*self.0.stub)
1932                .update_account_connector(self.0.request, self.0.options)
1933                .await
1934                .map(gax::response::Response::into_body)
1935        }
1936
1937        /// Creates a [Poller][lro::Poller] to work with `update_account_connector`.
1938        pub fn poller(
1939            self,
1940        ) -> impl lro::Poller<crate::model::AccountConnector, crate::model::OperationMetadata>
1941        {
1942            type Operation = lro::internal::Operation<
1943                crate::model::AccountConnector,
1944                crate::model::OperationMetadata,
1945            >;
1946            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1947            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1948
1949            let stub = self.0.stub.clone();
1950            let mut options = self.0.options.clone();
1951            options.set_retry_policy(gax::retry_policy::NeverRetry);
1952            let query = move |name| {
1953                let stub = stub.clone();
1954                let options = options.clone();
1955                async {
1956                    let op = GetOperation::new(stub)
1957                        .set_name(name)
1958                        .with_options(options)
1959                        .send()
1960                        .await?;
1961                    Ok(Operation::new(op))
1962                }
1963            };
1964
1965            let start = move || async {
1966                let op = self.send().await?;
1967                Ok(Operation::new(op))
1968            };
1969
1970            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
1971        }
1972
1973        /// Sets the value of [update_mask][crate::model::UpdateAccountConnectorRequest::update_mask].
1974        pub fn set_update_mask<T>(mut self, v: T) -> Self
1975        where
1976            T: std::convert::Into<wkt::FieldMask>,
1977        {
1978            self.0.request.update_mask = std::option::Option::Some(v.into());
1979            self
1980        }
1981
1982        /// Sets or clears the value of [update_mask][crate::model::UpdateAccountConnectorRequest::update_mask].
1983        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
1984        where
1985            T: std::convert::Into<wkt::FieldMask>,
1986        {
1987            self.0.request.update_mask = v.map(|x| x.into());
1988            self
1989        }
1990
1991        /// Sets the value of [account_connector][crate::model::UpdateAccountConnectorRequest::account_connector].
1992        ///
1993        /// This is a **required** field for requests.
1994        pub fn set_account_connector<T>(mut self, v: T) -> Self
1995        where
1996            T: std::convert::Into<crate::model::AccountConnector>,
1997        {
1998            self.0.request.account_connector = std::option::Option::Some(v.into());
1999            self
2000        }
2001
2002        /// Sets or clears the value of [account_connector][crate::model::UpdateAccountConnectorRequest::account_connector].
2003        ///
2004        /// This is a **required** field for requests.
2005        pub fn set_or_clear_account_connector<T>(mut self, v: std::option::Option<T>) -> Self
2006        where
2007            T: std::convert::Into<crate::model::AccountConnector>,
2008        {
2009            self.0.request.account_connector = v.map(|x| x.into());
2010            self
2011        }
2012
2013        /// Sets the value of [request_id][crate::model::UpdateAccountConnectorRequest::request_id].
2014        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2015            self.0.request.request_id = v.into();
2016            self
2017        }
2018
2019        /// Sets the value of [allow_missing][crate::model::UpdateAccountConnectorRequest::allow_missing].
2020        pub fn set_allow_missing<T: Into<bool>>(mut self, v: T) -> Self {
2021            self.0.request.allow_missing = v.into();
2022            self
2023        }
2024
2025        /// Sets the value of [validate_only][crate::model::UpdateAccountConnectorRequest::validate_only].
2026        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
2027            self.0.request.validate_only = v.into();
2028            self
2029        }
2030    }
2031
2032    #[doc(hidden)]
2033    impl gax::options::internal::RequestBuilder for UpdateAccountConnector {
2034        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2035            &mut self.0.options
2036        }
2037    }
2038
2039    /// The request builder for [DeveloperConnect::delete_account_connector][crate::client::DeveloperConnect::delete_account_connector] calls.
2040    ///
2041    /// # Example
2042    /// ```no_run
2043    /// # use google_cloud_developerconnect_v1::builder;
2044    /// use builder::developer_connect::DeleteAccountConnector;
2045    /// # tokio_test::block_on(async {
2046    /// use lro::Poller;
2047    ///
2048    /// let builder = prepare_request_builder();
2049    /// let response = builder.poller().until_done().await?;
2050    /// # gax::Result::<()>::Ok(()) });
2051    ///
2052    /// fn prepare_request_builder() -> DeleteAccountConnector {
2053    ///   # panic!();
2054    ///   // ... details omitted ...
2055    /// }
2056    /// ```
2057    #[derive(Clone, Debug)]
2058    pub struct DeleteAccountConnector(RequestBuilder<crate::model::DeleteAccountConnectorRequest>);
2059
2060    impl DeleteAccountConnector {
2061        pub(crate) fn new(
2062            stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
2063        ) -> Self {
2064            Self(RequestBuilder::new(stub))
2065        }
2066
2067        /// Sets the full request, replacing any prior values.
2068        pub fn with_request<V: Into<crate::model::DeleteAccountConnectorRequest>>(
2069            mut self,
2070            v: V,
2071        ) -> Self {
2072            self.0.request = v.into();
2073            self
2074        }
2075
2076        /// Sets all the options, replacing any prior values.
2077        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2078            self.0.options = v.into();
2079            self
2080        }
2081
2082        /// Sends the request.
2083        ///
2084        /// # Long running operations
2085        ///
2086        /// This starts, but does not poll, a longrunning operation. More information
2087        /// on [delete_account_connector][crate::client::DeveloperConnect::delete_account_connector].
2088        pub async fn send(self) -> Result<longrunning::model::Operation> {
2089            (*self.0.stub)
2090                .delete_account_connector(self.0.request, self.0.options)
2091                .await
2092                .map(gax::response::Response::into_body)
2093        }
2094
2095        /// Creates a [Poller][lro::Poller] to work with `delete_account_connector`.
2096        pub fn poller(self) -> impl lro::Poller<(), crate::model::OperationMetadata> {
2097            type Operation = lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
2098            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2099            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2100
2101            let stub = self.0.stub.clone();
2102            let mut options = self.0.options.clone();
2103            options.set_retry_policy(gax::retry_policy::NeverRetry);
2104            let query = move |name| {
2105                let stub = stub.clone();
2106                let options = options.clone();
2107                async {
2108                    let op = GetOperation::new(stub)
2109                        .set_name(name)
2110                        .with_options(options)
2111                        .send()
2112                        .await?;
2113                    Ok(Operation::new(op))
2114                }
2115            };
2116
2117            let start = move || async {
2118                let op = self.send().await?;
2119                Ok(Operation::new(op))
2120            };
2121
2122            lro::internal::new_unit_response_poller(
2123                polling_error_policy,
2124                polling_backoff_policy,
2125                start,
2126                query,
2127            )
2128        }
2129
2130        /// Sets the value of [name][crate::model::DeleteAccountConnectorRequest::name].
2131        ///
2132        /// This is a **required** field for requests.
2133        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2134            self.0.request.name = v.into();
2135            self
2136        }
2137
2138        /// Sets the value of [request_id][crate::model::DeleteAccountConnectorRequest::request_id].
2139        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2140            self.0.request.request_id = v.into();
2141            self
2142        }
2143
2144        /// Sets the value of [validate_only][crate::model::DeleteAccountConnectorRequest::validate_only].
2145        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
2146            self.0.request.validate_only = v.into();
2147            self
2148        }
2149
2150        /// Sets the value of [etag][crate::model::DeleteAccountConnectorRequest::etag].
2151        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
2152            self.0.request.etag = v.into();
2153            self
2154        }
2155
2156        /// Sets the value of [force][crate::model::DeleteAccountConnectorRequest::force].
2157        pub fn set_force<T: Into<bool>>(mut self, v: T) -> Self {
2158            self.0.request.force = v.into();
2159            self
2160        }
2161    }
2162
2163    #[doc(hidden)]
2164    impl gax::options::internal::RequestBuilder for DeleteAccountConnector {
2165        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2166            &mut self.0.options
2167        }
2168    }
2169
2170    /// The request builder for [DeveloperConnect::fetch_access_token][crate::client::DeveloperConnect::fetch_access_token] calls.
2171    ///
2172    /// # Example
2173    /// ```no_run
2174    /// # use google_cloud_developerconnect_v1::builder;
2175    /// use builder::developer_connect::FetchAccessToken;
2176    /// # tokio_test::block_on(async {
2177    ///
2178    /// let builder = prepare_request_builder();
2179    /// let response = builder.send().await?;
2180    /// # gax::Result::<()>::Ok(()) });
2181    ///
2182    /// fn prepare_request_builder() -> FetchAccessToken {
2183    ///   # panic!();
2184    ///   // ... details omitted ...
2185    /// }
2186    /// ```
2187    #[derive(Clone, Debug)]
2188    pub struct FetchAccessToken(RequestBuilder<crate::model::FetchAccessTokenRequest>);
2189
2190    impl FetchAccessToken {
2191        pub(crate) fn new(
2192            stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
2193        ) -> Self {
2194            Self(RequestBuilder::new(stub))
2195        }
2196
2197        /// Sets the full request, replacing any prior values.
2198        pub fn with_request<V: Into<crate::model::FetchAccessTokenRequest>>(
2199            mut self,
2200            v: V,
2201        ) -> Self {
2202            self.0.request = v.into();
2203            self
2204        }
2205
2206        /// Sets all the options, replacing any prior values.
2207        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2208            self.0.options = v.into();
2209            self
2210        }
2211
2212        /// Sends the request.
2213        pub async fn send(self) -> Result<crate::model::FetchAccessTokenResponse> {
2214            (*self.0.stub)
2215                .fetch_access_token(self.0.request, self.0.options)
2216                .await
2217                .map(gax::response::Response::into_body)
2218        }
2219
2220        /// Sets the value of [account_connector][crate::model::FetchAccessTokenRequest::account_connector].
2221        ///
2222        /// This is a **required** field for requests.
2223        pub fn set_account_connector<T: Into<std::string::String>>(mut self, v: T) -> Self {
2224            self.0.request.account_connector = v.into();
2225            self
2226        }
2227    }
2228
2229    #[doc(hidden)]
2230    impl gax::options::internal::RequestBuilder for FetchAccessToken {
2231        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2232            &mut self.0.options
2233        }
2234    }
2235
2236    /// The request builder for [DeveloperConnect::list_users][crate::client::DeveloperConnect::list_users] calls.
2237    ///
2238    /// # Example
2239    /// ```no_run
2240    /// # use google_cloud_developerconnect_v1::builder;
2241    /// use builder::developer_connect::ListUsers;
2242    /// # tokio_test::block_on(async {
2243    /// use gax::paginator::ItemPaginator;
2244    ///
2245    /// let builder = prepare_request_builder();
2246    /// let mut items = builder.by_item();
2247    /// while let Some(result) = items.next().await {
2248    ///   let item = result?;
2249    /// }
2250    /// # gax::Result::<()>::Ok(()) });
2251    ///
2252    /// fn prepare_request_builder() -> ListUsers {
2253    ///   # panic!();
2254    ///   // ... details omitted ...
2255    /// }
2256    /// ```
2257    #[derive(Clone, Debug)]
2258    pub struct ListUsers(RequestBuilder<crate::model::ListUsersRequest>);
2259
2260    impl ListUsers {
2261        pub(crate) fn new(
2262            stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
2263        ) -> Self {
2264            Self(RequestBuilder::new(stub))
2265        }
2266
2267        /// Sets the full request, replacing any prior values.
2268        pub fn with_request<V: Into<crate::model::ListUsersRequest>>(mut self, v: V) -> Self {
2269            self.0.request = v.into();
2270            self
2271        }
2272
2273        /// Sets all the options, replacing any prior values.
2274        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2275            self.0.options = v.into();
2276            self
2277        }
2278
2279        /// Sends the request.
2280        pub async fn send(self) -> Result<crate::model::ListUsersResponse> {
2281            (*self.0.stub)
2282                .list_users(self.0.request, self.0.options)
2283                .await
2284                .map(gax::response::Response::into_body)
2285        }
2286
2287        /// Streams each page in the collection.
2288        pub fn by_page(
2289            self,
2290        ) -> impl gax::paginator::Paginator<crate::model::ListUsersResponse, gax::error::Error>
2291        {
2292            use std::clone::Clone;
2293            let token = self.0.request.page_token.clone();
2294            let execute = move |token: String| {
2295                let mut builder = self.clone();
2296                builder.0.request = builder.0.request.set_page_token(token);
2297                builder.send()
2298            };
2299            gax::paginator::internal::new_paginator(token, execute)
2300        }
2301
2302        /// Streams each item in the collection.
2303        pub fn by_item(
2304            self,
2305        ) -> impl gax::paginator::ItemPaginator<crate::model::ListUsersResponse, gax::error::Error>
2306        {
2307            use gax::paginator::Paginator;
2308            self.by_page().items()
2309        }
2310
2311        /// Sets the value of [parent][crate::model::ListUsersRequest::parent].
2312        ///
2313        /// This is a **required** field for requests.
2314        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2315            self.0.request.parent = v.into();
2316            self
2317        }
2318
2319        /// Sets the value of [page_size][crate::model::ListUsersRequest::page_size].
2320        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2321            self.0.request.page_size = v.into();
2322            self
2323        }
2324
2325        /// Sets the value of [page_token][crate::model::ListUsersRequest::page_token].
2326        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2327            self.0.request.page_token = v.into();
2328            self
2329        }
2330
2331        /// Sets the value of [filter][crate::model::ListUsersRequest::filter].
2332        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
2333            self.0.request.filter = v.into();
2334            self
2335        }
2336
2337        /// Sets the value of [order_by][crate::model::ListUsersRequest::order_by].
2338        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
2339            self.0.request.order_by = v.into();
2340            self
2341        }
2342    }
2343
2344    #[doc(hidden)]
2345    impl gax::options::internal::RequestBuilder for ListUsers {
2346        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2347            &mut self.0.options
2348        }
2349    }
2350
2351    /// The request builder for [DeveloperConnect::delete_user][crate::client::DeveloperConnect::delete_user] calls.
2352    ///
2353    /// # Example
2354    /// ```no_run
2355    /// # use google_cloud_developerconnect_v1::builder;
2356    /// use builder::developer_connect::DeleteUser;
2357    /// # tokio_test::block_on(async {
2358    /// use lro::Poller;
2359    ///
2360    /// let builder = prepare_request_builder();
2361    /// let response = builder.poller().until_done().await?;
2362    /// # gax::Result::<()>::Ok(()) });
2363    ///
2364    /// fn prepare_request_builder() -> DeleteUser {
2365    ///   # panic!();
2366    ///   // ... details omitted ...
2367    /// }
2368    /// ```
2369    #[derive(Clone, Debug)]
2370    pub struct DeleteUser(RequestBuilder<crate::model::DeleteUserRequest>);
2371
2372    impl DeleteUser {
2373        pub(crate) fn new(
2374            stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
2375        ) -> Self {
2376            Self(RequestBuilder::new(stub))
2377        }
2378
2379        /// Sets the full request, replacing any prior values.
2380        pub fn with_request<V: Into<crate::model::DeleteUserRequest>>(mut self, v: V) -> Self {
2381            self.0.request = v.into();
2382            self
2383        }
2384
2385        /// Sets all the options, replacing any prior values.
2386        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2387            self.0.options = v.into();
2388            self
2389        }
2390
2391        /// Sends the request.
2392        ///
2393        /// # Long running operations
2394        ///
2395        /// This starts, but does not poll, a longrunning operation. More information
2396        /// on [delete_user][crate::client::DeveloperConnect::delete_user].
2397        pub async fn send(self) -> Result<longrunning::model::Operation> {
2398            (*self.0.stub)
2399                .delete_user(self.0.request, self.0.options)
2400                .await
2401                .map(gax::response::Response::into_body)
2402        }
2403
2404        /// Creates a [Poller][lro::Poller] to work with `delete_user`.
2405        pub fn poller(self) -> impl lro::Poller<(), crate::model::OperationMetadata> {
2406            type Operation = lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
2407            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2408            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2409
2410            let stub = self.0.stub.clone();
2411            let mut options = self.0.options.clone();
2412            options.set_retry_policy(gax::retry_policy::NeverRetry);
2413            let query = move |name| {
2414                let stub = stub.clone();
2415                let options = options.clone();
2416                async {
2417                    let op = GetOperation::new(stub)
2418                        .set_name(name)
2419                        .with_options(options)
2420                        .send()
2421                        .await?;
2422                    Ok(Operation::new(op))
2423                }
2424            };
2425
2426            let start = move || async {
2427                let op = self.send().await?;
2428                Ok(Operation::new(op))
2429            };
2430
2431            lro::internal::new_unit_response_poller(
2432                polling_error_policy,
2433                polling_backoff_policy,
2434                start,
2435                query,
2436            )
2437        }
2438
2439        /// Sets the value of [name][crate::model::DeleteUserRequest::name].
2440        ///
2441        /// This is a **required** field for requests.
2442        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2443            self.0.request.name = v.into();
2444            self
2445        }
2446
2447        /// Sets the value of [request_id][crate::model::DeleteUserRequest::request_id].
2448        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2449            self.0.request.request_id = v.into();
2450            self
2451        }
2452
2453        /// Sets the value of [validate_only][crate::model::DeleteUserRequest::validate_only].
2454        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
2455            self.0.request.validate_only = v.into();
2456            self
2457        }
2458
2459        /// Sets the value of [etag][crate::model::DeleteUserRequest::etag].
2460        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
2461            self.0.request.etag = v.into();
2462            self
2463        }
2464    }
2465
2466    #[doc(hidden)]
2467    impl gax::options::internal::RequestBuilder for DeleteUser {
2468        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2469            &mut self.0.options
2470        }
2471    }
2472
2473    /// The request builder for [DeveloperConnect::fetch_self][crate::client::DeveloperConnect::fetch_self] calls.
2474    ///
2475    /// # Example
2476    /// ```no_run
2477    /// # use google_cloud_developerconnect_v1::builder;
2478    /// use builder::developer_connect::FetchSelf;
2479    /// # tokio_test::block_on(async {
2480    ///
2481    /// let builder = prepare_request_builder();
2482    /// let response = builder.send().await?;
2483    /// # gax::Result::<()>::Ok(()) });
2484    ///
2485    /// fn prepare_request_builder() -> FetchSelf {
2486    ///   # panic!();
2487    ///   // ... details omitted ...
2488    /// }
2489    /// ```
2490    #[derive(Clone, Debug)]
2491    pub struct FetchSelf(RequestBuilder<crate::model::FetchSelfRequest>);
2492
2493    impl FetchSelf {
2494        pub(crate) fn new(
2495            stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
2496        ) -> Self {
2497            Self(RequestBuilder::new(stub))
2498        }
2499
2500        /// Sets the full request, replacing any prior values.
2501        pub fn with_request<V: Into<crate::model::FetchSelfRequest>>(mut self, v: V) -> Self {
2502            self.0.request = v.into();
2503            self
2504        }
2505
2506        /// Sets all the options, replacing any prior values.
2507        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2508            self.0.options = v.into();
2509            self
2510        }
2511
2512        /// Sends the request.
2513        pub async fn send(self) -> Result<crate::model::User> {
2514            (*self.0.stub)
2515                .fetch_self(self.0.request, self.0.options)
2516                .await
2517                .map(gax::response::Response::into_body)
2518        }
2519
2520        /// Sets the value of [name][crate::model::FetchSelfRequest::name].
2521        ///
2522        /// This is a **required** field for requests.
2523        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2524            self.0.request.name = v.into();
2525            self
2526        }
2527    }
2528
2529    #[doc(hidden)]
2530    impl gax::options::internal::RequestBuilder for FetchSelf {
2531        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2532            &mut self.0.options
2533        }
2534    }
2535
2536    /// The request builder for [DeveloperConnect::delete_self][crate::client::DeveloperConnect::delete_self] calls.
2537    ///
2538    /// # Example
2539    /// ```no_run
2540    /// # use google_cloud_developerconnect_v1::builder;
2541    /// use builder::developer_connect::DeleteSelf;
2542    /// # tokio_test::block_on(async {
2543    /// use lro::Poller;
2544    ///
2545    /// let builder = prepare_request_builder();
2546    /// let response = builder.poller().until_done().await?;
2547    /// # gax::Result::<()>::Ok(()) });
2548    ///
2549    /// fn prepare_request_builder() -> DeleteSelf {
2550    ///   # panic!();
2551    ///   // ... details omitted ...
2552    /// }
2553    /// ```
2554    #[derive(Clone, Debug)]
2555    pub struct DeleteSelf(RequestBuilder<crate::model::DeleteSelfRequest>);
2556
2557    impl DeleteSelf {
2558        pub(crate) fn new(
2559            stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
2560        ) -> Self {
2561            Self(RequestBuilder::new(stub))
2562        }
2563
2564        /// Sets the full request, replacing any prior values.
2565        pub fn with_request<V: Into<crate::model::DeleteSelfRequest>>(mut self, v: V) -> Self {
2566            self.0.request = v.into();
2567            self
2568        }
2569
2570        /// Sets all the options, replacing any prior values.
2571        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2572            self.0.options = v.into();
2573            self
2574        }
2575
2576        /// Sends the request.
2577        ///
2578        /// # Long running operations
2579        ///
2580        /// This starts, but does not poll, a longrunning operation. More information
2581        /// on [delete_self][crate::client::DeveloperConnect::delete_self].
2582        pub async fn send(self) -> Result<longrunning::model::Operation> {
2583            (*self.0.stub)
2584                .delete_self(self.0.request, self.0.options)
2585                .await
2586                .map(gax::response::Response::into_body)
2587        }
2588
2589        /// Creates a [Poller][lro::Poller] to work with `delete_self`.
2590        pub fn poller(self) -> impl lro::Poller<(), crate::model::OperationMetadata> {
2591            type Operation = lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
2592            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2593            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2594
2595            let stub = self.0.stub.clone();
2596            let mut options = self.0.options.clone();
2597            options.set_retry_policy(gax::retry_policy::NeverRetry);
2598            let query = move |name| {
2599                let stub = stub.clone();
2600                let options = options.clone();
2601                async {
2602                    let op = GetOperation::new(stub)
2603                        .set_name(name)
2604                        .with_options(options)
2605                        .send()
2606                        .await?;
2607                    Ok(Operation::new(op))
2608                }
2609            };
2610
2611            let start = move || async {
2612                let op = self.send().await?;
2613                Ok(Operation::new(op))
2614            };
2615
2616            lro::internal::new_unit_response_poller(
2617                polling_error_policy,
2618                polling_backoff_policy,
2619                start,
2620                query,
2621            )
2622        }
2623
2624        /// Sets the value of [name][crate::model::DeleteSelfRequest::name].
2625        ///
2626        /// This is a **required** field for requests.
2627        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2628            self.0.request.name = v.into();
2629            self
2630        }
2631    }
2632
2633    #[doc(hidden)]
2634    impl gax::options::internal::RequestBuilder for DeleteSelf {
2635        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2636            &mut self.0.options
2637        }
2638    }
2639
2640    /// The request builder for [DeveloperConnect::list_locations][crate::client::DeveloperConnect::list_locations] calls.
2641    ///
2642    /// # Example
2643    /// ```no_run
2644    /// # use google_cloud_developerconnect_v1::builder;
2645    /// use builder::developer_connect::ListLocations;
2646    /// # tokio_test::block_on(async {
2647    /// use gax::paginator::ItemPaginator;
2648    ///
2649    /// let builder = prepare_request_builder();
2650    /// let mut items = builder.by_item();
2651    /// while let Some(result) = items.next().await {
2652    ///   let item = result?;
2653    /// }
2654    /// # gax::Result::<()>::Ok(()) });
2655    ///
2656    /// fn prepare_request_builder() -> ListLocations {
2657    ///   # panic!();
2658    ///   // ... details omitted ...
2659    /// }
2660    /// ```
2661    #[derive(Clone, Debug)]
2662    pub struct ListLocations(RequestBuilder<location::model::ListLocationsRequest>);
2663
2664    impl ListLocations {
2665        pub(crate) fn new(
2666            stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
2667        ) -> Self {
2668            Self(RequestBuilder::new(stub))
2669        }
2670
2671        /// Sets the full request, replacing any prior values.
2672        pub fn with_request<V: Into<location::model::ListLocationsRequest>>(
2673            mut self,
2674            v: V,
2675        ) -> Self {
2676            self.0.request = v.into();
2677            self
2678        }
2679
2680        /// Sets all the options, replacing any prior values.
2681        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2682            self.0.options = v.into();
2683            self
2684        }
2685
2686        /// Sends the request.
2687        pub async fn send(self) -> Result<location::model::ListLocationsResponse> {
2688            (*self.0.stub)
2689                .list_locations(self.0.request, self.0.options)
2690                .await
2691                .map(gax::response::Response::into_body)
2692        }
2693
2694        /// Streams each page in the collection.
2695        pub fn by_page(
2696            self,
2697        ) -> impl gax::paginator::Paginator<location::model::ListLocationsResponse, gax::error::Error>
2698        {
2699            use std::clone::Clone;
2700            let token = self.0.request.page_token.clone();
2701            let execute = move |token: String| {
2702                let mut builder = self.clone();
2703                builder.0.request = builder.0.request.set_page_token(token);
2704                builder.send()
2705            };
2706            gax::paginator::internal::new_paginator(token, execute)
2707        }
2708
2709        /// Streams each item in the collection.
2710        pub fn by_item(
2711            self,
2712        ) -> impl gax::paginator::ItemPaginator<location::model::ListLocationsResponse, gax::error::Error>
2713        {
2714            use gax::paginator::Paginator;
2715            self.by_page().items()
2716        }
2717
2718        /// Sets the value of [name][location::model::ListLocationsRequest::name].
2719        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2720            self.0.request.name = v.into();
2721            self
2722        }
2723
2724        /// Sets the value of [filter][location::model::ListLocationsRequest::filter].
2725        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
2726            self.0.request.filter = v.into();
2727            self
2728        }
2729
2730        /// Sets the value of [page_size][location::model::ListLocationsRequest::page_size].
2731        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2732            self.0.request.page_size = v.into();
2733            self
2734        }
2735
2736        /// Sets the value of [page_token][location::model::ListLocationsRequest::page_token].
2737        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2738            self.0.request.page_token = v.into();
2739            self
2740        }
2741    }
2742
2743    #[doc(hidden)]
2744    impl gax::options::internal::RequestBuilder for ListLocations {
2745        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2746            &mut self.0.options
2747        }
2748    }
2749
2750    /// The request builder for [DeveloperConnect::get_location][crate::client::DeveloperConnect::get_location] calls.
2751    ///
2752    /// # Example
2753    /// ```no_run
2754    /// # use google_cloud_developerconnect_v1::builder;
2755    /// use builder::developer_connect::GetLocation;
2756    /// # tokio_test::block_on(async {
2757    ///
2758    /// let builder = prepare_request_builder();
2759    /// let response = builder.send().await?;
2760    /// # gax::Result::<()>::Ok(()) });
2761    ///
2762    /// fn prepare_request_builder() -> GetLocation {
2763    ///   # panic!();
2764    ///   // ... details omitted ...
2765    /// }
2766    /// ```
2767    #[derive(Clone, Debug)]
2768    pub struct GetLocation(RequestBuilder<location::model::GetLocationRequest>);
2769
2770    impl GetLocation {
2771        pub(crate) fn new(
2772            stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
2773        ) -> Self {
2774            Self(RequestBuilder::new(stub))
2775        }
2776
2777        /// Sets the full request, replacing any prior values.
2778        pub fn with_request<V: Into<location::model::GetLocationRequest>>(mut self, v: V) -> Self {
2779            self.0.request = v.into();
2780            self
2781        }
2782
2783        /// Sets all the options, replacing any prior values.
2784        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2785            self.0.options = v.into();
2786            self
2787        }
2788
2789        /// Sends the request.
2790        pub async fn send(self) -> Result<location::model::Location> {
2791            (*self.0.stub)
2792                .get_location(self.0.request, self.0.options)
2793                .await
2794                .map(gax::response::Response::into_body)
2795        }
2796
2797        /// Sets the value of [name][location::model::GetLocationRequest::name].
2798        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2799            self.0.request.name = v.into();
2800            self
2801        }
2802    }
2803
2804    #[doc(hidden)]
2805    impl gax::options::internal::RequestBuilder for GetLocation {
2806        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2807            &mut self.0.options
2808        }
2809    }
2810
2811    /// The request builder for [DeveloperConnect::list_operations][crate::client::DeveloperConnect::list_operations] calls.
2812    ///
2813    /// # Example
2814    /// ```no_run
2815    /// # use google_cloud_developerconnect_v1::builder;
2816    /// use builder::developer_connect::ListOperations;
2817    /// # tokio_test::block_on(async {
2818    /// use gax::paginator::ItemPaginator;
2819    ///
2820    /// let builder = prepare_request_builder();
2821    /// let mut items = builder.by_item();
2822    /// while let Some(result) = items.next().await {
2823    ///   let item = result?;
2824    /// }
2825    /// # gax::Result::<()>::Ok(()) });
2826    ///
2827    /// fn prepare_request_builder() -> ListOperations {
2828    ///   # panic!();
2829    ///   // ... details omitted ...
2830    /// }
2831    /// ```
2832    #[derive(Clone, Debug)]
2833    pub struct ListOperations(RequestBuilder<longrunning::model::ListOperationsRequest>);
2834
2835    impl ListOperations {
2836        pub(crate) fn new(
2837            stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
2838        ) -> Self {
2839            Self(RequestBuilder::new(stub))
2840        }
2841
2842        /// Sets the full request, replacing any prior values.
2843        pub fn with_request<V: Into<longrunning::model::ListOperationsRequest>>(
2844            mut self,
2845            v: V,
2846        ) -> Self {
2847            self.0.request = v.into();
2848            self
2849        }
2850
2851        /// Sets all the options, replacing any prior values.
2852        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2853            self.0.options = v.into();
2854            self
2855        }
2856
2857        /// Sends the request.
2858        pub async fn send(self) -> Result<longrunning::model::ListOperationsResponse> {
2859            (*self.0.stub)
2860                .list_operations(self.0.request, self.0.options)
2861                .await
2862                .map(gax::response::Response::into_body)
2863        }
2864
2865        /// Streams each page in the collection.
2866        pub fn by_page(
2867            self,
2868        ) -> impl gax::paginator::Paginator<longrunning::model::ListOperationsResponse, gax::error::Error>
2869        {
2870            use std::clone::Clone;
2871            let token = self.0.request.page_token.clone();
2872            let execute = move |token: String| {
2873                let mut builder = self.clone();
2874                builder.0.request = builder.0.request.set_page_token(token);
2875                builder.send()
2876            };
2877            gax::paginator::internal::new_paginator(token, execute)
2878        }
2879
2880        /// Streams each item in the collection.
2881        pub fn by_item(
2882            self,
2883        ) -> impl gax::paginator::ItemPaginator<
2884            longrunning::model::ListOperationsResponse,
2885            gax::error::Error,
2886        > {
2887            use gax::paginator::Paginator;
2888            self.by_page().items()
2889        }
2890
2891        /// Sets the value of [name][longrunning::model::ListOperationsRequest::name].
2892        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2893            self.0.request.name = v.into();
2894            self
2895        }
2896
2897        /// Sets the value of [filter][longrunning::model::ListOperationsRequest::filter].
2898        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
2899            self.0.request.filter = v.into();
2900            self
2901        }
2902
2903        /// Sets the value of [page_size][longrunning::model::ListOperationsRequest::page_size].
2904        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2905            self.0.request.page_size = v.into();
2906            self
2907        }
2908
2909        /// Sets the value of [page_token][longrunning::model::ListOperationsRequest::page_token].
2910        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2911            self.0.request.page_token = v.into();
2912            self
2913        }
2914
2915        /// Sets the value of [return_partial_success][longrunning::model::ListOperationsRequest::return_partial_success].
2916        pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
2917            self.0.request.return_partial_success = v.into();
2918            self
2919        }
2920    }
2921
2922    #[doc(hidden)]
2923    impl gax::options::internal::RequestBuilder for ListOperations {
2924        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2925            &mut self.0.options
2926        }
2927    }
2928
2929    /// The request builder for [DeveloperConnect::get_operation][crate::client::DeveloperConnect::get_operation] calls.
2930    ///
2931    /// # Example
2932    /// ```no_run
2933    /// # use google_cloud_developerconnect_v1::builder;
2934    /// use builder::developer_connect::GetOperation;
2935    /// # tokio_test::block_on(async {
2936    ///
2937    /// let builder = prepare_request_builder();
2938    /// let response = builder.send().await?;
2939    /// # gax::Result::<()>::Ok(()) });
2940    ///
2941    /// fn prepare_request_builder() -> GetOperation {
2942    ///   # panic!();
2943    ///   // ... details omitted ...
2944    /// }
2945    /// ```
2946    #[derive(Clone, Debug)]
2947    pub struct GetOperation(RequestBuilder<longrunning::model::GetOperationRequest>);
2948
2949    impl GetOperation {
2950        pub(crate) fn new(
2951            stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
2952        ) -> Self {
2953            Self(RequestBuilder::new(stub))
2954        }
2955
2956        /// Sets the full request, replacing any prior values.
2957        pub fn with_request<V: Into<longrunning::model::GetOperationRequest>>(
2958            mut self,
2959            v: V,
2960        ) -> Self {
2961            self.0.request = v.into();
2962            self
2963        }
2964
2965        /// Sets all the options, replacing any prior values.
2966        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2967            self.0.options = v.into();
2968            self
2969        }
2970
2971        /// Sends the request.
2972        pub async fn send(self) -> Result<longrunning::model::Operation> {
2973            (*self.0.stub)
2974                .get_operation(self.0.request, self.0.options)
2975                .await
2976                .map(gax::response::Response::into_body)
2977        }
2978
2979        /// Sets the value of [name][longrunning::model::GetOperationRequest::name].
2980        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2981            self.0.request.name = v.into();
2982            self
2983        }
2984    }
2985
2986    #[doc(hidden)]
2987    impl gax::options::internal::RequestBuilder for GetOperation {
2988        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2989            &mut self.0.options
2990        }
2991    }
2992
2993    /// The request builder for [DeveloperConnect::delete_operation][crate::client::DeveloperConnect::delete_operation] calls.
2994    ///
2995    /// # Example
2996    /// ```no_run
2997    /// # use google_cloud_developerconnect_v1::builder;
2998    /// use builder::developer_connect::DeleteOperation;
2999    /// # tokio_test::block_on(async {
3000    ///
3001    /// let builder = prepare_request_builder();
3002    /// let response = builder.send().await?;
3003    /// # gax::Result::<()>::Ok(()) });
3004    ///
3005    /// fn prepare_request_builder() -> DeleteOperation {
3006    ///   # panic!();
3007    ///   // ... details omitted ...
3008    /// }
3009    /// ```
3010    #[derive(Clone, Debug)]
3011    pub struct DeleteOperation(RequestBuilder<longrunning::model::DeleteOperationRequest>);
3012
3013    impl DeleteOperation {
3014        pub(crate) fn new(
3015            stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
3016        ) -> Self {
3017            Self(RequestBuilder::new(stub))
3018        }
3019
3020        /// Sets the full request, replacing any prior values.
3021        pub fn with_request<V: Into<longrunning::model::DeleteOperationRequest>>(
3022            mut self,
3023            v: V,
3024        ) -> Self {
3025            self.0.request = v.into();
3026            self
3027        }
3028
3029        /// Sets all the options, replacing any prior values.
3030        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3031            self.0.options = v.into();
3032            self
3033        }
3034
3035        /// Sends the request.
3036        pub async fn send(self) -> Result<()> {
3037            (*self.0.stub)
3038                .delete_operation(self.0.request, self.0.options)
3039                .await
3040                .map(gax::response::Response::into_body)
3041        }
3042
3043        /// Sets the value of [name][longrunning::model::DeleteOperationRequest::name].
3044        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3045            self.0.request.name = v.into();
3046            self
3047        }
3048    }
3049
3050    #[doc(hidden)]
3051    impl gax::options::internal::RequestBuilder for DeleteOperation {
3052        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3053            &mut self.0.options
3054        }
3055    }
3056
3057    /// The request builder for [DeveloperConnect::cancel_operation][crate::client::DeveloperConnect::cancel_operation] calls.
3058    ///
3059    /// # Example
3060    /// ```no_run
3061    /// # use google_cloud_developerconnect_v1::builder;
3062    /// use builder::developer_connect::CancelOperation;
3063    /// # tokio_test::block_on(async {
3064    ///
3065    /// let builder = prepare_request_builder();
3066    /// let response = builder.send().await?;
3067    /// # gax::Result::<()>::Ok(()) });
3068    ///
3069    /// fn prepare_request_builder() -> CancelOperation {
3070    ///   # panic!();
3071    ///   // ... details omitted ...
3072    /// }
3073    /// ```
3074    #[derive(Clone, Debug)]
3075    pub struct CancelOperation(RequestBuilder<longrunning::model::CancelOperationRequest>);
3076
3077    impl CancelOperation {
3078        pub(crate) fn new(
3079            stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
3080        ) -> Self {
3081            Self(RequestBuilder::new(stub))
3082        }
3083
3084        /// Sets the full request, replacing any prior values.
3085        pub fn with_request<V: Into<longrunning::model::CancelOperationRequest>>(
3086            mut self,
3087            v: V,
3088        ) -> Self {
3089            self.0.request = v.into();
3090            self
3091        }
3092
3093        /// Sets all the options, replacing any prior values.
3094        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3095            self.0.options = v.into();
3096            self
3097        }
3098
3099        /// Sends the request.
3100        pub async fn send(self) -> Result<()> {
3101            (*self.0.stub)
3102                .cancel_operation(self.0.request, self.0.options)
3103                .await
3104                .map(gax::response::Response::into_body)
3105        }
3106
3107        /// Sets the value of [name][longrunning::model::CancelOperationRequest::name].
3108        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3109            self.0.request.name = v.into();
3110            self
3111        }
3112    }
3113
3114    #[doc(hidden)]
3115    impl gax::options::internal::RequestBuilder for CancelOperation {
3116        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3117            &mut self.0.options
3118        }
3119    }
3120}
3121
3122pub mod insights_config_service {
3123    use crate::Result;
3124
3125    /// A builder for [InsightsConfigService][crate::client::InsightsConfigService].
3126    ///
3127    /// ```
3128    /// # tokio_test::block_on(async {
3129    /// # use google_cloud_developerconnect_v1::*;
3130    /// # use builder::insights_config_service::ClientBuilder;
3131    /// # use client::InsightsConfigService;
3132    /// let builder : ClientBuilder = InsightsConfigService::builder();
3133    /// let client = builder
3134    ///     .with_endpoint("https://developerconnect.googleapis.com")
3135    ///     .build().await?;
3136    /// # gax::client_builder::Result::<()>::Ok(()) });
3137    /// ```
3138    pub type ClientBuilder =
3139        gax::client_builder::ClientBuilder<client::Factory, gaxi::options::Credentials>;
3140
3141    pub(crate) mod client {
3142        use super::super::super::client::InsightsConfigService;
3143        pub struct Factory;
3144        impl gax::client_builder::internal::ClientFactory for Factory {
3145            type Client = InsightsConfigService;
3146            type Credentials = gaxi::options::Credentials;
3147            async fn build(
3148                self,
3149                config: gaxi::options::ClientConfig,
3150            ) -> gax::client_builder::Result<Self::Client> {
3151                Self::Client::new(config).await
3152            }
3153        }
3154    }
3155
3156    /// Common implementation for [crate::client::InsightsConfigService] request builders.
3157    #[derive(Clone, Debug)]
3158    pub(crate) struct RequestBuilder<R: std::default::Default> {
3159        stub: std::sync::Arc<dyn super::super::stub::dynamic::InsightsConfigService>,
3160        request: R,
3161        options: gax::options::RequestOptions,
3162    }
3163
3164    impl<R> RequestBuilder<R>
3165    where
3166        R: std::default::Default,
3167    {
3168        pub(crate) fn new(
3169            stub: std::sync::Arc<dyn super::super::stub::dynamic::InsightsConfigService>,
3170        ) -> Self {
3171            Self {
3172                stub,
3173                request: R::default(),
3174                options: gax::options::RequestOptions::default(),
3175            }
3176        }
3177    }
3178
3179    /// The request builder for [InsightsConfigService::list_insights_configs][crate::client::InsightsConfigService::list_insights_configs] calls.
3180    ///
3181    /// # Example
3182    /// ```no_run
3183    /// # use google_cloud_developerconnect_v1::builder;
3184    /// use builder::insights_config_service::ListInsightsConfigs;
3185    /// # tokio_test::block_on(async {
3186    /// use gax::paginator::ItemPaginator;
3187    ///
3188    /// let builder = prepare_request_builder();
3189    /// let mut items = builder.by_item();
3190    /// while let Some(result) = items.next().await {
3191    ///   let item = result?;
3192    /// }
3193    /// # gax::Result::<()>::Ok(()) });
3194    ///
3195    /// fn prepare_request_builder() -> ListInsightsConfigs {
3196    ///   # panic!();
3197    ///   // ... details omitted ...
3198    /// }
3199    /// ```
3200    #[derive(Clone, Debug)]
3201    pub struct ListInsightsConfigs(RequestBuilder<crate::model::ListInsightsConfigsRequest>);
3202
3203    impl ListInsightsConfigs {
3204        pub(crate) fn new(
3205            stub: std::sync::Arc<dyn super::super::stub::dynamic::InsightsConfigService>,
3206        ) -> Self {
3207            Self(RequestBuilder::new(stub))
3208        }
3209
3210        /// Sets the full request, replacing any prior values.
3211        pub fn with_request<V: Into<crate::model::ListInsightsConfigsRequest>>(
3212            mut self,
3213            v: V,
3214        ) -> Self {
3215            self.0.request = v.into();
3216            self
3217        }
3218
3219        /// Sets all the options, replacing any prior values.
3220        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3221            self.0.options = v.into();
3222            self
3223        }
3224
3225        /// Sends the request.
3226        pub async fn send(self) -> Result<crate::model::ListInsightsConfigsResponse> {
3227            (*self.0.stub)
3228                .list_insights_configs(self.0.request, self.0.options)
3229                .await
3230                .map(gax::response::Response::into_body)
3231        }
3232
3233        /// Streams each page in the collection.
3234        pub fn by_page(
3235            self,
3236        ) -> impl gax::paginator::Paginator<crate::model::ListInsightsConfigsResponse, gax::error::Error>
3237        {
3238            use std::clone::Clone;
3239            let token = self.0.request.page_token.clone();
3240            let execute = move |token: String| {
3241                let mut builder = self.clone();
3242                builder.0.request = builder.0.request.set_page_token(token);
3243                builder.send()
3244            };
3245            gax::paginator::internal::new_paginator(token, execute)
3246        }
3247
3248        /// Streams each item in the collection.
3249        pub fn by_item(
3250            self,
3251        ) -> impl gax::paginator::ItemPaginator<
3252            crate::model::ListInsightsConfigsResponse,
3253            gax::error::Error,
3254        > {
3255            use gax::paginator::Paginator;
3256            self.by_page().items()
3257        }
3258
3259        /// Sets the value of [parent][crate::model::ListInsightsConfigsRequest::parent].
3260        ///
3261        /// This is a **required** field for requests.
3262        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3263            self.0.request.parent = v.into();
3264            self
3265        }
3266
3267        /// Sets the value of [page_size][crate::model::ListInsightsConfigsRequest::page_size].
3268        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
3269            self.0.request.page_size = v.into();
3270            self
3271        }
3272
3273        /// Sets the value of [page_token][crate::model::ListInsightsConfigsRequest::page_token].
3274        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
3275            self.0.request.page_token = v.into();
3276            self
3277        }
3278
3279        /// Sets the value of [filter][crate::model::ListInsightsConfigsRequest::filter].
3280        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
3281            self.0.request.filter = v.into();
3282            self
3283        }
3284
3285        /// Sets the value of [order_by][crate::model::ListInsightsConfigsRequest::order_by].
3286        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
3287            self.0.request.order_by = v.into();
3288            self
3289        }
3290    }
3291
3292    #[doc(hidden)]
3293    impl gax::options::internal::RequestBuilder for ListInsightsConfigs {
3294        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3295            &mut self.0.options
3296        }
3297    }
3298
3299    /// The request builder for [InsightsConfigService::create_insights_config][crate::client::InsightsConfigService::create_insights_config] calls.
3300    ///
3301    /// # Example
3302    /// ```no_run
3303    /// # use google_cloud_developerconnect_v1::builder;
3304    /// use builder::insights_config_service::CreateInsightsConfig;
3305    /// # tokio_test::block_on(async {
3306    /// use lro::Poller;
3307    ///
3308    /// let builder = prepare_request_builder();
3309    /// let response = builder.poller().until_done().await?;
3310    /// # gax::Result::<()>::Ok(()) });
3311    ///
3312    /// fn prepare_request_builder() -> CreateInsightsConfig {
3313    ///   # panic!();
3314    ///   // ... details omitted ...
3315    /// }
3316    /// ```
3317    #[derive(Clone, Debug)]
3318    pub struct CreateInsightsConfig(RequestBuilder<crate::model::CreateInsightsConfigRequest>);
3319
3320    impl CreateInsightsConfig {
3321        pub(crate) fn new(
3322            stub: std::sync::Arc<dyn super::super::stub::dynamic::InsightsConfigService>,
3323        ) -> Self {
3324            Self(RequestBuilder::new(stub))
3325        }
3326
3327        /// Sets the full request, replacing any prior values.
3328        pub fn with_request<V: Into<crate::model::CreateInsightsConfigRequest>>(
3329            mut self,
3330            v: V,
3331        ) -> Self {
3332            self.0.request = v.into();
3333            self
3334        }
3335
3336        /// Sets all the options, replacing any prior values.
3337        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3338            self.0.options = v.into();
3339            self
3340        }
3341
3342        /// Sends the request.
3343        ///
3344        /// # Long running operations
3345        ///
3346        /// This starts, but does not poll, a longrunning operation. More information
3347        /// on [create_insights_config][crate::client::InsightsConfigService::create_insights_config].
3348        pub async fn send(self) -> Result<longrunning::model::Operation> {
3349            (*self.0.stub)
3350                .create_insights_config(self.0.request, self.0.options)
3351                .await
3352                .map(gax::response::Response::into_body)
3353        }
3354
3355        /// Creates a [Poller][lro::Poller] to work with `create_insights_config`.
3356        pub fn poller(
3357            self,
3358        ) -> impl lro::Poller<crate::model::InsightsConfig, crate::model::OperationMetadata>
3359        {
3360            type Operation = lro::internal::Operation<
3361                crate::model::InsightsConfig,
3362                crate::model::OperationMetadata,
3363            >;
3364            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3365            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3366
3367            let stub = self.0.stub.clone();
3368            let mut options = self.0.options.clone();
3369            options.set_retry_policy(gax::retry_policy::NeverRetry);
3370            let query = move |name| {
3371                let stub = stub.clone();
3372                let options = options.clone();
3373                async {
3374                    let op = GetOperation::new(stub)
3375                        .set_name(name)
3376                        .with_options(options)
3377                        .send()
3378                        .await?;
3379                    Ok(Operation::new(op))
3380                }
3381            };
3382
3383            let start = move || async {
3384                let op = self.send().await?;
3385                Ok(Operation::new(op))
3386            };
3387
3388            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
3389        }
3390
3391        /// Sets the value of [parent][crate::model::CreateInsightsConfigRequest::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 [insights_config_id][crate::model::CreateInsightsConfigRequest::insights_config_id].
3400        ///
3401        /// This is a **required** field for requests.
3402        pub fn set_insights_config_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3403            self.0.request.insights_config_id = v.into();
3404            self
3405        }
3406
3407        /// Sets the value of [insights_config][crate::model::CreateInsightsConfigRequest::insights_config].
3408        ///
3409        /// This is a **required** field for requests.
3410        pub fn set_insights_config<T>(mut self, v: T) -> Self
3411        where
3412            T: std::convert::Into<crate::model::InsightsConfig>,
3413        {
3414            self.0.request.insights_config = std::option::Option::Some(v.into());
3415            self
3416        }
3417
3418        /// Sets or clears the value of [insights_config][crate::model::CreateInsightsConfigRequest::insights_config].
3419        ///
3420        /// This is a **required** field for requests.
3421        pub fn set_or_clear_insights_config<T>(mut self, v: std::option::Option<T>) -> Self
3422        where
3423            T: std::convert::Into<crate::model::InsightsConfig>,
3424        {
3425            self.0.request.insights_config = v.map(|x| x.into());
3426            self
3427        }
3428
3429        /// Sets the value of [validate_only][crate::model::CreateInsightsConfigRequest::validate_only].
3430        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
3431            self.0.request.validate_only = v.into();
3432            self
3433        }
3434    }
3435
3436    #[doc(hidden)]
3437    impl gax::options::internal::RequestBuilder for CreateInsightsConfig {
3438        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3439            &mut self.0.options
3440        }
3441    }
3442
3443    /// The request builder for [InsightsConfigService::get_insights_config][crate::client::InsightsConfigService::get_insights_config] calls.
3444    ///
3445    /// # Example
3446    /// ```no_run
3447    /// # use google_cloud_developerconnect_v1::builder;
3448    /// use builder::insights_config_service::GetInsightsConfig;
3449    /// # tokio_test::block_on(async {
3450    ///
3451    /// let builder = prepare_request_builder();
3452    /// let response = builder.send().await?;
3453    /// # gax::Result::<()>::Ok(()) });
3454    ///
3455    /// fn prepare_request_builder() -> GetInsightsConfig {
3456    ///   # panic!();
3457    ///   // ... details omitted ...
3458    /// }
3459    /// ```
3460    #[derive(Clone, Debug)]
3461    pub struct GetInsightsConfig(RequestBuilder<crate::model::GetInsightsConfigRequest>);
3462
3463    impl GetInsightsConfig {
3464        pub(crate) fn new(
3465            stub: std::sync::Arc<dyn super::super::stub::dynamic::InsightsConfigService>,
3466        ) -> Self {
3467            Self(RequestBuilder::new(stub))
3468        }
3469
3470        /// Sets the full request, replacing any prior values.
3471        pub fn with_request<V: Into<crate::model::GetInsightsConfigRequest>>(
3472            mut self,
3473            v: V,
3474        ) -> Self {
3475            self.0.request = v.into();
3476            self
3477        }
3478
3479        /// Sets all the options, replacing any prior values.
3480        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3481            self.0.options = v.into();
3482            self
3483        }
3484
3485        /// Sends the request.
3486        pub async fn send(self) -> Result<crate::model::InsightsConfig> {
3487            (*self.0.stub)
3488                .get_insights_config(self.0.request, self.0.options)
3489                .await
3490                .map(gax::response::Response::into_body)
3491        }
3492
3493        /// Sets the value of [name][crate::model::GetInsightsConfigRequest::name].
3494        ///
3495        /// This is a **required** field for requests.
3496        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3497            self.0.request.name = v.into();
3498            self
3499        }
3500    }
3501
3502    #[doc(hidden)]
3503    impl gax::options::internal::RequestBuilder for GetInsightsConfig {
3504        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3505            &mut self.0.options
3506        }
3507    }
3508
3509    /// The request builder for [InsightsConfigService::update_insights_config][crate::client::InsightsConfigService::update_insights_config] calls.
3510    ///
3511    /// # Example
3512    /// ```no_run
3513    /// # use google_cloud_developerconnect_v1::builder;
3514    /// use builder::insights_config_service::UpdateInsightsConfig;
3515    /// # tokio_test::block_on(async {
3516    /// use lro::Poller;
3517    ///
3518    /// let builder = prepare_request_builder();
3519    /// let response = builder.poller().until_done().await?;
3520    /// # gax::Result::<()>::Ok(()) });
3521    ///
3522    /// fn prepare_request_builder() -> UpdateInsightsConfig {
3523    ///   # panic!();
3524    ///   // ... details omitted ...
3525    /// }
3526    /// ```
3527    #[derive(Clone, Debug)]
3528    pub struct UpdateInsightsConfig(RequestBuilder<crate::model::UpdateInsightsConfigRequest>);
3529
3530    impl UpdateInsightsConfig {
3531        pub(crate) fn new(
3532            stub: std::sync::Arc<dyn super::super::stub::dynamic::InsightsConfigService>,
3533        ) -> Self {
3534            Self(RequestBuilder::new(stub))
3535        }
3536
3537        /// Sets the full request, replacing any prior values.
3538        pub fn with_request<V: Into<crate::model::UpdateInsightsConfigRequest>>(
3539            mut self,
3540            v: V,
3541        ) -> Self {
3542            self.0.request = v.into();
3543            self
3544        }
3545
3546        /// Sets all the options, replacing any prior values.
3547        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3548            self.0.options = v.into();
3549            self
3550        }
3551
3552        /// Sends the request.
3553        ///
3554        /// # Long running operations
3555        ///
3556        /// This starts, but does not poll, a longrunning operation. More information
3557        /// on [update_insights_config][crate::client::InsightsConfigService::update_insights_config].
3558        pub async fn send(self) -> Result<longrunning::model::Operation> {
3559            (*self.0.stub)
3560                .update_insights_config(self.0.request, self.0.options)
3561                .await
3562                .map(gax::response::Response::into_body)
3563        }
3564
3565        /// Creates a [Poller][lro::Poller] to work with `update_insights_config`.
3566        pub fn poller(
3567            self,
3568        ) -> impl lro::Poller<crate::model::InsightsConfig, crate::model::OperationMetadata>
3569        {
3570            type Operation = lro::internal::Operation<
3571                crate::model::InsightsConfig,
3572                crate::model::OperationMetadata,
3573            >;
3574            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3575            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3576
3577            let stub = self.0.stub.clone();
3578            let mut options = self.0.options.clone();
3579            options.set_retry_policy(gax::retry_policy::NeverRetry);
3580            let query = move |name| {
3581                let stub = stub.clone();
3582                let options = options.clone();
3583                async {
3584                    let op = GetOperation::new(stub)
3585                        .set_name(name)
3586                        .with_options(options)
3587                        .send()
3588                        .await?;
3589                    Ok(Operation::new(op))
3590                }
3591            };
3592
3593            let start = move || async {
3594                let op = self.send().await?;
3595                Ok(Operation::new(op))
3596            };
3597
3598            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
3599        }
3600
3601        /// Sets the value of [insights_config][crate::model::UpdateInsightsConfigRequest::insights_config].
3602        ///
3603        /// This is a **required** field for requests.
3604        pub fn set_insights_config<T>(mut self, v: T) -> Self
3605        where
3606            T: std::convert::Into<crate::model::InsightsConfig>,
3607        {
3608            self.0.request.insights_config = std::option::Option::Some(v.into());
3609            self
3610        }
3611
3612        /// Sets or clears the value of [insights_config][crate::model::UpdateInsightsConfigRequest::insights_config].
3613        ///
3614        /// This is a **required** field for requests.
3615        pub fn set_or_clear_insights_config<T>(mut self, v: std::option::Option<T>) -> Self
3616        where
3617            T: std::convert::Into<crate::model::InsightsConfig>,
3618        {
3619            self.0.request.insights_config = v.map(|x| x.into());
3620            self
3621        }
3622
3623        /// Sets the value of [request_id][crate::model::UpdateInsightsConfigRequest::request_id].
3624        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3625            self.0.request.request_id = v.into();
3626            self
3627        }
3628
3629        /// Sets the value of [allow_missing][crate::model::UpdateInsightsConfigRequest::allow_missing].
3630        pub fn set_allow_missing<T: Into<bool>>(mut self, v: T) -> Self {
3631            self.0.request.allow_missing = v.into();
3632            self
3633        }
3634
3635        /// Sets the value of [validate_only][crate::model::UpdateInsightsConfigRequest::validate_only].
3636        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
3637            self.0.request.validate_only = v.into();
3638            self
3639        }
3640    }
3641
3642    #[doc(hidden)]
3643    impl gax::options::internal::RequestBuilder for UpdateInsightsConfig {
3644        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3645            &mut self.0.options
3646        }
3647    }
3648
3649    /// The request builder for [InsightsConfigService::delete_insights_config][crate::client::InsightsConfigService::delete_insights_config] calls.
3650    ///
3651    /// # Example
3652    /// ```no_run
3653    /// # use google_cloud_developerconnect_v1::builder;
3654    /// use builder::insights_config_service::DeleteInsightsConfig;
3655    /// # tokio_test::block_on(async {
3656    /// use lro::Poller;
3657    ///
3658    /// let builder = prepare_request_builder();
3659    /// let response = builder.poller().until_done().await?;
3660    /// # gax::Result::<()>::Ok(()) });
3661    ///
3662    /// fn prepare_request_builder() -> DeleteInsightsConfig {
3663    ///   # panic!();
3664    ///   // ... details omitted ...
3665    /// }
3666    /// ```
3667    #[derive(Clone, Debug)]
3668    pub struct DeleteInsightsConfig(RequestBuilder<crate::model::DeleteInsightsConfigRequest>);
3669
3670    impl DeleteInsightsConfig {
3671        pub(crate) fn new(
3672            stub: std::sync::Arc<dyn super::super::stub::dynamic::InsightsConfigService>,
3673        ) -> Self {
3674            Self(RequestBuilder::new(stub))
3675        }
3676
3677        /// Sets the full request, replacing any prior values.
3678        pub fn with_request<V: Into<crate::model::DeleteInsightsConfigRequest>>(
3679            mut self,
3680            v: V,
3681        ) -> Self {
3682            self.0.request = v.into();
3683            self
3684        }
3685
3686        /// Sets all the options, replacing any prior values.
3687        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3688            self.0.options = v.into();
3689            self
3690        }
3691
3692        /// Sends the request.
3693        ///
3694        /// # Long running operations
3695        ///
3696        /// This starts, but does not poll, a longrunning operation. More information
3697        /// on [delete_insights_config][crate::client::InsightsConfigService::delete_insights_config].
3698        pub async fn send(self) -> Result<longrunning::model::Operation> {
3699            (*self.0.stub)
3700                .delete_insights_config(self.0.request, self.0.options)
3701                .await
3702                .map(gax::response::Response::into_body)
3703        }
3704
3705        /// Creates a [Poller][lro::Poller] to work with `delete_insights_config`.
3706        pub fn poller(self) -> impl lro::Poller<(), crate::model::OperationMetadata> {
3707            type Operation = lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
3708            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3709            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3710
3711            let stub = self.0.stub.clone();
3712            let mut options = self.0.options.clone();
3713            options.set_retry_policy(gax::retry_policy::NeverRetry);
3714            let query = move |name| {
3715                let stub = stub.clone();
3716                let options = options.clone();
3717                async {
3718                    let op = GetOperation::new(stub)
3719                        .set_name(name)
3720                        .with_options(options)
3721                        .send()
3722                        .await?;
3723                    Ok(Operation::new(op))
3724                }
3725            };
3726
3727            let start = move || async {
3728                let op = self.send().await?;
3729                Ok(Operation::new(op))
3730            };
3731
3732            lro::internal::new_unit_response_poller(
3733                polling_error_policy,
3734                polling_backoff_policy,
3735                start,
3736                query,
3737            )
3738        }
3739
3740        /// Sets the value of [name][crate::model::DeleteInsightsConfigRequest::name].
3741        ///
3742        /// This is a **required** field for requests.
3743        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3744            self.0.request.name = v.into();
3745            self
3746        }
3747
3748        /// Sets the value of [request_id][crate::model::DeleteInsightsConfigRequest::request_id].
3749        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3750            self.0.request.request_id = v.into();
3751            self
3752        }
3753
3754        /// Sets the value of [validate_only][crate::model::DeleteInsightsConfigRequest::validate_only].
3755        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
3756            self.0.request.validate_only = v.into();
3757            self
3758        }
3759
3760        /// Sets the value of [etag][crate::model::DeleteInsightsConfigRequest::etag].
3761        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
3762            self.0.request.etag = v.into();
3763            self
3764        }
3765    }
3766
3767    #[doc(hidden)]
3768    impl gax::options::internal::RequestBuilder for DeleteInsightsConfig {
3769        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3770            &mut self.0.options
3771        }
3772    }
3773
3774    /// The request builder for [InsightsConfigService::list_locations][crate::client::InsightsConfigService::list_locations] calls.
3775    ///
3776    /// # Example
3777    /// ```no_run
3778    /// # use google_cloud_developerconnect_v1::builder;
3779    /// use builder::insights_config_service::ListLocations;
3780    /// # tokio_test::block_on(async {
3781    /// use gax::paginator::ItemPaginator;
3782    ///
3783    /// let builder = prepare_request_builder();
3784    /// let mut items = builder.by_item();
3785    /// while let Some(result) = items.next().await {
3786    ///   let item = result?;
3787    /// }
3788    /// # gax::Result::<()>::Ok(()) });
3789    ///
3790    /// fn prepare_request_builder() -> ListLocations {
3791    ///   # panic!();
3792    ///   // ... details omitted ...
3793    /// }
3794    /// ```
3795    #[derive(Clone, Debug)]
3796    pub struct ListLocations(RequestBuilder<location::model::ListLocationsRequest>);
3797
3798    impl ListLocations {
3799        pub(crate) fn new(
3800            stub: std::sync::Arc<dyn super::super::stub::dynamic::InsightsConfigService>,
3801        ) -> Self {
3802            Self(RequestBuilder::new(stub))
3803        }
3804
3805        /// Sets the full request, replacing any prior values.
3806        pub fn with_request<V: Into<location::model::ListLocationsRequest>>(
3807            mut self,
3808            v: V,
3809        ) -> Self {
3810            self.0.request = v.into();
3811            self
3812        }
3813
3814        /// Sets all the options, replacing any prior values.
3815        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3816            self.0.options = v.into();
3817            self
3818        }
3819
3820        /// Sends the request.
3821        pub async fn send(self) -> Result<location::model::ListLocationsResponse> {
3822            (*self.0.stub)
3823                .list_locations(self.0.request, self.0.options)
3824                .await
3825                .map(gax::response::Response::into_body)
3826        }
3827
3828        /// Streams each page in the collection.
3829        pub fn by_page(
3830            self,
3831        ) -> impl gax::paginator::Paginator<location::model::ListLocationsResponse, gax::error::Error>
3832        {
3833            use std::clone::Clone;
3834            let token = self.0.request.page_token.clone();
3835            let execute = move |token: String| {
3836                let mut builder = self.clone();
3837                builder.0.request = builder.0.request.set_page_token(token);
3838                builder.send()
3839            };
3840            gax::paginator::internal::new_paginator(token, execute)
3841        }
3842
3843        /// Streams each item in the collection.
3844        pub fn by_item(
3845            self,
3846        ) -> impl gax::paginator::ItemPaginator<location::model::ListLocationsResponse, gax::error::Error>
3847        {
3848            use gax::paginator::Paginator;
3849            self.by_page().items()
3850        }
3851
3852        /// Sets the value of [name][location::model::ListLocationsRequest::name].
3853        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3854            self.0.request.name = v.into();
3855            self
3856        }
3857
3858        /// Sets the value of [filter][location::model::ListLocationsRequest::filter].
3859        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
3860            self.0.request.filter = v.into();
3861            self
3862        }
3863
3864        /// Sets the value of [page_size][location::model::ListLocationsRequest::page_size].
3865        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
3866            self.0.request.page_size = v.into();
3867            self
3868        }
3869
3870        /// Sets the value of [page_token][location::model::ListLocationsRequest::page_token].
3871        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
3872            self.0.request.page_token = v.into();
3873            self
3874        }
3875    }
3876
3877    #[doc(hidden)]
3878    impl gax::options::internal::RequestBuilder for ListLocations {
3879        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3880            &mut self.0.options
3881        }
3882    }
3883
3884    /// The request builder for [InsightsConfigService::get_location][crate::client::InsightsConfigService::get_location] calls.
3885    ///
3886    /// # Example
3887    /// ```no_run
3888    /// # use google_cloud_developerconnect_v1::builder;
3889    /// use builder::insights_config_service::GetLocation;
3890    /// # tokio_test::block_on(async {
3891    ///
3892    /// let builder = prepare_request_builder();
3893    /// let response = builder.send().await?;
3894    /// # gax::Result::<()>::Ok(()) });
3895    ///
3896    /// fn prepare_request_builder() -> GetLocation {
3897    ///   # panic!();
3898    ///   // ... details omitted ...
3899    /// }
3900    /// ```
3901    #[derive(Clone, Debug)]
3902    pub struct GetLocation(RequestBuilder<location::model::GetLocationRequest>);
3903
3904    impl GetLocation {
3905        pub(crate) fn new(
3906            stub: std::sync::Arc<dyn super::super::stub::dynamic::InsightsConfigService>,
3907        ) -> Self {
3908            Self(RequestBuilder::new(stub))
3909        }
3910
3911        /// Sets the full request, replacing any prior values.
3912        pub fn with_request<V: Into<location::model::GetLocationRequest>>(mut self, v: V) -> Self {
3913            self.0.request = v.into();
3914            self
3915        }
3916
3917        /// Sets all the options, replacing any prior values.
3918        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3919            self.0.options = v.into();
3920            self
3921        }
3922
3923        /// Sends the request.
3924        pub async fn send(self) -> Result<location::model::Location> {
3925            (*self.0.stub)
3926                .get_location(self.0.request, self.0.options)
3927                .await
3928                .map(gax::response::Response::into_body)
3929        }
3930
3931        /// Sets the value of [name][location::model::GetLocationRequest::name].
3932        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3933            self.0.request.name = v.into();
3934            self
3935        }
3936    }
3937
3938    #[doc(hidden)]
3939    impl gax::options::internal::RequestBuilder for GetLocation {
3940        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3941            &mut self.0.options
3942        }
3943    }
3944
3945    /// The request builder for [InsightsConfigService::list_operations][crate::client::InsightsConfigService::list_operations] calls.
3946    ///
3947    /// # Example
3948    /// ```no_run
3949    /// # use google_cloud_developerconnect_v1::builder;
3950    /// use builder::insights_config_service::ListOperations;
3951    /// # tokio_test::block_on(async {
3952    /// use gax::paginator::ItemPaginator;
3953    ///
3954    /// let builder = prepare_request_builder();
3955    /// let mut items = builder.by_item();
3956    /// while let Some(result) = items.next().await {
3957    ///   let item = result?;
3958    /// }
3959    /// # gax::Result::<()>::Ok(()) });
3960    ///
3961    /// fn prepare_request_builder() -> ListOperations {
3962    ///   # panic!();
3963    ///   // ... details omitted ...
3964    /// }
3965    /// ```
3966    #[derive(Clone, Debug)]
3967    pub struct ListOperations(RequestBuilder<longrunning::model::ListOperationsRequest>);
3968
3969    impl ListOperations {
3970        pub(crate) fn new(
3971            stub: std::sync::Arc<dyn super::super::stub::dynamic::InsightsConfigService>,
3972        ) -> Self {
3973            Self(RequestBuilder::new(stub))
3974        }
3975
3976        /// Sets the full request, replacing any prior values.
3977        pub fn with_request<V: Into<longrunning::model::ListOperationsRequest>>(
3978            mut self,
3979            v: V,
3980        ) -> Self {
3981            self.0.request = v.into();
3982            self
3983        }
3984
3985        /// Sets all the options, replacing any prior values.
3986        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3987            self.0.options = v.into();
3988            self
3989        }
3990
3991        /// Sends the request.
3992        pub async fn send(self) -> Result<longrunning::model::ListOperationsResponse> {
3993            (*self.0.stub)
3994                .list_operations(self.0.request, self.0.options)
3995                .await
3996                .map(gax::response::Response::into_body)
3997        }
3998
3999        /// Streams each page in the collection.
4000        pub fn by_page(
4001            self,
4002        ) -> impl gax::paginator::Paginator<longrunning::model::ListOperationsResponse, gax::error::Error>
4003        {
4004            use std::clone::Clone;
4005            let token = self.0.request.page_token.clone();
4006            let execute = move |token: String| {
4007                let mut builder = self.clone();
4008                builder.0.request = builder.0.request.set_page_token(token);
4009                builder.send()
4010            };
4011            gax::paginator::internal::new_paginator(token, execute)
4012        }
4013
4014        /// Streams each item in the collection.
4015        pub fn by_item(
4016            self,
4017        ) -> impl gax::paginator::ItemPaginator<
4018            longrunning::model::ListOperationsResponse,
4019            gax::error::Error,
4020        > {
4021            use gax::paginator::Paginator;
4022            self.by_page().items()
4023        }
4024
4025        /// Sets the value of [name][longrunning::model::ListOperationsRequest::name].
4026        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4027            self.0.request.name = v.into();
4028            self
4029        }
4030
4031        /// Sets the value of [filter][longrunning::model::ListOperationsRequest::filter].
4032        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
4033            self.0.request.filter = v.into();
4034            self
4035        }
4036
4037        /// Sets the value of [page_size][longrunning::model::ListOperationsRequest::page_size].
4038        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
4039            self.0.request.page_size = v.into();
4040            self
4041        }
4042
4043        /// Sets the value of [page_token][longrunning::model::ListOperationsRequest::page_token].
4044        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
4045            self.0.request.page_token = v.into();
4046            self
4047        }
4048
4049        /// Sets the value of [return_partial_success][longrunning::model::ListOperationsRequest::return_partial_success].
4050        pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
4051            self.0.request.return_partial_success = v.into();
4052            self
4053        }
4054    }
4055
4056    #[doc(hidden)]
4057    impl gax::options::internal::RequestBuilder for ListOperations {
4058        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4059            &mut self.0.options
4060        }
4061    }
4062
4063    /// The request builder for [InsightsConfigService::get_operation][crate::client::InsightsConfigService::get_operation] calls.
4064    ///
4065    /// # Example
4066    /// ```no_run
4067    /// # use google_cloud_developerconnect_v1::builder;
4068    /// use builder::insights_config_service::GetOperation;
4069    /// # tokio_test::block_on(async {
4070    ///
4071    /// let builder = prepare_request_builder();
4072    /// let response = builder.send().await?;
4073    /// # gax::Result::<()>::Ok(()) });
4074    ///
4075    /// fn prepare_request_builder() -> GetOperation {
4076    ///   # panic!();
4077    ///   // ... details omitted ...
4078    /// }
4079    /// ```
4080    #[derive(Clone, Debug)]
4081    pub struct GetOperation(RequestBuilder<longrunning::model::GetOperationRequest>);
4082
4083    impl GetOperation {
4084        pub(crate) fn new(
4085            stub: std::sync::Arc<dyn super::super::stub::dynamic::InsightsConfigService>,
4086        ) -> Self {
4087            Self(RequestBuilder::new(stub))
4088        }
4089
4090        /// Sets the full request, replacing any prior values.
4091        pub fn with_request<V: Into<longrunning::model::GetOperationRequest>>(
4092            mut self,
4093            v: V,
4094        ) -> Self {
4095            self.0.request = v.into();
4096            self
4097        }
4098
4099        /// Sets all the options, replacing any prior values.
4100        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4101            self.0.options = v.into();
4102            self
4103        }
4104
4105        /// Sends the request.
4106        pub async fn send(self) -> Result<longrunning::model::Operation> {
4107            (*self.0.stub)
4108                .get_operation(self.0.request, self.0.options)
4109                .await
4110                .map(gax::response::Response::into_body)
4111        }
4112
4113        /// Sets the value of [name][longrunning::model::GetOperationRequest::name].
4114        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4115            self.0.request.name = v.into();
4116            self
4117        }
4118    }
4119
4120    #[doc(hidden)]
4121    impl gax::options::internal::RequestBuilder for GetOperation {
4122        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4123            &mut self.0.options
4124        }
4125    }
4126
4127    /// The request builder for [InsightsConfigService::delete_operation][crate::client::InsightsConfigService::delete_operation] calls.
4128    ///
4129    /// # Example
4130    /// ```no_run
4131    /// # use google_cloud_developerconnect_v1::builder;
4132    /// use builder::insights_config_service::DeleteOperation;
4133    /// # tokio_test::block_on(async {
4134    ///
4135    /// let builder = prepare_request_builder();
4136    /// let response = builder.send().await?;
4137    /// # gax::Result::<()>::Ok(()) });
4138    ///
4139    /// fn prepare_request_builder() -> DeleteOperation {
4140    ///   # panic!();
4141    ///   // ... details omitted ...
4142    /// }
4143    /// ```
4144    #[derive(Clone, Debug)]
4145    pub struct DeleteOperation(RequestBuilder<longrunning::model::DeleteOperationRequest>);
4146
4147    impl DeleteOperation {
4148        pub(crate) fn new(
4149            stub: std::sync::Arc<dyn super::super::stub::dynamic::InsightsConfigService>,
4150        ) -> Self {
4151            Self(RequestBuilder::new(stub))
4152        }
4153
4154        /// Sets the full request, replacing any prior values.
4155        pub fn with_request<V: Into<longrunning::model::DeleteOperationRequest>>(
4156            mut self,
4157            v: V,
4158        ) -> Self {
4159            self.0.request = v.into();
4160            self
4161        }
4162
4163        /// Sets all the options, replacing any prior values.
4164        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4165            self.0.options = v.into();
4166            self
4167        }
4168
4169        /// Sends the request.
4170        pub async fn send(self) -> Result<()> {
4171            (*self.0.stub)
4172                .delete_operation(self.0.request, self.0.options)
4173                .await
4174                .map(gax::response::Response::into_body)
4175        }
4176
4177        /// Sets the value of [name][longrunning::model::DeleteOperationRequest::name].
4178        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4179            self.0.request.name = v.into();
4180            self
4181        }
4182    }
4183
4184    #[doc(hidden)]
4185    impl gax::options::internal::RequestBuilder for DeleteOperation {
4186        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4187            &mut self.0.options
4188        }
4189    }
4190
4191    /// The request builder for [InsightsConfigService::cancel_operation][crate::client::InsightsConfigService::cancel_operation] calls.
4192    ///
4193    /// # Example
4194    /// ```no_run
4195    /// # use google_cloud_developerconnect_v1::builder;
4196    /// use builder::insights_config_service::CancelOperation;
4197    /// # tokio_test::block_on(async {
4198    ///
4199    /// let builder = prepare_request_builder();
4200    /// let response = builder.send().await?;
4201    /// # gax::Result::<()>::Ok(()) });
4202    ///
4203    /// fn prepare_request_builder() -> CancelOperation {
4204    ///   # panic!();
4205    ///   // ... details omitted ...
4206    /// }
4207    /// ```
4208    #[derive(Clone, Debug)]
4209    pub struct CancelOperation(RequestBuilder<longrunning::model::CancelOperationRequest>);
4210
4211    impl CancelOperation {
4212        pub(crate) fn new(
4213            stub: std::sync::Arc<dyn super::super::stub::dynamic::InsightsConfigService>,
4214        ) -> Self {
4215            Self(RequestBuilder::new(stub))
4216        }
4217
4218        /// Sets the full request, replacing any prior values.
4219        pub fn with_request<V: Into<longrunning::model::CancelOperationRequest>>(
4220            mut self,
4221            v: V,
4222        ) -> Self {
4223            self.0.request = v.into();
4224            self
4225        }
4226
4227        /// Sets all the options, replacing any prior values.
4228        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4229            self.0.options = v.into();
4230            self
4231        }
4232
4233        /// Sends the request.
4234        pub async fn send(self) -> Result<()> {
4235            (*self.0.stub)
4236                .cancel_operation(self.0.request, self.0.options)
4237                .await
4238                .map(gax::response::Response::into_body)
4239        }
4240
4241        /// Sets the value of [name][longrunning::model::CancelOperationRequest::name].
4242        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4243            self.0.request.name = v.into();
4244            self
4245        }
4246    }
4247
4248    #[doc(hidden)]
4249    impl gax::options::internal::RequestBuilder for CancelOperation {
4250        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4251            &mut self.0.options
4252        }
4253    }
4254}