Skip to main content

google_cloud_developerconnect_v1/
builder.rs

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