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    use std::sync::Arc;
20
21    /// A builder for [DeveloperConnect][super::super::client::DeveloperConnect].
22    ///
23    /// ```
24    /// # tokio_test::block_on(async {
25    /// # use google_cloud_developerconnect_v1::*;
26    /// # use builder::developer_connect::ClientBuilder;
27    /// # use client::DeveloperConnect;
28    /// let builder : ClientBuilder = DeveloperConnect::builder();
29    /// let client = builder
30    ///     .with_endpoint("https://developerconnect.googleapis.com")
31    ///     .build().await?;
32    /// # gax::Result::<()>::Ok(()) });
33    /// ```
34    pub type ClientBuilder =
35        gax::client_builder::ClientBuilder<client::Factory, gaxi::options::Credentials>;
36
37    pub(crate) mod client {
38        use super::super::super::client::DeveloperConnect;
39        pub struct Factory;
40        impl gax::client_builder::internal::ClientFactory for Factory {
41            type Client = DeveloperConnect;
42            type Credentials = gaxi::options::Credentials;
43            async fn build(self, config: gaxi::options::ClientConfig) -> gax::Result<Self::Client> {
44                Self::Client::new(config).await
45            }
46        }
47    }
48
49    /// Common implementation for [super::super::client::DeveloperConnect] request builders.
50    #[derive(Clone, Debug)]
51    pub(crate) struct RequestBuilder<R: std::default::Default> {
52        stub: Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
53        request: R,
54        options: gax::options::RequestOptions,
55    }
56
57    impl<R> RequestBuilder<R>
58    where
59        R: std::default::Default,
60    {
61        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::DeveloperConnect>) -> Self {
62            Self {
63                stub,
64                request: R::default(),
65                options: gax::options::RequestOptions::default(),
66            }
67        }
68    }
69
70    /// The request builder for [DeveloperConnect::list_connections][super::super::client::DeveloperConnect::list_connections] calls.
71    #[derive(Clone, Debug)]
72    pub struct ListConnections(RequestBuilder<crate::model::ListConnectionsRequest>);
73
74    impl ListConnections {
75        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::DeveloperConnect>) -> Self {
76            Self(RequestBuilder::new(stub))
77        }
78
79        /// Sets the full request, replacing any prior values.
80        pub fn with_request<V: Into<crate::model::ListConnectionsRequest>>(mut self, v: V) -> Self {
81            self.0.request = v.into();
82            self
83        }
84
85        /// Sets all the options, replacing any prior values.
86        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
87            self.0.options = v.into();
88            self
89        }
90
91        /// Sends the request.
92        pub async fn send(self) -> Result<crate::model::ListConnectionsResponse> {
93            (*self.0.stub)
94                .list_connections(self.0.request, self.0.options)
95                .await
96                .map(gax::response::Response::into_body)
97        }
98
99        /// Streams the responses back.
100        pub async fn paginator(
101            self,
102        ) -> impl gax::paginator::Paginator<crate::model::ListConnectionsResponse, gax::error::Error>
103        {
104            use std::clone::Clone;
105            let token = self.0.request.page_token.clone();
106            let execute = move |token: String| {
107                let mut builder = self.clone();
108                builder.0.request = builder.0.request.set_page_token(token);
109                builder.send()
110            };
111            gax::paginator::internal::new_paginator(token, execute)
112        }
113
114        /// Sets the value of [parent][crate::model::ListConnectionsRequest::parent].
115        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
116            self.0.request.parent = v.into();
117            self
118        }
119
120        /// Sets the value of [page_size][crate::model::ListConnectionsRequest::page_size].
121        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
122            self.0.request.page_size = v.into();
123            self
124        }
125
126        /// Sets the value of [page_token][crate::model::ListConnectionsRequest::page_token].
127        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
128            self.0.request.page_token = v.into();
129            self
130        }
131
132        /// Sets the value of [filter][crate::model::ListConnectionsRequest::filter].
133        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
134            self.0.request.filter = v.into();
135            self
136        }
137
138        /// Sets the value of [order_by][crate::model::ListConnectionsRequest::order_by].
139        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
140            self.0.request.order_by = v.into();
141            self
142        }
143    }
144
145    #[doc(hidden)]
146    impl gax::options::internal::RequestBuilder for ListConnections {
147        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
148            &mut self.0.options
149        }
150    }
151
152    /// The request builder for [DeveloperConnect::get_connection][super::super::client::DeveloperConnect::get_connection] calls.
153    #[derive(Clone, Debug)]
154    pub struct GetConnection(RequestBuilder<crate::model::GetConnectionRequest>);
155
156    impl GetConnection {
157        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::DeveloperConnect>) -> Self {
158            Self(RequestBuilder::new(stub))
159        }
160
161        /// Sets the full request, replacing any prior values.
162        pub fn with_request<V: Into<crate::model::GetConnectionRequest>>(mut self, v: V) -> Self {
163            self.0.request = v.into();
164            self
165        }
166
167        /// Sets all the options, replacing any prior values.
168        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
169            self.0.options = v.into();
170            self
171        }
172
173        /// Sends the request.
174        pub async fn send(self) -> Result<crate::model::Connection> {
175            (*self.0.stub)
176                .get_connection(self.0.request, self.0.options)
177                .await
178                .map(gax::response::Response::into_body)
179        }
180
181        /// Sets the value of [name][crate::model::GetConnectionRequest::name].
182        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
183            self.0.request.name = v.into();
184            self
185        }
186    }
187
188    #[doc(hidden)]
189    impl gax::options::internal::RequestBuilder for GetConnection {
190        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
191            &mut self.0.options
192        }
193    }
194
195    /// The request builder for [DeveloperConnect::create_connection][super::super::client::DeveloperConnect::create_connection] calls.
196    #[derive(Clone, Debug)]
197    pub struct CreateConnection(RequestBuilder<crate::model::CreateConnectionRequest>);
198
199    impl CreateConnection {
200        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::DeveloperConnect>) -> Self {
201            Self(RequestBuilder::new(stub))
202        }
203
204        /// Sets the full request, replacing any prior values.
205        pub fn with_request<V: Into<crate::model::CreateConnectionRequest>>(
206            mut self,
207            v: V,
208        ) -> Self {
209            self.0.request = v.into();
210            self
211        }
212
213        /// Sets all the options, replacing any prior values.
214        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
215            self.0.options = v.into();
216            self
217        }
218
219        /// Sends the request.
220        ///
221        /// # Long running operations
222        ///
223        /// This starts, but does not poll, a longrunning operation. More information
224        /// on [create_connection][super::super::client::DeveloperConnect::create_connection].
225        pub async fn send(self) -> Result<longrunning::model::Operation> {
226            (*self.0.stub)
227                .create_connection(self.0.request, self.0.options)
228                .await
229                .map(gax::response::Response::into_body)
230        }
231
232        /// Creates a [Poller][lro::Poller] to work with `create_connection`.
233        pub fn poller(
234            self,
235        ) -> impl lro::Poller<crate::model::Connection, crate::model::OperationMetadata> {
236            type Operation =
237                lro::Operation<crate::model::Connection, crate::model::OperationMetadata>;
238            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
239            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
240
241            let stub = self.0.stub.clone();
242            let mut options = self.0.options.clone();
243            options.set_retry_policy(gax::retry_policy::NeverRetry);
244            let query = move |name| {
245                let stub = stub.clone();
246                let options = options.clone();
247                async {
248                    let op = GetOperation::new(stub)
249                        .set_name(name)
250                        .with_options(options)
251                        .send()
252                        .await?;
253                    Ok(Operation::new(op))
254                }
255            };
256
257            let start = move || async {
258                let op = self.send().await?;
259                Ok(Operation::new(op))
260            };
261
262            lro::new_poller(polling_error_policy, polling_backoff_policy, start, query)
263        }
264
265        /// Sets the value of [parent][crate::model::CreateConnectionRequest::parent].
266        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
267            self.0.request.parent = v.into();
268            self
269        }
270
271        /// Sets the value of [connection_id][crate::model::CreateConnectionRequest::connection_id].
272        pub fn set_connection_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
273            self.0.request.connection_id = v.into();
274            self
275        }
276
277        /// Sets the value of [connection][crate::model::CreateConnectionRequest::connection].
278        pub fn set_connection<T: Into<std::option::Option<crate::model::Connection>>>(
279            mut self,
280            v: T,
281        ) -> Self {
282            self.0.request.connection = v.into();
283            self
284        }
285
286        /// Sets the value of [request_id][crate::model::CreateConnectionRequest::request_id].
287        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
288            self.0.request.request_id = v.into();
289            self
290        }
291
292        /// Sets the value of [validate_only][crate::model::CreateConnectionRequest::validate_only].
293        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
294            self.0.request.validate_only = v.into();
295            self
296        }
297    }
298
299    #[doc(hidden)]
300    impl gax::options::internal::RequestBuilder for CreateConnection {
301        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
302            &mut self.0.options
303        }
304    }
305
306    /// The request builder for [DeveloperConnect::update_connection][super::super::client::DeveloperConnect::update_connection] calls.
307    #[derive(Clone, Debug)]
308    pub struct UpdateConnection(RequestBuilder<crate::model::UpdateConnectionRequest>);
309
310    impl UpdateConnection {
311        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::DeveloperConnect>) -> Self {
312            Self(RequestBuilder::new(stub))
313        }
314
315        /// Sets the full request, replacing any prior values.
316        pub fn with_request<V: Into<crate::model::UpdateConnectionRequest>>(
317            mut self,
318            v: V,
319        ) -> Self {
320            self.0.request = v.into();
321            self
322        }
323
324        /// Sets all the options, replacing any prior values.
325        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
326            self.0.options = v.into();
327            self
328        }
329
330        /// Sends the request.
331        ///
332        /// # Long running operations
333        ///
334        /// This starts, but does not poll, a longrunning operation. More information
335        /// on [update_connection][super::super::client::DeveloperConnect::update_connection].
336        pub async fn send(self) -> Result<longrunning::model::Operation> {
337            (*self.0.stub)
338                .update_connection(self.0.request, self.0.options)
339                .await
340                .map(gax::response::Response::into_body)
341        }
342
343        /// Creates a [Poller][lro::Poller] to work with `update_connection`.
344        pub fn poller(
345            self,
346        ) -> impl lro::Poller<crate::model::Connection, crate::model::OperationMetadata> {
347            type Operation =
348                lro::Operation<crate::model::Connection, crate::model::OperationMetadata>;
349            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
350            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
351
352            let stub = self.0.stub.clone();
353            let mut options = self.0.options.clone();
354            options.set_retry_policy(gax::retry_policy::NeverRetry);
355            let query = move |name| {
356                let stub = stub.clone();
357                let options = options.clone();
358                async {
359                    let op = GetOperation::new(stub)
360                        .set_name(name)
361                        .with_options(options)
362                        .send()
363                        .await?;
364                    Ok(Operation::new(op))
365                }
366            };
367
368            let start = move || async {
369                let op = self.send().await?;
370                Ok(Operation::new(op))
371            };
372
373            lro::new_poller(polling_error_policy, polling_backoff_policy, start, query)
374        }
375
376        /// Sets the value of [update_mask][crate::model::UpdateConnectionRequest::update_mask].
377        pub fn set_update_mask<T: Into<std::option::Option<wkt::FieldMask>>>(
378            mut self,
379            v: T,
380        ) -> Self {
381            self.0.request.update_mask = v.into();
382            self
383        }
384
385        /// Sets the value of [connection][crate::model::UpdateConnectionRequest::connection].
386        pub fn set_connection<T: Into<std::option::Option<crate::model::Connection>>>(
387            mut self,
388            v: T,
389        ) -> Self {
390            self.0.request.connection = v.into();
391            self
392        }
393
394        /// Sets the value of [request_id][crate::model::UpdateConnectionRequest::request_id].
395        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
396            self.0.request.request_id = v.into();
397            self
398        }
399
400        /// Sets the value of [allow_missing][crate::model::UpdateConnectionRequest::allow_missing].
401        pub fn set_allow_missing<T: Into<bool>>(mut self, v: T) -> Self {
402            self.0.request.allow_missing = v.into();
403            self
404        }
405
406        /// Sets the value of [validate_only][crate::model::UpdateConnectionRequest::validate_only].
407        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
408            self.0.request.validate_only = v.into();
409            self
410        }
411    }
412
413    #[doc(hidden)]
414    impl gax::options::internal::RequestBuilder for UpdateConnection {
415        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
416            &mut self.0.options
417        }
418    }
419
420    /// The request builder for [DeveloperConnect::delete_connection][super::super::client::DeveloperConnect::delete_connection] calls.
421    #[derive(Clone, Debug)]
422    pub struct DeleteConnection(RequestBuilder<crate::model::DeleteConnectionRequest>);
423
424    impl DeleteConnection {
425        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::DeveloperConnect>) -> Self {
426            Self(RequestBuilder::new(stub))
427        }
428
429        /// Sets the full request, replacing any prior values.
430        pub fn with_request<V: Into<crate::model::DeleteConnectionRequest>>(
431            mut self,
432            v: V,
433        ) -> Self {
434            self.0.request = v.into();
435            self
436        }
437
438        /// Sets all the options, replacing any prior values.
439        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
440            self.0.options = v.into();
441            self
442        }
443
444        /// Sends the request.
445        ///
446        /// # Long running operations
447        ///
448        /// This starts, but does not poll, a longrunning operation. More information
449        /// on [delete_connection][super::super::client::DeveloperConnect::delete_connection].
450        pub async fn send(self) -> Result<longrunning::model::Operation> {
451            (*self.0.stub)
452                .delete_connection(self.0.request, self.0.options)
453                .await
454                .map(gax::response::Response::into_body)
455        }
456
457        /// Creates a [Poller][lro::Poller] to work with `delete_connection`.
458        pub fn poller(self) -> impl lro::Poller<wkt::Empty, crate::model::OperationMetadata> {
459            type Operation = lro::Operation<wkt::Empty, crate::model::OperationMetadata>;
460            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
461            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
462
463            let stub = self.0.stub.clone();
464            let mut options = self.0.options.clone();
465            options.set_retry_policy(gax::retry_policy::NeverRetry);
466            let query = move |name| {
467                let stub = stub.clone();
468                let options = options.clone();
469                async {
470                    let op = GetOperation::new(stub)
471                        .set_name(name)
472                        .with_options(options)
473                        .send()
474                        .await?;
475                    Ok(Operation::new(op))
476                }
477            };
478
479            let start = move || async {
480                let op = self.send().await?;
481                Ok(Operation::new(op))
482            };
483
484            lro::new_poller(polling_error_policy, polling_backoff_policy, start, query)
485        }
486
487        /// Sets the value of [name][crate::model::DeleteConnectionRequest::name].
488        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
489            self.0.request.name = v.into();
490            self
491        }
492
493        /// Sets the value of [request_id][crate::model::DeleteConnectionRequest::request_id].
494        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
495            self.0.request.request_id = v.into();
496            self
497        }
498
499        /// Sets the value of [validate_only][crate::model::DeleteConnectionRequest::validate_only].
500        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
501            self.0.request.validate_only = v.into();
502            self
503        }
504
505        /// Sets the value of [etag][crate::model::DeleteConnectionRequest::etag].
506        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
507            self.0.request.etag = v.into();
508            self
509        }
510    }
511
512    #[doc(hidden)]
513    impl gax::options::internal::RequestBuilder for DeleteConnection {
514        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
515            &mut self.0.options
516        }
517    }
518
519    /// The request builder for [DeveloperConnect::create_git_repository_link][super::super::client::DeveloperConnect::create_git_repository_link] calls.
520    #[derive(Clone, Debug)]
521    pub struct CreateGitRepositoryLink(
522        RequestBuilder<crate::model::CreateGitRepositoryLinkRequest>,
523    );
524
525    impl CreateGitRepositoryLink {
526        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::DeveloperConnect>) -> Self {
527            Self(RequestBuilder::new(stub))
528        }
529
530        /// Sets the full request, replacing any prior values.
531        pub fn with_request<V: Into<crate::model::CreateGitRepositoryLinkRequest>>(
532            mut self,
533            v: V,
534        ) -> Self {
535            self.0.request = v.into();
536            self
537        }
538
539        /// Sets all the options, replacing any prior values.
540        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
541            self.0.options = v.into();
542            self
543        }
544
545        /// Sends the request.
546        ///
547        /// # Long running operations
548        ///
549        /// This starts, but does not poll, a longrunning operation. More information
550        /// on [create_git_repository_link][super::super::client::DeveloperConnect::create_git_repository_link].
551        pub async fn send(self) -> Result<longrunning::model::Operation> {
552            (*self.0.stub)
553                .create_git_repository_link(self.0.request, self.0.options)
554                .await
555                .map(gax::response::Response::into_body)
556        }
557
558        /// Creates a [Poller][lro::Poller] to work with `create_git_repository_link`.
559        pub fn poller(
560            self,
561        ) -> impl lro::Poller<crate::model::GitRepositoryLink, crate::model::OperationMetadata>
562        {
563            type Operation =
564                lro::Operation<crate::model::GitRepositoryLink, crate::model::OperationMetadata>;
565            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
566            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
567
568            let stub = self.0.stub.clone();
569            let mut options = self.0.options.clone();
570            options.set_retry_policy(gax::retry_policy::NeverRetry);
571            let query = move |name| {
572                let stub = stub.clone();
573                let options = options.clone();
574                async {
575                    let op = GetOperation::new(stub)
576                        .set_name(name)
577                        .with_options(options)
578                        .send()
579                        .await?;
580                    Ok(Operation::new(op))
581                }
582            };
583
584            let start = move || async {
585                let op = self.send().await?;
586                Ok(Operation::new(op))
587            };
588
589            lro::new_poller(polling_error_policy, polling_backoff_policy, start, query)
590        }
591
592        /// Sets the value of [parent][crate::model::CreateGitRepositoryLinkRequest::parent].
593        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
594            self.0.request.parent = v.into();
595            self
596        }
597
598        /// Sets the value of [git_repository_link][crate::model::CreateGitRepositoryLinkRequest::git_repository_link].
599        pub fn set_git_repository_link<
600            T: Into<std::option::Option<crate::model::GitRepositoryLink>>,
601        >(
602            mut self,
603            v: T,
604        ) -> Self {
605            self.0.request.git_repository_link = v.into();
606            self
607        }
608
609        /// Sets the value of [git_repository_link_id][crate::model::CreateGitRepositoryLinkRequest::git_repository_link_id].
610        pub fn set_git_repository_link_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
611            self.0.request.git_repository_link_id = v.into();
612            self
613        }
614
615        /// Sets the value of [request_id][crate::model::CreateGitRepositoryLinkRequest::request_id].
616        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
617            self.0.request.request_id = v.into();
618            self
619        }
620
621        /// Sets the value of [validate_only][crate::model::CreateGitRepositoryLinkRequest::validate_only].
622        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
623            self.0.request.validate_only = v.into();
624            self
625        }
626    }
627
628    #[doc(hidden)]
629    impl gax::options::internal::RequestBuilder for CreateGitRepositoryLink {
630        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
631            &mut self.0.options
632        }
633    }
634
635    /// The request builder for [DeveloperConnect::delete_git_repository_link][super::super::client::DeveloperConnect::delete_git_repository_link] calls.
636    #[derive(Clone, Debug)]
637    pub struct DeleteGitRepositoryLink(
638        RequestBuilder<crate::model::DeleteGitRepositoryLinkRequest>,
639    );
640
641    impl DeleteGitRepositoryLink {
642        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::DeveloperConnect>) -> Self {
643            Self(RequestBuilder::new(stub))
644        }
645
646        /// Sets the full request, replacing any prior values.
647        pub fn with_request<V: Into<crate::model::DeleteGitRepositoryLinkRequest>>(
648            mut self,
649            v: V,
650        ) -> Self {
651            self.0.request = v.into();
652            self
653        }
654
655        /// Sets all the options, replacing any prior values.
656        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
657            self.0.options = v.into();
658            self
659        }
660
661        /// Sends the request.
662        ///
663        /// # Long running operations
664        ///
665        /// This starts, but does not poll, a longrunning operation. More information
666        /// on [delete_git_repository_link][super::super::client::DeveloperConnect::delete_git_repository_link].
667        pub async fn send(self) -> Result<longrunning::model::Operation> {
668            (*self.0.stub)
669                .delete_git_repository_link(self.0.request, self.0.options)
670                .await
671                .map(gax::response::Response::into_body)
672        }
673
674        /// Creates a [Poller][lro::Poller] to work with `delete_git_repository_link`.
675        pub fn poller(self) -> impl lro::Poller<wkt::Empty, crate::model::OperationMetadata> {
676            type Operation = lro::Operation<wkt::Empty, crate::model::OperationMetadata>;
677            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
678            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
679
680            let stub = self.0.stub.clone();
681            let mut options = self.0.options.clone();
682            options.set_retry_policy(gax::retry_policy::NeverRetry);
683            let query = move |name| {
684                let stub = stub.clone();
685                let options = options.clone();
686                async {
687                    let op = GetOperation::new(stub)
688                        .set_name(name)
689                        .with_options(options)
690                        .send()
691                        .await?;
692                    Ok(Operation::new(op))
693                }
694            };
695
696            let start = move || async {
697                let op = self.send().await?;
698                Ok(Operation::new(op))
699            };
700
701            lro::new_poller(polling_error_policy, polling_backoff_policy, start, query)
702        }
703
704        /// Sets the value of [name][crate::model::DeleteGitRepositoryLinkRequest::name].
705        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
706            self.0.request.name = v.into();
707            self
708        }
709
710        /// Sets the value of [request_id][crate::model::DeleteGitRepositoryLinkRequest::request_id].
711        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
712            self.0.request.request_id = v.into();
713            self
714        }
715
716        /// Sets the value of [validate_only][crate::model::DeleteGitRepositoryLinkRequest::validate_only].
717        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
718            self.0.request.validate_only = v.into();
719            self
720        }
721
722        /// Sets the value of [etag][crate::model::DeleteGitRepositoryLinkRequest::etag].
723        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
724            self.0.request.etag = v.into();
725            self
726        }
727    }
728
729    #[doc(hidden)]
730    impl gax::options::internal::RequestBuilder for DeleteGitRepositoryLink {
731        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
732            &mut self.0.options
733        }
734    }
735
736    /// The request builder for [DeveloperConnect::list_git_repository_links][super::super::client::DeveloperConnect::list_git_repository_links] calls.
737    #[derive(Clone, Debug)]
738    pub struct ListGitRepositoryLinks(RequestBuilder<crate::model::ListGitRepositoryLinksRequest>);
739
740    impl ListGitRepositoryLinks {
741        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::DeveloperConnect>) -> Self {
742            Self(RequestBuilder::new(stub))
743        }
744
745        /// Sets the full request, replacing any prior values.
746        pub fn with_request<V: Into<crate::model::ListGitRepositoryLinksRequest>>(
747            mut self,
748            v: V,
749        ) -> Self {
750            self.0.request = v.into();
751            self
752        }
753
754        /// Sets all the options, replacing any prior values.
755        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
756            self.0.options = v.into();
757            self
758        }
759
760        /// Sends the request.
761        pub async fn send(self) -> Result<crate::model::ListGitRepositoryLinksResponse> {
762            (*self.0.stub)
763                .list_git_repository_links(self.0.request, self.0.options)
764                .await
765                .map(gax::response::Response::into_body)
766        }
767
768        /// Streams the responses back.
769        pub async fn paginator(
770            self,
771        ) -> impl gax::paginator::Paginator<
772            crate::model::ListGitRepositoryLinksResponse,
773            gax::error::Error,
774        > {
775            use std::clone::Clone;
776            let token = self.0.request.page_token.clone();
777            let execute = move |token: String| {
778                let mut builder = self.clone();
779                builder.0.request = builder.0.request.set_page_token(token);
780                builder.send()
781            };
782            gax::paginator::internal::new_paginator(token, execute)
783        }
784
785        /// Sets the value of [parent][crate::model::ListGitRepositoryLinksRequest::parent].
786        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
787            self.0.request.parent = v.into();
788            self
789        }
790
791        /// Sets the value of [page_size][crate::model::ListGitRepositoryLinksRequest::page_size].
792        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
793            self.0.request.page_size = v.into();
794            self
795        }
796
797        /// Sets the value of [page_token][crate::model::ListGitRepositoryLinksRequest::page_token].
798        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
799            self.0.request.page_token = v.into();
800            self
801        }
802
803        /// Sets the value of [filter][crate::model::ListGitRepositoryLinksRequest::filter].
804        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
805            self.0.request.filter = v.into();
806            self
807        }
808
809        /// Sets the value of [order_by][crate::model::ListGitRepositoryLinksRequest::order_by].
810        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
811            self.0.request.order_by = v.into();
812            self
813        }
814    }
815
816    #[doc(hidden)]
817    impl gax::options::internal::RequestBuilder for ListGitRepositoryLinks {
818        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
819            &mut self.0.options
820        }
821    }
822
823    /// The request builder for [DeveloperConnect::get_git_repository_link][super::super::client::DeveloperConnect::get_git_repository_link] calls.
824    #[derive(Clone, Debug)]
825    pub struct GetGitRepositoryLink(RequestBuilder<crate::model::GetGitRepositoryLinkRequest>);
826
827    impl GetGitRepositoryLink {
828        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::DeveloperConnect>) -> Self {
829            Self(RequestBuilder::new(stub))
830        }
831
832        /// Sets the full request, replacing any prior values.
833        pub fn with_request<V: Into<crate::model::GetGitRepositoryLinkRequest>>(
834            mut self,
835            v: V,
836        ) -> Self {
837            self.0.request = v.into();
838            self
839        }
840
841        /// Sets all the options, replacing any prior values.
842        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
843            self.0.options = v.into();
844            self
845        }
846
847        /// Sends the request.
848        pub async fn send(self) -> Result<crate::model::GitRepositoryLink> {
849            (*self.0.stub)
850                .get_git_repository_link(self.0.request, self.0.options)
851                .await
852                .map(gax::response::Response::into_body)
853        }
854
855        /// Sets the value of [name][crate::model::GetGitRepositoryLinkRequest::name].
856        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
857            self.0.request.name = v.into();
858            self
859        }
860    }
861
862    #[doc(hidden)]
863    impl gax::options::internal::RequestBuilder for GetGitRepositoryLink {
864        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
865            &mut self.0.options
866        }
867    }
868
869    /// The request builder for [DeveloperConnect::fetch_read_write_token][super::super::client::DeveloperConnect::fetch_read_write_token] calls.
870    #[derive(Clone, Debug)]
871    pub struct FetchReadWriteToken(RequestBuilder<crate::model::FetchReadWriteTokenRequest>);
872
873    impl FetchReadWriteToken {
874        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::DeveloperConnect>) -> Self {
875            Self(RequestBuilder::new(stub))
876        }
877
878        /// Sets the full request, replacing any prior values.
879        pub fn with_request<V: Into<crate::model::FetchReadWriteTokenRequest>>(
880            mut self,
881            v: V,
882        ) -> Self {
883            self.0.request = v.into();
884            self
885        }
886
887        /// Sets all the options, replacing any prior values.
888        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
889            self.0.options = v.into();
890            self
891        }
892
893        /// Sends the request.
894        pub async fn send(self) -> Result<crate::model::FetchReadWriteTokenResponse> {
895            (*self.0.stub)
896                .fetch_read_write_token(self.0.request, self.0.options)
897                .await
898                .map(gax::response::Response::into_body)
899        }
900
901        /// Sets the value of [git_repository_link][crate::model::FetchReadWriteTokenRequest::git_repository_link].
902        pub fn set_git_repository_link<T: Into<std::string::String>>(mut self, v: T) -> Self {
903            self.0.request.git_repository_link = v.into();
904            self
905        }
906    }
907
908    #[doc(hidden)]
909    impl gax::options::internal::RequestBuilder for FetchReadWriteToken {
910        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
911            &mut self.0.options
912        }
913    }
914
915    /// The request builder for [DeveloperConnect::fetch_read_token][super::super::client::DeveloperConnect::fetch_read_token] calls.
916    #[derive(Clone, Debug)]
917    pub struct FetchReadToken(RequestBuilder<crate::model::FetchReadTokenRequest>);
918
919    impl FetchReadToken {
920        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::DeveloperConnect>) -> Self {
921            Self(RequestBuilder::new(stub))
922        }
923
924        /// Sets the full request, replacing any prior values.
925        pub fn with_request<V: Into<crate::model::FetchReadTokenRequest>>(mut self, v: V) -> Self {
926            self.0.request = v.into();
927            self
928        }
929
930        /// Sets all the options, replacing any prior values.
931        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
932            self.0.options = v.into();
933            self
934        }
935
936        /// Sends the request.
937        pub async fn send(self) -> Result<crate::model::FetchReadTokenResponse> {
938            (*self.0.stub)
939                .fetch_read_token(self.0.request, self.0.options)
940                .await
941                .map(gax::response::Response::into_body)
942        }
943
944        /// Sets the value of [git_repository_link][crate::model::FetchReadTokenRequest::git_repository_link].
945        pub fn set_git_repository_link<T: Into<std::string::String>>(mut self, v: T) -> Self {
946            self.0.request.git_repository_link = v.into();
947            self
948        }
949    }
950
951    #[doc(hidden)]
952    impl gax::options::internal::RequestBuilder for FetchReadToken {
953        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
954            &mut self.0.options
955        }
956    }
957
958    /// The request builder for [DeveloperConnect::fetch_linkable_git_repositories][super::super::client::DeveloperConnect::fetch_linkable_git_repositories] calls.
959    #[derive(Clone, Debug)]
960    pub struct FetchLinkableGitRepositories(
961        RequestBuilder<crate::model::FetchLinkableGitRepositoriesRequest>,
962    );
963
964    impl FetchLinkableGitRepositories {
965        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::DeveloperConnect>) -> Self {
966            Self(RequestBuilder::new(stub))
967        }
968
969        /// Sets the full request, replacing any prior values.
970        pub fn with_request<V: Into<crate::model::FetchLinkableGitRepositoriesRequest>>(
971            mut self,
972            v: V,
973        ) -> Self {
974            self.0.request = v.into();
975            self
976        }
977
978        /// Sets all the options, replacing any prior values.
979        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
980            self.0.options = v.into();
981            self
982        }
983
984        /// Sends the request.
985        pub async fn send(self) -> Result<crate::model::FetchLinkableGitRepositoriesResponse> {
986            (*self.0.stub)
987                .fetch_linkable_git_repositories(self.0.request, self.0.options)
988                .await
989                .map(gax::response::Response::into_body)
990        }
991
992        /// Streams the responses back.
993        pub async fn paginator(
994            self,
995        ) -> impl gax::paginator::Paginator<
996            crate::model::FetchLinkableGitRepositoriesResponse,
997            gax::error::Error,
998        > {
999            use std::clone::Clone;
1000            let token = self.0.request.page_token.clone();
1001            let execute = move |token: String| {
1002                let mut builder = self.clone();
1003                builder.0.request = builder.0.request.set_page_token(token);
1004                builder.send()
1005            };
1006            gax::paginator::internal::new_paginator(token, execute)
1007        }
1008
1009        /// Sets the value of [connection][crate::model::FetchLinkableGitRepositoriesRequest::connection].
1010        pub fn set_connection<T: Into<std::string::String>>(mut self, v: T) -> Self {
1011            self.0.request.connection = v.into();
1012            self
1013        }
1014
1015        /// Sets the value of [page_size][crate::model::FetchLinkableGitRepositoriesRequest::page_size].
1016        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1017            self.0.request.page_size = v.into();
1018            self
1019        }
1020
1021        /// Sets the value of [page_token][crate::model::FetchLinkableGitRepositoriesRequest::page_token].
1022        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1023            self.0.request.page_token = v.into();
1024            self
1025        }
1026    }
1027
1028    #[doc(hidden)]
1029    impl gax::options::internal::RequestBuilder for FetchLinkableGitRepositories {
1030        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1031            &mut self.0.options
1032        }
1033    }
1034
1035    /// The request builder for [DeveloperConnect::fetch_git_hub_installations][super::super::client::DeveloperConnect::fetch_git_hub_installations] calls.
1036    #[derive(Clone, Debug)]
1037    pub struct FetchGitHubInstallations(
1038        RequestBuilder<crate::model::FetchGitHubInstallationsRequest>,
1039    );
1040
1041    impl FetchGitHubInstallations {
1042        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::DeveloperConnect>) -> Self {
1043            Self(RequestBuilder::new(stub))
1044        }
1045
1046        /// Sets the full request, replacing any prior values.
1047        pub fn with_request<V: Into<crate::model::FetchGitHubInstallationsRequest>>(
1048            mut self,
1049            v: V,
1050        ) -> Self {
1051            self.0.request = v.into();
1052            self
1053        }
1054
1055        /// Sets all the options, replacing any prior values.
1056        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1057            self.0.options = v.into();
1058            self
1059        }
1060
1061        /// Sends the request.
1062        pub async fn send(self) -> Result<crate::model::FetchGitHubInstallationsResponse> {
1063            (*self.0.stub)
1064                .fetch_git_hub_installations(self.0.request, self.0.options)
1065                .await
1066                .map(gax::response::Response::into_body)
1067        }
1068
1069        /// Sets the value of [connection][crate::model::FetchGitHubInstallationsRequest::connection].
1070        pub fn set_connection<T: Into<std::string::String>>(mut self, v: T) -> Self {
1071            self.0.request.connection = v.into();
1072            self
1073        }
1074    }
1075
1076    #[doc(hidden)]
1077    impl gax::options::internal::RequestBuilder for FetchGitHubInstallations {
1078        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1079            &mut self.0.options
1080        }
1081    }
1082
1083    /// The request builder for [DeveloperConnect::fetch_git_refs][super::super::client::DeveloperConnect::fetch_git_refs] calls.
1084    #[derive(Clone, Debug)]
1085    pub struct FetchGitRefs(RequestBuilder<crate::model::FetchGitRefsRequest>);
1086
1087    impl FetchGitRefs {
1088        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::DeveloperConnect>) -> Self {
1089            Self(RequestBuilder::new(stub))
1090        }
1091
1092        /// Sets the full request, replacing any prior values.
1093        pub fn with_request<V: Into<crate::model::FetchGitRefsRequest>>(mut self, v: V) -> Self {
1094            self.0.request = v.into();
1095            self
1096        }
1097
1098        /// Sets all the options, replacing any prior values.
1099        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1100            self.0.options = v.into();
1101            self
1102        }
1103
1104        /// Sends the request.
1105        pub async fn send(self) -> Result<crate::model::FetchGitRefsResponse> {
1106            (*self.0.stub)
1107                .fetch_git_refs(self.0.request, self.0.options)
1108                .await
1109                .map(gax::response::Response::into_body)
1110        }
1111
1112        /// Sets the value of [git_repository_link][crate::model::FetchGitRefsRequest::git_repository_link].
1113        pub fn set_git_repository_link<T: Into<std::string::String>>(mut self, v: T) -> Self {
1114            self.0.request.git_repository_link = v.into();
1115            self
1116        }
1117
1118        /// Sets the value of [ref_type][crate::model::FetchGitRefsRequest::ref_type].
1119        pub fn set_ref_type<T: Into<crate::model::fetch_git_refs_request::RefType>>(
1120            mut self,
1121            v: T,
1122        ) -> Self {
1123            self.0.request.ref_type = v.into();
1124            self
1125        }
1126
1127        /// Sets the value of [page_size][crate::model::FetchGitRefsRequest::page_size].
1128        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1129            self.0.request.page_size = v.into();
1130            self
1131        }
1132
1133        /// Sets the value of [page_token][crate::model::FetchGitRefsRequest::page_token].
1134        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1135            self.0.request.page_token = v.into();
1136            self
1137        }
1138    }
1139
1140    #[doc(hidden)]
1141    impl gax::options::internal::RequestBuilder for FetchGitRefs {
1142        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1143            &mut self.0.options
1144        }
1145    }
1146
1147    /// The request builder for [DeveloperConnect::list_locations][super::super::client::DeveloperConnect::list_locations] calls.
1148    #[derive(Clone, Debug)]
1149    pub struct ListLocations(RequestBuilder<location::model::ListLocationsRequest>);
1150
1151    impl ListLocations {
1152        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::DeveloperConnect>) -> Self {
1153            Self(RequestBuilder::new(stub))
1154        }
1155
1156        /// Sets the full request, replacing any prior values.
1157        pub fn with_request<V: Into<location::model::ListLocationsRequest>>(
1158            mut self,
1159            v: V,
1160        ) -> Self {
1161            self.0.request = v.into();
1162            self
1163        }
1164
1165        /// Sets all the options, replacing any prior values.
1166        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1167            self.0.options = v.into();
1168            self
1169        }
1170
1171        /// Sends the request.
1172        pub async fn send(self) -> Result<location::model::ListLocationsResponse> {
1173            (*self.0.stub)
1174                .list_locations(self.0.request, self.0.options)
1175                .await
1176                .map(gax::response::Response::into_body)
1177        }
1178
1179        /// Streams the responses back.
1180        pub async fn paginator(
1181            self,
1182        ) -> impl gax::paginator::Paginator<location::model::ListLocationsResponse, gax::error::Error>
1183        {
1184            use std::clone::Clone;
1185            let token = self.0.request.page_token.clone();
1186            let execute = move |token: String| {
1187                let mut builder = self.clone();
1188                builder.0.request = builder.0.request.set_page_token(token);
1189                builder.send()
1190            };
1191            gax::paginator::internal::new_paginator(token, execute)
1192        }
1193
1194        /// Sets the value of [name][location::model::ListLocationsRequest::name].
1195        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1196            self.0.request.name = v.into();
1197            self
1198        }
1199
1200        /// Sets the value of [filter][location::model::ListLocationsRequest::filter].
1201        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
1202            self.0.request.filter = v.into();
1203            self
1204        }
1205
1206        /// Sets the value of [page_size][location::model::ListLocationsRequest::page_size].
1207        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1208            self.0.request.page_size = v.into();
1209            self
1210        }
1211
1212        /// Sets the value of [page_token][location::model::ListLocationsRequest::page_token].
1213        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1214            self.0.request.page_token = v.into();
1215            self
1216        }
1217    }
1218
1219    #[doc(hidden)]
1220    impl gax::options::internal::RequestBuilder for ListLocations {
1221        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1222            &mut self.0.options
1223        }
1224    }
1225
1226    /// The request builder for [DeveloperConnect::get_location][super::super::client::DeveloperConnect::get_location] calls.
1227    #[derive(Clone, Debug)]
1228    pub struct GetLocation(RequestBuilder<location::model::GetLocationRequest>);
1229
1230    impl GetLocation {
1231        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::DeveloperConnect>) -> Self {
1232            Self(RequestBuilder::new(stub))
1233        }
1234
1235        /// Sets the full request, replacing any prior values.
1236        pub fn with_request<V: Into<location::model::GetLocationRequest>>(mut self, v: V) -> Self {
1237            self.0.request = v.into();
1238            self
1239        }
1240
1241        /// Sets all the options, replacing any prior values.
1242        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1243            self.0.options = v.into();
1244            self
1245        }
1246
1247        /// Sends the request.
1248        pub async fn send(self) -> Result<location::model::Location> {
1249            (*self.0.stub)
1250                .get_location(self.0.request, self.0.options)
1251                .await
1252                .map(gax::response::Response::into_body)
1253        }
1254
1255        /// Sets the value of [name][location::model::GetLocationRequest::name].
1256        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1257            self.0.request.name = v.into();
1258            self
1259        }
1260    }
1261
1262    #[doc(hidden)]
1263    impl gax::options::internal::RequestBuilder for GetLocation {
1264        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1265            &mut self.0.options
1266        }
1267    }
1268
1269    /// The request builder for [DeveloperConnect::list_operations][super::super::client::DeveloperConnect::list_operations] calls.
1270    #[derive(Clone, Debug)]
1271    pub struct ListOperations(RequestBuilder<longrunning::model::ListOperationsRequest>);
1272
1273    impl ListOperations {
1274        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::DeveloperConnect>) -> Self {
1275            Self(RequestBuilder::new(stub))
1276        }
1277
1278        /// Sets the full request, replacing any prior values.
1279        pub fn with_request<V: Into<longrunning::model::ListOperationsRequest>>(
1280            mut self,
1281            v: V,
1282        ) -> Self {
1283            self.0.request = v.into();
1284            self
1285        }
1286
1287        /// Sets all the options, replacing any prior values.
1288        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1289            self.0.options = v.into();
1290            self
1291        }
1292
1293        /// Sends the request.
1294        pub async fn send(self) -> Result<longrunning::model::ListOperationsResponse> {
1295            (*self.0.stub)
1296                .list_operations(self.0.request, self.0.options)
1297                .await
1298                .map(gax::response::Response::into_body)
1299        }
1300
1301        /// Streams the responses back.
1302        pub async fn paginator(
1303            self,
1304        ) -> impl gax::paginator::Paginator<longrunning::model::ListOperationsResponse, gax::error::Error>
1305        {
1306            use std::clone::Clone;
1307            let token = self.0.request.page_token.clone();
1308            let execute = move |token: String| {
1309                let mut builder = self.clone();
1310                builder.0.request = builder.0.request.set_page_token(token);
1311                builder.send()
1312            };
1313            gax::paginator::internal::new_paginator(token, execute)
1314        }
1315
1316        /// Sets the value of [name][longrunning::model::ListOperationsRequest::name].
1317        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1318            self.0.request.name = v.into();
1319            self
1320        }
1321
1322        /// Sets the value of [filter][longrunning::model::ListOperationsRequest::filter].
1323        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
1324            self.0.request.filter = v.into();
1325            self
1326        }
1327
1328        /// Sets the value of [page_size][longrunning::model::ListOperationsRequest::page_size].
1329        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1330            self.0.request.page_size = v.into();
1331            self
1332        }
1333
1334        /// Sets the value of [page_token][longrunning::model::ListOperationsRequest::page_token].
1335        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1336            self.0.request.page_token = v.into();
1337            self
1338        }
1339    }
1340
1341    #[doc(hidden)]
1342    impl gax::options::internal::RequestBuilder for ListOperations {
1343        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1344            &mut self.0.options
1345        }
1346    }
1347
1348    /// The request builder for [DeveloperConnect::get_operation][super::super::client::DeveloperConnect::get_operation] calls.
1349    #[derive(Clone, Debug)]
1350    pub struct GetOperation(RequestBuilder<longrunning::model::GetOperationRequest>);
1351
1352    impl GetOperation {
1353        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::DeveloperConnect>) -> Self {
1354            Self(RequestBuilder::new(stub))
1355        }
1356
1357        /// Sets the full request, replacing any prior values.
1358        pub fn with_request<V: Into<longrunning::model::GetOperationRequest>>(
1359            mut self,
1360            v: V,
1361        ) -> Self {
1362            self.0.request = v.into();
1363            self
1364        }
1365
1366        /// Sets all the options, replacing any prior values.
1367        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1368            self.0.options = v.into();
1369            self
1370        }
1371
1372        /// Sends the request.
1373        pub async fn send(self) -> Result<longrunning::model::Operation> {
1374            (*self.0.stub)
1375                .get_operation(self.0.request, self.0.options)
1376                .await
1377                .map(gax::response::Response::into_body)
1378        }
1379
1380        /// Sets the value of [name][longrunning::model::GetOperationRequest::name].
1381        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1382            self.0.request.name = v.into();
1383            self
1384        }
1385    }
1386
1387    #[doc(hidden)]
1388    impl gax::options::internal::RequestBuilder for GetOperation {
1389        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1390            &mut self.0.options
1391        }
1392    }
1393
1394    /// The request builder for [DeveloperConnect::delete_operation][super::super::client::DeveloperConnect::delete_operation] calls.
1395    #[derive(Clone, Debug)]
1396    pub struct DeleteOperation(RequestBuilder<longrunning::model::DeleteOperationRequest>);
1397
1398    impl DeleteOperation {
1399        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::DeveloperConnect>) -> Self {
1400            Self(RequestBuilder::new(stub))
1401        }
1402
1403        /// Sets the full request, replacing any prior values.
1404        pub fn with_request<V: Into<longrunning::model::DeleteOperationRequest>>(
1405            mut self,
1406            v: V,
1407        ) -> Self {
1408            self.0.request = v.into();
1409            self
1410        }
1411
1412        /// Sets all the options, replacing any prior values.
1413        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1414            self.0.options = v.into();
1415            self
1416        }
1417
1418        /// Sends the request.
1419        pub async fn send(self) -> Result<()> {
1420            (*self.0.stub)
1421                .delete_operation(self.0.request, self.0.options)
1422                .await
1423                .map(gax::response::Response::into_body)
1424        }
1425
1426        /// Sets the value of [name][longrunning::model::DeleteOperationRequest::name].
1427        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1428            self.0.request.name = v.into();
1429            self
1430        }
1431    }
1432
1433    #[doc(hidden)]
1434    impl gax::options::internal::RequestBuilder for DeleteOperation {
1435        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1436            &mut self.0.options
1437        }
1438    }
1439
1440    /// The request builder for [DeveloperConnect::cancel_operation][super::super::client::DeveloperConnect::cancel_operation] calls.
1441    #[derive(Clone, Debug)]
1442    pub struct CancelOperation(RequestBuilder<longrunning::model::CancelOperationRequest>);
1443
1444    impl CancelOperation {
1445        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::DeveloperConnect>) -> Self {
1446            Self(RequestBuilder::new(stub))
1447        }
1448
1449        /// Sets the full request, replacing any prior values.
1450        pub fn with_request<V: Into<longrunning::model::CancelOperationRequest>>(
1451            mut self,
1452            v: V,
1453        ) -> Self {
1454            self.0.request = v.into();
1455            self
1456        }
1457
1458        /// Sets all the options, replacing any prior values.
1459        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1460            self.0.options = v.into();
1461            self
1462        }
1463
1464        /// Sends the request.
1465        pub async fn send(self) -> Result<()> {
1466            (*self.0.stub)
1467                .cancel_operation(self.0.request, self.0.options)
1468                .await
1469                .map(gax::response::Response::into_body)
1470        }
1471
1472        /// Sets the value of [name][longrunning::model::CancelOperationRequest::name].
1473        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1474            self.0.request.name = v.into();
1475            self
1476        }
1477    }
1478
1479    #[doc(hidden)]
1480    impl gax::options::internal::RequestBuilder for CancelOperation {
1481        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1482            &mut self.0.options
1483        }
1484    }
1485}