google_cloud_gsuiteaddons_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 g_suite_add_ons {
18    use crate::Result;
19
20    /// A builder for [GSuiteAddOns][crate::client::GSuiteAddOns].
21    ///
22    /// ```
23    /// # tokio_test::block_on(async {
24    /// # use google_cloud_gsuiteaddons_v1::*;
25    /// # use builder::g_suite_add_ons::ClientBuilder;
26    /// # use client::GSuiteAddOns;
27    /// let builder : ClientBuilder = GSuiteAddOns::builder();
28    /// let client = builder
29    ///     .with_endpoint("https://gsuiteaddons.googleapis.com")
30    ///     .build().await?;
31    /// # gax::client_builder::Result::<()>::Ok(()) });
32    /// ```
33    pub type ClientBuilder =
34        gax::client_builder::ClientBuilder<client::Factory, gaxi::options::Credentials>;
35
36    pub(crate) mod client {
37        use super::super::super::client::GSuiteAddOns;
38        pub struct Factory;
39        impl gax::client_builder::internal::ClientFactory for Factory {
40            type Client = GSuiteAddOns;
41            type Credentials = gaxi::options::Credentials;
42            async fn build(
43                self,
44                config: gaxi::options::ClientConfig,
45            ) -> gax::client_builder::Result<Self::Client> {
46                Self::Client::new(config).await
47            }
48        }
49    }
50
51    /// Common implementation for [crate::client::GSuiteAddOns] request builders.
52    #[derive(Clone, Debug)]
53    pub(crate) struct RequestBuilder<R: std::default::Default> {
54        stub: std::sync::Arc<dyn super::super::stub::dynamic::GSuiteAddOns>,
55        request: R,
56        options: gax::options::RequestOptions,
57    }
58
59    impl<R> RequestBuilder<R>
60    where
61        R: std::default::Default,
62    {
63        pub(crate) fn new(
64            stub: std::sync::Arc<dyn super::super::stub::dynamic::GSuiteAddOns>,
65        ) -> Self {
66            Self {
67                stub,
68                request: R::default(),
69                options: gax::options::RequestOptions::default(),
70            }
71        }
72    }
73
74    /// The request builder for [GSuiteAddOns::get_authorization][crate::client::GSuiteAddOns::get_authorization] calls.
75    ///
76    /// # Example
77    /// ```no_run
78    /// # use google_cloud_gsuiteaddons_v1::builder;
79    /// use builder::g_suite_add_ons::GetAuthorization;
80    /// # tokio_test::block_on(async {
81    ///
82    /// let builder = prepare_request_builder();
83    /// let response = builder.send().await?;
84    /// # gax::Result::<()>::Ok(()) });
85    ///
86    /// fn prepare_request_builder() -> GetAuthorization {
87    ///   # panic!();
88    ///   // ... details omitted ...
89    /// }
90    /// ```
91    #[derive(Clone, Debug)]
92    pub struct GetAuthorization(RequestBuilder<crate::model::GetAuthorizationRequest>);
93
94    impl GetAuthorization {
95        pub(crate) fn new(
96            stub: std::sync::Arc<dyn super::super::stub::dynamic::GSuiteAddOns>,
97        ) -> Self {
98            Self(RequestBuilder::new(stub))
99        }
100
101        /// Sets the full request, replacing any prior values.
102        pub fn with_request<V: Into<crate::model::GetAuthorizationRequest>>(
103            mut self,
104            v: V,
105        ) -> Self {
106            self.0.request = v.into();
107            self
108        }
109
110        /// Sets all the options, replacing any prior values.
111        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
112            self.0.options = v.into();
113            self
114        }
115
116        /// Sends the request.
117        pub async fn send(self) -> Result<crate::model::Authorization> {
118            (*self.0.stub)
119                .get_authorization(self.0.request, self.0.options)
120                .await
121                .map(gax::response::Response::into_body)
122        }
123
124        /// Sets the value of [name][crate::model::GetAuthorizationRequest::name].
125        ///
126        /// This is a **required** field for requests.
127        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
128            self.0.request.name = v.into();
129            self
130        }
131    }
132
133    #[doc(hidden)]
134    impl gax::options::internal::RequestBuilder for GetAuthorization {
135        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
136            &mut self.0.options
137        }
138    }
139
140    /// The request builder for [GSuiteAddOns::create_deployment][crate::client::GSuiteAddOns::create_deployment] calls.
141    ///
142    /// # Example
143    /// ```no_run
144    /// # use google_cloud_gsuiteaddons_v1::builder;
145    /// use builder::g_suite_add_ons::CreateDeployment;
146    /// # tokio_test::block_on(async {
147    ///
148    /// let builder = prepare_request_builder();
149    /// let response = builder.send().await?;
150    /// # gax::Result::<()>::Ok(()) });
151    ///
152    /// fn prepare_request_builder() -> CreateDeployment {
153    ///   # panic!();
154    ///   // ... details omitted ...
155    /// }
156    /// ```
157    #[derive(Clone, Debug)]
158    pub struct CreateDeployment(RequestBuilder<crate::model::CreateDeploymentRequest>);
159
160    impl CreateDeployment {
161        pub(crate) fn new(
162            stub: std::sync::Arc<dyn super::super::stub::dynamic::GSuiteAddOns>,
163        ) -> Self {
164            Self(RequestBuilder::new(stub))
165        }
166
167        /// Sets the full request, replacing any prior values.
168        pub fn with_request<V: Into<crate::model::CreateDeploymentRequest>>(
169            mut self,
170            v: V,
171        ) -> Self {
172            self.0.request = v.into();
173            self
174        }
175
176        /// Sets all the options, replacing any prior values.
177        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
178            self.0.options = v.into();
179            self
180        }
181
182        /// Sends the request.
183        pub async fn send(self) -> Result<crate::model::Deployment> {
184            (*self.0.stub)
185                .create_deployment(self.0.request, self.0.options)
186                .await
187                .map(gax::response::Response::into_body)
188        }
189
190        /// Sets the value of [parent][crate::model::CreateDeploymentRequest::parent].
191        ///
192        /// This is a **required** field for requests.
193        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
194            self.0.request.parent = v.into();
195            self
196        }
197
198        /// Sets the value of [deployment_id][crate::model::CreateDeploymentRequest::deployment_id].
199        ///
200        /// This is a **required** field for requests.
201        pub fn set_deployment_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
202            self.0.request.deployment_id = v.into();
203            self
204        }
205
206        /// Sets the value of [deployment][crate::model::CreateDeploymentRequest::deployment].
207        ///
208        /// This is a **required** field for requests.
209        pub fn set_deployment<T>(mut self, v: T) -> Self
210        where
211            T: std::convert::Into<crate::model::Deployment>,
212        {
213            self.0.request.deployment = std::option::Option::Some(v.into());
214            self
215        }
216
217        /// Sets or clears the value of [deployment][crate::model::CreateDeploymentRequest::deployment].
218        ///
219        /// This is a **required** field for requests.
220        pub fn set_or_clear_deployment<T>(mut self, v: std::option::Option<T>) -> Self
221        where
222            T: std::convert::Into<crate::model::Deployment>,
223        {
224            self.0.request.deployment = v.map(|x| x.into());
225            self
226        }
227    }
228
229    #[doc(hidden)]
230    impl gax::options::internal::RequestBuilder for CreateDeployment {
231        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
232            &mut self.0.options
233        }
234    }
235
236    /// The request builder for [GSuiteAddOns::replace_deployment][crate::client::GSuiteAddOns::replace_deployment] calls.
237    ///
238    /// # Example
239    /// ```no_run
240    /// # use google_cloud_gsuiteaddons_v1::builder;
241    /// use builder::g_suite_add_ons::ReplaceDeployment;
242    /// # tokio_test::block_on(async {
243    ///
244    /// let builder = prepare_request_builder();
245    /// let response = builder.send().await?;
246    /// # gax::Result::<()>::Ok(()) });
247    ///
248    /// fn prepare_request_builder() -> ReplaceDeployment {
249    ///   # panic!();
250    ///   // ... details omitted ...
251    /// }
252    /// ```
253    #[derive(Clone, Debug)]
254    pub struct ReplaceDeployment(RequestBuilder<crate::model::ReplaceDeploymentRequest>);
255
256    impl ReplaceDeployment {
257        pub(crate) fn new(
258            stub: std::sync::Arc<dyn super::super::stub::dynamic::GSuiteAddOns>,
259        ) -> Self {
260            Self(RequestBuilder::new(stub))
261        }
262
263        /// Sets the full request, replacing any prior values.
264        pub fn with_request<V: Into<crate::model::ReplaceDeploymentRequest>>(
265            mut self,
266            v: V,
267        ) -> Self {
268            self.0.request = v.into();
269            self
270        }
271
272        /// Sets all the options, replacing any prior values.
273        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
274            self.0.options = v.into();
275            self
276        }
277
278        /// Sends the request.
279        pub async fn send(self) -> Result<crate::model::Deployment> {
280            (*self.0.stub)
281                .replace_deployment(self.0.request, self.0.options)
282                .await
283                .map(gax::response::Response::into_body)
284        }
285
286        /// Sets the value of [deployment][crate::model::ReplaceDeploymentRequest::deployment].
287        ///
288        /// This is a **required** field for requests.
289        pub fn set_deployment<T>(mut self, v: T) -> Self
290        where
291            T: std::convert::Into<crate::model::Deployment>,
292        {
293            self.0.request.deployment = std::option::Option::Some(v.into());
294            self
295        }
296
297        /// Sets or clears the value of [deployment][crate::model::ReplaceDeploymentRequest::deployment].
298        ///
299        /// This is a **required** field for requests.
300        pub fn set_or_clear_deployment<T>(mut self, v: std::option::Option<T>) -> Self
301        where
302            T: std::convert::Into<crate::model::Deployment>,
303        {
304            self.0.request.deployment = v.map(|x| x.into());
305            self
306        }
307    }
308
309    #[doc(hidden)]
310    impl gax::options::internal::RequestBuilder for ReplaceDeployment {
311        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
312            &mut self.0.options
313        }
314    }
315
316    /// The request builder for [GSuiteAddOns::get_deployment][crate::client::GSuiteAddOns::get_deployment] calls.
317    ///
318    /// # Example
319    /// ```no_run
320    /// # use google_cloud_gsuiteaddons_v1::builder;
321    /// use builder::g_suite_add_ons::GetDeployment;
322    /// # tokio_test::block_on(async {
323    ///
324    /// let builder = prepare_request_builder();
325    /// let response = builder.send().await?;
326    /// # gax::Result::<()>::Ok(()) });
327    ///
328    /// fn prepare_request_builder() -> GetDeployment {
329    ///   # panic!();
330    ///   // ... details omitted ...
331    /// }
332    /// ```
333    #[derive(Clone, Debug)]
334    pub struct GetDeployment(RequestBuilder<crate::model::GetDeploymentRequest>);
335
336    impl GetDeployment {
337        pub(crate) fn new(
338            stub: std::sync::Arc<dyn super::super::stub::dynamic::GSuiteAddOns>,
339        ) -> Self {
340            Self(RequestBuilder::new(stub))
341        }
342
343        /// Sets the full request, replacing any prior values.
344        pub fn with_request<V: Into<crate::model::GetDeploymentRequest>>(mut self, v: V) -> Self {
345            self.0.request = v.into();
346            self
347        }
348
349        /// Sets all the options, replacing any prior values.
350        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
351            self.0.options = v.into();
352            self
353        }
354
355        /// Sends the request.
356        pub async fn send(self) -> Result<crate::model::Deployment> {
357            (*self.0.stub)
358                .get_deployment(self.0.request, self.0.options)
359                .await
360                .map(gax::response::Response::into_body)
361        }
362
363        /// Sets the value of [name][crate::model::GetDeploymentRequest::name].
364        ///
365        /// This is a **required** field for requests.
366        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
367            self.0.request.name = v.into();
368            self
369        }
370    }
371
372    #[doc(hidden)]
373    impl gax::options::internal::RequestBuilder for GetDeployment {
374        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
375            &mut self.0.options
376        }
377    }
378
379    /// The request builder for [GSuiteAddOns::list_deployments][crate::client::GSuiteAddOns::list_deployments] calls.
380    ///
381    /// # Example
382    /// ```no_run
383    /// # use google_cloud_gsuiteaddons_v1::builder;
384    /// use builder::g_suite_add_ons::ListDeployments;
385    /// # tokio_test::block_on(async {
386    /// use gax::paginator::ItemPaginator;
387    ///
388    /// let builder = prepare_request_builder();
389    /// let mut items = builder.by_item();
390    /// while let Some(result) = items.next().await {
391    ///   let item = result?;
392    /// }
393    /// # gax::Result::<()>::Ok(()) });
394    ///
395    /// fn prepare_request_builder() -> ListDeployments {
396    ///   # panic!();
397    ///   // ... details omitted ...
398    /// }
399    /// ```
400    #[derive(Clone, Debug)]
401    pub struct ListDeployments(RequestBuilder<crate::model::ListDeploymentsRequest>);
402
403    impl ListDeployments {
404        pub(crate) fn new(
405            stub: std::sync::Arc<dyn super::super::stub::dynamic::GSuiteAddOns>,
406        ) -> Self {
407            Self(RequestBuilder::new(stub))
408        }
409
410        /// Sets the full request, replacing any prior values.
411        pub fn with_request<V: Into<crate::model::ListDeploymentsRequest>>(mut self, v: V) -> Self {
412            self.0.request = v.into();
413            self
414        }
415
416        /// Sets all the options, replacing any prior values.
417        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
418            self.0.options = v.into();
419            self
420        }
421
422        /// Sends the request.
423        pub async fn send(self) -> Result<crate::model::ListDeploymentsResponse> {
424            (*self.0.stub)
425                .list_deployments(self.0.request, self.0.options)
426                .await
427                .map(gax::response::Response::into_body)
428        }
429
430        /// Streams each page in the collection.
431        pub fn by_page(
432            self,
433        ) -> impl gax::paginator::Paginator<crate::model::ListDeploymentsResponse, gax::error::Error>
434        {
435            use std::clone::Clone;
436            let token = self.0.request.page_token.clone();
437            let execute = move |token: String| {
438                let mut builder = self.clone();
439                builder.0.request = builder.0.request.set_page_token(token);
440                builder.send()
441            };
442            gax::paginator::internal::new_paginator(token, execute)
443        }
444
445        /// Streams each item in the collection.
446        pub fn by_item(
447            self,
448        ) -> impl gax::paginator::ItemPaginator<crate::model::ListDeploymentsResponse, gax::error::Error>
449        {
450            use gax::paginator::Paginator;
451            self.by_page().items()
452        }
453
454        /// Sets the value of [parent][crate::model::ListDeploymentsRequest::parent].
455        ///
456        /// This is a **required** field for requests.
457        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
458            self.0.request.parent = v.into();
459            self
460        }
461
462        /// Sets the value of [page_size][crate::model::ListDeploymentsRequest::page_size].
463        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
464            self.0.request.page_size = v.into();
465            self
466        }
467
468        /// Sets the value of [page_token][crate::model::ListDeploymentsRequest::page_token].
469        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
470            self.0.request.page_token = v.into();
471            self
472        }
473    }
474
475    #[doc(hidden)]
476    impl gax::options::internal::RequestBuilder for ListDeployments {
477        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
478            &mut self.0.options
479        }
480    }
481
482    /// The request builder for [GSuiteAddOns::delete_deployment][crate::client::GSuiteAddOns::delete_deployment] calls.
483    ///
484    /// # Example
485    /// ```no_run
486    /// # use google_cloud_gsuiteaddons_v1::builder;
487    /// use builder::g_suite_add_ons::DeleteDeployment;
488    /// # tokio_test::block_on(async {
489    ///
490    /// let builder = prepare_request_builder();
491    /// let response = builder.send().await?;
492    /// # gax::Result::<()>::Ok(()) });
493    ///
494    /// fn prepare_request_builder() -> DeleteDeployment {
495    ///   # panic!();
496    ///   // ... details omitted ...
497    /// }
498    /// ```
499    #[derive(Clone, Debug)]
500    pub struct DeleteDeployment(RequestBuilder<crate::model::DeleteDeploymentRequest>);
501
502    impl DeleteDeployment {
503        pub(crate) fn new(
504            stub: std::sync::Arc<dyn super::super::stub::dynamic::GSuiteAddOns>,
505        ) -> Self {
506            Self(RequestBuilder::new(stub))
507        }
508
509        /// Sets the full request, replacing any prior values.
510        pub fn with_request<V: Into<crate::model::DeleteDeploymentRequest>>(
511            mut self,
512            v: V,
513        ) -> Self {
514            self.0.request = v.into();
515            self
516        }
517
518        /// Sets all the options, replacing any prior values.
519        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
520            self.0.options = v.into();
521            self
522        }
523
524        /// Sends the request.
525        pub async fn send(self) -> Result<()> {
526            (*self.0.stub)
527                .delete_deployment(self.0.request, self.0.options)
528                .await
529                .map(gax::response::Response::into_body)
530        }
531
532        /// Sets the value of [name][crate::model::DeleteDeploymentRequest::name].
533        ///
534        /// This is a **required** field for requests.
535        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
536            self.0.request.name = v.into();
537            self
538        }
539
540        /// Sets the value of [etag][crate::model::DeleteDeploymentRequest::etag].
541        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
542            self.0.request.etag = v.into();
543            self
544        }
545    }
546
547    #[doc(hidden)]
548    impl gax::options::internal::RequestBuilder for DeleteDeployment {
549        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
550            &mut self.0.options
551        }
552    }
553
554    /// The request builder for [GSuiteAddOns::install_deployment][crate::client::GSuiteAddOns::install_deployment] calls.
555    ///
556    /// # Example
557    /// ```no_run
558    /// # use google_cloud_gsuiteaddons_v1::builder;
559    /// use builder::g_suite_add_ons::InstallDeployment;
560    /// # tokio_test::block_on(async {
561    ///
562    /// let builder = prepare_request_builder();
563    /// let response = builder.send().await?;
564    /// # gax::Result::<()>::Ok(()) });
565    ///
566    /// fn prepare_request_builder() -> InstallDeployment {
567    ///   # panic!();
568    ///   // ... details omitted ...
569    /// }
570    /// ```
571    #[derive(Clone, Debug)]
572    pub struct InstallDeployment(RequestBuilder<crate::model::InstallDeploymentRequest>);
573
574    impl InstallDeployment {
575        pub(crate) fn new(
576            stub: std::sync::Arc<dyn super::super::stub::dynamic::GSuiteAddOns>,
577        ) -> Self {
578            Self(RequestBuilder::new(stub))
579        }
580
581        /// Sets the full request, replacing any prior values.
582        pub fn with_request<V: Into<crate::model::InstallDeploymentRequest>>(
583            mut self,
584            v: V,
585        ) -> Self {
586            self.0.request = v.into();
587            self
588        }
589
590        /// Sets all the options, replacing any prior values.
591        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
592            self.0.options = v.into();
593            self
594        }
595
596        /// Sends the request.
597        pub async fn send(self) -> Result<()> {
598            (*self.0.stub)
599                .install_deployment(self.0.request, self.0.options)
600                .await
601                .map(gax::response::Response::into_body)
602        }
603
604        /// Sets the value of [name][crate::model::InstallDeploymentRequest::name].
605        ///
606        /// This is a **required** field for requests.
607        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
608            self.0.request.name = v.into();
609            self
610        }
611    }
612
613    #[doc(hidden)]
614    impl gax::options::internal::RequestBuilder for InstallDeployment {
615        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
616            &mut self.0.options
617        }
618    }
619
620    /// The request builder for [GSuiteAddOns::uninstall_deployment][crate::client::GSuiteAddOns::uninstall_deployment] calls.
621    ///
622    /// # Example
623    /// ```no_run
624    /// # use google_cloud_gsuiteaddons_v1::builder;
625    /// use builder::g_suite_add_ons::UninstallDeployment;
626    /// # tokio_test::block_on(async {
627    ///
628    /// let builder = prepare_request_builder();
629    /// let response = builder.send().await?;
630    /// # gax::Result::<()>::Ok(()) });
631    ///
632    /// fn prepare_request_builder() -> UninstallDeployment {
633    ///   # panic!();
634    ///   // ... details omitted ...
635    /// }
636    /// ```
637    #[derive(Clone, Debug)]
638    pub struct UninstallDeployment(RequestBuilder<crate::model::UninstallDeploymentRequest>);
639
640    impl UninstallDeployment {
641        pub(crate) fn new(
642            stub: std::sync::Arc<dyn super::super::stub::dynamic::GSuiteAddOns>,
643        ) -> Self {
644            Self(RequestBuilder::new(stub))
645        }
646
647        /// Sets the full request, replacing any prior values.
648        pub fn with_request<V: Into<crate::model::UninstallDeploymentRequest>>(
649            mut self,
650            v: V,
651        ) -> Self {
652            self.0.request = v.into();
653            self
654        }
655
656        /// Sets all the options, replacing any prior values.
657        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
658            self.0.options = v.into();
659            self
660        }
661
662        /// Sends the request.
663        pub async fn send(self) -> Result<()> {
664            (*self.0.stub)
665                .uninstall_deployment(self.0.request, self.0.options)
666                .await
667                .map(gax::response::Response::into_body)
668        }
669
670        /// Sets the value of [name][crate::model::UninstallDeploymentRequest::name].
671        ///
672        /// This is a **required** field for requests.
673        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
674            self.0.request.name = v.into();
675            self
676        }
677    }
678
679    #[doc(hidden)]
680    impl gax::options::internal::RequestBuilder for UninstallDeployment {
681        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
682            &mut self.0.options
683        }
684    }
685
686    /// The request builder for [GSuiteAddOns::get_install_status][crate::client::GSuiteAddOns::get_install_status] calls.
687    ///
688    /// # Example
689    /// ```no_run
690    /// # use google_cloud_gsuiteaddons_v1::builder;
691    /// use builder::g_suite_add_ons::GetInstallStatus;
692    /// # tokio_test::block_on(async {
693    ///
694    /// let builder = prepare_request_builder();
695    /// let response = builder.send().await?;
696    /// # gax::Result::<()>::Ok(()) });
697    ///
698    /// fn prepare_request_builder() -> GetInstallStatus {
699    ///   # panic!();
700    ///   // ... details omitted ...
701    /// }
702    /// ```
703    #[derive(Clone, Debug)]
704    pub struct GetInstallStatus(RequestBuilder<crate::model::GetInstallStatusRequest>);
705
706    impl GetInstallStatus {
707        pub(crate) fn new(
708            stub: std::sync::Arc<dyn super::super::stub::dynamic::GSuiteAddOns>,
709        ) -> Self {
710            Self(RequestBuilder::new(stub))
711        }
712
713        /// Sets the full request, replacing any prior values.
714        pub fn with_request<V: Into<crate::model::GetInstallStatusRequest>>(
715            mut self,
716            v: V,
717        ) -> Self {
718            self.0.request = v.into();
719            self
720        }
721
722        /// Sets all the options, replacing any prior values.
723        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
724            self.0.options = v.into();
725            self
726        }
727
728        /// Sends the request.
729        pub async fn send(self) -> Result<crate::model::InstallStatus> {
730            (*self.0.stub)
731                .get_install_status(self.0.request, self.0.options)
732                .await
733                .map(gax::response::Response::into_body)
734        }
735
736        /// Sets the value of [name][crate::model::GetInstallStatusRequest::name].
737        ///
738        /// This is a **required** field for requests.
739        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
740            self.0.request.name = v.into();
741            self
742        }
743    }
744
745    #[doc(hidden)]
746    impl gax::options::internal::RequestBuilder for GetInstallStatus {
747        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
748            &mut self.0.options
749        }
750    }
751}