Skip to main content

google_cloud_developerconnect_v1/
builder.rs

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