google_cloud_firestore_admin_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 firestore_admin {
18    use crate::Result;
19
20    /// A builder for [FirestoreAdmin][crate::client::FirestoreAdmin].
21    ///
22    /// ```
23    /// # async fn sample() -> gax::client_builder::Result<()> {
24    /// # use google_cloud_firestore_admin_v1::*;
25    /// # use builder::firestore_admin::ClientBuilder;
26    /// # use client::FirestoreAdmin;
27    /// let builder : ClientBuilder = FirestoreAdmin::builder();
28    /// let client = builder
29    ///     .with_endpoint("https://firestore.googleapis.com")
30    ///     .build().await?;
31    /// # Ok(()) }
32    /// ```
33    pub type ClientBuilder =
34        gax::client_builder::ClientBuilder<client::Factory, gaxi::options::Credentials>;
35
36    pub(crate) mod client {
37        use super::super::super::client::FirestoreAdmin;
38        pub struct Factory;
39        impl gax::client_builder::internal::ClientFactory for Factory {
40            type Client = FirestoreAdmin;
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::FirestoreAdmin] 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::FirestoreAdmin>,
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::FirestoreAdmin>,
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 [FirestoreAdmin::create_index][crate::client::FirestoreAdmin::create_index] calls.
75    ///
76    /// # Example
77    /// ```
78    /// # use google_cloud_firestore_admin_v1::builder::firestore_admin::CreateIndex;
79    /// # async fn sample() -> gax::Result<()> {
80    /// use lro::Poller;
81    ///
82    /// let builder = prepare_request_builder();
83    /// let response = builder.poller().until_done().await?;
84    /// # Ok(()) }
85    ///
86    /// fn prepare_request_builder() -> CreateIndex {
87    ///   # panic!();
88    ///   // ... details omitted ...
89    /// }
90    /// ```
91    #[derive(Clone, Debug)]
92    pub struct CreateIndex(RequestBuilder<crate::model::CreateIndexRequest>);
93
94    impl CreateIndex {
95        pub(crate) fn new(
96            stub: std::sync::Arc<dyn super::super::stub::dynamic::FirestoreAdmin>,
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::CreateIndexRequest>>(mut self, v: V) -> Self {
103            self.0.request = v.into();
104            self
105        }
106
107        /// Sets all the options, replacing any prior values.
108        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
109            self.0.options = v.into();
110            self
111        }
112
113        /// Sends the request.
114        ///
115        /// # Long running operations
116        ///
117        /// This starts, but does not poll, a longrunning operation. More information
118        /// on [create_index][crate::client::FirestoreAdmin::create_index].
119        pub async fn send(self) -> Result<longrunning::model::Operation> {
120            (*self.0.stub)
121                .create_index(self.0.request, self.0.options)
122                .await
123                .map(gax::response::Response::into_body)
124        }
125
126        /// Creates a [Poller][lro::Poller] to work with `create_index`.
127        pub fn poller(
128            self,
129        ) -> impl lro::Poller<crate::model::Index, crate::model::IndexOperationMetadata> {
130            type Operation =
131                lro::internal::Operation<crate::model::Index, crate::model::IndexOperationMetadata>;
132            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
133            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
134
135            let stub = self.0.stub.clone();
136            let mut options = self.0.options.clone();
137            options.set_retry_policy(gax::retry_policy::NeverRetry);
138            let query = move |name| {
139                let stub = stub.clone();
140                let options = options.clone();
141                async {
142                    let op = GetOperation::new(stub)
143                        .set_name(name)
144                        .with_options(options)
145                        .send()
146                        .await?;
147                    Ok(Operation::new(op))
148                }
149            };
150
151            let start = move || async {
152                let op = self.send().await?;
153                Ok(Operation::new(op))
154            };
155
156            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
157        }
158
159        /// Sets the value of [parent][crate::model::CreateIndexRequest::parent].
160        ///
161        /// This is a **required** field for requests.
162        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
163            self.0.request.parent = v.into();
164            self
165        }
166
167        /// Sets the value of [index][crate::model::CreateIndexRequest::index].
168        ///
169        /// This is a **required** field for requests.
170        pub fn set_index<T>(mut self, v: T) -> Self
171        where
172            T: std::convert::Into<crate::model::Index>,
173        {
174            self.0.request.index = std::option::Option::Some(v.into());
175            self
176        }
177
178        /// Sets or clears the value of [index][crate::model::CreateIndexRequest::index].
179        ///
180        /// This is a **required** field for requests.
181        pub fn set_or_clear_index<T>(mut self, v: std::option::Option<T>) -> Self
182        where
183            T: std::convert::Into<crate::model::Index>,
184        {
185            self.0.request.index = v.map(|x| x.into());
186            self
187        }
188    }
189
190    #[doc(hidden)]
191    impl gax::options::internal::RequestBuilder for CreateIndex {
192        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
193            &mut self.0.options
194        }
195    }
196
197    /// The request builder for [FirestoreAdmin::list_indexes][crate::client::FirestoreAdmin::list_indexes] calls.
198    ///
199    /// # Example
200    /// ```
201    /// # use google_cloud_firestore_admin_v1::builder::firestore_admin::ListIndexes;
202    /// # async fn sample() -> gax::Result<()> {
203    /// use gax::paginator::ItemPaginator;
204    ///
205    /// let builder = prepare_request_builder();
206    /// let mut items = builder.by_item();
207    /// while let Some(result) = items.next().await {
208    ///   let item = result?;
209    /// }
210    /// # Ok(()) }
211    ///
212    /// fn prepare_request_builder() -> ListIndexes {
213    ///   # panic!();
214    ///   // ... details omitted ...
215    /// }
216    /// ```
217    #[derive(Clone, Debug)]
218    pub struct ListIndexes(RequestBuilder<crate::model::ListIndexesRequest>);
219
220    impl ListIndexes {
221        pub(crate) fn new(
222            stub: std::sync::Arc<dyn super::super::stub::dynamic::FirestoreAdmin>,
223        ) -> Self {
224            Self(RequestBuilder::new(stub))
225        }
226
227        /// Sets the full request, replacing any prior values.
228        pub fn with_request<V: Into<crate::model::ListIndexesRequest>>(mut self, v: V) -> Self {
229            self.0.request = v.into();
230            self
231        }
232
233        /// Sets all the options, replacing any prior values.
234        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
235            self.0.options = v.into();
236            self
237        }
238
239        /// Sends the request.
240        pub async fn send(self) -> Result<crate::model::ListIndexesResponse> {
241            (*self.0.stub)
242                .list_indexes(self.0.request, self.0.options)
243                .await
244                .map(gax::response::Response::into_body)
245        }
246
247        /// Streams each page in the collection.
248        pub fn by_page(
249            self,
250        ) -> impl gax::paginator::Paginator<crate::model::ListIndexesResponse, gax::error::Error>
251        {
252            use std::clone::Clone;
253            let token = self.0.request.page_token.clone();
254            let execute = move |token: String| {
255                let mut builder = self.clone();
256                builder.0.request = builder.0.request.set_page_token(token);
257                builder.send()
258            };
259            gax::paginator::internal::new_paginator(token, execute)
260        }
261
262        /// Streams each item in the collection.
263        pub fn by_item(
264            self,
265        ) -> impl gax::paginator::ItemPaginator<crate::model::ListIndexesResponse, gax::error::Error>
266        {
267            use gax::paginator::Paginator;
268            self.by_page().items()
269        }
270
271        /// Sets the value of [parent][crate::model::ListIndexesRequest::parent].
272        ///
273        /// This is a **required** field for requests.
274        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
275            self.0.request.parent = v.into();
276            self
277        }
278
279        /// Sets the value of [filter][crate::model::ListIndexesRequest::filter].
280        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
281            self.0.request.filter = v.into();
282            self
283        }
284
285        /// Sets the value of [page_size][crate::model::ListIndexesRequest::page_size].
286        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
287            self.0.request.page_size = v.into();
288            self
289        }
290
291        /// Sets the value of [page_token][crate::model::ListIndexesRequest::page_token].
292        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
293            self.0.request.page_token = v.into();
294            self
295        }
296    }
297
298    #[doc(hidden)]
299    impl gax::options::internal::RequestBuilder for ListIndexes {
300        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
301            &mut self.0.options
302        }
303    }
304
305    /// The request builder for [FirestoreAdmin::get_index][crate::client::FirestoreAdmin::get_index] calls.
306    ///
307    /// # Example
308    /// ```
309    /// # use google_cloud_firestore_admin_v1::builder::firestore_admin::GetIndex;
310    /// # async fn sample() -> gax::Result<()> {
311    ///
312    /// let builder = prepare_request_builder();
313    /// let response = builder.send().await?;
314    /// # Ok(()) }
315    ///
316    /// fn prepare_request_builder() -> GetIndex {
317    ///   # panic!();
318    ///   // ... details omitted ...
319    /// }
320    /// ```
321    #[derive(Clone, Debug)]
322    pub struct GetIndex(RequestBuilder<crate::model::GetIndexRequest>);
323
324    impl GetIndex {
325        pub(crate) fn new(
326            stub: std::sync::Arc<dyn super::super::stub::dynamic::FirestoreAdmin>,
327        ) -> Self {
328            Self(RequestBuilder::new(stub))
329        }
330
331        /// Sets the full request, replacing any prior values.
332        pub fn with_request<V: Into<crate::model::GetIndexRequest>>(mut self, v: V) -> Self {
333            self.0.request = v.into();
334            self
335        }
336
337        /// Sets all the options, replacing any prior values.
338        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
339            self.0.options = v.into();
340            self
341        }
342
343        /// Sends the request.
344        pub async fn send(self) -> Result<crate::model::Index> {
345            (*self.0.stub)
346                .get_index(self.0.request, self.0.options)
347                .await
348                .map(gax::response::Response::into_body)
349        }
350
351        /// Sets the value of [name][crate::model::GetIndexRequest::name].
352        ///
353        /// This is a **required** field for requests.
354        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
355            self.0.request.name = v.into();
356            self
357        }
358    }
359
360    #[doc(hidden)]
361    impl gax::options::internal::RequestBuilder for GetIndex {
362        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
363            &mut self.0.options
364        }
365    }
366
367    /// The request builder for [FirestoreAdmin::delete_index][crate::client::FirestoreAdmin::delete_index] calls.
368    ///
369    /// # Example
370    /// ```
371    /// # use google_cloud_firestore_admin_v1::builder::firestore_admin::DeleteIndex;
372    /// # async fn sample() -> gax::Result<()> {
373    ///
374    /// let builder = prepare_request_builder();
375    /// let response = builder.send().await?;
376    /// # Ok(()) }
377    ///
378    /// fn prepare_request_builder() -> DeleteIndex {
379    ///   # panic!();
380    ///   // ... details omitted ...
381    /// }
382    /// ```
383    #[derive(Clone, Debug)]
384    pub struct DeleteIndex(RequestBuilder<crate::model::DeleteIndexRequest>);
385
386    impl DeleteIndex {
387        pub(crate) fn new(
388            stub: std::sync::Arc<dyn super::super::stub::dynamic::FirestoreAdmin>,
389        ) -> 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::DeleteIndexRequest>>(mut self, v: V) -> Self {
395            self.0.request = v.into();
396            self
397        }
398
399        /// Sets all the options, replacing any prior values.
400        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
401            self.0.options = v.into();
402            self
403        }
404
405        /// Sends the request.
406        pub async fn send(self) -> Result<()> {
407            (*self.0.stub)
408                .delete_index(self.0.request, self.0.options)
409                .await
410                .map(gax::response::Response::into_body)
411        }
412
413        /// Sets the value of [name][crate::model::DeleteIndexRequest::name].
414        ///
415        /// This is a **required** field for requests.
416        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
417            self.0.request.name = v.into();
418            self
419        }
420    }
421
422    #[doc(hidden)]
423    impl gax::options::internal::RequestBuilder for DeleteIndex {
424        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
425            &mut self.0.options
426        }
427    }
428
429    /// The request builder for [FirestoreAdmin::get_field][crate::client::FirestoreAdmin::get_field] calls.
430    ///
431    /// # Example
432    /// ```
433    /// # use google_cloud_firestore_admin_v1::builder::firestore_admin::GetField;
434    /// # async fn sample() -> gax::Result<()> {
435    ///
436    /// let builder = prepare_request_builder();
437    /// let response = builder.send().await?;
438    /// # Ok(()) }
439    ///
440    /// fn prepare_request_builder() -> GetField {
441    ///   # panic!();
442    ///   // ... details omitted ...
443    /// }
444    /// ```
445    #[derive(Clone, Debug)]
446    pub struct GetField(RequestBuilder<crate::model::GetFieldRequest>);
447
448    impl GetField {
449        pub(crate) fn new(
450            stub: std::sync::Arc<dyn super::super::stub::dynamic::FirestoreAdmin>,
451        ) -> Self {
452            Self(RequestBuilder::new(stub))
453        }
454
455        /// Sets the full request, replacing any prior values.
456        pub fn with_request<V: Into<crate::model::GetFieldRequest>>(mut self, v: V) -> Self {
457            self.0.request = v.into();
458            self
459        }
460
461        /// Sets all the options, replacing any prior values.
462        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
463            self.0.options = v.into();
464            self
465        }
466
467        /// Sends the request.
468        pub async fn send(self) -> Result<crate::model::Field> {
469            (*self.0.stub)
470                .get_field(self.0.request, self.0.options)
471                .await
472                .map(gax::response::Response::into_body)
473        }
474
475        /// Sets the value of [name][crate::model::GetFieldRequest::name].
476        ///
477        /// This is a **required** field for requests.
478        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
479            self.0.request.name = v.into();
480            self
481        }
482    }
483
484    #[doc(hidden)]
485    impl gax::options::internal::RequestBuilder for GetField {
486        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
487            &mut self.0.options
488        }
489    }
490
491    /// The request builder for [FirestoreAdmin::update_field][crate::client::FirestoreAdmin::update_field] calls.
492    ///
493    /// # Example
494    /// ```
495    /// # use google_cloud_firestore_admin_v1::builder::firestore_admin::UpdateField;
496    /// # async fn sample() -> gax::Result<()> {
497    /// use lro::Poller;
498    ///
499    /// let builder = prepare_request_builder();
500    /// let response = builder.poller().until_done().await?;
501    /// # Ok(()) }
502    ///
503    /// fn prepare_request_builder() -> UpdateField {
504    ///   # panic!();
505    ///   // ... details omitted ...
506    /// }
507    /// ```
508    #[derive(Clone, Debug)]
509    pub struct UpdateField(RequestBuilder<crate::model::UpdateFieldRequest>);
510
511    impl UpdateField {
512        pub(crate) fn new(
513            stub: std::sync::Arc<dyn super::super::stub::dynamic::FirestoreAdmin>,
514        ) -> Self {
515            Self(RequestBuilder::new(stub))
516        }
517
518        /// Sets the full request, replacing any prior values.
519        pub fn with_request<V: Into<crate::model::UpdateFieldRequest>>(mut self, v: V) -> Self {
520            self.0.request = v.into();
521            self
522        }
523
524        /// Sets all the options, replacing any prior values.
525        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
526            self.0.options = v.into();
527            self
528        }
529
530        /// Sends the request.
531        ///
532        /// # Long running operations
533        ///
534        /// This starts, but does not poll, a longrunning operation. More information
535        /// on [update_field][crate::client::FirestoreAdmin::update_field].
536        pub async fn send(self) -> Result<longrunning::model::Operation> {
537            (*self.0.stub)
538                .update_field(self.0.request, self.0.options)
539                .await
540                .map(gax::response::Response::into_body)
541        }
542
543        /// Creates a [Poller][lro::Poller] to work with `update_field`.
544        pub fn poller(
545            self,
546        ) -> impl lro::Poller<crate::model::Field, crate::model::FieldOperationMetadata> {
547            type Operation =
548                lro::internal::Operation<crate::model::Field, crate::model::FieldOperationMetadata>;
549            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
550            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
551
552            let stub = self.0.stub.clone();
553            let mut options = self.0.options.clone();
554            options.set_retry_policy(gax::retry_policy::NeverRetry);
555            let query = move |name| {
556                let stub = stub.clone();
557                let options = options.clone();
558                async {
559                    let op = GetOperation::new(stub)
560                        .set_name(name)
561                        .with_options(options)
562                        .send()
563                        .await?;
564                    Ok(Operation::new(op))
565                }
566            };
567
568            let start = move || async {
569                let op = self.send().await?;
570                Ok(Operation::new(op))
571            };
572
573            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
574        }
575
576        /// Sets the value of [field][crate::model::UpdateFieldRequest::field].
577        ///
578        /// This is a **required** field for requests.
579        pub fn set_field<T>(mut self, v: T) -> Self
580        where
581            T: std::convert::Into<crate::model::Field>,
582        {
583            self.0.request.field = std::option::Option::Some(v.into());
584            self
585        }
586
587        /// Sets or clears the value of [field][crate::model::UpdateFieldRequest::field].
588        ///
589        /// This is a **required** field for requests.
590        pub fn set_or_clear_field<T>(mut self, v: std::option::Option<T>) -> Self
591        where
592            T: std::convert::Into<crate::model::Field>,
593        {
594            self.0.request.field = v.map(|x| x.into());
595            self
596        }
597
598        /// Sets the value of [update_mask][crate::model::UpdateFieldRequest::update_mask].
599        pub fn set_update_mask<T>(mut self, v: T) -> Self
600        where
601            T: std::convert::Into<wkt::FieldMask>,
602        {
603            self.0.request.update_mask = std::option::Option::Some(v.into());
604            self
605        }
606
607        /// Sets or clears the value of [update_mask][crate::model::UpdateFieldRequest::update_mask].
608        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
609        where
610            T: std::convert::Into<wkt::FieldMask>,
611        {
612            self.0.request.update_mask = v.map(|x| x.into());
613            self
614        }
615    }
616
617    #[doc(hidden)]
618    impl gax::options::internal::RequestBuilder for UpdateField {
619        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
620            &mut self.0.options
621        }
622    }
623
624    /// The request builder for [FirestoreAdmin::list_fields][crate::client::FirestoreAdmin::list_fields] calls.
625    ///
626    /// # Example
627    /// ```
628    /// # use google_cloud_firestore_admin_v1::builder::firestore_admin::ListFields;
629    /// # async fn sample() -> gax::Result<()> {
630    /// use gax::paginator::ItemPaginator;
631    ///
632    /// let builder = prepare_request_builder();
633    /// let mut items = builder.by_item();
634    /// while let Some(result) = items.next().await {
635    ///   let item = result?;
636    /// }
637    /// # Ok(()) }
638    ///
639    /// fn prepare_request_builder() -> ListFields {
640    ///   # panic!();
641    ///   // ... details omitted ...
642    /// }
643    /// ```
644    #[derive(Clone, Debug)]
645    pub struct ListFields(RequestBuilder<crate::model::ListFieldsRequest>);
646
647    impl ListFields {
648        pub(crate) fn new(
649            stub: std::sync::Arc<dyn super::super::stub::dynamic::FirestoreAdmin>,
650        ) -> Self {
651            Self(RequestBuilder::new(stub))
652        }
653
654        /// Sets the full request, replacing any prior values.
655        pub fn with_request<V: Into<crate::model::ListFieldsRequest>>(mut self, v: V) -> Self {
656            self.0.request = v.into();
657            self
658        }
659
660        /// Sets all the options, replacing any prior values.
661        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
662            self.0.options = v.into();
663            self
664        }
665
666        /// Sends the request.
667        pub async fn send(self) -> Result<crate::model::ListFieldsResponse> {
668            (*self.0.stub)
669                .list_fields(self.0.request, self.0.options)
670                .await
671                .map(gax::response::Response::into_body)
672        }
673
674        /// Streams each page in the collection.
675        pub fn by_page(
676            self,
677        ) -> impl gax::paginator::Paginator<crate::model::ListFieldsResponse, gax::error::Error>
678        {
679            use std::clone::Clone;
680            let token = self.0.request.page_token.clone();
681            let execute = move |token: String| {
682                let mut builder = self.clone();
683                builder.0.request = builder.0.request.set_page_token(token);
684                builder.send()
685            };
686            gax::paginator::internal::new_paginator(token, execute)
687        }
688
689        /// Streams each item in the collection.
690        pub fn by_item(
691            self,
692        ) -> impl gax::paginator::ItemPaginator<crate::model::ListFieldsResponse, gax::error::Error>
693        {
694            use gax::paginator::Paginator;
695            self.by_page().items()
696        }
697
698        /// Sets the value of [parent][crate::model::ListFieldsRequest::parent].
699        ///
700        /// This is a **required** field for requests.
701        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
702            self.0.request.parent = v.into();
703            self
704        }
705
706        /// Sets the value of [filter][crate::model::ListFieldsRequest::filter].
707        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
708            self.0.request.filter = v.into();
709            self
710        }
711
712        /// Sets the value of [page_size][crate::model::ListFieldsRequest::page_size].
713        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
714            self.0.request.page_size = v.into();
715            self
716        }
717
718        /// Sets the value of [page_token][crate::model::ListFieldsRequest::page_token].
719        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
720            self.0.request.page_token = v.into();
721            self
722        }
723    }
724
725    #[doc(hidden)]
726    impl gax::options::internal::RequestBuilder for ListFields {
727        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
728            &mut self.0.options
729        }
730    }
731
732    /// The request builder for [FirestoreAdmin::export_documents][crate::client::FirestoreAdmin::export_documents] calls.
733    ///
734    /// # Example
735    /// ```
736    /// # use google_cloud_firestore_admin_v1::builder::firestore_admin::ExportDocuments;
737    /// # async fn sample() -> gax::Result<()> {
738    /// use lro::Poller;
739    ///
740    /// let builder = prepare_request_builder();
741    /// let response = builder.poller().until_done().await?;
742    /// # Ok(()) }
743    ///
744    /// fn prepare_request_builder() -> ExportDocuments {
745    ///   # panic!();
746    ///   // ... details omitted ...
747    /// }
748    /// ```
749    #[derive(Clone, Debug)]
750    pub struct ExportDocuments(RequestBuilder<crate::model::ExportDocumentsRequest>);
751
752    impl ExportDocuments {
753        pub(crate) fn new(
754            stub: std::sync::Arc<dyn super::super::stub::dynamic::FirestoreAdmin>,
755        ) -> Self {
756            Self(RequestBuilder::new(stub))
757        }
758
759        /// Sets the full request, replacing any prior values.
760        pub fn with_request<V: Into<crate::model::ExportDocumentsRequest>>(mut self, v: V) -> Self {
761            self.0.request = v.into();
762            self
763        }
764
765        /// Sets all the options, replacing any prior values.
766        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
767            self.0.options = v.into();
768            self
769        }
770
771        /// Sends the request.
772        ///
773        /// # Long running operations
774        ///
775        /// This starts, but does not poll, a longrunning operation. More information
776        /// on [export_documents][crate::client::FirestoreAdmin::export_documents].
777        pub async fn send(self) -> Result<longrunning::model::Operation> {
778            (*self.0.stub)
779                .export_documents(self.0.request, self.0.options)
780                .await
781                .map(gax::response::Response::into_body)
782        }
783
784        /// Creates a [Poller][lro::Poller] to work with `export_documents`.
785        pub fn poller(
786            self,
787        ) -> impl lro::Poller<crate::model::ExportDocumentsResponse, crate::model::ExportDocumentsMetadata>
788        {
789            type Operation = lro::internal::Operation<
790                crate::model::ExportDocumentsResponse,
791                crate::model::ExportDocumentsMetadata,
792            >;
793            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
794            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
795
796            let stub = self.0.stub.clone();
797            let mut options = self.0.options.clone();
798            options.set_retry_policy(gax::retry_policy::NeverRetry);
799            let query = move |name| {
800                let stub = stub.clone();
801                let options = options.clone();
802                async {
803                    let op = GetOperation::new(stub)
804                        .set_name(name)
805                        .with_options(options)
806                        .send()
807                        .await?;
808                    Ok(Operation::new(op))
809                }
810            };
811
812            let start = move || async {
813                let op = self.send().await?;
814                Ok(Operation::new(op))
815            };
816
817            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
818        }
819
820        /// Sets the value of [name][crate::model::ExportDocumentsRequest::name].
821        ///
822        /// This is a **required** field for requests.
823        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
824            self.0.request.name = v.into();
825            self
826        }
827
828        /// Sets the value of [collection_ids][crate::model::ExportDocumentsRequest::collection_ids].
829        pub fn set_collection_ids<T, V>(mut self, v: T) -> Self
830        where
831            T: std::iter::IntoIterator<Item = V>,
832            V: std::convert::Into<std::string::String>,
833        {
834            use std::iter::Iterator;
835            self.0.request.collection_ids = v.into_iter().map(|i| i.into()).collect();
836            self
837        }
838
839        /// Sets the value of [output_uri_prefix][crate::model::ExportDocumentsRequest::output_uri_prefix].
840        pub fn set_output_uri_prefix<T: Into<std::string::String>>(mut self, v: T) -> Self {
841            self.0.request.output_uri_prefix = v.into();
842            self
843        }
844
845        /// Sets the value of [namespace_ids][crate::model::ExportDocumentsRequest::namespace_ids].
846        pub fn set_namespace_ids<T, V>(mut self, v: T) -> Self
847        where
848            T: std::iter::IntoIterator<Item = V>,
849            V: std::convert::Into<std::string::String>,
850        {
851            use std::iter::Iterator;
852            self.0.request.namespace_ids = v.into_iter().map(|i| i.into()).collect();
853            self
854        }
855
856        /// Sets the value of [snapshot_time][crate::model::ExportDocumentsRequest::snapshot_time].
857        pub fn set_snapshot_time<T>(mut self, v: T) -> Self
858        where
859            T: std::convert::Into<wkt::Timestamp>,
860        {
861            self.0.request.snapshot_time = std::option::Option::Some(v.into());
862            self
863        }
864
865        /// Sets or clears the value of [snapshot_time][crate::model::ExportDocumentsRequest::snapshot_time].
866        pub fn set_or_clear_snapshot_time<T>(mut self, v: std::option::Option<T>) -> Self
867        where
868            T: std::convert::Into<wkt::Timestamp>,
869        {
870            self.0.request.snapshot_time = v.map(|x| x.into());
871            self
872        }
873    }
874
875    #[doc(hidden)]
876    impl gax::options::internal::RequestBuilder for ExportDocuments {
877        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
878            &mut self.0.options
879        }
880    }
881
882    /// The request builder for [FirestoreAdmin::import_documents][crate::client::FirestoreAdmin::import_documents] calls.
883    ///
884    /// # Example
885    /// ```
886    /// # use google_cloud_firestore_admin_v1::builder::firestore_admin::ImportDocuments;
887    /// # async fn sample() -> gax::Result<()> {
888    /// use lro::Poller;
889    ///
890    /// let builder = prepare_request_builder();
891    /// let response = builder.poller().until_done().await?;
892    /// # Ok(()) }
893    ///
894    /// fn prepare_request_builder() -> ImportDocuments {
895    ///   # panic!();
896    ///   // ... details omitted ...
897    /// }
898    /// ```
899    #[derive(Clone, Debug)]
900    pub struct ImportDocuments(RequestBuilder<crate::model::ImportDocumentsRequest>);
901
902    impl ImportDocuments {
903        pub(crate) fn new(
904            stub: std::sync::Arc<dyn super::super::stub::dynamic::FirestoreAdmin>,
905        ) -> Self {
906            Self(RequestBuilder::new(stub))
907        }
908
909        /// Sets the full request, replacing any prior values.
910        pub fn with_request<V: Into<crate::model::ImportDocumentsRequest>>(mut self, v: V) -> Self {
911            self.0.request = v.into();
912            self
913        }
914
915        /// Sets all the options, replacing any prior values.
916        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
917            self.0.options = v.into();
918            self
919        }
920
921        /// Sends the request.
922        ///
923        /// # Long running operations
924        ///
925        /// This starts, but does not poll, a longrunning operation. More information
926        /// on [import_documents][crate::client::FirestoreAdmin::import_documents].
927        pub async fn send(self) -> Result<longrunning::model::Operation> {
928            (*self.0.stub)
929                .import_documents(self.0.request, self.0.options)
930                .await
931                .map(gax::response::Response::into_body)
932        }
933
934        /// Creates a [Poller][lro::Poller] to work with `import_documents`.
935        pub fn poller(self) -> impl lro::Poller<(), crate::model::ImportDocumentsMetadata> {
936            type Operation =
937                lro::internal::Operation<wkt::Empty, crate::model::ImportDocumentsMetadata>;
938            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
939            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
940
941            let stub = self.0.stub.clone();
942            let mut options = self.0.options.clone();
943            options.set_retry_policy(gax::retry_policy::NeverRetry);
944            let query = move |name| {
945                let stub = stub.clone();
946                let options = options.clone();
947                async {
948                    let op = GetOperation::new(stub)
949                        .set_name(name)
950                        .with_options(options)
951                        .send()
952                        .await?;
953                    Ok(Operation::new(op))
954                }
955            };
956
957            let start = move || async {
958                let op = self.send().await?;
959                Ok(Operation::new(op))
960            };
961
962            lro::internal::new_unit_response_poller(
963                polling_error_policy,
964                polling_backoff_policy,
965                start,
966                query,
967            )
968        }
969
970        /// Sets the value of [name][crate::model::ImportDocumentsRequest::name].
971        ///
972        /// This is a **required** field for requests.
973        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
974            self.0.request.name = v.into();
975            self
976        }
977
978        /// Sets the value of [collection_ids][crate::model::ImportDocumentsRequest::collection_ids].
979        pub fn set_collection_ids<T, V>(mut self, v: T) -> Self
980        where
981            T: std::iter::IntoIterator<Item = V>,
982            V: std::convert::Into<std::string::String>,
983        {
984            use std::iter::Iterator;
985            self.0.request.collection_ids = v.into_iter().map(|i| i.into()).collect();
986            self
987        }
988
989        /// Sets the value of [input_uri_prefix][crate::model::ImportDocumentsRequest::input_uri_prefix].
990        pub fn set_input_uri_prefix<T: Into<std::string::String>>(mut self, v: T) -> Self {
991            self.0.request.input_uri_prefix = v.into();
992            self
993        }
994
995        /// Sets the value of [namespace_ids][crate::model::ImportDocumentsRequest::namespace_ids].
996        pub fn set_namespace_ids<T, V>(mut self, v: T) -> Self
997        where
998            T: std::iter::IntoIterator<Item = V>,
999            V: std::convert::Into<std::string::String>,
1000        {
1001            use std::iter::Iterator;
1002            self.0.request.namespace_ids = v.into_iter().map(|i| i.into()).collect();
1003            self
1004        }
1005    }
1006
1007    #[doc(hidden)]
1008    impl gax::options::internal::RequestBuilder for ImportDocuments {
1009        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1010            &mut self.0.options
1011        }
1012    }
1013
1014    /// The request builder for [FirestoreAdmin::bulk_delete_documents][crate::client::FirestoreAdmin::bulk_delete_documents] calls.
1015    ///
1016    /// # Example
1017    /// ```
1018    /// # use google_cloud_firestore_admin_v1::builder::firestore_admin::BulkDeleteDocuments;
1019    /// # async fn sample() -> gax::Result<()> {
1020    /// use lro::Poller;
1021    ///
1022    /// let builder = prepare_request_builder();
1023    /// let response = builder.poller().until_done().await?;
1024    /// # Ok(()) }
1025    ///
1026    /// fn prepare_request_builder() -> BulkDeleteDocuments {
1027    ///   # panic!();
1028    ///   // ... details omitted ...
1029    /// }
1030    /// ```
1031    #[derive(Clone, Debug)]
1032    pub struct BulkDeleteDocuments(RequestBuilder<crate::model::BulkDeleteDocumentsRequest>);
1033
1034    impl BulkDeleteDocuments {
1035        pub(crate) fn new(
1036            stub: std::sync::Arc<dyn super::super::stub::dynamic::FirestoreAdmin>,
1037        ) -> Self {
1038            Self(RequestBuilder::new(stub))
1039        }
1040
1041        /// Sets the full request, replacing any prior values.
1042        pub fn with_request<V: Into<crate::model::BulkDeleteDocumentsRequest>>(
1043            mut self,
1044            v: V,
1045        ) -> Self {
1046            self.0.request = v.into();
1047            self
1048        }
1049
1050        /// Sets all the options, replacing any prior values.
1051        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1052            self.0.options = v.into();
1053            self
1054        }
1055
1056        /// Sends the request.
1057        ///
1058        /// # Long running operations
1059        ///
1060        /// This starts, but does not poll, a longrunning operation. More information
1061        /// on [bulk_delete_documents][crate::client::FirestoreAdmin::bulk_delete_documents].
1062        pub async fn send(self) -> Result<longrunning::model::Operation> {
1063            (*self.0.stub)
1064                .bulk_delete_documents(self.0.request, self.0.options)
1065                .await
1066                .map(gax::response::Response::into_body)
1067        }
1068
1069        /// Creates a [Poller][lro::Poller] to work with `bulk_delete_documents`.
1070        pub fn poller(
1071            self,
1072        ) -> impl lro::Poller<
1073            crate::model::BulkDeleteDocumentsResponse,
1074            crate::model::BulkDeleteDocumentsMetadata,
1075        > {
1076            type Operation = lro::internal::Operation<
1077                crate::model::BulkDeleteDocumentsResponse,
1078                crate::model::BulkDeleteDocumentsMetadata,
1079            >;
1080            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1081            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1082
1083            let stub = self.0.stub.clone();
1084            let mut options = self.0.options.clone();
1085            options.set_retry_policy(gax::retry_policy::NeverRetry);
1086            let query = move |name| {
1087                let stub = stub.clone();
1088                let options = options.clone();
1089                async {
1090                    let op = GetOperation::new(stub)
1091                        .set_name(name)
1092                        .with_options(options)
1093                        .send()
1094                        .await?;
1095                    Ok(Operation::new(op))
1096                }
1097            };
1098
1099            let start = move || async {
1100                let op = self.send().await?;
1101                Ok(Operation::new(op))
1102            };
1103
1104            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
1105        }
1106
1107        /// Sets the value of [name][crate::model::BulkDeleteDocumentsRequest::name].
1108        ///
1109        /// This is a **required** field for requests.
1110        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1111            self.0.request.name = v.into();
1112            self
1113        }
1114
1115        /// Sets the value of [collection_ids][crate::model::BulkDeleteDocumentsRequest::collection_ids].
1116        pub fn set_collection_ids<T, V>(mut self, v: T) -> Self
1117        where
1118            T: std::iter::IntoIterator<Item = V>,
1119            V: std::convert::Into<std::string::String>,
1120        {
1121            use std::iter::Iterator;
1122            self.0.request.collection_ids = v.into_iter().map(|i| i.into()).collect();
1123            self
1124        }
1125
1126        /// Sets the value of [namespace_ids][crate::model::BulkDeleteDocumentsRequest::namespace_ids].
1127        pub fn set_namespace_ids<T, V>(mut self, v: T) -> Self
1128        where
1129            T: std::iter::IntoIterator<Item = V>,
1130            V: std::convert::Into<std::string::String>,
1131        {
1132            use std::iter::Iterator;
1133            self.0.request.namespace_ids = v.into_iter().map(|i| i.into()).collect();
1134            self
1135        }
1136    }
1137
1138    #[doc(hidden)]
1139    impl gax::options::internal::RequestBuilder for BulkDeleteDocuments {
1140        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1141            &mut self.0.options
1142        }
1143    }
1144
1145    /// The request builder for [FirestoreAdmin::create_database][crate::client::FirestoreAdmin::create_database] calls.
1146    ///
1147    /// # Example
1148    /// ```
1149    /// # use google_cloud_firestore_admin_v1::builder::firestore_admin::CreateDatabase;
1150    /// # async fn sample() -> gax::Result<()> {
1151    /// use lro::Poller;
1152    ///
1153    /// let builder = prepare_request_builder();
1154    /// let response = builder.poller().until_done().await?;
1155    /// # Ok(()) }
1156    ///
1157    /// fn prepare_request_builder() -> CreateDatabase {
1158    ///   # panic!();
1159    ///   // ... details omitted ...
1160    /// }
1161    /// ```
1162    #[derive(Clone, Debug)]
1163    pub struct CreateDatabase(RequestBuilder<crate::model::CreateDatabaseRequest>);
1164
1165    impl CreateDatabase {
1166        pub(crate) fn new(
1167            stub: std::sync::Arc<dyn super::super::stub::dynamic::FirestoreAdmin>,
1168        ) -> Self {
1169            Self(RequestBuilder::new(stub))
1170        }
1171
1172        /// Sets the full request, replacing any prior values.
1173        pub fn with_request<V: Into<crate::model::CreateDatabaseRequest>>(mut self, v: V) -> Self {
1174            self.0.request = v.into();
1175            self
1176        }
1177
1178        /// Sets all the options, replacing any prior values.
1179        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1180            self.0.options = v.into();
1181            self
1182        }
1183
1184        /// Sends the request.
1185        ///
1186        /// # Long running operations
1187        ///
1188        /// This starts, but does not poll, a longrunning operation. More information
1189        /// on [create_database][crate::client::FirestoreAdmin::create_database].
1190        pub async fn send(self) -> Result<longrunning::model::Operation> {
1191            (*self.0.stub)
1192                .create_database(self.0.request, self.0.options)
1193                .await
1194                .map(gax::response::Response::into_body)
1195        }
1196
1197        /// Creates a [Poller][lro::Poller] to work with `create_database`.
1198        pub fn poller(
1199            self,
1200        ) -> impl lro::Poller<crate::model::Database, crate::model::CreateDatabaseMetadata>
1201        {
1202            type Operation = lro::internal::Operation<
1203                crate::model::Database,
1204                crate::model::CreateDatabaseMetadata,
1205            >;
1206            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1207            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1208
1209            let stub = self.0.stub.clone();
1210            let mut options = self.0.options.clone();
1211            options.set_retry_policy(gax::retry_policy::NeverRetry);
1212            let query = move |name| {
1213                let stub = stub.clone();
1214                let options = options.clone();
1215                async {
1216                    let op = GetOperation::new(stub)
1217                        .set_name(name)
1218                        .with_options(options)
1219                        .send()
1220                        .await?;
1221                    Ok(Operation::new(op))
1222                }
1223            };
1224
1225            let start = move || async {
1226                let op = self.send().await?;
1227                Ok(Operation::new(op))
1228            };
1229
1230            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
1231        }
1232
1233        /// Sets the value of [parent][crate::model::CreateDatabaseRequest::parent].
1234        ///
1235        /// This is a **required** field for requests.
1236        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1237            self.0.request.parent = v.into();
1238            self
1239        }
1240
1241        /// Sets the value of [database][crate::model::CreateDatabaseRequest::database].
1242        ///
1243        /// This is a **required** field for requests.
1244        pub fn set_database<T>(mut self, v: T) -> Self
1245        where
1246            T: std::convert::Into<crate::model::Database>,
1247        {
1248            self.0.request.database = std::option::Option::Some(v.into());
1249            self
1250        }
1251
1252        /// Sets or clears the value of [database][crate::model::CreateDatabaseRequest::database].
1253        ///
1254        /// This is a **required** field for requests.
1255        pub fn set_or_clear_database<T>(mut self, v: std::option::Option<T>) -> Self
1256        where
1257            T: std::convert::Into<crate::model::Database>,
1258        {
1259            self.0.request.database = v.map(|x| x.into());
1260            self
1261        }
1262
1263        /// Sets the value of [database_id][crate::model::CreateDatabaseRequest::database_id].
1264        ///
1265        /// This is a **required** field for requests.
1266        pub fn set_database_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1267            self.0.request.database_id = v.into();
1268            self
1269        }
1270    }
1271
1272    #[doc(hidden)]
1273    impl gax::options::internal::RequestBuilder for CreateDatabase {
1274        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1275            &mut self.0.options
1276        }
1277    }
1278
1279    /// The request builder for [FirestoreAdmin::get_database][crate::client::FirestoreAdmin::get_database] calls.
1280    ///
1281    /// # Example
1282    /// ```
1283    /// # use google_cloud_firestore_admin_v1::builder::firestore_admin::GetDatabase;
1284    /// # async fn sample() -> gax::Result<()> {
1285    ///
1286    /// let builder = prepare_request_builder();
1287    /// let response = builder.send().await?;
1288    /// # Ok(()) }
1289    ///
1290    /// fn prepare_request_builder() -> GetDatabase {
1291    ///   # panic!();
1292    ///   // ... details omitted ...
1293    /// }
1294    /// ```
1295    #[derive(Clone, Debug)]
1296    pub struct GetDatabase(RequestBuilder<crate::model::GetDatabaseRequest>);
1297
1298    impl GetDatabase {
1299        pub(crate) fn new(
1300            stub: std::sync::Arc<dyn super::super::stub::dynamic::FirestoreAdmin>,
1301        ) -> Self {
1302            Self(RequestBuilder::new(stub))
1303        }
1304
1305        /// Sets the full request, replacing any prior values.
1306        pub fn with_request<V: Into<crate::model::GetDatabaseRequest>>(mut self, v: V) -> Self {
1307            self.0.request = v.into();
1308            self
1309        }
1310
1311        /// Sets all the options, replacing any prior values.
1312        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1313            self.0.options = v.into();
1314            self
1315        }
1316
1317        /// Sends the request.
1318        pub async fn send(self) -> Result<crate::model::Database> {
1319            (*self.0.stub)
1320                .get_database(self.0.request, self.0.options)
1321                .await
1322                .map(gax::response::Response::into_body)
1323        }
1324
1325        /// Sets the value of [name][crate::model::GetDatabaseRequest::name].
1326        ///
1327        /// This is a **required** field for requests.
1328        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1329            self.0.request.name = v.into();
1330            self
1331        }
1332    }
1333
1334    #[doc(hidden)]
1335    impl gax::options::internal::RequestBuilder for GetDatabase {
1336        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1337            &mut self.0.options
1338        }
1339    }
1340
1341    /// The request builder for [FirestoreAdmin::list_databases][crate::client::FirestoreAdmin::list_databases] calls.
1342    ///
1343    /// # Example
1344    /// ```
1345    /// # use google_cloud_firestore_admin_v1::builder::firestore_admin::ListDatabases;
1346    /// # async fn sample() -> gax::Result<()> {
1347    ///
1348    /// let builder = prepare_request_builder();
1349    /// let response = builder.send().await?;
1350    /// # Ok(()) }
1351    ///
1352    /// fn prepare_request_builder() -> ListDatabases {
1353    ///   # panic!();
1354    ///   // ... details omitted ...
1355    /// }
1356    /// ```
1357    #[derive(Clone, Debug)]
1358    pub struct ListDatabases(RequestBuilder<crate::model::ListDatabasesRequest>);
1359
1360    impl ListDatabases {
1361        pub(crate) fn new(
1362            stub: std::sync::Arc<dyn super::super::stub::dynamic::FirestoreAdmin>,
1363        ) -> Self {
1364            Self(RequestBuilder::new(stub))
1365        }
1366
1367        /// Sets the full request, replacing any prior values.
1368        pub fn with_request<V: Into<crate::model::ListDatabasesRequest>>(mut self, v: V) -> Self {
1369            self.0.request = v.into();
1370            self
1371        }
1372
1373        /// Sets all the options, replacing any prior values.
1374        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1375            self.0.options = v.into();
1376            self
1377        }
1378
1379        /// Sends the request.
1380        pub async fn send(self) -> Result<crate::model::ListDatabasesResponse> {
1381            (*self.0.stub)
1382                .list_databases(self.0.request, self.0.options)
1383                .await
1384                .map(gax::response::Response::into_body)
1385        }
1386
1387        /// Sets the value of [parent][crate::model::ListDatabasesRequest::parent].
1388        ///
1389        /// This is a **required** field for requests.
1390        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1391            self.0.request.parent = v.into();
1392            self
1393        }
1394
1395        /// Sets the value of [show_deleted][crate::model::ListDatabasesRequest::show_deleted].
1396        pub fn set_show_deleted<T: Into<bool>>(mut self, v: T) -> Self {
1397            self.0.request.show_deleted = v.into();
1398            self
1399        }
1400    }
1401
1402    #[doc(hidden)]
1403    impl gax::options::internal::RequestBuilder for ListDatabases {
1404        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1405            &mut self.0.options
1406        }
1407    }
1408
1409    /// The request builder for [FirestoreAdmin::update_database][crate::client::FirestoreAdmin::update_database] calls.
1410    ///
1411    /// # Example
1412    /// ```
1413    /// # use google_cloud_firestore_admin_v1::builder::firestore_admin::UpdateDatabase;
1414    /// # async fn sample() -> gax::Result<()> {
1415    /// use lro::Poller;
1416    ///
1417    /// let builder = prepare_request_builder();
1418    /// let response = builder.poller().until_done().await?;
1419    /// # Ok(()) }
1420    ///
1421    /// fn prepare_request_builder() -> UpdateDatabase {
1422    ///   # panic!();
1423    ///   // ... details omitted ...
1424    /// }
1425    /// ```
1426    #[derive(Clone, Debug)]
1427    pub struct UpdateDatabase(RequestBuilder<crate::model::UpdateDatabaseRequest>);
1428
1429    impl UpdateDatabase {
1430        pub(crate) fn new(
1431            stub: std::sync::Arc<dyn super::super::stub::dynamic::FirestoreAdmin>,
1432        ) -> Self {
1433            Self(RequestBuilder::new(stub))
1434        }
1435
1436        /// Sets the full request, replacing any prior values.
1437        pub fn with_request<V: Into<crate::model::UpdateDatabaseRequest>>(mut self, v: V) -> Self {
1438            self.0.request = v.into();
1439            self
1440        }
1441
1442        /// Sets all the options, replacing any prior values.
1443        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1444            self.0.options = v.into();
1445            self
1446        }
1447
1448        /// Sends the request.
1449        ///
1450        /// # Long running operations
1451        ///
1452        /// This starts, but does not poll, a longrunning operation. More information
1453        /// on [update_database][crate::client::FirestoreAdmin::update_database].
1454        pub async fn send(self) -> Result<longrunning::model::Operation> {
1455            (*self.0.stub)
1456                .update_database(self.0.request, self.0.options)
1457                .await
1458                .map(gax::response::Response::into_body)
1459        }
1460
1461        /// Creates a [Poller][lro::Poller] to work with `update_database`.
1462        pub fn poller(
1463            self,
1464        ) -> impl lro::Poller<crate::model::Database, crate::model::UpdateDatabaseMetadata>
1465        {
1466            type Operation = lro::internal::Operation<
1467                crate::model::Database,
1468                crate::model::UpdateDatabaseMetadata,
1469            >;
1470            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1471            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1472
1473            let stub = self.0.stub.clone();
1474            let mut options = self.0.options.clone();
1475            options.set_retry_policy(gax::retry_policy::NeverRetry);
1476            let query = move |name| {
1477                let stub = stub.clone();
1478                let options = options.clone();
1479                async {
1480                    let op = GetOperation::new(stub)
1481                        .set_name(name)
1482                        .with_options(options)
1483                        .send()
1484                        .await?;
1485                    Ok(Operation::new(op))
1486                }
1487            };
1488
1489            let start = move || async {
1490                let op = self.send().await?;
1491                Ok(Operation::new(op))
1492            };
1493
1494            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
1495        }
1496
1497        /// Sets the value of [database][crate::model::UpdateDatabaseRequest::database].
1498        ///
1499        /// This is a **required** field for requests.
1500        pub fn set_database<T>(mut self, v: T) -> Self
1501        where
1502            T: std::convert::Into<crate::model::Database>,
1503        {
1504            self.0.request.database = std::option::Option::Some(v.into());
1505            self
1506        }
1507
1508        /// Sets or clears the value of [database][crate::model::UpdateDatabaseRequest::database].
1509        ///
1510        /// This is a **required** field for requests.
1511        pub fn set_or_clear_database<T>(mut self, v: std::option::Option<T>) -> Self
1512        where
1513            T: std::convert::Into<crate::model::Database>,
1514        {
1515            self.0.request.database = v.map(|x| x.into());
1516            self
1517        }
1518
1519        /// Sets the value of [update_mask][crate::model::UpdateDatabaseRequest::update_mask].
1520        pub fn set_update_mask<T>(mut self, v: T) -> Self
1521        where
1522            T: std::convert::Into<wkt::FieldMask>,
1523        {
1524            self.0.request.update_mask = std::option::Option::Some(v.into());
1525            self
1526        }
1527
1528        /// Sets or clears the value of [update_mask][crate::model::UpdateDatabaseRequest::update_mask].
1529        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
1530        where
1531            T: std::convert::Into<wkt::FieldMask>,
1532        {
1533            self.0.request.update_mask = v.map(|x| x.into());
1534            self
1535        }
1536    }
1537
1538    #[doc(hidden)]
1539    impl gax::options::internal::RequestBuilder for UpdateDatabase {
1540        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1541            &mut self.0.options
1542        }
1543    }
1544
1545    /// The request builder for [FirestoreAdmin::delete_database][crate::client::FirestoreAdmin::delete_database] calls.
1546    ///
1547    /// # Example
1548    /// ```
1549    /// # use google_cloud_firestore_admin_v1::builder::firestore_admin::DeleteDatabase;
1550    /// # async fn sample() -> gax::Result<()> {
1551    /// use lro::Poller;
1552    ///
1553    /// let builder = prepare_request_builder();
1554    /// let response = builder.poller().until_done().await?;
1555    /// # Ok(()) }
1556    ///
1557    /// fn prepare_request_builder() -> DeleteDatabase {
1558    ///   # panic!();
1559    ///   // ... details omitted ...
1560    /// }
1561    /// ```
1562    #[derive(Clone, Debug)]
1563    pub struct DeleteDatabase(RequestBuilder<crate::model::DeleteDatabaseRequest>);
1564
1565    impl DeleteDatabase {
1566        pub(crate) fn new(
1567            stub: std::sync::Arc<dyn super::super::stub::dynamic::FirestoreAdmin>,
1568        ) -> Self {
1569            Self(RequestBuilder::new(stub))
1570        }
1571
1572        /// Sets the full request, replacing any prior values.
1573        pub fn with_request<V: Into<crate::model::DeleteDatabaseRequest>>(mut self, v: V) -> Self {
1574            self.0.request = v.into();
1575            self
1576        }
1577
1578        /// Sets all the options, replacing any prior values.
1579        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1580            self.0.options = v.into();
1581            self
1582        }
1583
1584        /// Sends the request.
1585        ///
1586        /// # Long running operations
1587        ///
1588        /// This starts, but does not poll, a longrunning operation. More information
1589        /// on [delete_database][crate::client::FirestoreAdmin::delete_database].
1590        pub async fn send(self) -> Result<longrunning::model::Operation> {
1591            (*self.0.stub)
1592                .delete_database(self.0.request, self.0.options)
1593                .await
1594                .map(gax::response::Response::into_body)
1595        }
1596
1597        /// Creates a [Poller][lro::Poller] to work with `delete_database`.
1598        pub fn poller(
1599            self,
1600        ) -> impl lro::Poller<crate::model::Database, crate::model::DeleteDatabaseMetadata>
1601        {
1602            type Operation = lro::internal::Operation<
1603                crate::model::Database,
1604                crate::model::DeleteDatabaseMetadata,
1605            >;
1606            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1607            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1608
1609            let stub = self.0.stub.clone();
1610            let mut options = self.0.options.clone();
1611            options.set_retry_policy(gax::retry_policy::NeverRetry);
1612            let query = move |name| {
1613                let stub = stub.clone();
1614                let options = options.clone();
1615                async {
1616                    let op = GetOperation::new(stub)
1617                        .set_name(name)
1618                        .with_options(options)
1619                        .send()
1620                        .await?;
1621                    Ok(Operation::new(op))
1622                }
1623            };
1624
1625            let start = move || async {
1626                let op = self.send().await?;
1627                Ok(Operation::new(op))
1628            };
1629
1630            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
1631        }
1632
1633        /// Sets the value of [name][crate::model::DeleteDatabaseRequest::name].
1634        ///
1635        /// This is a **required** field for requests.
1636        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1637            self.0.request.name = v.into();
1638            self
1639        }
1640
1641        /// Sets the value of [etag][crate::model::DeleteDatabaseRequest::etag].
1642        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
1643            self.0.request.etag = v.into();
1644            self
1645        }
1646    }
1647
1648    #[doc(hidden)]
1649    impl gax::options::internal::RequestBuilder for DeleteDatabase {
1650        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1651            &mut self.0.options
1652        }
1653    }
1654
1655    /// The request builder for [FirestoreAdmin::create_user_creds][crate::client::FirestoreAdmin::create_user_creds] calls.
1656    ///
1657    /// # Example
1658    /// ```
1659    /// # use google_cloud_firestore_admin_v1::builder::firestore_admin::CreateUserCreds;
1660    /// # async fn sample() -> gax::Result<()> {
1661    ///
1662    /// let builder = prepare_request_builder();
1663    /// let response = builder.send().await?;
1664    /// # Ok(()) }
1665    ///
1666    /// fn prepare_request_builder() -> CreateUserCreds {
1667    ///   # panic!();
1668    ///   // ... details omitted ...
1669    /// }
1670    /// ```
1671    #[derive(Clone, Debug)]
1672    pub struct CreateUserCreds(RequestBuilder<crate::model::CreateUserCredsRequest>);
1673
1674    impl CreateUserCreds {
1675        pub(crate) fn new(
1676            stub: std::sync::Arc<dyn super::super::stub::dynamic::FirestoreAdmin>,
1677        ) -> Self {
1678            Self(RequestBuilder::new(stub))
1679        }
1680
1681        /// Sets the full request, replacing any prior values.
1682        pub fn with_request<V: Into<crate::model::CreateUserCredsRequest>>(mut self, v: V) -> Self {
1683            self.0.request = v.into();
1684            self
1685        }
1686
1687        /// Sets all the options, replacing any prior values.
1688        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1689            self.0.options = v.into();
1690            self
1691        }
1692
1693        /// Sends the request.
1694        pub async fn send(self) -> Result<crate::model::UserCreds> {
1695            (*self.0.stub)
1696                .create_user_creds(self.0.request, self.0.options)
1697                .await
1698                .map(gax::response::Response::into_body)
1699        }
1700
1701        /// Sets the value of [parent][crate::model::CreateUserCredsRequest::parent].
1702        ///
1703        /// This is a **required** field for requests.
1704        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1705            self.0.request.parent = v.into();
1706            self
1707        }
1708
1709        /// Sets the value of [user_creds][crate::model::CreateUserCredsRequest::user_creds].
1710        ///
1711        /// This is a **required** field for requests.
1712        pub fn set_user_creds<T>(mut self, v: T) -> Self
1713        where
1714            T: std::convert::Into<crate::model::UserCreds>,
1715        {
1716            self.0.request.user_creds = std::option::Option::Some(v.into());
1717            self
1718        }
1719
1720        /// Sets or clears the value of [user_creds][crate::model::CreateUserCredsRequest::user_creds].
1721        ///
1722        /// This is a **required** field for requests.
1723        pub fn set_or_clear_user_creds<T>(mut self, v: std::option::Option<T>) -> Self
1724        where
1725            T: std::convert::Into<crate::model::UserCreds>,
1726        {
1727            self.0.request.user_creds = v.map(|x| x.into());
1728            self
1729        }
1730
1731        /// Sets the value of [user_creds_id][crate::model::CreateUserCredsRequest::user_creds_id].
1732        ///
1733        /// This is a **required** field for requests.
1734        pub fn set_user_creds_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1735            self.0.request.user_creds_id = v.into();
1736            self
1737        }
1738    }
1739
1740    #[doc(hidden)]
1741    impl gax::options::internal::RequestBuilder for CreateUserCreds {
1742        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1743            &mut self.0.options
1744        }
1745    }
1746
1747    /// The request builder for [FirestoreAdmin::get_user_creds][crate::client::FirestoreAdmin::get_user_creds] calls.
1748    ///
1749    /// # Example
1750    /// ```
1751    /// # use google_cloud_firestore_admin_v1::builder::firestore_admin::GetUserCreds;
1752    /// # async fn sample() -> gax::Result<()> {
1753    ///
1754    /// let builder = prepare_request_builder();
1755    /// let response = builder.send().await?;
1756    /// # Ok(()) }
1757    ///
1758    /// fn prepare_request_builder() -> GetUserCreds {
1759    ///   # panic!();
1760    ///   // ... details omitted ...
1761    /// }
1762    /// ```
1763    #[derive(Clone, Debug)]
1764    pub struct GetUserCreds(RequestBuilder<crate::model::GetUserCredsRequest>);
1765
1766    impl GetUserCreds {
1767        pub(crate) fn new(
1768            stub: std::sync::Arc<dyn super::super::stub::dynamic::FirestoreAdmin>,
1769        ) -> Self {
1770            Self(RequestBuilder::new(stub))
1771        }
1772
1773        /// Sets the full request, replacing any prior values.
1774        pub fn with_request<V: Into<crate::model::GetUserCredsRequest>>(mut self, v: V) -> Self {
1775            self.0.request = v.into();
1776            self
1777        }
1778
1779        /// Sets all the options, replacing any prior values.
1780        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1781            self.0.options = v.into();
1782            self
1783        }
1784
1785        /// Sends the request.
1786        pub async fn send(self) -> Result<crate::model::UserCreds> {
1787            (*self.0.stub)
1788                .get_user_creds(self.0.request, self.0.options)
1789                .await
1790                .map(gax::response::Response::into_body)
1791        }
1792
1793        /// Sets the value of [name][crate::model::GetUserCredsRequest::name].
1794        ///
1795        /// This is a **required** field for requests.
1796        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1797            self.0.request.name = v.into();
1798            self
1799        }
1800    }
1801
1802    #[doc(hidden)]
1803    impl gax::options::internal::RequestBuilder for GetUserCreds {
1804        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1805            &mut self.0.options
1806        }
1807    }
1808
1809    /// The request builder for [FirestoreAdmin::list_user_creds][crate::client::FirestoreAdmin::list_user_creds] calls.
1810    ///
1811    /// # Example
1812    /// ```
1813    /// # use google_cloud_firestore_admin_v1::builder::firestore_admin::ListUserCreds;
1814    /// # async fn sample() -> gax::Result<()> {
1815    ///
1816    /// let builder = prepare_request_builder();
1817    /// let response = builder.send().await?;
1818    /// # Ok(()) }
1819    ///
1820    /// fn prepare_request_builder() -> ListUserCreds {
1821    ///   # panic!();
1822    ///   // ... details omitted ...
1823    /// }
1824    /// ```
1825    #[derive(Clone, Debug)]
1826    pub struct ListUserCreds(RequestBuilder<crate::model::ListUserCredsRequest>);
1827
1828    impl ListUserCreds {
1829        pub(crate) fn new(
1830            stub: std::sync::Arc<dyn super::super::stub::dynamic::FirestoreAdmin>,
1831        ) -> Self {
1832            Self(RequestBuilder::new(stub))
1833        }
1834
1835        /// Sets the full request, replacing any prior values.
1836        pub fn with_request<V: Into<crate::model::ListUserCredsRequest>>(mut self, v: V) -> Self {
1837            self.0.request = v.into();
1838            self
1839        }
1840
1841        /// Sets all the options, replacing any prior values.
1842        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1843            self.0.options = v.into();
1844            self
1845        }
1846
1847        /// Sends the request.
1848        pub async fn send(self) -> Result<crate::model::ListUserCredsResponse> {
1849            (*self.0.stub)
1850                .list_user_creds(self.0.request, self.0.options)
1851                .await
1852                .map(gax::response::Response::into_body)
1853        }
1854
1855        /// Sets the value of [parent][crate::model::ListUserCredsRequest::parent].
1856        ///
1857        /// This is a **required** field for requests.
1858        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1859            self.0.request.parent = v.into();
1860            self
1861        }
1862    }
1863
1864    #[doc(hidden)]
1865    impl gax::options::internal::RequestBuilder for ListUserCreds {
1866        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1867            &mut self.0.options
1868        }
1869    }
1870
1871    /// The request builder for [FirestoreAdmin::enable_user_creds][crate::client::FirestoreAdmin::enable_user_creds] calls.
1872    ///
1873    /// # Example
1874    /// ```
1875    /// # use google_cloud_firestore_admin_v1::builder::firestore_admin::EnableUserCreds;
1876    /// # async fn sample() -> gax::Result<()> {
1877    ///
1878    /// let builder = prepare_request_builder();
1879    /// let response = builder.send().await?;
1880    /// # Ok(()) }
1881    ///
1882    /// fn prepare_request_builder() -> EnableUserCreds {
1883    ///   # panic!();
1884    ///   // ... details omitted ...
1885    /// }
1886    /// ```
1887    #[derive(Clone, Debug)]
1888    pub struct EnableUserCreds(RequestBuilder<crate::model::EnableUserCredsRequest>);
1889
1890    impl EnableUserCreds {
1891        pub(crate) fn new(
1892            stub: std::sync::Arc<dyn super::super::stub::dynamic::FirestoreAdmin>,
1893        ) -> Self {
1894            Self(RequestBuilder::new(stub))
1895        }
1896
1897        /// Sets the full request, replacing any prior values.
1898        pub fn with_request<V: Into<crate::model::EnableUserCredsRequest>>(mut self, v: V) -> Self {
1899            self.0.request = v.into();
1900            self
1901        }
1902
1903        /// Sets all the options, replacing any prior values.
1904        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1905            self.0.options = v.into();
1906            self
1907        }
1908
1909        /// Sends the request.
1910        pub async fn send(self) -> Result<crate::model::UserCreds> {
1911            (*self.0.stub)
1912                .enable_user_creds(self.0.request, self.0.options)
1913                .await
1914                .map(gax::response::Response::into_body)
1915        }
1916
1917        /// Sets the value of [name][crate::model::EnableUserCredsRequest::name].
1918        ///
1919        /// This is a **required** field for requests.
1920        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1921            self.0.request.name = v.into();
1922            self
1923        }
1924    }
1925
1926    #[doc(hidden)]
1927    impl gax::options::internal::RequestBuilder for EnableUserCreds {
1928        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1929            &mut self.0.options
1930        }
1931    }
1932
1933    /// The request builder for [FirestoreAdmin::disable_user_creds][crate::client::FirestoreAdmin::disable_user_creds] calls.
1934    ///
1935    /// # Example
1936    /// ```
1937    /// # use google_cloud_firestore_admin_v1::builder::firestore_admin::DisableUserCreds;
1938    /// # async fn sample() -> gax::Result<()> {
1939    ///
1940    /// let builder = prepare_request_builder();
1941    /// let response = builder.send().await?;
1942    /// # Ok(()) }
1943    ///
1944    /// fn prepare_request_builder() -> DisableUserCreds {
1945    ///   # panic!();
1946    ///   // ... details omitted ...
1947    /// }
1948    /// ```
1949    #[derive(Clone, Debug)]
1950    pub struct DisableUserCreds(RequestBuilder<crate::model::DisableUserCredsRequest>);
1951
1952    impl DisableUserCreds {
1953        pub(crate) fn new(
1954            stub: std::sync::Arc<dyn super::super::stub::dynamic::FirestoreAdmin>,
1955        ) -> Self {
1956            Self(RequestBuilder::new(stub))
1957        }
1958
1959        /// Sets the full request, replacing any prior values.
1960        pub fn with_request<V: Into<crate::model::DisableUserCredsRequest>>(
1961            mut self,
1962            v: V,
1963        ) -> Self {
1964            self.0.request = v.into();
1965            self
1966        }
1967
1968        /// Sets all the options, replacing any prior values.
1969        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1970            self.0.options = v.into();
1971            self
1972        }
1973
1974        /// Sends the request.
1975        pub async fn send(self) -> Result<crate::model::UserCreds> {
1976            (*self.0.stub)
1977                .disable_user_creds(self.0.request, self.0.options)
1978                .await
1979                .map(gax::response::Response::into_body)
1980        }
1981
1982        /// Sets the value of [name][crate::model::DisableUserCredsRequest::name].
1983        ///
1984        /// This is a **required** field for requests.
1985        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1986            self.0.request.name = v.into();
1987            self
1988        }
1989    }
1990
1991    #[doc(hidden)]
1992    impl gax::options::internal::RequestBuilder for DisableUserCreds {
1993        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1994            &mut self.0.options
1995        }
1996    }
1997
1998    /// The request builder for [FirestoreAdmin::reset_user_password][crate::client::FirestoreAdmin::reset_user_password] calls.
1999    ///
2000    /// # Example
2001    /// ```
2002    /// # use google_cloud_firestore_admin_v1::builder::firestore_admin::ResetUserPassword;
2003    /// # async fn sample() -> gax::Result<()> {
2004    ///
2005    /// let builder = prepare_request_builder();
2006    /// let response = builder.send().await?;
2007    /// # Ok(()) }
2008    ///
2009    /// fn prepare_request_builder() -> ResetUserPassword {
2010    ///   # panic!();
2011    ///   // ... details omitted ...
2012    /// }
2013    /// ```
2014    #[derive(Clone, Debug)]
2015    pub struct ResetUserPassword(RequestBuilder<crate::model::ResetUserPasswordRequest>);
2016
2017    impl ResetUserPassword {
2018        pub(crate) fn new(
2019            stub: std::sync::Arc<dyn super::super::stub::dynamic::FirestoreAdmin>,
2020        ) -> Self {
2021            Self(RequestBuilder::new(stub))
2022        }
2023
2024        /// Sets the full request, replacing any prior values.
2025        pub fn with_request<V: Into<crate::model::ResetUserPasswordRequest>>(
2026            mut self,
2027            v: V,
2028        ) -> Self {
2029            self.0.request = v.into();
2030            self
2031        }
2032
2033        /// Sets all the options, replacing any prior values.
2034        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2035            self.0.options = v.into();
2036            self
2037        }
2038
2039        /// Sends the request.
2040        pub async fn send(self) -> Result<crate::model::UserCreds> {
2041            (*self.0.stub)
2042                .reset_user_password(self.0.request, self.0.options)
2043                .await
2044                .map(gax::response::Response::into_body)
2045        }
2046
2047        /// Sets the value of [name][crate::model::ResetUserPasswordRequest::name].
2048        ///
2049        /// This is a **required** field for requests.
2050        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2051            self.0.request.name = v.into();
2052            self
2053        }
2054    }
2055
2056    #[doc(hidden)]
2057    impl gax::options::internal::RequestBuilder for ResetUserPassword {
2058        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2059            &mut self.0.options
2060        }
2061    }
2062
2063    /// The request builder for [FirestoreAdmin::delete_user_creds][crate::client::FirestoreAdmin::delete_user_creds] calls.
2064    ///
2065    /// # Example
2066    /// ```
2067    /// # use google_cloud_firestore_admin_v1::builder::firestore_admin::DeleteUserCreds;
2068    /// # async fn sample() -> gax::Result<()> {
2069    ///
2070    /// let builder = prepare_request_builder();
2071    /// let response = builder.send().await?;
2072    /// # Ok(()) }
2073    ///
2074    /// fn prepare_request_builder() -> DeleteUserCreds {
2075    ///   # panic!();
2076    ///   // ... details omitted ...
2077    /// }
2078    /// ```
2079    #[derive(Clone, Debug)]
2080    pub struct DeleteUserCreds(RequestBuilder<crate::model::DeleteUserCredsRequest>);
2081
2082    impl DeleteUserCreds {
2083        pub(crate) fn new(
2084            stub: std::sync::Arc<dyn super::super::stub::dynamic::FirestoreAdmin>,
2085        ) -> Self {
2086            Self(RequestBuilder::new(stub))
2087        }
2088
2089        /// Sets the full request, replacing any prior values.
2090        pub fn with_request<V: Into<crate::model::DeleteUserCredsRequest>>(mut self, v: V) -> Self {
2091            self.0.request = v.into();
2092            self
2093        }
2094
2095        /// Sets all the options, replacing any prior values.
2096        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2097            self.0.options = v.into();
2098            self
2099        }
2100
2101        /// Sends the request.
2102        pub async fn send(self) -> Result<()> {
2103            (*self.0.stub)
2104                .delete_user_creds(self.0.request, self.0.options)
2105                .await
2106                .map(gax::response::Response::into_body)
2107        }
2108
2109        /// Sets the value of [name][crate::model::DeleteUserCredsRequest::name].
2110        ///
2111        /// This is a **required** field for requests.
2112        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2113            self.0.request.name = v.into();
2114            self
2115        }
2116    }
2117
2118    #[doc(hidden)]
2119    impl gax::options::internal::RequestBuilder for DeleteUserCreds {
2120        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2121            &mut self.0.options
2122        }
2123    }
2124
2125    /// The request builder for [FirestoreAdmin::get_backup][crate::client::FirestoreAdmin::get_backup] calls.
2126    ///
2127    /// # Example
2128    /// ```
2129    /// # use google_cloud_firestore_admin_v1::builder::firestore_admin::GetBackup;
2130    /// # async fn sample() -> gax::Result<()> {
2131    ///
2132    /// let builder = prepare_request_builder();
2133    /// let response = builder.send().await?;
2134    /// # Ok(()) }
2135    ///
2136    /// fn prepare_request_builder() -> GetBackup {
2137    ///   # panic!();
2138    ///   // ... details omitted ...
2139    /// }
2140    /// ```
2141    #[derive(Clone, Debug)]
2142    pub struct GetBackup(RequestBuilder<crate::model::GetBackupRequest>);
2143
2144    impl GetBackup {
2145        pub(crate) fn new(
2146            stub: std::sync::Arc<dyn super::super::stub::dynamic::FirestoreAdmin>,
2147        ) -> Self {
2148            Self(RequestBuilder::new(stub))
2149        }
2150
2151        /// Sets the full request, replacing any prior values.
2152        pub fn with_request<V: Into<crate::model::GetBackupRequest>>(mut self, v: V) -> Self {
2153            self.0.request = v.into();
2154            self
2155        }
2156
2157        /// Sets all the options, replacing any prior values.
2158        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2159            self.0.options = v.into();
2160            self
2161        }
2162
2163        /// Sends the request.
2164        pub async fn send(self) -> Result<crate::model::Backup> {
2165            (*self.0.stub)
2166                .get_backup(self.0.request, self.0.options)
2167                .await
2168                .map(gax::response::Response::into_body)
2169        }
2170
2171        /// Sets the value of [name][crate::model::GetBackupRequest::name].
2172        ///
2173        /// This is a **required** field for requests.
2174        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2175            self.0.request.name = v.into();
2176            self
2177        }
2178    }
2179
2180    #[doc(hidden)]
2181    impl gax::options::internal::RequestBuilder for GetBackup {
2182        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2183            &mut self.0.options
2184        }
2185    }
2186
2187    /// The request builder for [FirestoreAdmin::list_backups][crate::client::FirestoreAdmin::list_backups] calls.
2188    ///
2189    /// # Example
2190    /// ```
2191    /// # use google_cloud_firestore_admin_v1::builder::firestore_admin::ListBackups;
2192    /// # async fn sample() -> gax::Result<()> {
2193    ///
2194    /// let builder = prepare_request_builder();
2195    /// let response = builder.send().await?;
2196    /// # Ok(()) }
2197    ///
2198    /// fn prepare_request_builder() -> ListBackups {
2199    ///   # panic!();
2200    ///   // ... details omitted ...
2201    /// }
2202    /// ```
2203    #[derive(Clone, Debug)]
2204    pub struct ListBackups(RequestBuilder<crate::model::ListBackupsRequest>);
2205
2206    impl ListBackups {
2207        pub(crate) fn new(
2208            stub: std::sync::Arc<dyn super::super::stub::dynamic::FirestoreAdmin>,
2209        ) -> Self {
2210            Self(RequestBuilder::new(stub))
2211        }
2212
2213        /// Sets the full request, replacing any prior values.
2214        pub fn with_request<V: Into<crate::model::ListBackupsRequest>>(mut self, v: V) -> Self {
2215            self.0.request = v.into();
2216            self
2217        }
2218
2219        /// Sets all the options, replacing any prior values.
2220        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2221            self.0.options = v.into();
2222            self
2223        }
2224
2225        /// Sends the request.
2226        pub async fn send(self) -> Result<crate::model::ListBackupsResponse> {
2227            (*self.0.stub)
2228                .list_backups(self.0.request, self.0.options)
2229                .await
2230                .map(gax::response::Response::into_body)
2231        }
2232
2233        /// Sets the value of [parent][crate::model::ListBackupsRequest::parent].
2234        ///
2235        /// This is a **required** field for requests.
2236        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2237            self.0.request.parent = v.into();
2238            self
2239        }
2240
2241        /// Sets the value of [filter][crate::model::ListBackupsRequest::filter].
2242        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
2243            self.0.request.filter = v.into();
2244            self
2245        }
2246    }
2247
2248    #[doc(hidden)]
2249    impl gax::options::internal::RequestBuilder for ListBackups {
2250        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2251            &mut self.0.options
2252        }
2253    }
2254
2255    /// The request builder for [FirestoreAdmin::delete_backup][crate::client::FirestoreAdmin::delete_backup] calls.
2256    ///
2257    /// # Example
2258    /// ```
2259    /// # use google_cloud_firestore_admin_v1::builder::firestore_admin::DeleteBackup;
2260    /// # async fn sample() -> gax::Result<()> {
2261    ///
2262    /// let builder = prepare_request_builder();
2263    /// let response = builder.send().await?;
2264    /// # Ok(()) }
2265    ///
2266    /// fn prepare_request_builder() -> DeleteBackup {
2267    ///   # panic!();
2268    ///   // ... details omitted ...
2269    /// }
2270    /// ```
2271    #[derive(Clone, Debug)]
2272    pub struct DeleteBackup(RequestBuilder<crate::model::DeleteBackupRequest>);
2273
2274    impl DeleteBackup {
2275        pub(crate) fn new(
2276            stub: std::sync::Arc<dyn super::super::stub::dynamic::FirestoreAdmin>,
2277        ) -> Self {
2278            Self(RequestBuilder::new(stub))
2279        }
2280
2281        /// Sets the full request, replacing any prior values.
2282        pub fn with_request<V: Into<crate::model::DeleteBackupRequest>>(mut self, v: V) -> Self {
2283            self.0.request = v.into();
2284            self
2285        }
2286
2287        /// Sets all the options, replacing any prior values.
2288        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2289            self.0.options = v.into();
2290            self
2291        }
2292
2293        /// Sends the request.
2294        pub async fn send(self) -> Result<()> {
2295            (*self.0.stub)
2296                .delete_backup(self.0.request, self.0.options)
2297                .await
2298                .map(gax::response::Response::into_body)
2299        }
2300
2301        /// Sets the value of [name][crate::model::DeleteBackupRequest::name].
2302        ///
2303        /// This is a **required** field for requests.
2304        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2305            self.0.request.name = v.into();
2306            self
2307        }
2308    }
2309
2310    #[doc(hidden)]
2311    impl gax::options::internal::RequestBuilder for DeleteBackup {
2312        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2313            &mut self.0.options
2314        }
2315    }
2316
2317    /// The request builder for [FirestoreAdmin::restore_database][crate::client::FirestoreAdmin::restore_database] calls.
2318    ///
2319    /// # Example
2320    /// ```
2321    /// # use google_cloud_firestore_admin_v1::builder::firestore_admin::RestoreDatabase;
2322    /// # async fn sample() -> gax::Result<()> {
2323    /// use lro::Poller;
2324    ///
2325    /// let builder = prepare_request_builder();
2326    /// let response = builder.poller().until_done().await?;
2327    /// # Ok(()) }
2328    ///
2329    /// fn prepare_request_builder() -> RestoreDatabase {
2330    ///   # panic!();
2331    ///   // ... details omitted ...
2332    /// }
2333    /// ```
2334    #[derive(Clone, Debug)]
2335    pub struct RestoreDatabase(RequestBuilder<crate::model::RestoreDatabaseRequest>);
2336
2337    impl RestoreDatabase {
2338        pub(crate) fn new(
2339            stub: std::sync::Arc<dyn super::super::stub::dynamic::FirestoreAdmin>,
2340        ) -> Self {
2341            Self(RequestBuilder::new(stub))
2342        }
2343
2344        /// Sets the full request, replacing any prior values.
2345        pub fn with_request<V: Into<crate::model::RestoreDatabaseRequest>>(mut self, v: V) -> Self {
2346            self.0.request = v.into();
2347            self
2348        }
2349
2350        /// Sets all the options, replacing any prior values.
2351        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2352            self.0.options = v.into();
2353            self
2354        }
2355
2356        /// Sends the request.
2357        ///
2358        /// # Long running operations
2359        ///
2360        /// This starts, but does not poll, a longrunning operation. More information
2361        /// on [restore_database][crate::client::FirestoreAdmin::restore_database].
2362        pub async fn send(self) -> Result<longrunning::model::Operation> {
2363            (*self.0.stub)
2364                .restore_database(self.0.request, self.0.options)
2365                .await
2366                .map(gax::response::Response::into_body)
2367        }
2368
2369        /// Creates a [Poller][lro::Poller] to work with `restore_database`.
2370        pub fn poller(
2371            self,
2372        ) -> impl lro::Poller<crate::model::Database, crate::model::RestoreDatabaseMetadata>
2373        {
2374            type Operation = lro::internal::Operation<
2375                crate::model::Database,
2376                crate::model::RestoreDatabaseMetadata,
2377            >;
2378            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2379            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2380
2381            let stub = self.0.stub.clone();
2382            let mut options = self.0.options.clone();
2383            options.set_retry_policy(gax::retry_policy::NeverRetry);
2384            let query = move |name| {
2385                let stub = stub.clone();
2386                let options = options.clone();
2387                async {
2388                    let op = GetOperation::new(stub)
2389                        .set_name(name)
2390                        .with_options(options)
2391                        .send()
2392                        .await?;
2393                    Ok(Operation::new(op))
2394                }
2395            };
2396
2397            let start = move || async {
2398                let op = self.send().await?;
2399                Ok(Operation::new(op))
2400            };
2401
2402            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
2403        }
2404
2405        /// Sets the value of [parent][crate::model::RestoreDatabaseRequest::parent].
2406        ///
2407        /// This is a **required** field for requests.
2408        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2409            self.0.request.parent = v.into();
2410            self
2411        }
2412
2413        /// Sets the value of [database_id][crate::model::RestoreDatabaseRequest::database_id].
2414        ///
2415        /// This is a **required** field for requests.
2416        pub fn set_database_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2417            self.0.request.database_id = v.into();
2418            self
2419        }
2420
2421        /// Sets the value of [backup][crate::model::RestoreDatabaseRequest::backup].
2422        ///
2423        /// This is a **required** field for requests.
2424        pub fn set_backup<T: Into<std::string::String>>(mut self, v: T) -> Self {
2425            self.0.request.backup = v.into();
2426            self
2427        }
2428
2429        /// Sets the value of [encryption_config][crate::model::RestoreDatabaseRequest::encryption_config].
2430        pub fn set_encryption_config<T>(mut self, v: T) -> Self
2431        where
2432            T: std::convert::Into<crate::model::database::EncryptionConfig>,
2433        {
2434            self.0.request.encryption_config = std::option::Option::Some(v.into());
2435            self
2436        }
2437
2438        /// Sets or clears the value of [encryption_config][crate::model::RestoreDatabaseRequest::encryption_config].
2439        pub fn set_or_clear_encryption_config<T>(mut self, v: std::option::Option<T>) -> Self
2440        where
2441            T: std::convert::Into<crate::model::database::EncryptionConfig>,
2442        {
2443            self.0.request.encryption_config = v.map(|x| x.into());
2444            self
2445        }
2446
2447        /// Sets the value of [tags][crate::model::RestoreDatabaseRequest::tags].
2448        pub fn set_tags<T, K, V>(mut self, v: T) -> Self
2449        where
2450            T: std::iter::IntoIterator<Item = (K, V)>,
2451            K: std::convert::Into<std::string::String>,
2452            V: std::convert::Into<std::string::String>,
2453        {
2454            self.0.request.tags = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
2455            self
2456        }
2457    }
2458
2459    #[doc(hidden)]
2460    impl gax::options::internal::RequestBuilder for RestoreDatabase {
2461        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2462            &mut self.0.options
2463        }
2464    }
2465
2466    /// The request builder for [FirestoreAdmin::create_backup_schedule][crate::client::FirestoreAdmin::create_backup_schedule] calls.
2467    ///
2468    /// # Example
2469    /// ```
2470    /// # use google_cloud_firestore_admin_v1::builder::firestore_admin::CreateBackupSchedule;
2471    /// # async fn sample() -> gax::Result<()> {
2472    ///
2473    /// let builder = prepare_request_builder();
2474    /// let response = builder.send().await?;
2475    /// # Ok(()) }
2476    ///
2477    /// fn prepare_request_builder() -> CreateBackupSchedule {
2478    ///   # panic!();
2479    ///   // ... details omitted ...
2480    /// }
2481    /// ```
2482    #[derive(Clone, Debug)]
2483    pub struct CreateBackupSchedule(RequestBuilder<crate::model::CreateBackupScheduleRequest>);
2484
2485    impl CreateBackupSchedule {
2486        pub(crate) fn new(
2487            stub: std::sync::Arc<dyn super::super::stub::dynamic::FirestoreAdmin>,
2488        ) -> Self {
2489            Self(RequestBuilder::new(stub))
2490        }
2491
2492        /// Sets the full request, replacing any prior values.
2493        pub fn with_request<V: Into<crate::model::CreateBackupScheduleRequest>>(
2494            mut self,
2495            v: V,
2496        ) -> Self {
2497            self.0.request = v.into();
2498            self
2499        }
2500
2501        /// Sets all the options, replacing any prior values.
2502        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2503            self.0.options = v.into();
2504            self
2505        }
2506
2507        /// Sends the request.
2508        pub async fn send(self) -> Result<crate::model::BackupSchedule> {
2509            (*self.0.stub)
2510                .create_backup_schedule(self.0.request, self.0.options)
2511                .await
2512                .map(gax::response::Response::into_body)
2513        }
2514
2515        /// Sets the value of [parent][crate::model::CreateBackupScheduleRequest::parent].
2516        ///
2517        /// This is a **required** field for requests.
2518        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2519            self.0.request.parent = v.into();
2520            self
2521        }
2522
2523        /// Sets the value of [backup_schedule][crate::model::CreateBackupScheduleRequest::backup_schedule].
2524        ///
2525        /// This is a **required** field for requests.
2526        pub fn set_backup_schedule<T>(mut self, v: T) -> Self
2527        where
2528            T: std::convert::Into<crate::model::BackupSchedule>,
2529        {
2530            self.0.request.backup_schedule = std::option::Option::Some(v.into());
2531            self
2532        }
2533
2534        /// Sets or clears the value of [backup_schedule][crate::model::CreateBackupScheduleRequest::backup_schedule].
2535        ///
2536        /// This is a **required** field for requests.
2537        pub fn set_or_clear_backup_schedule<T>(mut self, v: std::option::Option<T>) -> Self
2538        where
2539            T: std::convert::Into<crate::model::BackupSchedule>,
2540        {
2541            self.0.request.backup_schedule = v.map(|x| x.into());
2542            self
2543        }
2544    }
2545
2546    #[doc(hidden)]
2547    impl gax::options::internal::RequestBuilder for CreateBackupSchedule {
2548        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2549            &mut self.0.options
2550        }
2551    }
2552
2553    /// The request builder for [FirestoreAdmin::get_backup_schedule][crate::client::FirestoreAdmin::get_backup_schedule] calls.
2554    ///
2555    /// # Example
2556    /// ```
2557    /// # use google_cloud_firestore_admin_v1::builder::firestore_admin::GetBackupSchedule;
2558    /// # async fn sample() -> gax::Result<()> {
2559    ///
2560    /// let builder = prepare_request_builder();
2561    /// let response = builder.send().await?;
2562    /// # Ok(()) }
2563    ///
2564    /// fn prepare_request_builder() -> GetBackupSchedule {
2565    ///   # panic!();
2566    ///   // ... details omitted ...
2567    /// }
2568    /// ```
2569    #[derive(Clone, Debug)]
2570    pub struct GetBackupSchedule(RequestBuilder<crate::model::GetBackupScheduleRequest>);
2571
2572    impl GetBackupSchedule {
2573        pub(crate) fn new(
2574            stub: std::sync::Arc<dyn super::super::stub::dynamic::FirestoreAdmin>,
2575        ) -> Self {
2576            Self(RequestBuilder::new(stub))
2577        }
2578
2579        /// Sets the full request, replacing any prior values.
2580        pub fn with_request<V: Into<crate::model::GetBackupScheduleRequest>>(
2581            mut self,
2582            v: V,
2583        ) -> Self {
2584            self.0.request = v.into();
2585            self
2586        }
2587
2588        /// Sets all the options, replacing any prior values.
2589        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2590            self.0.options = v.into();
2591            self
2592        }
2593
2594        /// Sends the request.
2595        pub async fn send(self) -> Result<crate::model::BackupSchedule> {
2596            (*self.0.stub)
2597                .get_backup_schedule(self.0.request, self.0.options)
2598                .await
2599                .map(gax::response::Response::into_body)
2600        }
2601
2602        /// Sets the value of [name][crate::model::GetBackupScheduleRequest::name].
2603        ///
2604        /// This is a **required** field for requests.
2605        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2606            self.0.request.name = v.into();
2607            self
2608        }
2609    }
2610
2611    #[doc(hidden)]
2612    impl gax::options::internal::RequestBuilder for GetBackupSchedule {
2613        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2614            &mut self.0.options
2615        }
2616    }
2617
2618    /// The request builder for [FirestoreAdmin::list_backup_schedules][crate::client::FirestoreAdmin::list_backup_schedules] calls.
2619    ///
2620    /// # Example
2621    /// ```
2622    /// # use google_cloud_firestore_admin_v1::builder::firestore_admin::ListBackupSchedules;
2623    /// # async fn sample() -> gax::Result<()> {
2624    ///
2625    /// let builder = prepare_request_builder();
2626    /// let response = builder.send().await?;
2627    /// # Ok(()) }
2628    ///
2629    /// fn prepare_request_builder() -> ListBackupSchedules {
2630    ///   # panic!();
2631    ///   // ... details omitted ...
2632    /// }
2633    /// ```
2634    #[derive(Clone, Debug)]
2635    pub struct ListBackupSchedules(RequestBuilder<crate::model::ListBackupSchedulesRequest>);
2636
2637    impl ListBackupSchedules {
2638        pub(crate) fn new(
2639            stub: std::sync::Arc<dyn super::super::stub::dynamic::FirestoreAdmin>,
2640        ) -> Self {
2641            Self(RequestBuilder::new(stub))
2642        }
2643
2644        /// Sets the full request, replacing any prior values.
2645        pub fn with_request<V: Into<crate::model::ListBackupSchedulesRequest>>(
2646            mut self,
2647            v: V,
2648        ) -> Self {
2649            self.0.request = v.into();
2650            self
2651        }
2652
2653        /// Sets all the options, replacing any prior values.
2654        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2655            self.0.options = v.into();
2656            self
2657        }
2658
2659        /// Sends the request.
2660        pub async fn send(self) -> Result<crate::model::ListBackupSchedulesResponse> {
2661            (*self.0.stub)
2662                .list_backup_schedules(self.0.request, self.0.options)
2663                .await
2664                .map(gax::response::Response::into_body)
2665        }
2666
2667        /// Sets the value of [parent][crate::model::ListBackupSchedulesRequest::parent].
2668        ///
2669        /// This is a **required** field for requests.
2670        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2671            self.0.request.parent = v.into();
2672            self
2673        }
2674    }
2675
2676    #[doc(hidden)]
2677    impl gax::options::internal::RequestBuilder for ListBackupSchedules {
2678        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2679            &mut self.0.options
2680        }
2681    }
2682
2683    /// The request builder for [FirestoreAdmin::update_backup_schedule][crate::client::FirestoreAdmin::update_backup_schedule] calls.
2684    ///
2685    /// # Example
2686    /// ```
2687    /// # use google_cloud_firestore_admin_v1::builder::firestore_admin::UpdateBackupSchedule;
2688    /// # async fn sample() -> gax::Result<()> {
2689    ///
2690    /// let builder = prepare_request_builder();
2691    /// let response = builder.send().await?;
2692    /// # Ok(()) }
2693    ///
2694    /// fn prepare_request_builder() -> UpdateBackupSchedule {
2695    ///   # panic!();
2696    ///   // ... details omitted ...
2697    /// }
2698    /// ```
2699    #[derive(Clone, Debug)]
2700    pub struct UpdateBackupSchedule(RequestBuilder<crate::model::UpdateBackupScheduleRequest>);
2701
2702    impl UpdateBackupSchedule {
2703        pub(crate) fn new(
2704            stub: std::sync::Arc<dyn super::super::stub::dynamic::FirestoreAdmin>,
2705        ) -> Self {
2706            Self(RequestBuilder::new(stub))
2707        }
2708
2709        /// Sets the full request, replacing any prior values.
2710        pub fn with_request<V: Into<crate::model::UpdateBackupScheduleRequest>>(
2711            mut self,
2712            v: V,
2713        ) -> Self {
2714            self.0.request = v.into();
2715            self
2716        }
2717
2718        /// Sets all the options, replacing any prior values.
2719        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2720            self.0.options = v.into();
2721            self
2722        }
2723
2724        /// Sends the request.
2725        pub async fn send(self) -> Result<crate::model::BackupSchedule> {
2726            (*self.0.stub)
2727                .update_backup_schedule(self.0.request, self.0.options)
2728                .await
2729                .map(gax::response::Response::into_body)
2730        }
2731
2732        /// Sets the value of [backup_schedule][crate::model::UpdateBackupScheduleRequest::backup_schedule].
2733        ///
2734        /// This is a **required** field for requests.
2735        pub fn set_backup_schedule<T>(mut self, v: T) -> Self
2736        where
2737            T: std::convert::Into<crate::model::BackupSchedule>,
2738        {
2739            self.0.request.backup_schedule = std::option::Option::Some(v.into());
2740            self
2741        }
2742
2743        /// Sets or clears the value of [backup_schedule][crate::model::UpdateBackupScheduleRequest::backup_schedule].
2744        ///
2745        /// This is a **required** field for requests.
2746        pub fn set_or_clear_backup_schedule<T>(mut self, v: std::option::Option<T>) -> Self
2747        where
2748            T: std::convert::Into<crate::model::BackupSchedule>,
2749        {
2750            self.0.request.backup_schedule = v.map(|x| x.into());
2751            self
2752        }
2753
2754        /// Sets the value of [update_mask][crate::model::UpdateBackupScheduleRequest::update_mask].
2755        pub fn set_update_mask<T>(mut self, v: T) -> Self
2756        where
2757            T: std::convert::Into<wkt::FieldMask>,
2758        {
2759            self.0.request.update_mask = std::option::Option::Some(v.into());
2760            self
2761        }
2762
2763        /// Sets or clears the value of [update_mask][crate::model::UpdateBackupScheduleRequest::update_mask].
2764        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
2765        where
2766            T: std::convert::Into<wkt::FieldMask>,
2767        {
2768            self.0.request.update_mask = v.map(|x| x.into());
2769            self
2770        }
2771    }
2772
2773    #[doc(hidden)]
2774    impl gax::options::internal::RequestBuilder for UpdateBackupSchedule {
2775        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2776            &mut self.0.options
2777        }
2778    }
2779
2780    /// The request builder for [FirestoreAdmin::delete_backup_schedule][crate::client::FirestoreAdmin::delete_backup_schedule] calls.
2781    ///
2782    /// # Example
2783    /// ```
2784    /// # use google_cloud_firestore_admin_v1::builder::firestore_admin::DeleteBackupSchedule;
2785    /// # async fn sample() -> gax::Result<()> {
2786    ///
2787    /// let builder = prepare_request_builder();
2788    /// let response = builder.send().await?;
2789    /// # Ok(()) }
2790    ///
2791    /// fn prepare_request_builder() -> DeleteBackupSchedule {
2792    ///   # panic!();
2793    ///   // ... details omitted ...
2794    /// }
2795    /// ```
2796    #[derive(Clone, Debug)]
2797    pub struct DeleteBackupSchedule(RequestBuilder<crate::model::DeleteBackupScheduleRequest>);
2798
2799    impl DeleteBackupSchedule {
2800        pub(crate) fn new(
2801            stub: std::sync::Arc<dyn super::super::stub::dynamic::FirestoreAdmin>,
2802        ) -> Self {
2803            Self(RequestBuilder::new(stub))
2804        }
2805
2806        /// Sets the full request, replacing any prior values.
2807        pub fn with_request<V: Into<crate::model::DeleteBackupScheduleRequest>>(
2808            mut self,
2809            v: V,
2810        ) -> Self {
2811            self.0.request = v.into();
2812            self
2813        }
2814
2815        /// Sets all the options, replacing any prior values.
2816        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2817            self.0.options = v.into();
2818            self
2819        }
2820
2821        /// Sends the request.
2822        pub async fn send(self) -> Result<()> {
2823            (*self.0.stub)
2824                .delete_backup_schedule(self.0.request, self.0.options)
2825                .await
2826                .map(gax::response::Response::into_body)
2827        }
2828
2829        /// Sets the value of [name][crate::model::DeleteBackupScheduleRequest::name].
2830        ///
2831        /// This is a **required** field for requests.
2832        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2833            self.0.request.name = v.into();
2834            self
2835        }
2836    }
2837
2838    #[doc(hidden)]
2839    impl gax::options::internal::RequestBuilder for DeleteBackupSchedule {
2840        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2841            &mut self.0.options
2842        }
2843    }
2844
2845    /// The request builder for [FirestoreAdmin::clone_database][crate::client::FirestoreAdmin::clone_database] calls.
2846    ///
2847    /// # Example
2848    /// ```
2849    /// # use google_cloud_firestore_admin_v1::builder::firestore_admin::CloneDatabase;
2850    /// # async fn sample() -> gax::Result<()> {
2851    /// use lro::Poller;
2852    ///
2853    /// let builder = prepare_request_builder();
2854    /// let response = builder.poller().until_done().await?;
2855    /// # Ok(()) }
2856    ///
2857    /// fn prepare_request_builder() -> CloneDatabase {
2858    ///   # panic!();
2859    ///   // ... details omitted ...
2860    /// }
2861    /// ```
2862    #[derive(Clone, Debug)]
2863    pub struct CloneDatabase(RequestBuilder<crate::model::CloneDatabaseRequest>);
2864
2865    impl CloneDatabase {
2866        pub(crate) fn new(
2867            stub: std::sync::Arc<dyn super::super::stub::dynamic::FirestoreAdmin>,
2868        ) -> Self {
2869            Self(RequestBuilder::new(stub))
2870        }
2871
2872        /// Sets the full request, replacing any prior values.
2873        pub fn with_request<V: Into<crate::model::CloneDatabaseRequest>>(mut self, v: V) -> Self {
2874            self.0.request = v.into();
2875            self
2876        }
2877
2878        /// Sets all the options, replacing any prior values.
2879        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2880            self.0.options = v.into();
2881            self
2882        }
2883
2884        /// Sends the request.
2885        ///
2886        /// # Long running operations
2887        ///
2888        /// This starts, but does not poll, a longrunning operation. More information
2889        /// on [clone_database][crate::client::FirestoreAdmin::clone_database].
2890        pub async fn send(self) -> Result<longrunning::model::Operation> {
2891            (*self.0.stub)
2892                .clone_database(self.0.request, self.0.options)
2893                .await
2894                .map(gax::response::Response::into_body)
2895        }
2896
2897        /// Creates a [Poller][lro::Poller] to work with `clone_database`.
2898        pub fn poller(
2899            self,
2900        ) -> impl lro::Poller<crate::model::Database, crate::model::CloneDatabaseMetadata> {
2901            type Operation = lro::internal::Operation<
2902                crate::model::Database,
2903                crate::model::CloneDatabaseMetadata,
2904            >;
2905            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2906            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2907
2908            let stub = self.0.stub.clone();
2909            let mut options = self.0.options.clone();
2910            options.set_retry_policy(gax::retry_policy::NeverRetry);
2911            let query = move |name| {
2912                let stub = stub.clone();
2913                let options = options.clone();
2914                async {
2915                    let op = GetOperation::new(stub)
2916                        .set_name(name)
2917                        .with_options(options)
2918                        .send()
2919                        .await?;
2920                    Ok(Operation::new(op))
2921                }
2922            };
2923
2924            let start = move || async {
2925                let op = self.send().await?;
2926                Ok(Operation::new(op))
2927            };
2928
2929            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
2930        }
2931
2932        /// Sets the value of [parent][crate::model::CloneDatabaseRequest::parent].
2933        ///
2934        /// This is a **required** field for requests.
2935        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2936            self.0.request.parent = v.into();
2937            self
2938        }
2939
2940        /// Sets the value of [database_id][crate::model::CloneDatabaseRequest::database_id].
2941        ///
2942        /// This is a **required** field for requests.
2943        pub fn set_database_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2944            self.0.request.database_id = v.into();
2945            self
2946        }
2947
2948        /// Sets the value of [pitr_snapshot][crate::model::CloneDatabaseRequest::pitr_snapshot].
2949        ///
2950        /// This is a **required** field for requests.
2951        pub fn set_pitr_snapshot<T>(mut self, v: T) -> Self
2952        where
2953            T: std::convert::Into<crate::model::PitrSnapshot>,
2954        {
2955            self.0.request.pitr_snapshot = std::option::Option::Some(v.into());
2956            self
2957        }
2958
2959        /// Sets or clears the value of [pitr_snapshot][crate::model::CloneDatabaseRequest::pitr_snapshot].
2960        ///
2961        /// This is a **required** field for requests.
2962        pub fn set_or_clear_pitr_snapshot<T>(mut self, v: std::option::Option<T>) -> Self
2963        where
2964            T: std::convert::Into<crate::model::PitrSnapshot>,
2965        {
2966            self.0.request.pitr_snapshot = v.map(|x| x.into());
2967            self
2968        }
2969
2970        /// Sets the value of [encryption_config][crate::model::CloneDatabaseRequest::encryption_config].
2971        pub fn set_encryption_config<T>(mut self, v: T) -> Self
2972        where
2973            T: std::convert::Into<crate::model::database::EncryptionConfig>,
2974        {
2975            self.0.request.encryption_config = std::option::Option::Some(v.into());
2976            self
2977        }
2978
2979        /// Sets or clears the value of [encryption_config][crate::model::CloneDatabaseRequest::encryption_config].
2980        pub fn set_or_clear_encryption_config<T>(mut self, v: std::option::Option<T>) -> Self
2981        where
2982            T: std::convert::Into<crate::model::database::EncryptionConfig>,
2983        {
2984            self.0.request.encryption_config = v.map(|x| x.into());
2985            self
2986        }
2987
2988        /// Sets the value of [tags][crate::model::CloneDatabaseRequest::tags].
2989        pub fn set_tags<T, K, V>(mut self, v: T) -> Self
2990        where
2991            T: std::iter::IntoIterator<Item = (K, V)>,
2992            K: std::convert::Into<std::string::String>,
2993            V: std::convert::Into<std::string::String>,
2994        {
2995            self.0.request.tags = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
2996            self
2997        }
2998    }
2999
3000    #[doc(hidden)]
3001    impl gax::options::internal::RequestBuilder for CloneDatabase {
3002        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3003            &mut self.0.options
3004        }
3005    }
3006
3007    /// The request builder for [FirestoreAdmin::list_operations][crate::client::FirestoreAdmin::list_operations] calls.
3008    ///
3009    /// # Example
3010    /// ```
3011    /// # use google_cloud_firestore_admin_v1::builder::firestore_admin::ListOperations;
3012    /// # async fn sample() -> gax::Result<()> {
3013    /// use gax::paginator::ItemPaginator;
3014    ///
3015    /// let builder = prepare_request_builder();
3016    /// let mut items = builder.by_item();
3017    /// while let Some(result) = items.next().await {
3018    ///   let item = result?;
3019    /// }
3020    /// # Ok(()) }
3021    ///
3022    /// fn prepare_request_builder() -> ListOperations {
3023    ///   # panic!();
3024    ///   // ... details omitted ...
3025    /// }
3026    /// ```
3027    #[derive(Clone, Debug)]
3028    pub struct ListOperations(RequestBuilder<longrunning::model::ListOperationsRequest>);
3029
3030    impl ListOperations {
3031        pub(crate) fn new(
3032            stub: std::sync::Arc<dyn super::super::stub::dynamic::FirestoreAdmin>,
3033        ) -> Self {
3034            Self(RequestBuilder::new(stub))
3035        }
3036
3037        /// Sets the full request, replacing any prior values.
3038        pub fn with_request<V: Into<longrunning::model::ListOperationsRequest>>(
3039            mut self,
3040            v: V,
3041        ) -> Self {
3042            self.0.request = v.into();
3043            self
3044        }
3045
3046        /// Sets all the options, replacing any prior values.
3047        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3048            self.0.options = v.into();
3049            self
3050        }
3051
3052        /// Sends the request.
3053        pub async fn send(self) -> Result<longrunning::model::ListOperationsResponse> {
3054            (*self.0.stub)
3055                .list_operations(self.0.request, self.0.options)
3056                .await
3057                .map(gax::response::Response::into_body)
3058        }
3059
3060        /// Streams each page in the collection.
3061        pub fn by_page(
3062            self,
3063        ) -> impl gax::paginator::Paginator<longrunning::model::ListOperationsResponse, gax::error::Error>
3064        {
3065            use std::clone::Clone;
3066            let token = self.0.request.page_token.clone();
3067            let execute = move |token: String| {
3068                let mut builder = self.clone();
3069                builder.0.request = builder.0.request.set_page_token(token);
3070                builder.send()
3071            };
3072            gax::paginator::internal::new_paginator(token, execute)
3073        }
3074
3075        /// Streams each item in the collection.
3076        pub fn by_item(
3077            self,
3078        ) -> impl gax::paginator::ItemPaginator<
3079            longrunning::model::ListOperationsResponse,
3080            gax::error::Error,
3081        > {
3082            use gax::paginator::Paginator;
3083            self.by_page().items()
3084        }
3085
3086        /// Sets the value of [name][longrunning::model::ListOperationsRequest::name].
3087        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3088            self.0.request.name = v.into();
3089            self
3090        }
3091
3092        /// Sets the value of [filter][longrunning::model::ListOperationsRequest::filter].
3093        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
3094            self.0.request.filter = v.into();
3095            self
3096        }
3097
3098        /// Sets the value of [page_size][longrunning::model::ListOperationsRequest::page_size].
3099        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
3100            self.0.request.page_size = v.into();
3101            self
3102        }
3103
3104        /// Sets the value of [page_token][longrunning::model::ListOperationsRequest::page_token].
3105        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
3106            self.0.request.page_token = v.into();
3107            self
3108        }
3109
3110        /// Sets the value of [return_partial_success][longrunning::model::ListOperationsRequest::return_partial_success].
3111        pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
3112            self.0.request.return_partial_success = v.into();
3113            self
3114        }
3115    }
3116
3117    #[doc(hidden)]
3118    impl gax::options::internal::RequestBuilder for ListOperations {
3119        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3120            &mut self.0.options
3121        }
3122    }
3123
3124    /// The request builder for [FirestoreAdmin::get_operation][crate::client::FirestoreAdmin::get_operation] calls.
3125    ///
3126    /// # Example
3127    /// ```
3128    /// # use google_cloud_firestore_admin_v1::builder::firestore_admin::GetOperation;
3129    /// # async fn sample() -> gax::Result<()> {
3130    ///
3131    /// let builder = prepare_request_builder();
3132    /// let response = builder.send().await?;
3133    /// # Ok(()) }
3134    ///
3135    /// fn prepare_request_builder() -> GetOperation {
3136    ///   # panic!();
3137    ///   // ... details omitted ...
3138    /// }
3139    /// ```
3140    #[derive(Clone, Debug)]
3141    pub struct GetOperation(RequestBuilder<longrunning::model::GetOperationRequest>);
3142
3143    impl GetOperation {
3144        pub(crate) fn new(
3145            stub: std::sync::Arc<dyn super::super::stub::dynamic::FirestoreAdmin>,
3146        ) -> Self {
3147            Self(RequestBuilder::new(stub))
3148        }
3149
3150        /// Sets the full request, replacing any prior values.
3151        pub fn with_request<V: Into<longrunning::model::GetOperationRequest>>(
3152            mut self,
3153            v: V,
3154        ) -> Self {
3155            self.0.request = v.into();
3156            self
3157        }
3158
3159        /// Sets all the options, replacing any prior values.
3160        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3161            self.0.options = v.into();
3162            self
3163        }
3164
3165        /// Sends the request.
3166        pub async fn send(self) -> Result<longrunning::model::Operation> {
3167            (*self.0.stub)
3168                .get_operation(self.0.request, self.0.options)
3169                .await
3170                .map(gax::response::Response::into_body)
3171        }
3172
3173        /// Sets the value of [name][longrunning::model::GetOperationRequest::name].
3174        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3175            self.0.request.name = v.into();
3176            self
3177        }
3178    }
3179
3180    #[doc(hidden)]
3181    impl gax::options::internal::RequestBuilder for GetOperation {
3182        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3183            &mut self.0.options
3184        }
3185    }
3186
3187    /// The request builder for [FirestoreAdmin::delete_operation][crate::client::FirestoreAdmin::delete_operation] calls.
3188    ///
3189    /// # Example
3190    /// ```
3191    /// # use google_cloud_firestore_admin_v1::builder::firestore_admin::DeleteOperation;
3192    /// # async fn sample() -> gax::Result<()> {
3193    ///
3194    /// let builder = prepare_request_builder();
3195    /// let response = builder.send().await?;
3196    /// # Ok(()) }
3197    ///
3198    /// fn prepare_request_builder() -> DeleteOperation {
3199    ///   # panic!();
3200    ///   // ... details omitted ...
3201    /// }
3202    /// ```
3203    #[derive(Clone, Debug)]
3204    pub struct DeleteOperation(RequestBuilder<longrunning::model::DeleteOperationRequest>);
3205
3206    impl DeleteOperation {
3207        pub(crate) fn new(
3208            stub: std::sync::Arc<dyn super::super::stub::dynamic::FirestoreAdmin>,
3209        ) -> Self {
3210            Self(RequestBuilder::new(stub))
3211        }
3212
3213        /// Sets the full request, replacing any prior values.
3214        pub fn with_request<V: Into<longrunning::model::DeleteOperationRequest>>(
3215            mut self,
3216            v: V,
3217        ) -> Self {
3218            self.0.request = v.into();
3219            self
3220        }
3221
3222        /// Sets all the options, replacing any prior values.
3223        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3224            self.0.options = v.into();
3225            self
3226        }
3227
3228        /// Sends the request.
3229        pub async fn send(self) -> Result<()> {
3230            (*self.0.stub)
3231                .delete_operation(self.0.request, self.0.options)
3232                .await
3233                .map(gax::response::Response::into_body)
3234        }
3235
3236        /// Sets the value of [name][longrunning::model::DeleteOperationRequest::name].
3237        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3238            self.0.request.name = v.into();
3239            self
3240        }
3241    }
3242
3243    #[doc(hidden)]
3244    impl gax::options::internal::RequestBuilder for DeleteOperation {
3245        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3246            &mut self.0.options
3247        }
3248    }
3249
3250    /// The request builder for [FirestoreAdmin::cancel_operation][crate::client::FirestoreAdmin::cancel_operation] calls.
3251    ///
3252    /// # Example
3253    /// ```
3254    /// # use google_cloud_firestore_admin_v1::builder::firestore_admin::CancelOperation;
3255    /// # async fn sample() -> gax::Result<()> {
3256    ///
3257    /// let builder = prepare_request_builder();
3258    /// let response = builder.send().await?;
3259    /// # Ok(()) }
3260    ///
3261    /// fn prepare_request_builder() -> CancelOperation {
3262    ///   # panic!();
3263    ///   // ... details omitted ...
3264    /// }
3265    /// ```
3266    #[derive(Clone, Debug)]
3267    pub struct CancelOperation(RequestBuilder<longrunning::model::CancelOperationRequest>);
3268
3269    impl CancelOperation {
3270        pub(crate) fn new(
3271            stub: std::sync::Arc<dyn super::super::stub::dynamic::FirestoreAdmin>,
3272        ) -> Self {
3273            Self(RequestBuilder::new(stub))
3274        }
3275
3276        /// Sets the full request, replacing any prior values.
3277        pub fn with_request<V: Into<longrunning::model::CancelOperationRequest>>(
3278            mut self,
3279            v: V,
3280        ) -> Self {
3281            self.0.request = v.into();
3282            self
3283        }
3284
3285        /// Sets all the options, replacing any prior values.
3286        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3287            self.0.options = v.into();
3288            self
3289        }
3290
3291        /// Sends the request.
3292        pub async fn send(self) -> Result<()> {
3293            (*self.0.stub)
3294                .cancel_operation(self.0.request, self.0.options)
3295                .await
3296                .map(gax::response::Response::into_body)
3297        }
3298
3299        /// Sets the value of [name][longrunning::model::CancelOperationRequest::name].
3300        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3301            self.0.request.name = v.into();
3302            self
3303        }
3304    }
3305
3306    #[doc(hidden)]
3307    impl gax::options::internal::RequestBuilder for CancelOperation {
3308        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3309            &mut self.0.options
3310        }
3311    }
3312}