google_cloud_developerconnect_v1/
builder.rs

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