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
2916    #[doc(hidden)]
2917    impl gax::options::internal::RequestBuilder for ListOperations {
2918        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2919            &mut self.0.options
2920        }
2921    }
2922
2923    /// The request builder for [DeveloperConnect::get_operation][crate::client::DeveloperConnect::get_operation] calls.
2924    ///
2925    /// # Example
2926    /// ```no_run
2927    /// # use google_cloud_developerconnect_v1::builder;
2928    /// use builder::developer_connect::GetOperation;
2929    /// # tokio_test::block_on(async {
2930    ///
2931    /// let builder = prepare_request_builder();
2932    /// let response = builder.send().await?;
2933    /// # gax::Result::<()>::Ok(()) });
2934    ///
2935    /// fn prepare_request_builder() -> GetOperation {
2936    ///   # panic!();
2937    ///   // ... details omitted ...
2938    /// }
2939    /// ```
2940    #[derive(Clone, Debug)]
2941    pub struct GetOperation(RequestBuilder<longrunning::model::GetOperationRequest>);
2942
2943    impl GetOperation {
2944        pub(crate) fn new(
2945            stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
2946        ) -> Self {
2947            Self(RequestBuilder::new(stub))
2948        }
2949
2950        /// Sets the full request, replacing any prior values.
2951        pub fn with_request<V: Into<longrunning::model::GetOperationRequest>>(
2952            mut self,
2953            v: V,
2954        ) -> Self {
2955            self.0.request = v.into();
2956            self
2957        }
2958
2959        /// Sets all the options, replacing any prior values.
2960        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2961            self.0.options = v.into();
2962            self
2963        }
2964
2965        /// Sends the request.
2966        pub async fn send(self) -> Result<longrunning::model::Operation> {
2967            (*self.0.stub)
2968                .get_operation(self.0.request, self.0.options)
2969                .await
2970                .map(gax::response::Response::into_body)
2971        }
2972
2973        /// Sets the value of [name][longrunning::model::GetOperationRequest::name].
2974        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2975            self.0.request.name = v.into();
2976            self
2977        }
2978    }
2979
2980    #[doc(hidden)]
2981    impl gax::options::internal::RequestBuilder for GetOperation {
2982        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2983            &mut self.0.options
2984        }
2985    }
2986
2987    /// The request builder for [DeveloperConnect::delete_operation][crate::client::DeveloperConnect::delete_operation] calls.
2988    ///
2989    /// # Example
2990    /// ```no_run
2991    /// # use google_cloud_developerconnect_v1::builder;
2992    /// use builder::developer_connect::DeleteOperation;
2993    /// # tokio_test::block_on(async {
2994    ///
2995    /// let builder = prepare_request_builder();
2996    /// let response = builder.send().await?;
2997    /// # gax::Result::<()>::Ok(()) });
2998    ///
2999    /// fn prepare_request_builder() -> DeleteOperation {
3000    ///   # panic!();
3001    ///   // ... details omitted ...
3002    /// }
3003    /// ```
3004    #[derive(Clone, Debug)]
3005    pub struct DeleteOperation(RequestBuilder<longrunning::model::DeleteOperationRequest>);
3006
3007    impl DeleteOperation {
3008        pub(crate) fn new(
3009            stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
3010        ) -> Self {
3011            Self(RequestBuilder::new(stub))
3012        }
3013
3014        /// Sets the full request, replacing any prior values.
3015        pub fn with_request<V: Into<longrunning::model::DeleteOperationRequest>>(
3016            mut self,
3017            v: V,
3018        ) -> Self {
3019            self.0.request = v.into();
3020            self
3021        }
3022
3023        /// Sets all the options, replacing any prior values.
3024        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3025            self.0.options = v.into();
3026            self
3027        }
3028
3029        /// Sends the request.
3030        pub async fn send(self) -> Result<()> {
3031            (*self.0.stub)
3032                .delete_operation(self.0.request, self.0.options)
3033                .await
3034                .map(gax::response::Response::into_body)
3035        }
3036
3037        /// Sets the value of [name][longrunning::model::DeleteOperationRequest::name].
3038        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3039            self.0.request.name = v.into();
3040            self
3041        }
3042    }
3043
3044    #[doc(hidden)]
3045    impl gax::options::internal::RequestBuilder for DeleteOperation {
3046        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3047            &mut self.0.options
3048        }
3049    }
3050
3051    /// The request builder for [DeveloperConnect::cancel_operation][crate::client::DeveloperConnect::cancel_operation] calls.
3052    ///
3053    /// # Example
3054    /// ```no_run
3055    /// # use google_cloud_developerconnect_v1::builder;
3056    /// use builder::developer_connect::CancelOperation;
3057    /// # tokio_test::block_on(async {
3058    ///
3059    /// let builder = prepare_request_builder();
3060    /// let response = builder.send().await?;
3061    /// # gax::Result::<()>::Ok(()) });
3062    ///
3063    /// fn prepare_request_builder() -> CancelOperation {
3064    ///   # panic!();
3065    ///   // ... details omitted ...
3066    /// }
3067    /// ```
3068    #[derive(Clone, Debug)]
3069    pub struct CancelOperation(RequestBuilder<longrunning::model::CancelOperationRequest>);
3070
3071    impl CancelOperation {
3072        pub(crate) fn new(
3073            stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
3074        ) -> Self {
3075            Self(RequestBuilder::new(stub))
3076        }
3077
3078        /// Sets the full request, replacing any prior values.
3079        pub fn with_request<V: Into<longrunning::model::CancelOperationRequest>>(
3080            mut self,
3081            v: V,
3082        ) -> Self {
3083            self.0.request = v.into();
3084            self
3085        }
3086
3087        /// Sets all the options, replacing any prior values.
3088        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3089            self.0.options = v.into();
3090            self
3091        }
3092
3093        /// Sends the request.
3094        pub async fn send(self) -> Result<()> {
3095            (*self.0.stub)
3096                .cancel_operation(self.0.request, self.0.options)
3097                .await
3098                .map(gax::response::Response::into_body)
3099        }
3100
3101        /// Sets the value of [name][longrunning::model::CancelOperationRequest::name].
3102        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3103            self.0.request.name = v.into();
3104            self
3105        }
3106    }
3107
3108    #[doc(hidden)]
3109    impl gax::options::internal::RequestBuilder for CancelOperation {
3110        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3111            &mut self.0.options
3112        }
3113    }
3114}
3115
3116pub mod insights_config_service {
3117    use crate::Result;
3118
3119    /// A builder for [InsightsConfigService][crate::client::InsightsConfigService].
3120    ///
3121    /// ```
3122    /// # tokio_test::block_on(async {
3123    /// # use google_cloud_developerconnect_v1::*;
3124    /// # use builder::insights_config_service::ClientBuilder;
3125    /// # use client::InsightsConfigService;
3126    /// let builder : ClientBuilder = InsightsConfigService::builder();
3127    /// let client = builder
3128    ///     .with_endpoint("https://developerconnect.googleapis.com")
3129    ///     .build().await?;
3130    /// # gax::client_builder::Result::<()>::Ok(()) });
3131    /// ```
3132    pub type ClientBuilder =
3133        gax::client_builder::ClientBuilder<client::Factory, gaxi::options::Credentials>;
3134
3135    pub(crate) mod client {
3136        use super::super::super::client::InsightsConfigService;
3137        pub struct Factory;
3138        impl gax::client_builder::internal::ClientFactory for Factory {
3139            type Client = InsightsConfigService;
3140            type Credentials = gaxi::options::Credentials;
3141            async fn build(
3142                self,
3143                config: gaxi::options::ClientConfig,
3144            ) -> gax::client_builder::Result<Self::Client> {
3145                Self::Client::new(config).await
3146            }
3147        }
3148    }
3149
3150    /// Common implementation for [crate::client::InsightsConfigService] request builders.
3151    #[derive(Clone, Debug)]
3152    pub(crate) struct RequestBuilder<R: std::default::Default> {
3153        stub: std::sync::Arc<dyn super::super::stub::dynamic::InsightsConfigService>,
3154        request: R,
3155        options: gax::options::RequestOptions,
3156    }
3157
3158    impl<R> RequestBuilder<R>
3159    where
3160        R: std::default::Default,
3161    {
3162        pub(crate) fn new(
3163            stub: std::sync::Arc<dyn super::super::stub::dynamic::InsightsConfigService>,
3164        ) -> Self {
3165            Self {
3166                stub,
3167                request: R::default(),
3168                options: gax::options::RequestOptions::default(),
3169            }
3170        }
3171    }
3172
3173    /// The request builder for [InsightsConfigService::list_insights_configs][crate::client::InsightsConfigService::list_insights_configs] calls.
3174    ///
3175    /// # Example
3176    /// ```no_run
3177    /// # use google_cloud_developerconnect_v1::builder;
3178    /// use builder::insights_config_service::ListInsightsConfigs;
3179    /// # tokio_test::block_on(async {
3180    /// use gax::paginator::ItemPaginator;
3181    ///
3182    /// let builder = prepare_request_builder();
3183    /// let mut items = builder.by_item();
3184    /// while let Some(result) = items.next().await {
3185    ///   let item = result?;
3186    /// }
3187    /// # gax::Result::<()>::Ok(()) });
3188    ///
3189    /// fn prepare_request_builder() -> ListInsightsConfigs {
3190    ///   # panic!();
3191    ///   // ... details omitted ...
3192    /// }
3193    /// ```
3194    #[derive(Clone, Debug)]
3195    pub struct ListInsightsConfigs(RequestBuilder<crate::model::ListInsightsConfigsRequest>);
3196
3197    impl ListInsightsConfigs {
3198        pub(crate) fn new(
3199            stub: std::sync::Arc<dyn super::super::stub::dynamic::InsightsConfigService>,
3200        ) -> Self {
3201            Self(RequestBuilder::new(stub))
3202        }
3203
3204        /// Sets the full request, replacing any prior values.
3205        pub fn with_request<V: Into<crate::model::ListInsightsConfigsRequest>>(
3206            mut self,
3207            v: V,
3208        ) -> Self {
3209            self.0.request = v.into();
3210            self
3211        }
3212
3213        /// Sets all the options, replacing any prior values.
3214        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3215            self.0.options = v.into();
3216            self
3217        }
3218
3219        /// Sends the request.
3220        pub async fn send(self) -> Result<crate::model::ListInsightsConfigsResponse> {
3221            (*self.0.stub)
3222                .list_insights_configs(self.0.request, self.0.options)
3223                .await
3224                .map(gax::response::Response::into_body)
3225        }
3226
3227        /// Streams each page in the collection.
3228        pub fn by_page(
3229            self,
3230        ) -> impl gax::paginator::Paginator<crate::model::ListInsightsConfigsResponse, gax::error::Error>
3231        {
3232            use std::clone::Clone;
3233            let token = self.0.request.page_token.clone();
3234            let execute = move |token: String| {
3235                let mut builder = self.clone();
3236                builder.0.request = builder.0.request.set_page_token(token);
3237                builder.send()
3238            };
3239            gax::paginator::internal::new_paginator(token, execute)
3240        }
3241
3242        /// Streams each item in the collection.
3243        pub fn by_item(
3244            self,
3245        ) -> impl gax::paginator::ItemPaginator<
3246            crate::model::ListInsightsConfigsResponse,
3247            gax::error::Error,
3248        > {
3249            use gax::paginator::Paginator;
3250            self.by_page().items()
3251        }
3252
3253        /// Sets the value of [parent][crate::model::ListInsightsConfigsRequest::parent].
3254        ///
3255        /// This is a **required** field for requests.
3256        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3257            self.0.request.parent = v.into();
3258            self
3259        }
3260
3261        /// Sets the value of [page_size][crate::model::ListInsightsConfigsRequest::page_size].
3262        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
3263            self.0.request.page_size = v.into();
3264            self
3265        }
3266
3267        /// Sets the value of [page_token][crate::model::ListInsightsConfigsRequest::page_token].
3268        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
3269            self.0.request.page_token = v.into();
3270            self
3271        }
3272
3273        /// Sets the value of [filter][crate::model::ListInsightsConfigsRequest::filter].
3274        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
3275            self.0.request.filter = v.into();
3276            self
3277        }
3278
3279        /// Sets the value of [order_by][crate::model::ListInsightsConfigsRequest::order_by].
3280        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
3281            self.0.request.order_by = v.into();
3282            self
3283        }
3284    }
3285
3286    #[doc(hidden)]
3287    impl gax::options::internal::RequestBuilder for ListInsightsConfigs {
3288        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3289            &mut self.0.options
3290        }
3291    }
3292
3293    /// The request builder for [InsightsConfigService::create_insights_config][crate::client::InsightsConfigService::create_insights_config] calls.
3294    ///
3295    /// # Example
3296    /// ```no_run
3297    /// # use google_cloud_developerconnect_v1::builder;
3298    /// use builder::insights_config_service::CreateInsightsConfig;
3299    /// # tokio_test::block_on(async {
3300    /// use lro::Poller;
3301    ///
3302    /// let builder = prepare_request_builder();
3303    /// let response = builder.poller().until_done().await?;
3304    /// # gax::Result::<()>::Ok(()) });
3305    ///
3306    /// fn prepare_request_builder() -> CreateInsightsConfig {
3307    ///   # panic!();
3308    ///   // ... details omitted ...
3309    /// }
3310    /// ```
3311    #[derive(Clone, Debug)]
3312    pub struct CreateInsightsConfig(RequestBuilder<crate::model::CreateInsightsConfigRequest>);
3313
3314    impl CreateInsightsConfig {
3315        pub(crate) fn new(
3316            stub: std::sync::Arc<dyn super::super::stub::dynamic::InsightsConfigService>,
3317        ) -> Self {
3318            Self(RequestBuilder::new(stub))
3319        }
3320
3321        /// Sets the full request, replacing any prior values.
3322        pub fn with_request<V: Into<crate::model::CreateInsightsConfigRequest>>(
3323            mut self,
3324            v: V,
3325        ) -> Self {
3326            self.0.request = v.into();
3327            self
3328        }
3329
3330        /// Sets all the options, replacing any prior values.
3331        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3332            self.0.options = v.into();
3333            self
3334        }
3335
3336        /// Sends the request.
3337        ///
3338        /// # Long running operations
3339        ///
3340        /// This starts, but does not poll, a longrunning operation. More information
3341        /// on [create_insights_config][crate::client::InsightsConfigService::create_insights_config].
3342        pub async fn send(self) -> Result<longrunning::model::Operation> {
3343            (*self.0.stub)
3344                .create_insights_config(self.0.request, self.0.options)
3345                .await
3346                .map(gax::response::Response::into_body)
3347        }
3348
3349        /// Creates a [Poller][lro::Poller] to work with `create_insights_config`.
3350        pub fn poller(
3351            self,
3352        ) -> impl lro::Poller<crate::model::InsightsConfig, crate::model::OperationMetadata>
3353        {
3354            type Operation = lro::internal::Operation<
3355                crate::model::InsightsConfig,
3356                crate::model::OperationMetadata,
3357            >;
3358            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3359            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3360
3361            let stub = self.0.stub.clone();
3362            let mut options = self.0.options.clone();
3363            options.set_retry_policy(gax::retry_policy::NeverRetry);
3364            let query = move |name| {
3365                let stub = stub.clone();
3366                let options = options.clone();
3367                async {
3368                    let op = GetOperation::new(stub)
3369                        .set_name(name)
3370                        .with_options(options)
3371                        .send()
3372                        .await?;
3373                    Ok(Operation::new(op))
3374                }
3375            };
3376
3377            let start = move || async {
3378                let op = self.send().await?;
3379                Ok(Operation::new(op))
3380            };
3381
3382            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
3383        }
3384
3385        /// Sets the value of [parent][crate::model::CreateInsightsConfigRequest::parent].
3386        ///
3387        /// This is a **required** field for requests.
3388        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3389            self.0.request.parent = v.into();
3390            self
3391        }
3392
3393        /// Sets the value of [insights_config_id][crate::model::CreateInsightsConfigRequest::insights_config_id].
3394        ///
3395        /// This is a **required** field for requests.
3396        pub fn set_insights_config_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3397            self.0.request.insights_config_id = v.into();
3398            self
3399        }
3400
3401        /// Sets the value of [insights_config][crate::model::CreateInsightsConfigRequest::insights_config].
3402        ///
3403        /// This is a **required** field for requests.
3404        pub fn set_insights_config<T>(mut self, v: T) -> Self
3405        where
3406            T: std::convert::Into<crate::model::InsightsConfig>,
3407        {
3408            self.0.request.insights_config = std::option::Option::Some(v.into());
3409            self
3410        }
3411
3412        /// Sets or clears the value of [insights_config][crate::model::CreateInsightsConfigRequest::insights_config].
3413        ///
3414        /// This is a **required** field for requests.
3415        pub fn set_or_clear_insights_config<T>(mut self, v: std::option::Option<T>) -> Self
3416        where
3417            T: std::convert::Into<crate::model::InsightsConfig>,
3418        {
3419            self.0.request.insights_config = v.map(|x| x.into());
3420            self
3421        }
3422
3423        /// Sets the value of [validate_only][crate::model::CreateInsightsConfigRequest::validate_only].
3424        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
3425            self.0.request.validate_only = v.into();
3426            self
3427        }
3428    }
3429
3430    #[doc(hidden)]
3431    impl gax::options::internal::RequestBuilder for CreateInsightsConfig {
3432        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3433            &mut self.0.options
3434        }
3435    }
3436
3437    /// The request builder for [InsightsConfigService::get_insights_config][crate::client::InsightsConfigService::get_insights_config] calls.
3438    ///
3439    /// # Example
3440    /// ```no_run
3441    /// # use google_cloud_developerconnect_v1::builder;
3442    /// use builder::insights_config_service::GetInsightsConfig;
3443    /// # tokio_test::block_on(async {
3444    ///
3445    /// let builder = prepare_request_builder();
3446    /// let response = builder.send().await?;
3447    /// # gax::Result::<()>::Ok(()) });
3448    ///
3449    /// fn prepare_request_builder() -> GetInsightsConfig {
3450    ///   # panic!();
3451    ///   // ... details omitted ...
3452    /// }
3453    /// ```
3454    #[derive(Clone, Debug)]
3455    pub struct GetInsightsConfig(RequestBuilder<crate::model::GetInsightsConfigRequest>);
3456
3457    impl GetInsightsConfig {
3458        pub(crate) fn new(
3459            stub: std::sync::Arc<dyn super::super::stub::dynamic::InsightsConfigService>,
3460        ) -> Self {
3461            Self(RequestBuilder::new(stub))
3462        }
3463
3464        /// Sets the full request, replacing any prior values.
3465        pub fn with_request<V: Into<crate::model::GetInsightsConfigRequest>>(
3466            mut self,
3467            v: V,
3468        ) -> Self {
3469            self.0.request = v.into();
3470            self
3471        }
3472
3473        /// Sets all the options, replacing any prior values.
3474        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3475            self.0.options = v.into();
3476            self
3477        }
3478
3479        /// Sends the request.
3480        pub async fn send(self) -> Result<crate::model::InsightsConfig> {
3481            (*self.0.stub)
3482                .get_insights_config(self.0.request, self.0.options)
3483                .await
3484                .map(gax::response::Response::into_body)
3485        }
3486
3487        /// Sets the value of [name][crate::model::GetInsightsConfigRequest::name].
3488        ///
3489        /// This is a **required** field for requests.
3490        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3491            self.0.request.name = v.into();
3492            self
3493        }
3494    }
3495
3496    #[doc(hidden)]
3497    impl gax::options::internal::RequestBuilder for GetInsightsConfig {
3498        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3499            &mut self.0.options
3500        }
3501    }
3502
3503    /// The request builder for [InsightsConfigService::update_insights_config][crate::client::InsightsConfigService::update_insights_config] calls.
3504    ///
3505    /// # Example
3506    /// ```no_run
3507    /// # use google_cloud_developerconnect_v1::builder;
3508    /// use builder::insights_config_service::UpdateInsightsConfig;
3509    /// # tokio_test::block_on(async {
3510    /// use lro::Poller;
3511    ///
3512    /// let builder = prepare_request_builder();
3513    /// let response = builder.poller().until_done().await?;
3514    /// # gax::Result::<()>::Ok(()) });
3515    ///
3516    /// fn prepare_request_builder() -> UpdateInsightsConfig {
3517    ///   # panic!();
3518    ///   // ... details omitted ...
3519    /// }
3520    /// ```
3521    #[derive(Clone, Debug)]
3522    pub struct UpdateInsightsConfig(RequestBuilder<crate::model::UpdateInsightsConfigRequest>);
3523
3524    impl UpdateInsightsConfig {
3525        pub(crate) fn new(
3526            stub: std::sync::Arc<dyn super::super::stub::dynamic::InsightsConfigService>,
3527        ) -> Self {
3528            Self(RequestBuilder::new(stub))
3529        }
3530
3531        /// Sets the full request, replacing any prior values.
3532        pub fn with_request<V: Into<crate::model::UpdateInsightsConfigRequest>>(
3533            mut self,
3534            v: V,
3535        ) -> Self {
3536            self.0.request = v.into();
3537            self
3538        }
3539
3540        /// Sets all the options, replacing any prior values.
3541        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3542            self.0.options = v.into();
3543            self
3544        }
3545
3546        /// Sends the request.
3547        ///
3548        /// # Long running operations
3549        ///
3550        /// This starts, but does not poll, a longrunning operation. More information
3551        /// on [update_insights_config][crate::client::InsightsConfigService::update_insights_config].
3552        pub async fn send(self) -> Result<longrunning::model::Operation> {
3553            (*self.0.stub)
3554                .update_insights_config(self.0.request, self.0.options)
3555                .await
3556                .map(gax::response::Response::into_body)
3557        }
3558
3559        /// Creates a [Poller][lro::Poller] to work with `update_insights_config`.
3560        pub fn poller(
3561            self,
3562        ) -> impl lro::Poller<crate::model::InsightsConfig, crate::model::OperationMetadata>
3563        {
3564            type Operation = lro::internal::Operation<
3565                crate::model::InsightsConfig,
3566                crate::model::OperationMetadata,
3567            >;
3568            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3569            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3570
3571            let stub = self.0.stub.clone();
3572            let mut options = self.0.options.clone();
3573            options.set_retry_policy(gax::retry_policy::NeverRetry);
3574            let query = move |name| {
3575                let stub = stub.clone();
3576                let options = options.clone();
3577                async {
3578                    let op = GetOperation::new(stub)
3579                        .set_name(name)
3580                        .with_options(options)
3581                        .send()
3582                        .await?;
3583                    Ok(Operation::new(op))
3584                }
3585            };
3586
3587            let start = move || async {
3588                let op = self.send().await?;
3589                Ok(Operation::new(op))
3590            };
3591
3592            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
3593        }
3594
3595        /// Sets the value of [insights_config][crate::model::UpdateInsightsConfigRequest::insights_config].
3596        ///
3597        /// This is a **required** field for requests.
3598        pub fn set_insights_config<T>(mut self, v: T) -> Self
3599        where
3600            T: std::convert::Into<crate::model::InsightsConfig>,
3601        {
3602            self.0.request.insights_config = std::option::Option::Some(v.into());
3603            self
3604        }
3605
3606        /// Sets or clears the value of [insights_config][crate::model::UpdateInsightsConfigRequest::insights_config].
3607        ///
3608        /// This is a **required** field for requests.
3609        pub fn set_or_clear_insights_config<T>(mut self, v: std::option::Option<T>) -> Self
3610        where
3611            T: std::convert::Into<crate::model::InsightsConfig>,
3612        {
3613            self.0.request.insights_config = v.map(|x| x.into());
3614            self
3615        }
3616
3617        /// Sets the value of [request_id][crate::model::UpdateInsightsConfigRequest::request_id].
3618        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3619            self.0.request.request_id = v.into();
3620            self
3621        }
3622
3623        /// Sets the value of [allow_missing][crate::model::UpdateInsightsConfigRequest::allow_missing].
3624        pub fn set_allow_missing<T: Into<bool>>(mut self, v: T) -> Self {
3625            self.0.request.allow_missing = v.into();
3626            self
3627        }
3628
3629        /// Sets the value of [validate_only][crate::model::UpdateInsightsConfigRequest::validate_only].
3630        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
3631            self.0.request.validate_only = v.into();
3632            self
3633        }
3634    }
3635
3636    #[doc(hidden)]
3637    impl gax::options::internal::RequestBuilder for UpdateInsightsConfig {
3638        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3639            &mut self.0.options
3640        }
3641    }
3642
3643    /// The request builder for [InsightsConfigService::delete_insights_config][crate::client::InsightsConfigService::delete_insights_config] calls.
3644    ///
3645    /// # Example
3646    /// ```no_run
3647    /// # use google_cloud_developerconnect_v1::builder;
3648    /// use builder::insights_config_service::DeleteInsightsConfig;
3649    /// # tokio_test::block_on(async {
3650    /// use lro::Poller;
3651    ///
3652    /// let builder = prepare_request_builder();
3653    /// let response = builder.poller().until_done().await?;
3654    /// # gax::Result::<()>::Ok(()) });
3655    ///
3656    /// fn prepare_request_builder() -> DeleteInsightsConfig {
3657    ///   # panic!();
3658    ///   // ... details omitted ...
3659    /// }
3660    /// ```
3661    #[derive(Clone, Debug)]
3662    pub struct DeleteInsightsConfig(RequestBuilder<crate::model::DeleteInsightsConfigRequest>);
3663
3664    impl DeleteInsightsConfig {
3665        pub(crate) fn new(
3666            stub: std::sync::Arc<dyn super::super::stub::dynamic::InsightsConfigService>,
3667        ) -> Self {
3668            Self(RequestBuilder::new(stub))
3669        }
3670
3671        /// Sets the full request, replacing any prior values.
3672        pub fn with_request<V: Into<crate::model::DeleteInsightsConfigRequest>>(
3673            mut self,
3674            v: V,
3675        ) -> Self {
3676            self.0.request = v.into();
3677            self
3678        }
3679
3680        /// Sets all the options, replacing any prior values.
3681        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3682            self.0.options = v.into();
3683            self
3684        }
3685
3686        /// Sends the request.
3687        ///
3688        /// # Long running operations
3689        ///
3690        /// This starts, but does not poll, a longrunning operation. More information
3691        /// on [delete_insights_config][crate::client::InsightsConfigService::delete_insights_config].
3692        pub async fn send(self) -> Result<longrunning::model::Operation> {
3693            (*self.0.stub)
3694                .delete_insights_config(self.0.request, self.0.options)
3695                .await
3696                .map(gax::response::Response::into_body)
3697        }
3698
3699        /// Creates a [Poller][lro::Poller] to work with `delete_insights_config`.
3700        pub fn poller(self) -> impl lro::Poller<(), crate::model::OperationMetadata> {
3701            type Operation = lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
3702            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3703            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3704
3705            let stub = self.0.stub.clone();
3706            let mut options = self.0.options.clone();
3707            options.set_retry_policy(gax::retry_policy::NeverRetry);
3708            let query = move |name| {
3709                let stub = stub.clone();
3710                let options = options.clone();
3711                async {
3712                    let op = GetOperation::new(stub)
3713                        .set_name(name)
3714                        .with_options(options)
3715                        .send()
3716                        .await?;
3717                    Ok(Operation::new(op))
3718                }
3719            };
3720
3721            let start = move || async {
3722                let op = self.send().await?;
3723                Ok(Operation::new(op))
3724            };
3725
3726            lro::internal::new_unit_response_poller(
3727                polling_error_policy,
3728                polling_backoff_policy,
3729                start,
3730                query,
3731            )
3732        }
3733
3734        /// Sets the value of [name][crate::model::DeleteInsightsConfigRequest::name].
3735        ///
3736        /// This is a **required** field for requests.
3737        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3738            self.0.request.name = v.into();
3739            self
3740        }
3741
3742        /// Sets the value of [request_id][crate::model::DeleteInsightsConfigRequest::request_id].
3743        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3744            self.0.request.request_id = v.into();
3745            self
3746        }
3747
3748        /// Sets the value of [validate_only][crate::model::DeleteInsightsConfigRequest::validate_only].
3749        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
3750            self.0.request.validate_only = v.into();
3751            self
3752        }
3753
3754        /// Sets the value of [etag][crate::model::DeleteInsightsConfigRequest::etag].
3755        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
3756            self.0.request.etag = v.into();
3757            self
3758        }
3759    }
3760
3761    #[doc(hidden)]
3762    impl gax::options::internal::RequestBuilder for DeleteInsightsConfig {
3763        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3764            &mut self.0.options
3765        }
3766    }
3767
3768    /// The request builder for [InsightsConfigService::list_locations][crate::client::InsightsConfigService::list_locations] calls.
3769    ///
3770    /// # Example
3771    /// ```no_run
3772    /// # use google_cloud_developerconnect_v1::builder;
3773    /// use builder::insights_config_service::ListLocations;
3774    /// # tokio_test::block_on(async {
3775    /// use gax::paginator::ItemPaginator;
3776    ///
3777    /// let builder = prepare_request_builder();
3778    /// let mut items = builder.by_item();
3779    /// while let Some(result) = items.next().await {
3780    ///   let item = result?;
3781    /// }
3782    /// # gax::Result::<()>::Ok(()) });
3783    ///
3784    /// fn prepare_request_builder() -> ListLocations {
3785    ///   # panic!();
3786    ///   // ... details omitted ...
3787    /// }
3788    /// ```
3789    #[derive(Clone, Debug)]
3790    pub struct ListLocations(RequestBuilder<location::model::ListLocationsRequest>);
3791
3792    impl ListLocations {
3793        pub(crate) fn new(
3794            stub: std::sync::Arc<dyn super::super::stub::dynamic::InsightsConfigService>,
3795        ) -> Self {
3796            Self(RequestBuilder::new(stub))
3797        }
3798
3799        /// Sets the full request, replacing any prior values.
3800        pub fn with_request<V: Into<location::model::ListLocationsRequest>>(
3801            mut self,
3802            v: V,
3803        ) -> Self {
3804            self.0.request = v.into();
3805            self
3806        }
3807
3808        /// Sets all the options, replacing any prior values.
3809        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3810            self.0.options = v.into();
3811            self
3812        }
3813
3814        /// Sends the request.
3815        pub async fn send(self) -> Result<location::model::ListLocationsResponse> {
3816            (*self.0.stub)
3817                .list_locations(self.0.request, self.0.options)
3818                .await
3819                .map(gax::response::Response::into_body)
3820        }
3821
3822        /// Streams each page in the collection.
3823        pub fn by_page(
3824            self,
3825        ) -> impl gax::paginator::Paginator<location::model::ListLocationsResponse, gax::error::Error>
3826        {
3827            use std::clone::Clone;
3828            let token = self.0.request.page_token.clone();
3829            let execute = move |token: String| {
3830                let mut builder = self.clone();
3831                builder.0.request = builder.0.request.set_page_token(token);
3832                builder.send()
3833            };
3834            gax::paginator::internal::new_paginator(token, execute)
3835        }
3836
3837        /// Streams each item in the collection.
3838        pub fn by_item(
3839            self,
3840        ) -> impl gax::paginator::ItemPaginator<location::model::ListLocationsResponse, gax::error::Error>
3841        {
3842            use gax::paginator::Paginator;
3843            self.by_page().items()
3844        }
3845
3846        /// Sets the value of [name][location::model::ListLocationsRequest::name].
3847        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3848            self.0.request.name = v.into();
3849            self
3850        }
3851
3852        /// Sets the value of [filter][location::model::ListLocationsRequest::filter].
3853        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
3854            self.0.request.filter = v.into();
3855            self
3856        }
3857
3858        /// Sets the value of [page_size][location::model::ListLocationsRequest::page_size].
3859        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
3860            self.0.request.page_size = v.into();
3861            self
3862        }
3863
3864        /// Sets the value of [page_token][location::model::ListLocationsRequest::page_token].
3865        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
3866            self.0.request.page_token = v.into();
3867            self
3868        }
3869    }
3870
3871    #[doc(hidden)]
3872    impl gax::options::internal::RequestBuilder for ListLocations {
3873        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3874            &mut self.0.options
3875        }
3876    }
3877
3878    /// The request builder for [InsightsConfigService::get_location][crate::client::InsightsConfigService::get_location] calls.
3879    ///
3880    /// # Example
3881    /// ```no_run
3882    /// # use google_cloud_developerconnect_v1::builder;
3883    /// use builder::insights_config_service::GetLocation;
3884    /// # tokio_test::block_on(async {
3885    ///
3886    /// let builder = prepare_request_builder();
3887    /// let response = builder.send().await?;
3888    /// # gax::Result::<()>::Ok(()) });
3889    ///
3890    /// fn prepare_request_builder() -> GetLocation {
3891    ///   # panic!();
3892    ///   // ... details omitted ...
3893    /// }
3894    /// ```
3895    #[derive(Clone, Debug)]
3896    pub struct GetLocation(RequestBuilder<location::model::GetLocationRequest>);
3897
3898    impl GetLocation {
3899        pub(crate) fn new(
3900            stub: std::sync::Arc<dyn super::super::stub::dynamic::InsightsConfigService>,
3901        ) -> Self {
3902            Self(RequestBuilder::new(stub))
3903        }
3904
3905        /// Sets the full request, replacing any prior values.
3906        pub fn with_request<V: Into<location::model::GetLocationRequest>>(mut self, v: V) -> Self {
3907            self.0.request = v.into();
3908            self
3909        }
3910
3911        /// Sets all the options, replacing any prior values.
3912        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3913            self.0.options = v.into();
3914            self
3915        }
3916
3917        /// Sends the request.
3918        pub async fn send(self) -> Result<location::model::Location> {
3919            (*self.0.stub)
3920                .get_location(self.0.request, self.0.options)
3921                .await
3922                .map(gax::response::Response::into_body)
3923        }
3924
3925        /// Sets the value of [name][location::model::GetLocationRequest::name].
3926        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3927            self.0.request.name = v.into();
3928            self
3929        }
3930    }
3931
3932    #[doc(hidden)]
3933    impl gax::options::internal::RequestBuilder for GetLocation {
3934        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3935            &mut self.0.options
3936        }
3937    }
3938
3939    /// The request builder for [InsightsConfigService::list_operations][crate::client::InsightsConfigService::list_operations] calls.
3940    ///
3941    /// # Example
3942    /// ```no_run
3943    /// # use google_cloud_developerconnect_v1::builder;
3944    /// use builder::insights_config_service::ListOperations;
3945    /// # tokio_test::block_on(async {
3946    /// use gax::paginator::ItemPaginator;
3947    ///
3948    /// let builder = prepare_request_builder();
3949    /// let mut items = builder.by_item();
3950    /// while let Some(result) = items.next().await {
3951    ///   let item = result?;
3952    /// }
3953    /// # gax::Result::<()>::Ok(()) });
3954    ///
3955    /// fn prepare_request_builder() -> ListOperations {
3956    ///   # panic!();
3957    ///   // ... details omitted ...
3958    /// }
3959    /// ```
3960    #[derive(Clone, Debug)]
3961    pub struct ListOperations(RequestBuilder<longrunning::model::ListOperationsRequest>);
3962
3963    impl ListOperations {
3964        pub(crate) fn new(
3965            stub: std::sync::Arc<dyn super::super::stub::dynamic::InsightsConfigService>,
3966        ) -> Self {
3967            Self(RequestBuilder::new(stub))
3968        }
3969
3970        /// Sets the full request, replacing any prior values.
3971        pub fn with_request<V: Into<longrunning::model::ListOperationsRequest>>(
3972            mut self,
3973            v: V,
3974        ) -> Self {
3975            self.0.request = v.into();
3976            self
3977        }
3978
3979        /// Sets all the options, replacing any prior values.
3980        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3981            self.0.options = v.into();
3982            self
3983        }
3984
3985        /// Sends the request.
3986        pub async fn send(self) -> Result<longrunning::model::ListOperationsResponse> {
3987            (*self.0.stub)
3988                .list_operations(self.0.request, self.0.options)
3989                .await
3990                .map(gax::response::Response::into_body)
3991        }
3992
3993        /// Streams each page in the collection.
3994        pub fn by_page(
3995            self,
3996        ) -> impl gax::paginator::Paginator<longrunning::model::ListOperationsResponse, gax::error::Error>
3997        {
3998            use std::clone::Clone;
3999            let token = self.0.request.page_token.clone();
4000            let execute = move |token: String| {
4001                let mut builder = self.clone();
4002                builder.0.request = builder.0.request.set_page_token(token);
4003                builder.send()
4004            };
4005            gax::paginator::internal::new_paginator(token, execute)
4006        }
4007
4008        /// Streams each item in the collection.
4009        pub fn by_item(
4010            self,
4011        ) -> impl gax::paginator::ItemPaginator<
4012            longrunning::model::ListOperationsResponse,
4013            gax::error::Error,
4014        > {
4015            use gax::paginator::Paginator;
4016            self.by_page().items()
4017        }
4018
4019        /// Sets the value of [name][longrunning::model::ListOperationsRequest::name].
4020        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4021            self.0.request.name = v.into();
4022            self
4023        }
4024
4025        /// Sets the value of [filter][longrunning::model::ListOperationsRequest::filter].
4026        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
4027            self.0.request.filter = v.into();
4028            self
4029        }
4030
4031        /// Sets the value of [page_size][longrunning::model::ListOperationsRequest::page_size].
4032        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
4033            self.0.request.page_size = v.into();
4034            self
4035        }
4036
4037        /// Sets the value of [page_token][longrunning::model::ListOperationsRequest::page_token].
4038        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
4039            self.0.request.page_token = v.into();
4040            self
4041        }
4042    }
4043
4044    #[doc(hidden)]
4045    impl gax::options::internal::RequestBuilder for ListOperations {
4046        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4047            &mut self.0.options
4048        }
4049    }
4050
4051    /// The request builder for [InsightsConfigService::get_operation][crate::client::InsightsConfigService::get_operation] calls.
4052    ///
4053    /// # Example
4054    /// ```no_run
4055    /// # use google_cloud_developerconnect_v1::builder;
4056    /// use builder::insights_config_service::GetOperation;
4057    /// # tokio_test::block_on(async {
4058    ///
4059    /// let builder = prepare_request_builder();
4060    /// let response = builder.send().await?;
4061    /// # gax::Result::<()>::Ok(()) });
4062    ///
4063    /// fn prepare_request_builder() -> GetOperation {
4064    ///   # panic!();
4065    ///   // ... details omitted ...
4066    /// }
4067    /// ```
4068    #[derive(Clone, Debug)]
4069    pub struct GetOperation(RequestBuilder<longrunning::model::GetOperationRequest>);
4070
4071    impl GetOperation {
4072        pub(crate) fn new(
4073            stub: std::sync::Arc<dyn super::super::stub::dynamic::InsightsConfigService>,
4074        ) -> Self {
4075            Self(RequestBuilder::new(stub))
4076        }
4077
4078        /// Sets the full request, replacing any prior values.
4079        pub fn with_request<V: Into<longrunning::model::GetOperationRequest>>(
4080            mut self,
4081            v: V,
4082        ) -> Self {
4083            self.0.request = v.into();
4084            self
4085        }
4086
4087        /// Sets all the options, replacing any prior values.
4088        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4089            self.0.options = v.into();
4090            self
4091        }
4092
4093        /// Sends the request.
4094        pub async fn send(self) -> Result<longrunning::model::Operation> {
4095            (*self.0.stub)
4096                .get_operation(self.0.request, self.0.options)
4097                .await
4098                .map(gax::response::Response::into_body)
4099        }
4100
4101        /// Sets the value of [name][longrunning::model::GetOperationRequest::name].
4102        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4103            self.0.request.name = v.into();
4104            self
4105        }
4106    }
4107
4108    #[doc(hidden)]
4109    impl gax::options::internal::RequestBuilder for GetOperation {
4110        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4111            &mut self.0.options
4112        }
4113    }
4114
4115    /// The request builder for [InsightsConfigService::delete_operation][crate::client::InsightsConfigService::delete_operation] calls.
4116    ///
4117    /// # Example
4118    /// ```no_run
4119    /// # use google_cloud_developerconnect_v1::builder;
4120    /// use builder::insights_config_service::DeleteOperation;
4121    /// # tokio_test::block_on(async {
4122    ///
4123    /// let builder = prepare_request_builder();
4124    /// let response = builder.send().await?;
4125    /// # gax::Result::<()>::Ok(()) });
4126    ///
4127    /// fn prepare_request_builder() -> DeleteOperation {
4128    ///   # panic!();
4129    ///   // ... details omitted ...
4130    /// }
4131    /// ```
4132    #[derive(Clone, Debug)]
4133    pub struct DeleteOperation(RequestBuilder<longrunning::model::DeleteOperationRequest>);
4134
4135    impl DeleteOperation {
4136        pub(crate) fn new(
4137            stub: std::sync::Arc<dyn super::super::stub::dynamic::InsightsConfigService>,
4138        ) -> Self {
4139            Self(RequestBuilder::new(stub))
4140        }
4141
4142        /// Sets the full request, replacing any prior values.
4143        pub fn with_request<V: Into<longrunning::model::DeleteOperationRequest>>(
4144            mut self,
4145            v: V,
4146        ) -> Self {
4147            self.0.request = v.into();
4148            self
4149        }
4150
4151        /// Sets all the options, replacing any prior values.
4152        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4153            self.0.options = v.into();
4154            self
4155        }
4156
4157        /// Sends the request.
4158        pub async fn send(self) -> Result<()> {
4159            (*self.0.stub)
4160                .delete_operation(self.0.request, self.0.options)
4161                .await
4162                .map(gax::response::Response::into_body)
4163        }
4164
4165        /// Sets the value of [name][longrunning::model::DeleteOperationRequest::name].
4166        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4167            self.0.request.name = v.into();
4168            self
4169        }
4170    }
4171
4172    #[doc(hidden)]
4173    impl gax::options::internal::RequestBuilder for DeleteOperation {
4174        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4175            &mut self.0.options
4176        }
4177    }
4178
4179    /// The request builder for [InsightsConfigService::cancel_operation][crate::client::InsightsConfigService::cancel_operation] calls.
4180    ///
4181    /// # Example
4182    /// ```no_run
4183    /// # use google_cloud_developerconnect_v1::builder;
4184    /// use builder::insights_config_service::CancelOperation;
4185    /// # tokio_test::block_on(async {
4186    ///
4187    /// let builder = prepare_request_builder();
4188    /// let response = builder.send().await?;
4189    /// # gax::Result::<()>::Ok(()) });
4190    ///
4191    /// fn prepare_request_builder() -> CancelOperation {
4192    ///   # panic!();
4193    ///   // ... details omitted ...
4194    /// }
4195    /// ```
4196    #[derive(Clone, Debug)]
4197    pub struct CancelOperation(RequestBuilder<longrunning::model::CancelOperationRequest>);
4198
4199    impl CancelOperation {
4200        pub(crate) fn new(
4201            stub: std::sync::Arc<dyn super::super::stub::dynamic::InsightsConfigService>,
4202        ) -> Self {
4203            Self(RequestBuilder::new(stub))
4204        }
4205
4206        /// Sets the full request, replacing any prior values.
4207        pub fn with_request<V: Into<longrunning::model::CancelOperationRequest>>(
4208            mut self,
4209            v: V,
4210        ) -> Self {
4211            self.0.request = v.into();
4212            self
4213        }
4214
4215        /// Sets all the options, replacing any prior values.
4216        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4217            self.0.options = v.into();
4218            self
4219        }
4220
4221        /// Sends the request.
4222        pub async fn send(self) -> Result<()> {
4223            (*self.0.stub)
4224                .cancel_operation(self.0.request, self.0.options)
4225                .await
4226                .map(gax::response::Response::into_body)
4227        }
4228
4229        /// Sets the value of [name][longrunning::model::CancelOperationRequest::name].
4230        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4231            self.0.request.name = v.into();
4232            self
4233        }
4234    }
4235
4236    #[doc(hidden)]
4237    impl gax::options::internal::RequestBuilder for CancelOperation {
4238        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4239            &mut self.0.options
4240        }
4241    }
4242}