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