Skip to main content

google_cloud_developerconnect_v1/
builder.rs

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