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