Skip to main content

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    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
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    /// # Ok(()) }
32    /// ```
33    pub type ClientBuilder = crate::ClientBuilder<client::Factory, gaxi::options::Credentials>;
34
35    pub(crate) mod client {
36        use super::super::super::client::OracleDatabase;
37        pub struct Factory;
38        impl crate::ClientFactory for Factory {
39            type Client = OracleDatabase;
40            type Credentials = gaxi::options::Credentials;
41            async fn build(
42                self,
43                config: gaxi::options::ClientConfig,
44            ) -> crate::ClientBuilderResult<Self::Client> {
45                Self::Client::new(config).await
46            }
47        }
48    }
49
50    /// Common implementation for [crate::client::OracleDatabase] request builders.
51    #[derive(Clone, Debug)]
52    pub(crate) struct RequestBuilder<R: std::default::Default> {
53        stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
54        request: R,
55        options: crate::RequestOptions,
56    }
57
58    impl<R> RequestBuilder<R>
59    where
60        R: std::default::Default,
61    {
62        pub(crate) fn new(
63            stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
64        ) -> Self {
65            Self {
66                stub,
67                request: R::default(),
68                options: crate::RequestOptions::default(),
69            }
70        }
71    }
72
73    /// The request builder for [OracleDatabase::list_cloud_exadata_infrastructures][crate::client::OracleDatabase::list_cloud_exadata_infrastructures] calls.
74    ///
75    /// # Example
76    /// ```
77    /// # use google_cloud_oracledatabase_v1::builder::oracle_database::ListCloudExadataInfrastructures;
78    /// # async fn sample() -> google_cloud_oracledatabase_v1::Result<()> {
79    /// use google_cloud_gax::paginator::ItemPaginator;
80    ///
81    /// let builder = prepare_request_builder();
82    /// let mut items = builder.by_item();
83    /// while let Some(result) = items.next().await {
84    ///   let item = result?;
85    /// }
86    /// # Ok(()) }
87    ///
88    /// fn prepare_request_builder() -> ListCloudExadataInfrastructures {
89    ///   # panic!();
90    ///   // ... details omitted ...
91    /// }
92    /// ```
93    #[derive(Clone, Debug)]
94    pub struct ListCloudExadataInfrastructures(
95        RequestBuilder<crate::model::ListCloudExadataInfrastructuresRequest>,
96    );
97
98    impl ListCloudExadataInfrastructures {
99        pub(crate) fn new(
100            stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
101        ) -> Self {
102            Self(RequestBuilder::new(stub))
103        }
104
105        /// Sets the full request, replacing any prior values.
106        pub fn with_request<V: Into<crate::model::ListCloudExadataInfrastructuresRequest>>(
107            mut self,
108            v: V,
109        ) -> Self {
110            self.0.request = v.into();
111            self
112        }
113
114        /// Sets all the options, replacing any prior values.
115        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
116            self.0.options = v.into();
117            self
118        }
119
120        /// Sends the request.
121        pub async fn send(self) -> Result<crate::model::ListCloudExadataInfrastructuresResponse> {
122            (*self.0.stub)
123                .list_cloud_exadata_infrastructures(self.0.request, self.0.options)
124                .await
125                .map(crate::Response::into_body)
126        }
127
128        /// Streams each page in the collection.
129        pub fn by_page(
130            self,
131        ) -> impl google_cloud_gax::paginator::Paginator<
132            crate::model::ListCloudExadataInfrastructuresResponse,
133            crate::Error,
134        > {
135            use std::clone::Clone;
136            let token = self.0.request.page_token.clone();
137            let execute = move |token: String| {
138                let mut builder = self.clone();
139                builder.0.request = builder.0.request.set_page_token(token);
140                builder.send()
141            };
142            google_cloud_gax::paginator::internal::new_paginator(token, execute)
143        }
144
145        /// Streams each item in the collection.
146        pub fn by_item(
147            self,
148        ) -> impl google_cloud_gax::paginator::ItemPaginator<
149            crate::model::ListCloudExadataInfrastructuresResponse,
150            crate::Error,
151        > {
152            use google_cloud_gax::paginator::Paginator;
153            self.by_page().items()
154        }
155
156        /// Sets the value of [parent][crate::model::ListCloudExadataInfrastructuresRequest::parent].
157        ///
158        /// This is a **required** field for requests.
159        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
160            self.0.request.parent = v.into();
161            self
162        }
163
164        /// Sets the value of [page_size][crate::model::ListCloudExadataInfrastructuresRequest::page_size].
165        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
166            self.0.request.page_size = v.into();
167            self
168        }
169
170        /// Sets the value of [page_token][crate::model::ListCloudExadataInfrastructuresRequest::page_token].
171        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
172            self.0.request.page_token = v.into();
173            self
174        }
175
176        /// Sets the value of [filter][crate::model::ListCloudExadataInfrastructuresRequest::filter].
177        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
178            self.0.request.filter = v.into();
179            self
180        }
181
182        /// Sets the value of [order_by][crate::model::ListCloudExadataInfrastructuresRequest::order_by].
183        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
184            self.0.request.order_by = v.into();
185            self
186        }
187    }
188
189    #[doc(hidden)]
190    impl crate::RequestBuilder for ListCloudExadataInfrastructures {
191        fn request_options(&mut self) -> &mut crate::RequestOptions {
192            &mut self.0.options
193        }
194    }
195
196    /// The request builder for [OracleDatabase::get_cloud_exadata_infrastructure][crate::client::OracleDatabase::get_cloud_exadata_infrastructure] calls.
197    ///
198    /// # Example
199    /// ```
200    /// # use google_cloud_oracledatabase_v1::builder::oracle_database::GetCloudExadataInfrastructure;
201    /// # async fn sample() -> google_cloud_oracledatabase_v1::Result<()> {
202    ///
203    /// let builder = prepare_request_builder();
204    /// let response = builder.send().await?;
205    /// # Ok(()) }
206    ///
207    /// fn prepare_request_builder() -> GetCloudExadataInfrastructure {
208    ///   # panic!();
209    ///   // ... details omitted ...
210    /// }
211    /// ```
212    #[derive(Clone, Debug)]
213    pub struct GetCloudExadataInfrastructure(
214        RequestBuilder<crate::model::GetCloudExadataInfrastructureRequest>,
215    );
216
217    impl GetCloudExadataInfrastructure {
218        pub(crate) fn new(
219            stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
220        ) -> Self {
221            Self(RequestBuilder::new(stub))
222        }
223
224        /// Sets the full request, replacing any prior values.
225        pub fn with_request<V: Into<crate::model::GetCloudExadataInfrastructureRequest>>(
226            mut self,
227            v: V,
228        ) -> Self {
229            self.0.request = v.into();
230            self
231        }
232
233        /// Sets all the options, replacing any prior values.
234        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
235            self.0.options = v.into();
236            self
237        }
238
239        /// Sends the request.
240        pub async fn send(self) -> Result<crate::model::CloudExadataInfrastructure> {
241            (*self.0.stub)
242                .get_cloud_exadata_infrastructure(self.0.request, self.0.options)
243                .await
244                .map(crate::Response::into_body)
245        }
246
247        /// Sets the value of [name][crate::model::GetCloudExadataInfrastructureRequest::name].
248        ///
249        /// This is a **required** field for requests.
250        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
251            self.0.request.name = v.into();
252            self
253        }
254    }
255
256    #[doc(hidden)]
257    impl crate::RequestBuilder for GetCloudExadataInfrastructure {
258        fn request_options(&mut self) -> &mut crate::RequestOptions {
259            &mut self.0.options
260        }
261    }
262
263    /// The request builder for [OracleDatabase::create_cloud_exadata_infrastructure][crate::client::OracleDatabase::create_cloud_exadata_infrastructure] calls.
264    ///
265    /// # Example
266    /// ```
267    /// # use google_cloud_oracledatabase_v1::builder::oracle_database::CreateCloudExadataInfrastructure;
268    /// # async fn sample() -> google_cloud_oracledatabase_v1::Result<()> {
269    /// use google_cloud_lro::Poller;
270    ///
271    /// let builder = prepare_request_builder();
272    /// let response = builder.poller().until_done().await?;
273    /// # Ok(()) }
274    ///
275    /// fn prepare_request_builder() -> CreateCloudExadataInfrastructure {
276    ///   # panic!();
277    ///   // ... details omitted ...
278    /// }
279    /// ```
280    #[derive(Clone, Debug)]
281    pub struct CreateCloudExadataInfrastructure(
282        RequestBuilder<crate::model::CreateCloudExadataInfrastructureRequest>,
283    );
284
285    impl CreateCloudExadataInfrastructure {
286        pub(crate) fn new(
287            stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
288        ) -> Self {
289            Self(RequestBuilder::new(stub))
290        }
291
292        /// Sets the full request, replacing any prior values.
293        pub fn with_request<V: Into<crate::model::CreateCloudExadataInfrastructureRequest>>(
294            mut self,
295            v: V,
296        ) -> Self {
297            self.0.request = v.into();
298            self
299        }
300
301        /// Sets all the options, replacing any prior values.
302        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
303            self.0.options = v.into();
304            self
305        }
306
307        /// Sends the request.
308        ///
309        /// # Long running operations
310        ///
311        /// This starts, but does not poll, a longrunning operation. More information
312        /// on [create_cloud_exadata_infrastructure][crate::client::OracleDatabase::create_cloud_exadata_infrastructure].
313        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
314            (*self.0.stub)
315                .create_cloud_exadata_infrastructure(self.0.request, self.0.options)
316                .await
317                .map(crate::Response::into_body)
318        }
319
320        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_cloud_exadata_infrastructure`.
321        pub fn poller(
322            self,
323        ) -> impl google_cloud_lro::Poller<
324            crate::model::CloudExadataInfrastructure,
325            crate::model::OperationMetadata,
326        > {
327            type Operation = google_cloud_lro::internal::Operation<
328                crate::model::CloudExadataInfrastructure,
329                crate::model::OperationMetadata,
330            >;
331            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
332            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
333
334            let stub = self.0.stub.clone();
335            let mut options = self.0.options.clone();
336            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
337            let query = move |name| {
338                let stub = stub.clone();
339                let options = options.clone();
340                async {
341                    let op = GetOperation::new(stub)
342                        .set_name(name)
343                        .with_options(options)
344                        .send()
345                        .await?;
346                    Ok(Operation::new(op))
347                }
348            };
349
350            let start = move || async {
351                let op = self.send().await?;
352                Ok(Operation::new(op))
353            };
354
355            google_cloud_lro::internal::new_poller(
356                polling_error_policy,
357                polling_backoff_policy,
358                start,
359                query,
360            )
361        }
362
363        /// Sets the value of [parent][crate::model::CreateCloudExadataInfrastructureRequest::parent].
364        ///
365        /// This is a **required** field for requests.
366        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
367            self.0.request.parent = v.into();
368            self
369        }
370
371        /// Sets the value of [cloud_exadata_infrastructure_id][crate::model::CreateCloudExadataInfrastructureRequest::cloud_exadata_infrastructure_id].
372        ///
373        /// This is a **required** field for requests.
374        pub fn set_cloud_exadata_infrastructure_id<T: Into<std::string::String>>(
375            mut self,
376            v: T,
377        ) -> Self {
378            self.0.request.cloud_exadata_infrastructure_id = v.into();
379            self
380        }
381
382        /// Sets the value of [cloud_exadata_infrastructure][crate::model::CreateCloudExadataInfrastructureRequest::cloud_exadata_infrastructure].
383        ///
384        /// This is a **required** field for requests.
385        pub fn set_cloud_exadata_infrastructure<T>(mut self, v: T) -> Self
386        where
387            T: std::convert::Into<crate::model::CloudExadataInfrastructure>,
388        {
389            self.0.request.cloud_exadata_infrastructure = std::option::Option::Some(v.into());
390            self
391        }
392
393        /// Sets or clears the value of [cloud_exadata_infrastructure][crate::model::CreateCloudExadataInfrastructureRequest::cloud_exadata_infrastructure].
394        ///
395        /// This is a **required** field for requests.
396        pub fn set_or_clear_cloud_exadata_infrastructure<T>(
397            mut self,
398            v: std::option::Option<T>,
399        ) -> Self
400        where
401            T: std::convert::Into<crate::model::CloudExadataInfrastructure>,
402        {
403            self.0.request.cloud_exadata_infrastructure = v.map(|x| x.into());
404            self
405        }
406
407        /// Sets the value of [request_id][crate::model::CreateCloudExadataInfrastructureRequest::request_id].
408        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
409            self.0.request.request_id = v.into();
410            self
411        }
412    }
413
414    #[doc(hidden)]
415    impl crate::RequestBuilder for CreateCloudExadataInfrastructure {
416        fn request_options(&mut self) -> &mut crate::RequestOptions {
417            &mut self.0.options
418        }
419    }
420
421    /// The request builder for [OracleDatabase::delete_cloud_exadata_infrastructure][crate::client::OracleDatabase::delete_cloud_exadata_infrastructure] calls.
422    ///
423    /// # Example
424    /// ```
425    /// # use google_cloud_oracledatabase_v1::builder::oracle_database::DeleteCloudExadataInfrastructure;
426    /// # async fn sample() -> google_cloud_oracledatabase_v1::Result<()> {
427    /// use google_cloud_lro::Poller;
428    ///
429    /// let builder = prepare_request_builder();
430    /// let response = builder.poller().until_done().await?;
431    /// # Ok(()) }
432    ///
433    /// fn prepare_request_builder() -> DeleteCloudExadataInfrastructure {
434    ///   # panic!();
435    ///   // ... details omitted ...
436    /// }
437    /// ```
438    #[derive(Clone, Debug)]
439    pub struct DeleteCloudExadataInfrastructure(
440        RequestBuilder<crate::model::DeleteCloudExadataInfrastructureRequest>,
441    );
442
443    impl DeleteCloudExadataInfrastructure {
444        pub(crate) fn new(
445            stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
446        ) -> Self {
447            Self(RequestBuilder::new(stub))
448        }
449
450        /// Sets the full request, replacing any prior values.
451        pub fn with_request<V: Into<crate::model::DeleteCloudExadataInfrastructureRequest>>(
452            mut self,
453            v: V,
454        ) -> Self {
455            self.0.request = v.into();
456            self
457        }
458
459        /// Sets all the options, replacing any prior values.
460        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
461            self.0.options = v.into();
462            self
463        }
464
465        /// Sends the request.
466        ///
467        /// # Long running operations
468        ///
469        /// This starts, but does not poll, a longrunning operation. More information
470        /// on [delete_cloud_exadata_infrastructure][crate::client::OracleDatabase::delete_cloud_exadata_infrastructure].
471        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
472            (*self.0.stub)
473                .delete_cloud_exadata_infrastructure(self.0.request, self.0.options)
474                .await
475                .map(crate::Response::into_body)
476        }
477
478        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_cloud_exadata_infrastructure`.
479        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
480            type Operation =
481                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
482            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
483            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
484
485            let stub = self.0.stub.clone();
486            let mut options = self.0.options.clone();
487            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
488            let query = move |name| {
489                let stub = stub.clone();
490                let options = options.clone();
491                async {
492                    let op = GetOperation::new(stub)
493                        .set_name(name)
494                        .with_options(options)
495                        .send()
496                        .await?;
497                    Ok(Operation::new(op))
498                }
499            };
500
501            let start = move || async {
502                let op = self.send().await?;
503                Ok(Operation::new(op))
504            };
505
506            google_cloud_lro::internal::new_unit_response_poller(
507                polling_error_policy,
508                polling_backoff_policy,
509                start,
510                query,
511            )
512        }
513
514        /// Sets the value of [name][crate::model::DeleteCloudExadataInfrastructureRequest::name].
515        ///
516        /// This is a **required** field for requests.
517        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
518            self.0.request.name = v.into();
519            self
520        }
521
522        /// Sets the value of [request_id][crate::model::DeleteCloudExadataInfrastructureRequest::request_id].
523        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
524            self.0.request.request_id = v.into();
525            self
526        }
527
528        /// Sets the value of [force][crate::model::DeleteCloudExadataInfrastructureRequest::force].
529        pub fn set_force<T: Into<bool>>(mut self, v: T) -> Self {
530            self.0.request.force = v.into();
531            self
532        }
533    }
534
535    #[doc(hidden)]
536    impl crate::RequestBuilder for DeleteCloudExadataInfrastructure {
537        fn request_options(&mut self) -> &mut crate::RequestOptions {
538            &mut self.0.options
539        }
540    }
541
542    /// The request builder for [OracleDatabase::list_cloud_vm_clusters][crate::client::OracleDatabase::list_cloud_vm_clusters] calls.
543    ///
544    /// # Example
545    /// ```
546    /// # use google_cloud_oracledatabase_v1::builder::oracle_database::ListCloudVmClusters;
547    /// # async fn sample() -> google_cloud_oracledatabase_v1::Result<()> {
548    /// use google_cloud_gax::paginator::ItemPaginator;
549    ///
550    /// let builder = prepare_request_builder();
551    /// let mut items = builder.by_item();
552    /// while let Some(result) = items.next().await {
553    ///   let item = result?;
554    /// }
555    /// # Ok(()) }
556    ///
557    /// fn prepare_request_builder() -> ListCloudVmClusters {
558    ///   # panic!();
559    ///   // ... details omitted ...
560    /// }
561    /// ```
562    #[derive(Clone, Debug)]
563    pub struct ListCloudVmClusters(RequestBuilder<crate::model::ListCloudVmClustersRequest>);
564
565    impl ListCloudVmClusters {
566        pub(crate) fn new(
567            stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
568        ) -> Self {
569            Self(RequestBuilder::new(stub))
570        }
571
572        /// Sets the full request, replacing any prior values.
573        pub fn with_request<V: Into<crate::model::ListCloudVmClustersRequest>>(
574            mut self,
575            v: V,
576        ) -> Self {
577            self.0.request = v.into();
578            self
579        }
580
581        /// Sets all the options, replacing any prior values.
582        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
583            self.0.options = v.into();
584            self
585        }
586
587        /// Sends the request.
588        pub async fn send(self) -> Result<crate::model::ListCloudVmClustersResponse> {
589            (*self.0.stub)
590                .list_cloud_vm_clusters(self.0.request, self.0.options)
591                .await
592                .map(crate::Response::into_body)
593        }
594
595        /// Streams each page in the collection.
596        pub fn by_page(
597            self,
598        ) -> impl google_cloud_gax::paginator::Paginator<
599            crate::model::ListCloudVmClustersResponse,
600            crate::Error,
601        > {
602            use std::clone::Clone;
603            let token = self.0.request.page_token.clone();
604            let execute = move |token: String| {
605                let mut builder = self.clone();
606                builder.0.request = builder.0.request.set_page_token(token);
607                builder.send()
608            };
609            google_cloud_gax::paginator::internal::new_paginator(token, execute)
610        }
611
612        /// Streams each item in the collection.
613        pub fn by_item(
614            self,
615        ) -> impl google_cloud_gax::paginator::ItemPaginator<
616            crate::model::ListCloudVmClustersResponse,
617            crate::Error,
618        > {
619            use google_cloud_gax::paginator::Paginator;
620            self.by_page().items()
621        }
622
623        /// Sets the value of [parent][crate::model::ListCloudVmClustersRequest::parent].
624        ///
625        /// This is a **required** field for requests.
626        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
627            self.0.request.parent = v.into();
628            self
629        }
630
631        /// Sets the value of [page_size][crate::model::ListCloudVmClustersRequest::page_size].
632        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
633            self.0.request.page_size = v.into();
634            self
635        }
636
637        /// Sets the value of [page_token][crate::model::ListCloudVmClustersRequest::page_token].
638        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
639            self.0.request.page_token = v.into();
640            self
641        }
642
643        /// Sets the value of [filter][crate::model::ListCloudVmClustersRequest::filter].
644        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
645            self.0.request.filter = v.into();
646            self
647        }
648    }
649
650    #[doc(hidden)]
651    impl crate::RequestBuilder for ListCloudVmClusters {
652        fn request_options(&mut self) -> &mut crate::RequestOptions {
653            &mut self.0.options
654        }
655    }
656
657    /// The request builder for [OracleDatabase::get_cloud_vm_cluster][crate::client::OracleDatabase::get_cloud_vm_cluster] calls.
658    ///
659    /// # Example
660    /// ```
661    /// # use google_cloud_oracledatabase_v1::builder::oracle_database::GetCloudVmCluster;
662    /// # async fn sample() -> google_cloud_oracledatabase_v1::Result<()> {
663    ///
664    /// let builder = prepare_request_builder();
665    /// let response = builder.send().await?;
666    /// # Ok(()) }
667    ///
668    /// fn prepare_request_builder() -> GetCloudVmCluster {
669    ///   # panic!();
670    ///   // ... details omitted ...
671    /// }
672    /// ```
673    #[derive(Clone, Debug)]
674    pub struct GetCloudVmCluster(RequestBuilder<crate::model::GetCloudVmClusterRequest>);
675
676    impl GetCloudVmCluster {
677        pub(crate) fn new(
678            stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
679        ) -> Self {
680            Self(RequestBuilder::new(stub))
681        }
682
683        /// Sets the full request, replacing any prior values.
684        pub fn with_request<V: Into<crate::model::GetCloudVmClusterRequest>>(
685            mut self,
686            v: V,
687        ) -> Self {
688            self.0.request = v.into();
689            self
690        }
691
692        /// Sets all the options, replacing any prior values.
693        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
694            self.0.options = v.into();
695            self
696        }
697
698        /// Sends the request.
699        pub async fn send(self) -> Result<crate::model::CloudVmCluster> {
700            (*self.0.stub)
701                .get_cloud_vm_cluster(self.0.request, self.0.options)
702                .await
703                .map(crate::Response::into_body)
704        }
705
706        /// Sets the value of [name][crate::model::GetCloudVmClusterRequest::name].
707        ///
708        /// This is a **required** field for requests.
709        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
710            self.0.request.name = v.into();
711            self
712        }
713    }
714
715    #[doc(hidden)]
716    impl crate::RequestBuilder for GetCloudVmCluster {
717        fn request_options(&mut self) -> &mut crate::RequestOptions {
718            &mut self.0.options
719        }
720    }
721
722    /// The request builder for [OracleDatabase::create_cloud_vm_cluster][crate::client::OracleDatabase::create_cloud_vm_cluster] calls.
723    ///
724    /// # Example
725    /// ```
726    /// # use google_cloud_oracledatabase_v1::builder::oracle_database::CreateCloudVmCluster;
727    /// # async fn sample() -> google_cloud_oracledatabase_v1::Result<()> {
728    /// use google_cloud_lro::Poller;
729    ///
730    /// let builder = prepare_request_builder();
731    /// let response = builder.poller().until_done().await?;
732    /// # Ok(()) }
733    ///
734    /// fn prepare_request_builder() -> CreateCloudVmCluster {
735    ///   # panic!();
736    ///   // ... details omitted ...
737    /// }
738    /// ```
739    #[derive(Clone, Debug)]
740    pub struct CreateCloudVmCluster(RequestBuilder<crate::model::CreateCloudVmClusterRequest>);
741
742    impl CreateCloudVmCluster {
743        pub(crate) fn new(
744            stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
745        ) -> Self {
746            Self(RequestBuilder::new(stub))
747        }
748
749        /// Sets the full request, replacing any prior values.
750        pub fn with_request<V: Into<crate::model::CreateCloudVmClusterRequest>>(
751            mut self,
752            v: V,
753        ) -> Self {
754            self.0.request = v.into();
755            self
756        }
757
758        /// Sets all the options, replacing any prior values.
759        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
760            self.0.options = v.into();
761            self
762        }
763
764        /// Sends the request.
765        ///
766        /// # Long running operations
767        ///
768        /// This starts, but does not poll, a longrunning operation. More information
769        /// on [create_cloud_vm_cluster][crate::client::OracleDatabase::create_cloud_vm_cluster].
770        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
771            (*self.0.stub)
772                .create_cloud_vm_cluster(self.0.request, self.0.options)
773                .await
774                .map(crate::Response::into_body)
775        }
776
777        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_cloud_vm_cluster`.
778        pub fn poller(
779            self,
780        ) -> impl google_cloud_lro::Poller<crate::model::CloudVmCluster, crate::model::OperationMetadata>
781        {
782            type Operation = google_cloud_lro::internal::Operation<
783                crate::model::CloudVmCluster,
784                crate::model::OperationMetadata,
785            >;
786            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
787            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
788
789            let stub = self.0.stub.clone();
790            let mut options = self.0.options.clone();
791            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
792            let query = move |name| {
793                let stub = stub.clone();
794                let options = options.clone();
795                async {
796                    let op = GetOperation::new(stub)
797                        .set_name(name)
798                        .with_options(options)
799                        .send()
800                        .await?;
801                    Ok(Operation::new(op))
802                }
803            };
804
805            let start = move || async {
806                let op = self.send().await?;
807                Ok(Operation::new(op))
808            };
809
810            google_cloud_lro::internal::new_poller(
811                polling_error_policy,
812                polling_backoff_policy,
813                start,
814                query,
815            )
816        }
817
818        /// Sets the value of [parent][crate::model::CreateCloudVmClusterRequest::parent].
819        ///
820        /// This is a **required** field for requests.
821        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
822            self.0.request.parent = v.into();
823            self
824        }
825
826        /// Sets the value of [cloud_vm_cluster_id][crate::model::CreateCloudVmClusterRequest::cloud_vm_cluster_id].
827        ///
828        /// This is a **required** field for requests.
829        pub fn set_cloud_vm_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
830            self.0.request.cloud_vm_cluster_id = v.into();
831            self
832        }
833
834        /// Sets the value of [cloud_vm_cluster][crate::model::CreateCloudVmClusterRequest::cloud_vm_cluster].
835        ///
836        /// This is a **required** field for requests.
837        pub fn set_cloud_vm_cluster<T>(mut self, v: T) -> Self
838        where
839            T: std::convert::Into<crate::model::CloudVmCluster>,
840        {
841            self.0.request.cloud_vm_cluster = std::option::Option::Some(v.into());
842            self
843        }
844
845        /// Sets or clears the value of [cloud_vm_cluster][crate::model::CreateCloudVmClusterRequest::cloud_vm_cluster].
846        ///
847        /// This is a **required** field for requests.
848        pub fn set_or_clear_cloud_vm_cluster<T>(mut self, v: std::option::Option<T>) -> Self
849        where
850            T: std::convert::Into<crate::model::CloudVmCluster>,
851        {
852            self.0.request.cloud_vm_cluster = v.map(|x| x.into());
853            self
854        }
855
856        /// Sets the value of [request_id][crate::model::CreateCloudVmClusterRequest::request_id].
857        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
858            self.0.request.request_id = v.into();
859            self
860        }
861    }
862
863    #[doc(hidden)]
864    impl crate::RequestBuilder for CreateCloudVmCluster {
865        fn request_options(&mut self) -> &mut crate::RequestOptions {
866            &mut self.0.options
867        }
868    }
869
870    /// The request builder for [OracleDatabase::delete_cloud_vm_cluster][crate::client::OracleDatabase::delete_cloud_vm_cluster] calls.
871    ///
872    /// # Example
873    /// ```
874    /// # use google_cloud_oracledatabase_v1::builder::oracle_database::DeleteCloudVmCluster;
875    /// # async fn sample() -> google_cloud_oracledatabase_v1::Result<()> {
876    /// use google_cloud_lro::Poller;
877    ///
878    /// let builder = prepare_request_builder();
879    /// let response = builder.poller().until_done().await?;
880    /// # Ok(()) }
881    ///
882    /// fn prepare_request_builder() -> DeleteCloudVmCluster {
883    ///   # panic!();
884    ///   // ... details omitted ...
885    /// }
886    /// ```
887    #[derive(Clone, Debug)]
888    pub struct DeleteCloudVmCluster(RequestBuilder<crate::model::DeleteCloudVmClusterRequest>);
889
890    impl DeleteCloudVmCluster {
891        pub(crate) fn new(
892            stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
893        ) -> Self {
894            Self(RequestBuilder::new(stub))
895        }
896
897        /// Sets the full request, replacing any prior values.
898        pub fn with_request<V: Into<crate::model::DeleteCloudVmClusterRequest>>(
899            mut self,
900            v: V,
901        ) -> Self {
902            self.0.request = v.into();
903            self
904        }
905
906        /// Sets all the options, replacing any prior values.
907        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
908            self.0.options = v.into();
909            self
910        }
911
912        /// Sends the request.
913        ///
914        /// # Long running operations
915        ///
916        /// This starts, but does not poll, a longrunning operation. More information
917        /// on [delete_cloud_vm_cluster][crate::client::OracleDatabase::delete_cloud_vm_cluster].
918        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
919            (*self.0.stub)
920                .delete_cloud_vm_cluster(self.0.request, self.0.options)
921                .await
922                .map(crate::Response::into_body)
923        }
924
925        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_cloud_vm_cluster`.
926        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
927            type Operation =
928                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
929            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
930            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
931
932            let stub = self.0.stub.clone();
933            let mut options = self.0.options.clone();
934            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
935            let query = move |name| {
936                let stub = stub.clone();
937                let options = options.clone();
938                async {
939                    let op = GetOperation::new(stub)
940                        .set_name(name)
941                        .with_options(options)
942                        .send()
943                        .await?;
944                    Ok(Operation::new(op))
945                }
946            };
947
948            let start = move || async {
949                let op = self.send().await?;
950                Ok(Operation::new(op))
951            };
952
953            google_cloud_lro::internal::new_unit_response_poller(
954                polling_error_policy,
955                polling_backoff_policy,
956                start,
957                query,
958            )
959        }
960
961        /// Sets the value of [name][crate::model::DeleteCloudVmClusterRequest::name].
962        ///
963        /// This is a **required** field for requests.
964        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
965            self.0.request.name = v.into();
966            self
967        }
968
969        /// Sets the value of [request_id][crate::model::DeleteCloudVmClusterRequest::request_id].
970        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
971            self.0.request.request_id = v.into();
972            self
973        }
974
975        /// Sets the value of [force][crate::model::DeleteCloudVmClusterRequest::force].
976        pub fn set_force<T: Into<bool>>(mut self, v: T) -> Self {
977            self.0.request.force = v.into();
978            self
979        }
980    }
981
982    #[doc(hidden)]
983    impl crate::RequestBuilder for DeleteCloudVmCluster {
984        fn request_options(&mut self) -> &mut crate::RequestOptions {
985            &mut self.0.options
986        }
987    }
988
989    /// The request builder for [OracleDatabase::list_entitlements][crate::client::OracleDatabase::list_entitlements] calls.
990    ///
991    /// # Example
992    /// ```
993    /// # use google_cloud_oracledatabase_v1::builder::oracle_database::ListEntitlements;
994    /// # async fn sample() -> google_cloud_oracledatabase_v1::Result<()> {
995    /// use google_cloud_gax::paginator::ItemPaginator;
996    ///
997    /// let builder = prepare_request_builder();
998    /// let mut items = builder.by_item();
999    /// while let Some(result) = items.next().await {
1000    ///   let item = result?;
1001    /// }
1002    /// # Ok(()) }
1003    ///
1004    /// fn prepare_request_builder() -> ListEntitlements {
1005    ///   # panic!();
1006    ///   // ... details omitted ...
1007    /// }
1008    /// ```
1009    #[derive(Clone, Debug)]
1010    pub struct ListEntitlements(RequestBuilder<crate::model::ListEntitlementsRequest>);
1011
1012    impl ListEntitlements {
1013        pub(crate) fn new(
1014            stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
1015        ) -> Self {
1016            Self(RequestBuilder::new(stub))
1017        }
1018
1019        /// Sets the full request, replacing any prior values.
1020        pub fn with_request<V: Into<crate::model::ListEntitlementsRequest>>(
1021            mut self,
1022            v: V,
1023        ) -> Self {
1024            self.0.request = v.into();
1025            self
1026        }
1027
1028        /// Sets all the options, replacing any prior values.
1029        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1030            self.0.options = v.into();
1031            self
1032        }
1033
1034        /// Sends the request.
1035        pub async fn send(self) -> Result<crate::model::ListEntitlementsResponse> {
1036            (*self.0.stub)
1037                .list_entitlements(self.0.request, self.0.options)
1038                .await
1039                .map(crate::Response::into_body)
1040        }
1041
1042        /// Streams each page in the collection.
1043        pub fn by_page(
1044            self,
1045        ) -> impl google_cloud_gax::paginator::Paginator<
1046            crate::model::ListEntitlementsResponse,
1047            crate::Error,
1048        > {
1049            use std::clone::Clone;
1050            let token = self.0.request.page_token.clone();
1051            let execute = move |token: String| {
1052                let mut builder = self.clone();
1053                builder.0.request = builder.0.request.set_page_token(token);
1054                builder.send()
1055            };
1056            google_cloud_gax::paginator::internal::new_paginator(token, execute)
1057        }
1058
1059        /// Streams each item in the collection.
1060        pub fn by_item(
1061            self,
1062        ) -> impl google_cloud_gax::paginator::ItemPaginator<
1063            crate::model::ListEntitlementsResponse,
1064            crate::Error,
1065        > {
1066            use google_cloud_gax::paginator::Paginator;
1067            self.by_page().items()
1068        }
1069
1070        /// Sets the value of [parent][crate::model::ListEntitlementsRequest::parent].
1071        ///
1072        /// This is a **required** field for requests.
1073        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1074            self.0.request.parent = v.into();
1075            self
1076        }
1077
1078        /// Sets the value of [page_size][crate::model::ListEntitlementsRequest::page_size].
1079        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1080            self.0.request.page_size = v.into();
1081            self
1082        }
1083
1084        /// Sets the value of [page_token][crate::model::ListEntitlementsRequest::page_token].
1085        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1086            self.0.request.page_token = v.into();
1087            self
1088        }
1089    }
1090
1091    #[doc(hidden)]
1092    impl crate::RequestBuilder for ListEntitlements {
1093        fn request_options(&mut self) -> &mut crate::RequestOptions {
1094            &mut self.0.options
1095        }
1096    }
1097
1098    /// The request builder for [OracleDatabase::list_db_servers][crate::client::OracleDatabase::list_db_servers] calls.
1099    ///
1100    /// # Example
1101    /// ```
1102    /// # use google_cloud_oracledatabase_v1::builder::oracle_database::ListDbServers;
1103    /// # async fn sample() -> google_cloud_oracledatabase_v1::Result<()> {
1104    /// use google_cloud_gax::paginator::ItemPaginator;
1105    ///
1106    /// let builder = prepare_request_builder();
1107    /// let mut items = builder.by_item();
1108    /// while let Some(result) = items.next().await {
1109    ///   let item = result?;
1110    /// }
1111    /// # Ok(()) }
1112    ///
1113    /// fn prepare_request_builder() -> ListDbServers {
1114    ///   # panic!();
1115    ///   // ... details omitted ...
1116    /// }
1117    /// ```
1118    #[derive(Clone, Debug)]
1119    pub struct ListDbServers(RequestBuilder<crate::model::ListDbServersRequest>);
1120
1121    impl ListDbServers {
1122        pub(crate) fn new(
1123            stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
1124        ) -> Self {
1125            Self(RequestBuilder::new(stub))
1126        }
1127
1128        /// Sets the full request, replacing any prior values.
1129        pub fn with_request<V: Into<crate::model::ListDbServersRequest>>(mut self, v: V) -> Self {
1130            self.0.request = v.into();
1131            self
1132        }
1133
1134        /// Sets all the options, replacing any prior values.
1135        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1136            self.0.options = v.into();
1137            self
1138        }
1139
1140        /// Sends the request.
1141        pub async fn send(self) -> Result<crate::model::ListDbServersResponse> {
1142            (*self.0.stub)
1143                .list_db_servers(self.0.request, self.0.options)
1144                .await
1145                .map(crate::Response::into_body)
1146        }
1147
1148        /// Streams each page in the collection.
1149        pub fn by_page(
1150            self,
1151        ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListDbServersResponse, crate::Error>
1152        {
1153            use std::clone::Clone;
1154            let token = self.0.request.page_token.clone();
1155            let execute = move |token: String| {
1156                let mut builder = self.clone();
1157                builder.0.request = builder.0.request.set_page_token(token);
1158                builder.send()
1159            };
1160            google_cloud_gax::paginator::internal::new_paginator(token, execute)
1161        }
1162
1163        /// Streams each item in the collection.
1164        pub fn by_item(
1165            self,
1166        ) -> impl google_cloud_gax::paginator::ItemPaginator<
1167            crate::model::ListDbServersResponse,
1168            crate::Error,
1169        > {
1170            use google_cloud_gax::paginator::Paginator;
1171            self.by_page().items()
1172        }
1173
1174        /// Sets the value of [parent][crate::model::ListDbServersRequest::parent].
1175        ///
1176        /// This is a **required** field for requests.
1177        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1178            self.0.request.parent = v.into();
1179            self
1180        }
1181
1182        /// Sets the value of [page_size][crate::model::ListDbServersRequest::page_size].
1183        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1184            self.0.request.page_size = v.into();
1185            self
1186        }
1187
1188        /// Sets the value of [page_token][crate::model::ListDbServersRequest::page_token].
1189        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1190            self.0.request.page_token = v.into();
1191            self
1192        }
1193    }
1194
1195    #[doc(hidden)]
1196    impl crate::RequestBuilder for ListDbServers {
1197        fn request_options(&mut self) -> &mut crate::RequestOptions {
1198            &mut self.0.options
1199        }
1200    }
1201
1202    /// The request builder for [OracleDatabase::list_db_nodes][crate::client::OracleDatabase::list_db_nodes] calls.
1203    ///
1204    /// # Example
1205    /// ```
1206    /// # use google_cloud_oracledatabase_v1::builder::oracle_database::ListDbNodes;
1207    /// # async fn sample() -> google_cloud_oracledatabase_v1::Result<()> {
1208    /// use google_cloud_gax::paginator::ItemPaginator;
1209    ///
1210    /// let builder = prepare_request_builder();
1211    /// let mut items = builder.by_item();
1212    /// while let Some(result) = items.next().await {
1213    ///   let item = result?;
1214    /// }
1215    /// # Ok(()) }
1216    ///
1217    /// fn prepare_request_builder() -> ListDbNodes {
1218    ///   # panic!();
1219    ///   // ... details omitted ...
1220    /// }
1221    /// ```
1222    #[derive(Clone, Debug)]
1223    pub struct ListDbNodes(RequestBuilder<crate::model::ListDbNodesRequest>);
1224
1225    impl ListDbNodes {
1226        pub(crate) fn new(
1227            stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
1228        ) -> Self {
1229            Self(RequestBuilder::new(stub))
1230        }
1231
1232        /// Sets the full request, replacing any prior values.
1233        pub fn with_request<V: Into<crate::model::ListDbNodesRequest>>(mut self, v: V) -> Self {
1234            self.0.request = v.into();
1235            self
1236        }
1237
1238        /// Sets all the options, replacing any prior values.
1239        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1240            self.0.options = v.into();
1241            self
1242        }
1243
1244        /// Sends the request.
1245        pub async fn send(self) -> Result<crate::model::ListDbNodesResponse> {
1246            (*self.0.stub)
1247                .list_db_nodes(self.0.request, self.0.options)
1248                .await
1249                .map(crate::Response::into_body)
1250        }
1251
1252        /// Streams each page in the collection.
1253        pub fn by_page(
1254            self,
1255        ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListDbNodesResponse, crate::Error>
1256        {
1257            use std::clone::Clone;
1258            let token = self.0.request.page_token.clone();
1259            let execute = move |token: String| {
1260                let mut builder = self.clone();
1261                builder.0.request = builder.0.request.set_page_token(token);
1262                builder.send()
1263            };
1264            google_cloud_gax::paginator::internal::new_paginator(token, execute)
1265        }
1266
1267        /// Streams each item in the collection.
1268        pub fn by_item(
1269            self,
1270        ) -> impl google_cloud_gax::paginator::ItemPaginator<
1271            crate::model::ListDbNodesResponse,
1272            crate::Error,
1273        > {
1274            use google_cloud_gax::paginator::Paginator;
1275            self.by_page().items()
1276        }
1277
1278        /// Sets the value of [parent][crate::model::ListDbNodesRequest::parent].
1279        ///
1280        /// This is a **required** field for requests.
1281        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1282            self.0.request.parent = v.into();
1283            self
1284        }
1285
1286        /// Sets the value of [page_size][crate::model::ListDbNodesRequest::page_size].
1287        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1288            self.0.request.page_size = v.into();
1289            self
1290        }
1291
1292        /// Sets the value of [page_token][crate::model::ListDbNodesRequest::page_token].
1293        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1294            self.0.request.page_token = v.into();
1295            self
1296        }
1297    }
1298
1299    #[doc(hidden)]
1300    impl crate::RequestBuilder for ListDbNodes {
1301        fn request_options(&mut self) -> &mut crate::RequestOptions {
1302            &mut self.0.options
1303        }
1304    }
1305
1306    /// The request builder for [OracleDatabase::list_gi_versions][crate::client::OracleDatabase::list_gi_versions] calls.
1307    ///
1308    /// # Example
1309    /// ```
1310    /// # use google_cloud_oracledatabase_v1::builder::oracle_database::ListGiVersions;
1311    /// # async fn sample() -> google_cloud_oracledatabase_v1::Result<()> {
1312    /// use google_cloud_gax::paginator::ItemPaginator;
1313    ///
1314    /// let builder = prepare_request_builder();
1315    /// let mut items = builder.by_item();
1316    /// while let Some(result) = items.next().await {
1317    ///   let item = result?;
1318    /// }
1319    /// # Ok(()) }
1320    ///
1321    /// fn prepare_request_builder() -> ListGiVersions {
1322    ///   # panic!();
1323    ///   // ... details omitted ...
1324    /// }
1325    /// ```
1326    #[derive(Clone, Debug)]
1327    pub struct ListGiVersions(RequestBuilder<crate::model::ListGiVersionsRequest>);
1328
1329    impl ListGiVersions {
1330        pub(crate) fn new(
1331            stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
1332        ) -> Self {
1333            Self(RequestBuilder::new(stub))
1334        }
1335
1336        /// Sets the full request, replacing any prior values.
1337        pub fn with_request<V: Into<crate::model::ListGiVersionsRequest>>(mut self, v: V) -> Self {
1338            self.0.request = v.into();
1339            self
1340        }
1341
1342        /// Sets all the options, replacing any prior values.
1343        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1344            self.0.options = v.into();
1345            self
1346        }
1347
1348        /// Sends the request.
1349        pub async fn send(self) -> Result<crate::model::ListGiVersionsResponse> {
1350            (*self.0.stub)
1351                .list_gi_versions(self.0.request, self.0.options)
1352                .await
1353                .map(crate::Response::into_body)
1354        }
1355
1356        /// Streams each page in the collection.
1357        pub fn by_page(
1358            self,
1359        ) -> impl google_cloud_gax::paginator::Paginator<
1360            crate::model::ListGiVersionsResponse,
1361            crate::Error,
1362        > {
1363            use std::clone::Clone;
1364            let token = self.0.request.page_token.clone();
1365            let execute = move |token: String| {
1366                let mut builder = self.clone();
1367                builder.0.request = builder.0.request.set_page_token(token);
1368                builder.send()
1369            };
1370            google_cloud_gax::paginator::internal::new_paginator(token, execute)
1371        }
1372
1373        /// Streams each item in the collection.
1374        pub fn by_item(
1375            self,
1376        ) -> impl google_cloud_gax::paginator::ItemPaginator<
1377            crate::model::ListGiVersionsResponse,
1378            crate::Error,
1379        > {
1380            use google_cloud_gax::paginator::Paginator;
1381            self.by_page().items()
1382        }
1383
1384        /// Sets the value of [parent][crate::model::ListGiVersionsRequest::parent].
1385        ///
1386        /// This is a **required** field for requests.
1387        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1388            self.0.request.parent = v.into();
1389            self
1390        }
1391
1392        /// Sets the value of [page_size][crate::model::ListGiVersionsRequest::page_size].
1393        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1394            self.0.request.page_size = v.into();
1395            self
1396        }
1397
1398        /// Sets the value of [page_token][crate::model::ListGiVersionsRequest::page_token].
1399        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1400            self.0.request.page_token = v.into();
1401            self
1402        }
1403
1404        /// Sets the value of [filter][crate::model::ListGiVersionsRequest::filter].
1405        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
1406            self.0.request.filter = v.into();
1407            self
1408        }
1409    }
1410
1411    #[doc(hidden)]
1412    impl crate::RequestBuilder for ListGiVersions {
1413        fn request_options(&mut self) -> &mut crate::RequestOptions {
1414            &mut self.0.options
1415        }
1416    }
1417
1418    /// The request builder for [OracleDatabase::list_minor_versions][crate::client::OracleDatabase::list_minor_versions] calls.
1419    ///
1420    /// # Example
1421    /// ```
1422    /// # use google_cloud_oracledatabase_v1::builder::oracle_database::ListMinorVersions;
1423    /// # async fn sample() -> google_cloud_oracledatabase_v1::Result<()> {
1424    /// use google_cloud_gax::paginator::ItemPaginator;
1425    ///
1426    /// let builder = prepare_request_builder();
1427    /// let mut items = builder.by_item();
1428    /// while let Some(result) = items.next().await {
1429    ///   let item = result?;
1430    /// }
1431    /// # Ok(()) }
1432    ///
1433    /// fn prepare_request_builder() -> ListMinorVersions {
1434    ///   # panic!();
1435    ///   // ... details omitted ...
1436    /// }
1437    /// ```
1438    #[derive(Clone, Debug)]
1439    pub struct ListMinorVersions(RequestBuilder<crate::model::ListMinorVersionsRequest>);
1440
1441    impl ListMinorVersions {
1442        pub(crate) fn new(
1443            stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
1444        ) -> Self {
1445            Self(RequestBuilder::new(stub))
1446        }
1447
1448        /// Sets the full request, replacing any prior values.
1449        pub fn with_request<V: Into<crate::model::ListMinorVersionsRequest>>(
1450            mut self,
1451            v: V,
1452        ) -> Self {
1453            self.0.request = v.into();
1454            self
1455        }
1456
1457        /// Sets all the options, replacing any prior values.
1458        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1459            self.0.options = v.into();
1460            self
1461        }
1462
1463        /// Sends the request.
1464        pub async fn send(self) -> Result<crate::model::ListMinorVersionsResponse> {
1465            (*self.0.stub)
1466                .list_minor_versions(self.0.request, self.0.options)
1467                .await
1468                .map(crate::Response::into_body)
1469        }
1470
1471        /// Streams each page in the collection.
1472        pub fn by_page(
1473            self,
1474        ) -> impl google_cloud_gax::paginator::Paginator<
1475            crate::model::ListMinorVersionsResponse,
1476            crate::Error,
1477        > {
1478            use std::clone::Clone;
1479            let token = self.0.request.page_token.clone();
1480            let execute = move |token: String| {
1481                let mut builder = self.clone();
1482                builder.0.request = builder.0.request.set_page_token(token);
1483                builder.send()
1484            };
1485            google_cloud_gax::paginator::internal::new_paginator(token, execute)
1486        }
1487
1488        /// Streams each item in the collection.
1489        pub fn by_item(
1490            self,
1491        ) -> impl google_cloud_gax::paginator::ItemPaginator<
1492            crate::model::ListMinorVersionsResponse,
1493            crate::Error,
1494        > {
1495            use google_cloud_gax::paginator::Paginator;
1496            self.by_page().items()
1497        }
1498
1499        /// Sets the value of [parent][crate::model::ListMinorVersionsRequest::parent].
1500        ///
1501        /// This is a **required** field for requests.
1502        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1503            self.0.request.parent = v.into();
1504            self
1505        }
1506
1507        /// Sets the value of [page_size][crate::model::ListMinorVersionsRequest::page_size].
1508        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1509            self.0.request.page_size = v.into();
1510            self
1511        }
1512
1513        /// Sets the value of [page_token][crate::model::ListMinorVersionsRequest::page_token].
1514        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1515            self.0.request.page_token = v.into();
1516            self
1517        }
1518
1519        /// Sets the value of [filter][crate::model::ListMinorVersionsRequest::filter].
1520        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
1521            self.0.request.filter = v.into();
1522            self
1523        }
1524    }
1525
1526    #[doc(hidden)]
1527    impl crate::RequestBuilder for ListMinorVersions {
1528        fn request_options(&mut self) -> &mut crate::RequestOptions {
1529            &mut self.0.options
1530        }
1531    }
1532
1533    /// The request builder for [OracleDatabase::list_db_system_shapes][crate::client::OracleDatabase::list_db_system_shapes] calls.
1534    ///
1535    /// # Example
1536    /// ```
1537    /// # use google_cloud_oracledatabase_v1::builder::oracle_database::ListDbSystemShapes;
1538    /// # async fn sample() -> google_cloud_oracledatabase_v1::Result<()> {
1539    /// use google_cloud_gax::paginator::ItemPaginator;
1540    ///
1541    /// let builder = prepare_request_builder();
1542    /// let mut items = builder.by_item();
1543    /// while let Some(result) = items.next().await {
1544    ///   let item = result?;
1545    /// }
1546    /// # Ok(()) }
1547    ///
1548    /// fn prepare_request_builder() -> ListDbSystemShapes {
1549    ///   # panic!();
1550    ///   // ... details omitted ...
1551    /// }
1552    /// ```
1553    #[derive(Clone, Debug)]
1554    pub struct ListDbSystemShapes(RequestBuilder<crate::model::ListDbSystemShapesRequest>);
1555
1556    impl ListDbSystemShapes {
1557        pub(crate) fn new(
1558            stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
1559        ) -> Self {
1560            Self(RequestBuilder::new(stub))
1561        }
1562
1563        /// Sets the full request, replacing any prior values.
1564        pub fn with_request<V: Into<crate::model::ListDbSystemShapesRequest>>(
1565            mut self,
1566            v: V,
1567        ) -> Self {
1568            self.0.request = v.into();
1569            self
1570        }
1571
1572        /// Sets all the options, replacing any prior values.
1573        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1574            self.0.options = v.into();
1575            self
1576        }
1577
1578        /// Sends the request.
1579        pub async fn send(self) -> Result<crate::model::ListDbSystemShapesResponse> {
1580            (*self.0.stub)
1581                .list_db_system_shapes(self.0.request, self.0.options)
1582                .await
1583                .map(crate::Response::into_body)
1584        }
1585
1586        /// Streams each page in the collection.
1587        pub fn by_page(
1588            self,
1589        ) -> impl google_cloud_gax::paginator::Paginator<
1590            crate::model::ListDbSystemShapesResponse,
1591            crate::Error,
1592        > {
1593            use std::clone::Clone;
1594            let token = self.0.request.page_token.clone();
1595            let execute = move |token: String| {
1596                let mut builder = self.clone();
1597                builder.0.request = builder.0.request.set_page_token(token);
1598                builder.send()
1599            };
1600            google_cloud_gax::paginator::internal::new_paginator(token, execute)
1601        }
1602
1603        /// Streams each item in the collection.
1604        pub fn by_item(
1605            self,
1606        ) -> impl google_cloud_gax::paginator::ItemPaginator<
1607            crate::model::ListDbSystemShapesResponse,
1608            crate::Error,
1609        > {
1610            use google_cloud_gax::paginator::Paginator;
1611            self.by_page().items()
1612        }
1613
1614        /// Sets the value of [parent][crate::model::ListDbSystemShapesRequest::parent].
1615        ///
1616        /// This is a **required** field for requests.
1617        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1618            self.0.request.parent = v.into();
1619            self
1620        }
1621
1622        /// Sets the value of [page_size][crate::model::ListDbSystemShapesRequest::page_size].
1623        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1624            self.0.request.page_size = v.into();
1625            self
1626        }
1627
1628        /// Sets the value of [page_token][crate::model::ListDbSystemShapesRequest::page_token].
1629        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1630            self.0.request.page_token = v.into();
1631            self
1632        }
1633
1634        /// Sets the value of [filter][crate::model::ListDbSystemShapesRequest::filter].
1635        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
1636            self.0.request.filter = v.into();
1637            self
1638        }
1639    }
1640
1641    #[doc(hidden)]
1642    impl crate::RequestBuilder for ListDbSystemShapes {
1643        fn request_options(&mut self) -> &mut crate::RequestOptions {
1644            &mut self.0.options
1645        }
1646    }
1647
1648    /// The request builder for [OracleDatabase::list_autonomous_databases][crate::client::OracleDatabase::list_autonomous_databases] calls.
1649    ///
1650    /// # Example
1651    /// ```
1652    /// # use google_cloud_oracledatabase_v1::builder::oracle_database::ListAutonomousDatabases;
1653    /// # async fn sample() -> google_cloud_oracledatabase_v1::Result<()> {
1654    /// use google_cloud_gax::paginator::ItemPaginator;
1655    ///
1656    /// let builder = prepare_request_builder();
1657    /// let mut items = builder.by_item();
1658    /// while let Some(result) = items.next().await {
1659    ///   let item = result?;
1660    /// }
1661    /// # Ok(()) }
1662    ///
1663    /// fn prepare_request_builder() -> ListAutonomousDatabases {
1664    ///   # panic!();
1665    ///   // ... details omitted ...
1666    /// }
1667    /// ```
1668    #[derive(Clone, Debug)]
1669    pub struct ListAutonomousDatabases(
1670        RequestBuilder<crate::model::ListAutonomousDatabasesRequest>,
1671    );
1672
1673    impl ListAutonomousDatabases {
1674        pub(crate) fn new(
1675            stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
1676        ) -> Self {
1677            Self(RequestBuilder::new(stub))
1678        }
1679
1680        /// Sets the full request, replacing any prior values.
1681        pub fn with_request<V: Into<crate::model::ListAutonomousDatabasesRequest>>(
1682            mut self,
1683            v: V,
1684        ) -> Self {
1685            self.0.request = v.into();
1686            self
1687        }
1688
1689        /// Sets all the options, replacing any prior values.
1690        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1691            self.0.options = v.into();
1692            self
1693        }
1694
1695        /// Sends the request.
1696        pub async fn send(self) -> Result<crate::model::ListAutonomousDatabasesResponse> {
1697            (*self.0.stub)
1698                .list_autonomous_databases(self.0.request, self.0.options)
1699                .await
1700                .map(crate::Response::into_body)
1701        }
1702
1703        /// Streams each page in the collection.
1704        pub fn by_page(
1705            self,
1706        ) -> impl google_cloud_gax::paginator::Paginator<
1707            crate::model::ListAutonomousDatabasesResponse,
1708            crate::Error,
1709        > {
1710            use std::clone::Clone;
1711            let token = self.0.request.page_token.clone();
1712            let execute = move |token: String| {
1713                let mut builder = self.clone();
1714                builder.0.request = builder.0.request.set_page_token(token);
1715                builder.send()
1716            };
1717            google_cloud_gax::paginator::internal::new_paginator(token, execute)
1718        }
1719
1720        /// Streams each item in the collection.
1721        pub fn by_item(
1722            self,
1723        ) -> impl google_cloud_gax::paginator::ItemPaginator<
1724            crate::model::ListAutonomousDatabasesResponse,
1725            crate::Error,
1726        > {
1727            use google_cloud_gax::paginator::Paginator;
1728            self.by_page().items()
1729        }
1730
1731        /// Sets the value of [parent][crate::model::ListAutonomousDatabasesRequest::parent].
1732        ///
1733        /// This is a **required** field for requests.
1734        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1735            self.0.request.parent = v.into();
1736            self
1737        }
1738
1739        /// Sets the value of [page_size][crate::model::ListAutonomousDatabasesRequest::page_size].
1740        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1741            self.0.request.page_size = v.into();
1742            self
1743        }
1744
1745        /// Sets the value of [page_token][crate::model::ListAutonomousDatabasesRequest::page_token].
1746        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1747            self.0.request.page_token = v.into();
1748            self
1749        }
1750
1751        /// Sets the value of [filter][crate::model::ListAutonomousDatabasesRequest::filter].
1752        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
1753            self.0.request.filter = v.into();
1754            self
1755        }
1756
1757        /// Sets the value of [order_by][crate::model::ListAutonomousDatabasesRequest::order_by].
1758        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
1759            self.0.request.order_by = v.into();
1760            self
1761        }
1762    }
1763
1764    #[doc(hidden)]
1765    impl crate::RequestBuilder for ListAutonomousDatabases {
1766        fn request_options(&mut self) -> &mut crate::RequestOptions {
1767            &mut self.0.options
1768        }
1769    }
1770
1771    /// The request builder for [OracleDatabase::get_autonomous_database][crate::client::OracleDatabase::get_autonomous_database] calls.
1772    ///
1773    /// # Example
1774    /// ```
1775    /// # use google_cloud_oracledatabase_v1::builder::oracle_database::GetAutonomousDatabase;
1776    /// # async fn sample() -> google_cloud_oracledatabase_v1::Result<()> {
1777    ///
1778    /// let builder = prepare_request_builder();
1779    /// let response = builder.send().await?;
1780    /// # Ok(()) }
1781    ///
1782    /// fn prepare_request_builder() -> GetAutonomousDatabase {
1783    ///   # panic!();
1784    ///   // ... details omitted ...
1785    /// }
1786    /// ```
1787    #[derive(Clone, Debug)]
1788    pub struct GetAutonomousDatabase(RequestBuilder<crate::model::GetAutonomousDatabaseRequest>);
1789
1790    impl GetAutonomousDatabase {
1791        pub(crate) fn new(
1792            stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
1793        ) -> Self {
1794            Self(RequestBuilder::new(stub))
1795        }
1796
1797        /// Sets the full request, replacing any prior values.
1798        pub fn with_request<V: Into<crate::model::GetAutonomousDatabaseRequest>>(
1799            mut self,
1800            v: V,
1801        ) -> Self {
1802            self.0.request = v.into();
1803            self
1804        }
1805
1806        /// Sets all the options, replacing any prior values.
1807        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1808            self.0.options = v.into();
1809            self
1810        }
1811
1812        /// Sends the request.
1813        pub async fn send(self) -> Result<crate::model::AutonomousDatabase> {
1814            (*self.0.stub)
1815                .get_autonomous_database(self.0.request, self.0.options)
1816                .await
1817                .map(crate::Response::into_body)
1818        }
1819
1820        /// Sets the value of [name][crate::model::GetAutonomousDatabaseRequest::name].
1821        ///
1822        /// This is a **required** field for requests.
1823        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1824            self.0.request.name = v.into();
1825            self
1826        }
1827    }
1828
1829    #[doc(hidden)]
1830    impl crate::RequestBuilder for GetAutonomousDatabase {
1831        fn request_options(&mut self) -> &mut crate::RequestOptions {
1832            &mut self.0.options
1833        }
1834    }
1835
1836    /// The request builder for [OracleDatabase::create_autonomous_database][crate::client::OracleDatabase::create_autonomous_database] calls.
1837    ///
1838    /// # Example
1839    /// ```
1840    /// # use google_cloud_oracledatabase_v1::builder::oracle_database::CreateAutonomousDatabase;
1841    /// # async fn sample() -> google_cloud_oracledatabase_v1::Result<()> {
1842    /// use google_cloud_lro::Poller;
1843    ///
1844    /// let builder = prepare_request_builder();
1845    /// let response = builder.poller().until_done().await?;
1846    /// # Ok(()) }
1847    ///
1848    /// fn prepare_request_builder() -> CreateAutonomousDatabase {
1849    ///   # panic!();
1850    ///   // ... details omitted ...
1851    /// }
1852    /// ```
1853    #[derive(Clone, Debug)]
1854    pub struct CreateAutonomousDatabase(
1855        RequestBuilder<crate::model::CreateAutonomousDatabaseRequest>,
1856    );
1857
1858    impl CreateAutonomousDatabase {
1859        pub(crate) fn new(
1860            stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
1861        ) -> Self {
1862            Self(RequestBuilder::new(stub))
1863        }
1864
1865        /// Sets the full request, replacing any prior values.
1866        pub fn with_request<V: Into<crate::model::CreateAutonomousDatabaseRequest>>(
1867            mut self,
1868            v: V,
1869        ) -> Self {
1870            self.0.request = v.into();
1871            self
1872        }
1873
1874        /// Sets all the options, replacing any prior values.
1875        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1876            self.0.options = v.into();
1877            self
1878        }
1879
1880        /// Sends the request.
1881        ///
1882        /// # Long running operations
1883        ///
1884        /// This starts, but does not poll, a longrunning operation. More information
1885        /// on [create_autonomous_database][crate::client::OracleDatabase::create_autonomous_database].
1886        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
1887            (*self.0.stub)
1888                .create_autonomous_database(self.0.request, self.0.options)
1889                .await
1890                .map(crate::Response::into_body)
1891        }
1892
1893        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_autonomous_database`.
1894        pub fn poller(
1895            self,
1896        ) -> impl google_cloud_lro::Poller<
1897            crate::model::AutonomousDatabase,
1898            crate::model::OperationMetadata,
1899        > {
1900            type Operation = google_cloud_lro::internal::Operation<
1901                crate::model::AutonomousDatabase,
1902                crate::model::OperationMetadata,
1903            >;
1904            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1905            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1906
1907            let stub = self.0.stub.clone();
1908            let mut options = self.0.options.clone();
1909            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
1910            let query = move |name| {
1911                let stub = stub.clone();
1912                let options = options.clone();
1913                async {
1914                    let op = GetOperation::new(stub)
1915                        .set_name(name)
1916                        .with_options(options)
1917                        .send()
1918                        .await?;
1919                    Ok(Operation::new(op))
1920                }
1921            };
1922
1923            let start = move || async {
1924                let op = self.send().await?;
1925                Ok(Operation::new(op))
1926            };
1927
1928            google_cloud_lro::internal::new_poller(
1929                polling_error_policy,
1930                polling_backoff_policy,
1931                start,
1932                query,
1933            )
1934        }
1935
1936        /// Sets the value of [parent][crate::model::CreateAutonomousDatabaseRequest::parent].
1937        ///
1938        /// This is a **required** field for requests.
1939        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1940            self.0.request.parent = v.into();
1941            self
1942        }
1943
1944        /// Sets the value of [autonomous_database_id][crate::model::CreateAutonomousDatabaseRequest::autonomous_database_id].
1945        ///
1946        /// This is a **required** field for requests.
1947        pub fn set_autonomous_database_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1948            self.0.request.autonomous_database_id = v.into();
1949            self
1950        }
1951
1952        /// Sets the value of [autonomous_database][crate::model::CreateAutonomousDatabaseRequest::autonomous_database].
1953        ///
1954        /// This is a **required** field for requests.
1955        pub fn set_autonomous_database<T>(mut self, v: T) -> Self
1956        where
1957            T: std::convert::Into<crate::model::AutonomousDatabase>,
1958        {
1959            self.0.request.autonomous_database = std::option::Option::Some(v.into());
1960            self
1961        }
1962
1963        /// Sets or clears the value of [autonomous_database][crate::model::CreateAutonomousDatabaseRequest::autonomous_database].
1964        ///
1965        /// This is a **required** field for requests.
1966        pub fn set_or_clear_autonomous_database<T>(mut self, v: std::option::Option<T>) -> Self
1967        where
1968            T: std::convert::Into<crate::model::AutonomousDatabase>,
1969        {
1970            self.0.request.autonomous_database = v.map(|x| x.into());
1971            self
1972        }
1973
1974        /// Sets the value of [request_id][crate::model::CreateAutonomousDatabaseRequest::request_id].
1975        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1976            self.0.request.request_id = v.into();
1977            self
1978        }
1979    }
1980
1981    #[doc(hidden)]
1982    impl crate::RequestBuilder for CreateAutonomousDatabase {
1983        fn request_options(&mut self) -> &mut crate::RequestOptions {
1984            &mut self.0.options
1985        }
1986    }
1987
1988    /// The request builder for [OracleDatabase::update_autonomous_database][crate::client::OracleDatabase::update_autonomous_database] calls.
1989    ///
1990    /// # Example
1991    /// ```
1992    /// # use google_cloud_oracledatabase_v1::builder::oracle_database::UpdateAutonomousDatabase;
1993    /// # async fn sample() -> google_cloud_oracledatabase_v1::Result<()> {
1994    /// use google_cloud_lro::Poller;
1995    ///
1996    /// let builder = prepare_request_builder();
1997    /// let response = builder.poller().until_done().await?;
1998    /// # Ok(()) }
1999    ///
2000    /// fn prepare_request_builder() -> UpdateAutonomousDatabase {
2001    ///   # panic!();
2002    ///   // ... details omitted ...
2003    /// }
2004    /// ```
2005    #[derive(Clone, Debug)]
2006    pub struct UpdateAutonomousDatabase(
2007        RequestBuilder<crate::model::UpdateAutonomousDatabaseRequest>,
2008    );
2009
2010    impl UpdateAutonomousDatabase {
2011        pub(crate) fn new(
2012            stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
2013        ) -> Self {
2014            Self(RequestBuilder::new(stub))
2015        }
2016
2017        /// Sets the full request, replacing any prior values.
2018        pub fn with_request<V: Into<crate::model::UpdateAutonomousDatabaseRequest>>(
2019            mut self,
2020            v: V,
2021        ) -> Self {
2022            self.0.request = v.into();
2023            self
2024        }
2025
2026        /// Sets all the options, replacing any prior values.
2027        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2028            self.0.options = v.into();
2029            self
2030        }
2031
2032        /// Sends the request.
2033        ///
2034        /// # Long running operations
2035        ///
2036        /// This starts, but does not poll, a longrunning operation. More information
2037        /// on [update_autonomous_database][crate::client::OracleDatabase::update_autonomous_database].
2038        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
2039            (*self.0.stub)
2040                .update_autonomous_database(self.0.request, self.0.options)
2041                .await
2042                .map(crate::Response::into_body)
2043        }
2044
2045        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_autonomous_database`.
2046        pub fn poller(
2047            self,
2048        ) -> impl google_cloud_lro::Poller<
2049            crate::model::AutonomousDatabase,
2050            crate::model::OperationMetadata,
2051        > {
2052            type Operation = google_cloud_lro::internal::Operation<
2053                crate::model::AutonomousDatabase,
2054                crate::model::OperationMetadata,
2055            >;
2056            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2057            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2058
2059            let stub = self.0.stub.clone();
2060            let mut options = self.0.options.clone();
2061            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
2062            let query = move |name| {
2063                let stub = stub.clone();
2064                let options = options.clone();
2065                async {
2066                    let op = GetOperation::new(stub)
2067                        .set_name(name)
2068                        .with_options(options)
2069                        .send()
2070                        .await?;
2071                    Ok(Operation::new(op))
2072                }
2073            };
2074
2075            let start = move || async {
2076                let op = self.send().await?;
2077                Ok(Operation::new(op))
2078            };
2079
2080            google_cloud_lro::internal::new_poller(
2081                polling_error_policy,
2082                polling_backoff_policy,
2083                start,
2084                query,
2085            )
2086        }
2087
2088        /// Sets the value of [update_mask][crate::model::UpdateAutonomousDatabaseRequest::update_mask].
2089        pub fn set_update_mask<T>(mut self, v: T) -> Self
2090        where
2091            T: std::convert::Into<wkt::FieldMask>,
2092        {
2093            self.0.request.update_mask = std::option::Option::Some(v.into());
2094            self
2095        }
2096
2097        /// Sets or clears the value of [update_mask][crate::model::UpdateAutonomousDatabaseRequest::update_mask].
2098        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
2099        where
2100            T: std::convert::Into<wkt::FieldMask>,
2101        {
2102            self.0.request.update_mask = v.map(|x| x.into());
2103            self
2104        }
2105
2106        /// Sets the value of [autonomous_database][crate::model::UpdateAutonomousDatabaseRequest::autonomous_database].
2107        ///
2108        /// This is a **required** field for requests.
2109        pub fn set_autonomous_database<T>(mut self, v: T) -> Self
2110        where
2111            T: std::convert::Into<crate::model::AutonomousDatabase>,
2112        {
2113            self.0.request.autonomous_database = std::option::Option::Some(v.into());
2114            self
2115        }
2116
2117        /// Sets or clears the value of [autonomous_database][crate::model::UpdateAutonomousDatabaseRequest::autonomous_database].
2118        ///
2119        /// This is a **required** field for requests.
2120        pub fn set_or_clear_autonomous_database<T>(mut self, v: std::option::Option<T>) -> Self
2121        where
2122            T: std::convert::Into<crate::model::AutonomousDatabase>,
2123        {
2124            self.0.request.autonomous_database = v.map(|x| x.into());
2125            self
2126        }
2127
2128        /// Sets the value of [request_id][crate::model::UpdateAutonomousDatabaseRequest::request_id].
2129        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2130            self.0.request.request_id = v.into();
2131            self
2132        }
2133    }
2134
2135    #[doc(hidden)]
2136    impl crate::RequestBuilder for UpdateAutonomousDatabase {
2137        fn request_options(&mut self) -> &mut crate::RequestOptions {
2138            &mut self.0.options
2139        }
2140    }
2141
2142    /// The request builder for [OracleDatabase::delete_autonomous_database][crate::client::OracleDatabase::delete_autonomous_database] calls.
2143    ///
2144    /// # Example
2145    /// ```
2146    /// # use google_cloud_oracledatabase_v1::builder::oracle_database::DeleteAutonomousDatabase;
2147    /// # async fn sample() -> google_cloud_oracledatabase_v1::Result<()> {
2148    /// use google_cloud_lro::Poller;
2149    ///
2150    /// let builder = prepare_request_builder();
2151    /// let response = builder.poller().until_done().await?;
2152    /// # Ok(()) }
2153    ///
2154    /// fn prepare_request_builder() -> DeleteAutonomousDatabase {
2155    ///   # panic!();
2156    ///   // ... details omitted ...
2157    /// }
2158    /// ```
2159    #[derive(Clone, Debug)]
2160    pub struct DeleteAutonomousDatabase(
2161        RequestBuilder<crate::model::DeleteAutonomousDatabaseRequest>,
2162    );
2163
2164    impl DeleteAutonomousDatabase {
2165        pub(crate) fn new(
2166            stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
2167        ) -> Self {
2168            Self(RequestBuilder::new(stub))
2169        }
2170
2171        /// Sets the full request, replacing any prior values.
2172        pub fn with_request<V: Into<crate::model::DeleteAutonomousDatabaseRequest>>(
2173            mut self,
2174            v: V,
2175        ) -> Self {
2176            self.0.request = v.into();
2177            self
2178        }
2179
2180        /// Sets all the options, replacing any prior values.
2181        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2182            self.0.options = v.into();
2183            self
2184        }
2185
2186        /// Sends the request.
2187        ///
2188        /// # Long running operations
2189        ///
2190        /// This starts, but does not poll, a longrunning operation. More information
2191        /// on [delete_autonomous_database][crate::client::OracleDatabase::delete_autonomous_database].
2192        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
2193            (*self.0.stub)
2194                .delete_autonomous_database(self.0.request, self.0.options)
2195                .await
2196                .map(crate::Response::into_body)
2197        }
2198
2199        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_autonomous_database`.
2200        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
2201            type Operation =
2202                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
2203            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2204            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2205
2206            let stub = self.0.stub.clone();
2207            let mut options = self.0.options.clone();
2208            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
2209            let query = move |name| {
2210                let stub = stub.clone();
2211                let options = options.clone();
2212                async {
2213                    let op = GetOperation::new(stub)
2214                        .set_name(name)
2215                        .with_options(options)
2216                        .send()
2217                        .await?;
2218                    Ok(Operation::new(op))
2219                }
2220            };
2221
2222            let start = move || async {
2223                let op = self.send().await?;
2224                Ok(Operation::new(op))
2225            };
2226
2227            google_cloud_lro::internal::new_unit_response_poller(
2228                polling_error_policy,
2229                polling_backoff_policy,
2230                start,
2231                query,
2232            )
2233        }
2234
2235        /// Sets the value of [name][crate::model::DeleteAutonomousDatabaseRequest::name].
2236        ///
2237        /// This is a **required** field for requests.
2238        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2239            self.0.request.name = v.into();
2240            self
2241        }
2242
2243        /// Sets the value of [request_id][crate::model::DeleteAutonomousDatabaseRequest::request_id].
2244        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2245            self.0.request.request_id = v.into();
2246            self
2247        }
2248    }
2249
2250    #[doc(hidden)]
2251    impl crate::RequestBuilder for DeleteAutonomousDatabase {
2252        fn request_options(&mut self) -> &mut crate::RequestOptions {
2253            &mut self.0.options
2254        }
2255    }
2256
2257    /// The request builder for [OracleDatabase::restore_autonomous_database][crate::client::OracleDatabase::restore_autonomous_database] calls.
2258    ///
2259    /// # Example
2260    /// ```
2261    /// # use google_cloud_oracledatabase_v1::builder::oracle_database::RestoreAutonomousDatabase;
2262    /// # async fn sample() -> google_cloud_oracledatabase_v1::Result<()> {
2263    /// use google_cloud_lro::Poller;
2264    ///
2265    /// let builder = prepare_request_builder();
2266    /// let response = builder.poller().until_done().await?;
2267    /// # Ok(()) }
2268    ///
2269    /// fn prepare_request_builder() -> RestoreAutonomousDatabase {
2270    ///   # panic!();
2271    ///   // ... details omitted ...
2272    /// }
2273    /// ```
2274    #[derive(Clone, Debug)]
2275    pub struct RestoreAutonomousDatabase(
2276        RequestBuilder<crate::model::RestoreAutonomousDatabaseRequest>,
2277    );
2278
2279    impl RestoreAutonomousDatabase {
2280        pub(crate) fn new(
2281            stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
2282        ) -> Self {
2283            Self(RequestBuilder::new(stub))
2284        }
2285
2286        /// Sets the full request, replacing any prior values.
2287        pub fn with_request<V: Into<crate::model::RestoreAutonomousDatabaseRequest>>(
2288            mut self,
2289            v: V,
2290        ) -> Self {
2291            self.0.request = v.into();
2292            self
2293        }
2294
2295        /// Sets all the options, replacing any prior values.
2296        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2297            self.0.options = v.into();
2298            self
2299        }
2300
2301        /// Sends the request.
2302        ///
2303        /// # Long running operations
2304        ///
2305        /// This starts, but does not poll, a longrunning operation. More information
2306        /// on [restore_autonomous_database][crate::client::OracleDatabase::restore_autonomous_database].
2307        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
2308            (*self.0.stub)
2309                .restore_autonomous_database(self.0.request, self.0.options)
2310                .await
2311                .map(crate::Response::into_body)
2312        }
2313
2314        /// Creates a [Poller][google_cloud_lro::Poller] to work with `restore_autonomous_database`.
2315        pub fn poller(
2316            self,
2317        ) -> impl google_cloud_lro::Poller<
2318            crate::model::AutonomousDatabase,
2319            crate::model::OperationMetadata,
2320        > {
2321            type Operation = google_cloud_lro::internal::Operation<
2322                crate::model::AutonomousDatabase,
2323                crate::model::OperationMetadata,
2324            >;
2325            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2326            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2327
2328            let stub = self.0.stub.clone();
2329            let mut options = self.0.options.clone();
2330            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
2331            let query = move |name| {
2332                let stub = stub.clone();
2333                let options = options.clone();
2334                async {
2335                    let op = GetOperation::new(stub)
2336                        .set_name(name)
2337                        .with_options(options)
2338                        .send()
2339                        .await?;
2340                    Ok(Operation::new(op))
2341                }
2342            };
2343
2344            let start = move || async {
2345                let op = self.send().await?;
2346                Ok(Operation::new(op))
2347            };
2348
2349            google_cloud_lro::internal::new_poller(
2350                polling_error_policy,
2351                polling_backoff_policy,
2352                start,
2353                query,
2354            )
2355        }
2356
2357        /// Sets the value of [name][crate::model::RestoreAutonomousDatabaseRequest::name].
2358        ///
2359        /// This is a **required** field for requests.
2360        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2361            self.0.request.name = v.into();
2362            self
2363        }
2364
2365        /// Sets the value of [restore_time][crate::model::RestoreAutonomousDatabaseRequest::restore_time].
2366        ///
2367        /// This is a **required** field for requests.
2368        pub fn set_restore_time<T>(mut self, v: T) -> Self
2369        where
2370            T: std::convert::Into<wkt::Timestamp>,
2371        {
2372            self.0.request.restore_time = std::option::Option::Some(v.into());
2373            self
2374        }
2375
2376        /// Sets or clears the value of [restore_time][crate::model::RestoreAutonomousDatabaseRequest::restore_time].
2377        ///
2378        /// This is a **required** field for requests.
2379        pub fn set_or_clear_restore_time<T>(mut self, v: std::option::Option<T>) -> Self
2380        where
2381            T: std::convert::Into<wkt::Timestamp>,
2382        {
2383            self.0.request.restore_time = v.map(|x| x.into());
2384            self
2385        }
2386    }
2387
2388    #[doc(hidden)]
2389    impl crate::RequestBuilder for RestoreAutonomousDatabase {
2390        fn request_options(&mut self) -> &mut crate::RequestOptions {
2391            &mut self.0.options
2392        }
2393    }
2394
2395    /// The request builder for [OracleDatabase::generate_autonomous_database_wallet][crate::client::OracleDatabase::generate_autonomous_database_wallet] calls.
2396    ///
2397    /// # Example
2398    /// ```
2399    /// # use google_cloud_oracledatabase_v1::builder::oracle_database::GenerateAutonomousDatabaseWallet;
2400    /// # async fn sample() -> google_cloud_oracledatabase_v1::Result<()> {
2401    ///
2402    /// let builder = prepare_request_builder();
2403    /// let response = builder.send().await?;
2404    /// # Ok(()) }
2405    ///
2406    /// fn prepare_request_builder() -> GenerateAutonomousDatabaseWallet {
2407    ///   # panic!();
2408    ///   // ... details omitted ...
2409    /// }
2410    /// ```
2411    #[derive(Clone, Debug)]
2412    pub struct GenerateAutonomousDatabaseWallet(
2413        RequestBuilder<crate::model::GenerateAutonomousDatabaseWalletRequest>,
2414    );
2415
2416    impl GenerateAutonomousDatabaseWallet {
2417        pub(crate) fn new(
2418            stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
2419        ) -> Self {
2420            Self(RequestBuilder::new(stub))
2421        }
2422
2423        /// Sets the full request, replacing any prior values.
2424        pub fn with_request<V: Into<crate::model::GenerateAutonomousDatabaseWalletRequest>>(
2425            mut self,
2426            v: V,
2427        ) -> Self {
2428            self.0.request = v.into();
2429            self
2430        }
2431
2432        /// Sets all the options, replacing any prior values.
2433        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2434            self.0.options = v.into();
2435            self
2436        }
2437
2438        /// Sends the request.
2439        pub async fn send(self) -> Result<crate::model::GenerateAutonomousDatabaseWalletResponse> {
2440            (*self.0.stub)
2441                .generate_autonomous_database_wallet(self.0.request, self.0.options)
2442                .await
2443                .map(crate::Response::into_body)
2444        }
2445
2446        /// Sets the value of [name][crate::model::GenerateAutonomousDatabaseWalletRequest::name].
2447        ///
2448        /// This is a **required** field for requests.
2449        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2450            self.0.request.name = v.into();
2451            self
2452        }
2453
2454        /// Sets the value of [r#type][crate::model::GenerateAutonomousDatabaseWalletRequest::type].
2455        pub fn set_type<T: Into<crate::model::GenerateType>>(mut self, v: T) -> Self {
2456            self.0.request.r#type = v.into();
2457            self
2458        }
2459
2460        /// Sets the value of [is_regional][crate::model::GenerateAutonomousDatabaseWalletRequest::is_regional].
2461        pub fn set_is_regional<T: Into<bool>>(mut self, v: T) -> Self {
2462            self.0.request.is_regional = v.into();
2463            self
2464        }
2465
2466        /// Sets the value of [password][crate::model::GenerateAutonomousDatabaseWalletRequest::password].
2467        ///
2468        /// This is a **required** field for requests.
2469        pub fn set_password<T: Into<std::string::String>>(mut self, v: T) -> Self {
2470            self.0.request.password = v.into();
2471            self
2472        }
2473    }
2474
2475    #[doc(hidden)]
2476    impl crate::RequestBuilder for GenerateAutonomousDatabaseWallet {
2477        fn request_options(&mut self) -> &mut crate::RequestOptions {
2478            &mut self.0.options
2479        }
2480    }
2481
2482    /// The request builder for [OracleDatabase::list_autonomous_db_versions][crate::client::OracleDatabase::list_autonomous_db_versions] calls.
2483    ///
2484    /// # Example
2485    /// ```
2486    /// # use google_cloud_oracledatabase_v1::builder::oracle_database::ListAutonomousDbVersions;
2487    /// # async fn sample() -> google_cloud_oracledatabase_v1::Result<()> {
2488    /// use google_cloud_gax::paginator::ItemPaginator;
2489    ///
2490    /// let builder = prepare_request_builder();
2491    /// let mut items = builder.by_item();
2492    /// while let Some(result) = items.next().await {
2493    ///   let item = result?;
2494    /// }
2495    /// # Ok(()) }
2496    ///
2497    /// fn prepare_request_builder() -> ListAutonomousDbVersions {
2498    ///   # panic!();
2499    ///   // ... details omitted ...
2500    /// }
2501    /// ```
2502    #[derive(Clone, Debug)]
2503    pub struct ListAutonomousDbVersions(
2504        RequestBuilder<crate::model::ListAutonomousDbVersionsRequest>,
2505    );
2506
2507    impl ListAutonomousDbVersions {
2508        pub(crate) fn new(
2509            stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
2510        ) -> Self {
2511            Self(RequestBuilder::new(stub))
2512        }
2513
2514        /// Sets the full request, replacing any prior values.
2515        pub fn with_request<V: Into<crate::model::ListAutonomousDbVersionsRequest>>(
2516            mut self,
2517            v: V,
2518        ) -> Self {
2519            self.0.request = v.into();
2520            self
2521        }
2522
2523        /// Sets all the options, replacing any prior values.
2524        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2525            self.0.options = v.into();
2526            self
2527        }
2528
2529        /// Sends the request.
2530        pub async fn send(self) -> Result<crate::model::ListAutonomousDbVersionsResponse> {
2531            (*self.0.stub)
2532                .list_autonomous_db_versions(self.0.request, self.0.options)
2533                .await
2534                .map(crate::Response::into_body)
2535        }
2536
2537        /// Streams each page in the collection.
2538        pub fn by_page(
2539            self,
2540        ) -> impl google_cloud_gax::paginator::Paginator<
2541            crate::model::ListAutonomousDbVersionsResponse,
2542            crate::Error,
2543        > {
2544            use std::clone::Clone;
2545            let token = self.0.request.page_token.clone();
2546            let execute = move |token: String| {
2547                let mut builder = self.clone();
2548                builder.0.request = builder.0.request.set_page_token(token);
2549                builder.send()
2550            };
2551            google_cloud_gax::paginator::internal::new_paginator(token, execute)
2552        }
2553
2554        /// Streams each item in the collection.
2555        pub fn by_item(
2556            self,
2557        ) -> impl google_cloud_gax::paginator::ItemPaginator<
2558            crate::model::ListAutonomousDbVersionsResponse,
2559            crate::Error,
2560        > {
2561            use google_cloud_gax::paginator::Paginator;
2562            self.by_page().items()
2563        }
2564
2565        /// Sets the value of [parent][crate::model::ListAutonomousDbVersionsRequest::parent].
2566        ///
2567        /// This is a **required** field for requests.
2568        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2569            self.0.request.parent = v.into();
2570            self
2571        }
2572
2573        /// Sets the value of [page_size][crate::model::ListAutonomousDbVersionsRequest::page_size].
2574        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2575            self.0.request.page_size = v.into();
2576            self
2577        }
2578
2579        /// Sets the value of [page_token][crate::model::ListAutonomousDbVersionsRequest::page_token].
2580        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2581            self.0.request.page_token = v.into();
2582            self
2583        }
2584    }
2585
2586    #[doc(hidden)]
2587    impl crate::RequestBuilder for ListAutonomousDbVersions {
2588        fn request_options(&mut self) -> &mut crate::RequestOptions {
2589            &mut self.0.options
2590        }
2591    }
2592
2593    /// The request builder for [OracleDatabase::list_autonomous_database_character_sets][crate::client::OracleDatabase::list_autonomous_database_character_sets] calls.
2594    ///
2595    /// # Example
2596    /// ```
2597    /// # use google_cloud_oracledatabase_v1::builder::oracle_database::ListAutonomousDatabaseCharacterSets;
2598    /// # async fn sample() -> google_cloud_oracledatabase_v1::Result<()> {
2599    /// use google_cloud_gax::paginator::ItemPaginator;
2600    ///
2601    /// let builder = prepare_request_builder();
2602    /// let mut items = builder.by_item();
2603    /// while let Some(result) = items.next().await {
2604    ///   let item = result?;
2605    /// }
2606    /// # Ok(()) }
2607    ///
2608    /// fn prepare_request_builder() -> ListAutonomousDatabaseCharacterSets {
2609    ///   # panic!();
2610    ///   // ... details omitted ...
2611    /// }
2612    /// ```
2613    #[derive(Clone, Debug)]
2614    pub struct ListAutonomousDatabaseCharacterSets(
2615        RequestBuilder<crate::model::ListAutonomousDatabaseCharacterSetsRequest>,
2616    );
2617
2618    impl ListAutonomousDatabaseCharacterSets {
2619        pub(crate) fn new(
2620            stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
2621        ) -> Self {
2622            Self(RequestBuilder::new(stub))
2623        }
2624
2625        /// Sets the full request, replacing any prior values.
2626        pub fn with_request<V: Into<crate::model::ListAutonomousDatabaseCharacterSetsRequest>>(
2627            mut self,
2628            v: V,
2629        ) -> Self {
2630            self.0.request = v.into();
2631            self
2632        }
2633
2634        /// Sets all the options, replacing any prior values.
2635        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2636            self.0.options = v.into();
2637            self
2638        }
2639
2640        /// Sends the request.
2641        pub async fn send(
2642            self,
2643        ) -> Result<crate::model::ListAutonomousDatabaseCharacterSetsResponse> {
2644            (*self.0.stub)
2645                .list_autonomous_database_character_sets(self.0.request, self.0.options)
2646                .await
2647                .map(crate::Response::into_body)
2648        }
2649
2650        /// Streams each page in the collection.
2651        pub fn by_page(
2652            self,
2653        ) -> impl google_cloud_gax::paginator::Paginator<
2654            crate::model::ListAutonomousDatabaseCharacterSetsResponse,
2655            crate::Error,
2656        > {
2657            use std::clone::Clone;
2658            let token = self.0.request.page_token.clone();
2659            let execute = move |token: String| {
2660                let mut builder = self.clone();
2661                builder.0.request = builder.0.request.set_page_token(token);
2662                builder.send()
2663            };
2664            google_cloud_gax::paginator::internal::new_paginator(token, execute)
2665        }
2666
2667        /// Streams each item in the collection.
2668        pub fn by_item(
2669            self,
2670        ) -> impl google_cloud_gax::paginator::ItemPaginator<
2671            crate::model::ListAutonomousDatabaseCharacterSetsResponse,
2672            crate::Error,
2673        > {
2674            use google_cloud_gax::paginator::Paginator;
2675            self.by_page().items()
2676        }
2677
2678        /// Sets the value of [parent][crate::model::ListAutonomousDatabaseCharacterSetsRequest::parent].
2679        ///
2680        /// This is a **required** field for requests.
2681        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2682            self.0.request.parent = v.into();
2683            self
2684        }
2685
2686        /// Sets the value of [page_size][crate::model::ListAutonomousDatabaseCharacterSetsRequest::page_size].
2687        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2688            self.0.request.page_size = v.into();
2689            self
2690        }
2691
2692        /// Sets the value of [page_token][crate::model::ListAutonomousDatabaseCharacterSetsRequest::page_token].
2693        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2694            self.0.request.page_token = v.into();
2695            self
2696        }
2697
2698        /// Sets the value of [filter][crate::model::ListAutonomousDatabaseCharacterSetsRequest::filter].
2699        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
2700            self.0.request.filter = v.into();
2701            self
2702        }
2703    }
2704
2705    #[doc(hidden)]
2706    impl crate::RequestBuilder for ListAutonomousDatabaseCharacterSets {
2707        fn request_options(&mut self) -> &mut crate::RequestOptions {
2708            &mut self.0.options
2709        }
2710    }
2711
2712    /// The request builder for [OracleDatabase::list_autonomous_database_backups][crate::client::OracleDatabase::list_autonomous_database_backups] calls.
2713    ///
2714    /// # Example
2715    /// ```
2716    /// # use google_cloud_oracledatabase_v1::builder::oracle_database::ListAutonomousDatabaseBackups;
2717    /// # async fn sample() -> google_cloud_oracledatabase_v1::Result<()> {
2718    /// use google_cloud_gax::paginator::ItemPaginator;
2719    ///
2720    /// let builder = prepare_request_builder();
2721    /// let mut items = builder.by_item();
2722    /// while let Some(result) = items.next().await {
2723    ///   let item = result?;
2724    /// }
2725    /// # Ok(()) }
2726    ///
2727    /// fn prepare_request_builder() -> ListAutonomousDatabaseBackups {
2728    ///   # panic!();
2729    ///   // ... details omitted ...
2730    /// }
2731    /// ```
2732    #[derive(Clone, Debug)]
2733    pub struct ListAutonomousDatabaseBackups(
2734        RequestBuilder<crate::model::ListAutonomousDatabaseBackupsRequest>,
2735    );
2736
2737    impl ListAutonomousDatabaseBackups {
2738        pub(crate) fn new(
2739            stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
2740        ) -> Self {
2741            Self(RequestBuilder::new(stub))
2742        }
2743
2744        /// Sets the full request, replacing any prior values.
2745        pub fn with_request<V: Into<crate::model::ListAutonomousDatabaseBackupsRequest>>(
2746            mut self,
2747            v: V,
2748        ) -> Self {
2749            self.0.request = v.into();
2750            self
2751        }
2752
2753        /// Sets all the options, replacing any prior values.
2754        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2755            self.0.options = v.into();
2756            self
2757        }
2758
2759        /// Sends the request.
2760        pub async fn send(self) -> Result<crate::model::ListAutonomousDatabaseBackupsResponse> {
2761            (*self.0.stub)
2762                .list_autonomous_database_backups(self.0.request, self.0.options)
2763                .await
2764                .map(crate::Response::into_body)
2765        }
2766
2767        /// Streams each page in the collection.
2768        pub fn by_page(
2769            self,
2770        ) -> impl google_cloud_gax::paginator::Paginator<
2771            crate::model::ListAutonomousDatabaseBackupsResponse,
2772            crate::Error,
2773        > {
2774            use std::clone::Clone;
2775            let token = self.0.request.page_token.clone();
2776            let execute = move |token: String| {
2777                let mut builder = self.clone();
2778                builder.0.request = builder.0.request.set_page_token(token);
2779                builder.send()
2780            };
2781            google_cloud_gax::paginator::internal::new_paginator(token, execute)
2782        }
2783
2784        /// Streams each item in the collection.
2785        pub fn by_item(
2786            self,
2787        ) -> impl google_cloud_gax::paginator::ItemPaginator<
2788            crate::model::ListAutonomousDatabaseBackupsResponse,
2789            crate::Error,
2790        > {
2791            use google_cloud_gax::paginator::Paginator;
2792            self.by_page().items()
2793        }
2794
2795        /// Sets the value of [parent][crate::model::ListAutonomousDatabaseBackupsRequest::parent].
2796        ///
2797        /// This is a **required** field for requests.
2798        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2799            self.0.request.parent = v.into();
2800            self
2801        }
2802
2803        /// Sets the value of [filter][crate::model::ListAutonomousDatabaseBackupsRequest::filter].
2804        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
2805            self.0.request.filter = v.into();
2806            self
2807        }
2808
2809        /// Sets the value of [page_size][crate::model::ListAutonomousDatabaseBackupsRequest::page_size].
2810        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2811            self.0.request.page_size = v.into();
2812            self
2813        }
2814
2815        /// Sets the value of [page_token][crate::model::ListAutonomousDatabaseBackupsRequest::page_token].
2816        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2817            self.0.request.page_token = v.into();
2818            self
2819        }
2820    }
2821
2822    #[doc(hidden)]
2823    impl crate::RequestBuilder for ListAutonomousDatabaseBackups {
2824        fn request_options(&mut self) -> &mut crate::RequestOptions {
2825            &mut self.0.options
2826        }
2827    }
2828
2829    /// The request builder for [OracleDatabase::stop_autonomous_database][crate::client::OracleDatabase::stop_autonomous_database] calls.
2830    ///
2831    /// # Example
2832    /// ```
2833    /// # use google_cloud_oracledatabase_v1::builder::oracle_database::StopAutonomousDatabase;
2834    /// # async fn sample() -> google_cloud_oracledatabase_v1::Result<()> {
2835    /// use google_cloud_lro::Poller;
2836    ///
2837    /// let builder = prepare_request_builder();
2838    /// let response = builder.poller().until_done().await?;
2839    /// # Ok(()) }
2840    ///
2841    /// fn prepare_request_builder() -> StopAutonomousDatabase {
2842    ///   # panic!();
2843    ///   // ... details omitted ...
2844    /// }
2845    /// ```
2846    #[derive(Clone, Debug)]
2847    pub struct StopAutonomousDatabase(RequestBuilder<crate::model::StopAutonomousDatabaseRequest>);
2848
2849    impl StopAutonomousDatabase {
2850        pub(crate) fn new(
2851            stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
2852        ) -> Self {
2853            Self(RequestBuilder::new(stub))
2854        }
2855
2856        /// Sets the full request, replacing any prior values.
2857        pub fn with_request<V: Into<crate::model::StopAutonomousDatabaseRequest>>(
2858            mut self,
2859            v: V,
2860        ) -> Self {
2861            self.0.request = v.into();
2862            self
2863        }
2864
2865        /// Sets all the options, replacing any prior values.
2866        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2867            self.0.options = v.into();
2868            self
2869        }
2870
2871        /// Sends the request.
2872        ///
2873        /// # Long running operations
2874        ///
2875        /// This starts, but does not poll, a longrunning operation. More information
2876        /// on [stop_autonomous_database][crate::client::OracleDatabase::stop_autonomous_database].
2877        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
2878            (*self.0.stub)
2879                .stop_autonomous_database(self.0.request, self.0.options)
2880                .await
2881                .map(crate::Response::into_body)
2882        }
2883
2884        /// Creates a [Poller][google_cloud_lro::Poller] to work with `stop_autonomous_database`.
2885        pub fn poller(
2886            self,
2887        ) -> impl google_cloud_lro::Poller<
2888            crate::model::AutonomousDatabase,
2889            crate::model::OperationMetadata,
2890        > {
2891            type Operation = google_cloud_lro::internal::Operation<
2892                crate::model::AutonomousDatabase,
2893                crate::model::OperationMetadata,
2894            >;
2895            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2896            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2897
2898            let stub = self.0.stub.clone();
2899            let mut options = self.0.options.clone();
2900            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
2901            let query = move |name| {
2902                let stub = stub.clone();
2903                let options = options.clone();
2904                async {
2905                    let op = GetOperation::new(stub)
2906                        .set_name(name)
2907                        .with_options(options)
2908                        .send()
2909                        .await?;
2910                    Ok(Operation::new(op))
2911                }
2912            };
2913
2914            let start = move || async {
2915                let op = self.send().await?;
2916                Ok(Operation::new(op))
2917            };
2918
2919            google_cloud_lro::internal::new_poller(
2920                polling_error_policy,
2921                polling_backoff_policy,
2922                start,
2923                query,
2924            )
2925        }
2926
2927        /// Sets the value of [name][crate::model::StopAutonomousDatabaseRequest::name].
2928        ///
2929        /// This is a **required** field for requests.
2930        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2931            self.0.request.name = v.into();
2932            self
2933        }
2934    }
2935
2936    #[doc(hidden)]
2937    impl crate::RequestBuilder for StopAutonomousDatabase {
2938        fn request_options(&mut self) -> &mut crate::RequestOptions {
2939            &mut self.0.options
2940        }
2941    }
2942
2943    /// The request builder for [OracleDatabase::start_autonomous_database][crate::client::OracleDatabase::start_autonomous_database] calls.
2944    ///
2945    /// # Example
2946    /// ```
2947    /// # use google_cloud_oracledatabase_v1::builder::oracle_database::StartAutonomousDatabase;
2948    /// # async fn sample() -> google_cloud_oracledatabase_v1::Result<()> {
2949    /// use google_cloud_lro::Poller;
2950    ///
2951    /// let builder = prepare_request_builder();
2952    /// let response = builder.poller().until_done().await?;
2953    /// # Ok(()) }
2954    ///
2955    /// fn prepare_request_builder() -> StartAutonomousDatabase {
2956    ///   # panic!();
2957    ///   // ... details omitted ...
2958    /// }
2959    /// ```
2960    #[derive(Clone, Debug)]
2961    pub struct StartAutonomousDatabase(
2962        RequestBuilder<crate::model::StartAutonomousDatabaseRequest>,
2963    );
2964
2965    impl StartAutonomousDatabase {
2966        pub(crate) fn new(
2967            stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
2968        ) -> Self {
2969            Self(RequestBuilder::new(stub))
2970        }
2971
2972        /// Sets the full request, replacing any prior values.
2973        pub fn with_request<V: Into<crate::model::StartAutonomousDatabaseRequest>>(
2974            mut self,
2975            v: V,
2976        ) -> Self {
2977            self.0.request = v.into();
2978            self
2979        }
2980
2981        /// Sets all the options, replacing any prior values.
2982        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2983            self.0.options = v.into();
2984            self
2985        }
2986
2987        /// Sends the request.
2988        ///
2989        /// # Long running operations
2990        ///
2991        /// This starts, but does not poll, a longrunning operation. More information
2992        /// on [start_autonomous_database][crate::client::OracleDatabase::start_autonomous_database].
2993        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
2994            (*self.0.stub)
2995                .start_autonomous_database(self.0.request, self.0.options)
2996                .await
2997                .map(crate::Response::into_body)
2998        }
2999
3000        /// Creates a [Poller][google_cloud_lro::Poller] to work with `start_autonomous_database`.
3001        pub fn poller(
3002            self,
3003        ) -> impl google_cloud_lro::Poller<
3004            crate::model::AutonomousDatabase,
3005            crate::model::OperationMetadata,
3006        > {
3007            type Operation = google_cloud_lro::internal::Operation<
3008                crate::model::AutonomousDatabase,
3009                crate::model::OperationMetadata,
3010            >;
3011            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3012            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3013
3014            let stub = self.0.stub.clone();
3015            let mut options = self.0.options.clone();
3016            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
3017            let query = move |name| {
3018                let stub = stub.clone();
3019                let options = options.clone();
3020                async {
3021                    let op = GetOperation::new(stub)
3022                        .set_name(name)
3023                        .with_options(options)
3024                        .send()
3025                        .await?;
3026                    Ok(Operation::new(op))
3027                }
3028            };
3029
3030            let start = move || async {
3031                let op = self.send().await?;
3032                Ok(Operation::new(op))
3033            };
3034
3035            google_cloud_lro::internal::new_poller(
3036                polling_error_policy,
3037                polling_backoff_policy,
3038                start,
3039                query,
3040            )
3041        }
3042
3043        /// Sets the value of [name][crate::model::StartAutonomousDatabaseRequest::name].
3044        ///
3045        /// This is a **required** field for requests.
3046        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3047            self.0.request.name = v.into();
3048            self
3049        }
3050    }
3051
3052    #[doc(hidden)]
3053    impl crate::RequestBuilder for StartAutonomousDatabase {
3054        fn request_options(&mut self) -> &mut crate::RequestOptions {
3055            &mut self.0.options
3056        }
3057    }
3058
3059    /// The request builder for [OracleDatabase::restart_autonomous_database][crate::client::OracleDatabase::restart_autonomous_database] calls.
3060    ///
3061    /// # Example
3062    /// ```
3063    /// # use google_cloud_oracledatabase_v1::builder::oracle_database::RestartAutonomousDatabase;
3064    /// # async fn sample() -> google_cloud_oracledatabase_v1::Result<()> {
3065    /// use google_cloud_lro::Poller;
3066    ///
3067    /// let builder = prepare_request_builder();
3068    /// let response = builder.poller().until_done().await?;
3069    /// # Ok(()) }
3070    ///
3071    /// fn prepare_request_builder() -> RestartAutonomousDatabase {
3072    ///   # panic!();
3073    ///   // ... details omitted ...
3074    /// }
3075    /// ```
3076    #[derive(Clone, Debug)]
3077    pub struct RestartAutonomousDatabase(
3078        RequestBuilder<crate::model::RestartAutonomousDatabaseRequest>,
3079    );
3080
3081    impl RestartAutonomousDatabase {
3082        pub(crate) fn new(
3083            stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
3084        ) -> Self {
3085            Self(RequestBuilder::new(stub))
3086        }
3087
3088        /// Sets the full request, replacing any prior values.
3089        pub fn with_request<V: Into<crate::model::RestartAutonomousDatabaseRequest>>(
3090            mut self,
3091            v: V,
3092        ) -> Self {
3093            self.0.request = v.into();
3094            self
3095        }
3096
3097        /// Sets all the options, replacing any prior values.
3098        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3099            self.0.options = v.into();
3100            self
3101        }
3102
3103        /// Sends the request.
3104        ///
3105        /// # Long running operations
3106        ///
3107        /// This starts, but does not poll, a longrunning operation. More information
3108        /// on [restart_autonomous_database][crate::client::OracleDatabase::restart_autonomous_database].
3109        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
3110            (*self.0.stub)
3111                .restart_autonomous_database(self.0.request, self.0.options)
3112                .await
3113                .map(crate::Response::into_body)
3114        }
3115
3116        /// Creates a [Poller][google_cloud_lro::Poller] to work with `restart_autonomous_database`.
3117        pub fn poller(
3118            self,
3119        ) -> impl google_cloud_lro::Poller<
3120            crate::model::AutonomousDatabase,
3121            crate::model::OperationMetadata,
3122        > {
3123            type Operation = google_cloud_lro::internal::Operation<
3124                crate::model::AutonomousDatabase,
3125                crate::model::OperationMetadata,
3126            >;
3127            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3128            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3129
3130            let stub = self.0.stub.clone();
3131            let mut options = self.0.options.clone();
3132            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
3133            let query = move |name| {
3134                let stub = stub.clone();
3135                let options = options.clone();
3136                async {
3137                    let op = GetOperation::new(stub)
3138                        .set_name(name)
3139                        .with_options(options)
3140                        .send()
3141                        .await?;
3142                    Ok(Operation::new(op))
3143                }
3144            };
3145
3146            let start = move || async {
3147                let op = self.send().await?;
3148                Ok(Operation::new(op))
3149            };
3150
3151            google_cloud_lro::internal::new_poller(
3152                polling_error_policy,
3153                polling_backoff_policy,
3154                start,
3155                query,
3156            )
3157        }
3158
3159        /// Sets the value of [name][crate::model::RestartAutonomousDatabaseRequest::name].
3160        ///
3161        /// This is a **required** field for requests.
3162        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3163            self.0.request.name = v.into();
3164            self
3165        }
3166    }
3167
3168    #[doc(hidden)]
3169    impl crate::RequestBuilder for RestartAutonomousDatabase {
3170        fn request_options(&mut self) -> &mut crate::RequestOptions {
3171            &mut self.0.options
3172        }
3173    }
3174
3175    /// The request builder for [OracleDatabase::switchover_autonomous_database][crate::client::OracleDatabase::switchover_autonomous_database] calls.
3176    ///
3177    /// # Example
3178    /// ```
3179    /// # use google_cloud_oracledatabase_v1::builder::oracle_database::SwitchoverAutonomousDatabase;
3180    /// # async fn sample() -> google_cloud_oracledatabase_v1::Result<()> {
3181    /// use google_cloud_lro::Poller;
3182    ///
3183    /// let builder = prepare_request_builder();
3184    /// let response = builder.poller().until_done().await?;
3185    /// # Ok(()) }
3186    ///
3187    /// fn prepare_request_builder() -> SwitchoverAutonomousDatabase {
3188    ///   # panic!();
3189    ///   // ... details omitted ...
3190    /// }
3191    /// ```
3192    #[derive(Clone, Debug)]
3193    pub struct SwitchoverAutonomousDatabase(
3194        RequestBuilder<crate::model::SwitchoverAutonomousDatabaseRequest>,
3195    );
3196
3197    impl SwitchoverAutonomousDatabase {
3198        pub(crate) fn new(
3199            stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
3200        ) -> Self {
3201            Self(RequestBuilder::new(stub))
3202        }
3203
3204        /// Sets the full request, replacing any prior values.
3205        pub fn with_request<V: Into<crate::model::SwitchoverAutonomousDatabaseRequest>>(
3206            mut self,
3207            v: V,
3208        ) -> Self {
3209            self.0.request = v.into();
3210            self
3211        }
3212
3213        /// Sets all the options, replacing any prior values.
3214        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3215            self.0.options = v.into();
3216            self
3217        }
3218
3219        /// Sends the request.
3220        ///
3221        /// # Long running operations
3222        ///
3223        /// This starts, but does not poll, a longrunning operation. More information
3224        /// on [switchover_autonomous_database][crate::client::OracleDatabase::switchover_autonomous_database].
3225        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
3226            (*self.0.stub)
3227                .switchover_autonomous_database(self.0.request, self.0.options)
3228                .await
3229                .map(crate::Response::into_body)
3230        }
3231
3232        /// Creates a [Poller][google_cloud_lro::Poller] to work with `switchover_autonomous_database`.
3233        pub fn poller(
3234            self,
3235        ) -> impl google_cloud_lro::Poller<
3236            crate::model::AutonomousDatabase,
3237            crate::model::OperationMetadata,
3238        > {
3239            type Operation = google_cloud_lro::internal::Operation<
3240                crate::model::AutonomousDatabase,
3241                crate::model::OperationMetadata,
3242            >;
3243            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3244            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3245
3246            let stub = self.0.stub.clone();
3247            let mut options = self.0.options.clone();
3248            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
3249            let query = move |name| {
3250                let stub = stub.clone();
3251                let options = options.clone();
3252                async {
3253                    let op = GetOperation::new(stub)
3254                        .set_name(name)
3255                        .with_options(options)
3256                        .send()
3257                        .await?;
3258                    Ok(Operation::new(op))
3259                }
3260            };
3261
3262            let start = move || async {
3263                let op = self.send().await?;
3264                Ok(Operation::new(op))
3265            };
3266
3267            google_cloud_lro::internal::new_poller(
3268                polling_error_policy,
3269                polling_backoff_policy,
3270                start,
3271                query,
3272            )
3273        }
3274
3275        /// Sets the value of [name][crate::model::SwitchoverAutonomousDatabaseRequest::name].
3276        ///
3277        /// This is a **required** field for requests.
3278        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3279            self.0.request.name = v.into();
3280            self
3281        }
3282
3283        /// Sets the value of [peer_autonomous_database][crate::model::SwitchoverAutonomousDatabaseRequest::peer_autonomous_database].
3284        ///
3285        /// This is a **required** field for requests.
3286        pub fn set_peer_autonomous_database<T: Into<std::string::String>>(mut self, v: T) -> Self {
3287            self.0.request.peer_autonomous_database = v.into();
3288            self
3289        }
3290    }
3291
3292    #[doc(hidden)]
3293    impl crate::RequestBuilder for SwitchoverAutonomousDatabase {
3294        fn request_options(&mut self) -> &mut crate::RequestOptions {
3295            &mut self.0.options
3296        }
3297    }
3298
3299    /// The request builder for [OracleDatabase::failover_autonomous_database][crate::client::OracleDatabase::failover_autonomous_database] calls.
3300    ///
3301    /// # Example
3302    /// ```
3303    /// # use google_cloud_oracledatabase_v1::builder::oracle_database::FailoverAutonomousDatabase;
3304    /// # async fn sample() -> google_cloud_oracledatabase_v1::Result<()> {
3305    /// use google_cloud_lro::Poller;
3306    ///
3307    /// let builder = prepare_request_builder();
3308    /// let response = builder.poller().until_done().await?;
3309    /// # Ok(()) }
3310    ///
3311    /// fn prepare_request_builder() -> FailoverAutonomousDatabase {
3312    ///   # panic!();
3313    ///   // ... details omitted ...
3314    /// }
3315    /// ```
3316    #[derive(Clone, Debug)]
3317    pub struct FailoverAutonomousDatabase(
3318        RequestBuilder<crate::model::FailoverAutonomousDatabaseRequest>,
3319    );
3320
3321    impl FailoverAutonomousDatabase {
3322        pub(crate) fn new(
3323            stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
3324        ) -> Self {
3325            Self(RequestBuilder::new(stub))
3326        }
3327
3328        /// Sets the full request, replacing any prior values.
3329        pub fn with_request<V: Into<crate::model::FailoverAutonomousDatabaseRequest>>(
3330            mut self,
3331            v: V,
3332        ) -> Self {
3333            self.0.request = v.into();
3334            self
3335        }
3336
3337        /// Sets all the options, replacing any prior values.
3338        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3339            self.0.options = v.into();
3340            self
3341        }
3342
3343        /// Sends the request.
3344        ///
3345        /// # Long running operations
3346        ///
3347        /// This starts, but does not poll, a longrunning operation. More information
3348        /// on [failover_autonomous_database][crate::client::OracleDatabase::failover_autonomous_database].
3349        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
3350            (*self.0.stub)
3351                .failover_autonomous_database(self.0.request, self.0.options)
3352                .await
3353                .map(crate::Response::into_body)
3354        }
3355
3356        /// Creates a [Poller][google_cloud_lro::Poller] to work with `failover_autonomous_database`.
3357        pub fn poller(
3358            self,
3359        ) -> impl google_cloud_lro::Poller<
3360            crate::model::AutonomousDatabase,
3361            crate::model::OperationMetadata,
3362        > {
3363            type Operation = google_cloud_lro::internal::Operation<
3364                crate::model::AutonomousDatabase,
3365                crate::model::OperationMetadata,
3366            >;
3367            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3368            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3369
3370            let stub = self.0.stub.clone();
3371            let mut options = self.0.options.clone();
3372            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
3373            let query = move |name| {
3374                let stub = stub.clone();
3375                let options = options.clone();
3376                async {
3377                    let op = GetOperation::new(stub)
3378                        .set_name(name)
3379                        .with_options(options)
3380                        .send()
3381                        .await?;
3382                    Ok(Operation::new(op))
3383                }
3384            };
3385
3386            let start = move || async {
3387                let op = self.send().await?;
3388                Ok(Operation::new(op))
3389            };
3390
3391            google_cloud_lro::internal::new_poller(
3392                polling_error_policy,
3393                polling_backoff_policy,
3394                start,
3395                query,
3396            )
3397        }
3398
3399        /// Sets the value of [name][crate::model::FailoverAutonomousDatabaseRequest::name].
3400        ///
3401        /// This is a **required** field for requests.
3402        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3403            self.0.request.name = v.into();
3404            self
3405        }
3406
3407        /// Sets the value of [peer_autonomous_database][crate::model::FailoverAutonomousDatabaseRequest::peer_autonomous_database].
3408        ///
3409        /// This is a **required** field for requests.
3410        pub fn set_peer_autonomous_database<T: Into<std::string::String>>(mut self, v: T) -> Self {
3411            self.0.request.peer_autonomous_database = v.into();
3412            self
3413        }
3414    }
3415
3416    #[doc(hidden)]
3417    impl crate::RequestBuilder for FailoverAutonomousDatabase {
3418        fn request_options(&mut self) -> &mut crate::RequestOptions {
3419            &mut self.0.options
3420        }
3421    }
3422
3423    /// The request builder for [OracleDatabase::list_odb_networks][crate::client::OracleDatabase::list_odb_networks] calls.
3424    ///
3425    /// # Example
3426    /// ```
3427    /// # use google_cloud_oracledatabase_v1::builder::oracle_database::ListOdbNetworks;
3428    /// # async fn sample() -> google_cloud_oracledatabase_v1::Result<()> {
3429    /// use google_cloud_gax::paginator::ItemPaginator;
3430    ///
3431    /// let builder = prepare_request_builder();
3432    /// let mut items = builder.by_item();
3433    /// while let Some(result) = items.next().await {
3434    ///   let item = result?;
3435    /// }
3436    /// # Ok(()) }
3437    ///
3438    /// fn prepare_request_builder() -> ListOdbNetworks {
3439    ///   # panic!();
3440    ///   // ... details omitted ...
3441    /// }
3442    /// ```
3443    #[derive(Clone, Debug)]
3444    pub struct ListOdbNetworks(RequestBuilder<crate::model::ListOdbNetworksRequest>);
3445
3446    impl ListOdbNetworks {
3447        pub(crate) fn new(
3448            stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
3449        ) -> Self {
3450            Self(RequestBuilder::new(stub))
3451        }
3452
3453        /// Sets the full request, replacing any prior values.
3454        pub fn with_request<V: Into<crate::model::ListOdbNetworksRequest>>(mut self, v: V) -> Self {
3455            self.0.request = v.into();
3456            self
3457        }
3458
3459        /// Sets all the options, replacing any prior values.
3460        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3461            self.0.options = v.into();
3462            self
3463        }
3464
3465        /// Sends the request.
3466        pub async fn send(self) -> Result<crate::model::ListOdbNetworksResponse> {
3467            (*self.0.stub)
3468                .list_odb_networks(self.0.request, self.0.options)
3469                .await
3470                .map(crate::Response::into_body)
3471        }
3472
3473        /// Streams each page in the collection.
3474        pub fn by_page(
3475            self,
3476        ) -> impl google_cloud_gax::paginator::Paginator<
3477            crate::model::ListOdbNetworksResponse,
3478            crate::Error,
3479        > {
3480            use std::clone::Clone;
3481            let token = self.0.request.page_token.clone();
3482            let execute = move |token: String| {
3483                let mut builder = self.clone();
3484                builder.0.request = builder.0.request.set_page_token(token);
3485                builder.send()
3486            };
3487            google_cloud_gax::paginator::internal::new_paginator(token, execute)
3488        }
3489
3490        /// Streams each item in the collection.
3491        pub fn by_item(
3492            self,
3493        ) -> impl google_cloud_gax::paginator::ItemPaginator<
3494            crate::model::ListOdbNetworksResponse,
3495            crate::Error,
3496        > {
3497            use google_cloud_gax::paginator::Paginator;
3498            self.by_page().items()
3499        }
3500
3501        /// Sets the value of [parent][crate::model::ListOdbNetworksRequest::parent].
3502        ///
3503        /// This is a **required** field for requests.
3504        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3505            self.0.request.parent = v.into();
3506            self
3507        }
3508
3509        /// Sets the value of [page_size][crate::model::ListOdbNetworksRequest::page_size].
3510        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
3511            self.0.request.page_size = v.into();
3512            self
3513        }
3514
3515        /// Sets the value of [page_token][crate::model::ListOdbNetworksRequest::page_token].
3516        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
3517            self.0.request.page_token = v.into();
3518            self
3519        }
3520
3521        /// Sets the value of [filter][crate::model::ListOdbNetworksRequest::filter].
3522        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
3523            self.0.request.filter = v.into();
3524            self
3525        }
3526
3527        /// Sets the value of [order_by][crate::model::ListOdbNetworksRequest::order_by].
3528        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
3529            self.0.request.order_by = v.into();
3530            self
3531        }
3532    }
3533
3534    #[doc(hidden)]
3535    impl crate::RequestBuilder for ListOdbNetworks {
3536        fn request_options(&mut self) -> &mut crate::RequestOptions {
3537            &mut self.0.options
3538        }
3539    }
3540
3541    /// The request builder for [OracleDatabase::get_odb_network][crate::client::OracleDatabase::get_odb_network] calls.
3542    ///
3543    /// # Example
3544    /// ```
3545    /// # use google_cloud_oracledatabase_v1::builder::oracle_database::GetOdbNetwork;
3546    /// # async fn sample() -> google_cloud_oracledatabase_v1::Result<()> {
3547    ///
3548    /// let builder = prepare_request_builder();
3549    /// let response = builder.send().await?;
3550    /// # Ok(()) }
3551    ///
3552    /// fn prepare_request_builder() -> GetOdbNetwork {
3553    ///   # panic!();
3554    ///   // ... details omitted ...
3555    /// }
3556    /// ```
3557    #[derive(Clone, Debug)]
3558    pub struct GetOdbNetwork(RequestBuilder<crate::model::GetOdbNetworkRequest>);
3559
3560    impl GetOdbNetwork {
3561        pub(crate) fn new(
3562            stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
3563        ) -> Self {
3564            Self(RequestBuilder::new(stub))
3565        }
3566
3567        /// Sets the full request, replacing any prior values.
3568        pub fn with_request<V: Into<crate::model::GetOdbNetworkRequest>>(mut self, v: V) -> Self {
3569            self.0.request = v.into();
3570            self
3571        }
3572
3573        /// Sets all the options, replacing any prior values.
3574        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3575            self.0.options = v.into();
3576            self
3577        }
3578
3579        /// Sends the request.
3580        pub async fn send(self) -> Result<crate::model::OdbNetwork> {
3581            (*self.0.stub)
3582                .get_odb_network(self.0.request, self.0.options)
3583                .await
3584                .map(crate::Response::into_body)
3585        }
3586
3587        /// Sets the value of [name][crate::model::GetOdbNetworkRequest::name].
3588        ///
3589        /// This is a **required** field for requests.
3590        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3591            self.0.request.name = v.into();
3592            self
3593        }
3594    }
3595
3596    #[doc(hidden)]
3597    impl crate::RequestBuilder for GetOdbNetwork {
3598        fn request_options(&mut self) -> &mut crate::RequestOptions {
3599            &mut self.0.options
3600        }
3601    }
3602
3603    /// The request builder for [OracleDatabase::create_odb_network][crate::client::OracleDatabase::create_odb_network] calls.
3604    ///
3605    /// # Example
3606    /// ```
3607    /// # use google_cloud_oracledatabase_v1::builder::oracle_database::CreateOdbNetwork;
3608    /// # async fn sample() -> google_cloud_oracledatabase_v1::Result<()> {
3609    /// use google_cloud_lro::Poller;
3610    ///
3611    /// let builder = prepare_request_builder();
3612    /// let response = builder.poller().until_done().await?;
3613    /// # Ok(()) }
3614    ///
3615    /// fn prepare_request_builder() -> CreateOdbNetwork {
3616    ///   # panic!();
3617    ///   // ... details omitted ...
3618    /// }
3619    /// ```
3620    #[derive(Clone, Debug)]
3621    pub struct CreateOdbNetwork(RequestBuilder<crate::model::CreateOdbNetworkRequest>);
3622
3623    impl CreateOdbNetwork {
3624        pub(crate) fn new(
3625            stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
3626        ) -> Self {
3627            Self(RequestBuilder::new(stub))
3628        }
3629
3630        /// Sets the full request, replacing any prior values.
3631        pub fn with_request<V: Into<crate::model::CreateOdbNetworkRequest>>(
3632            mut self,
3633            v: V,
3634        ) -> Self {
3635            self.0.request = v.into();
3636            self
3637        }
3638
3639        /// Sets all the options, replacing any prior values.
3640        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3641            self.0.options = v.into();
3642            self
3643        }
3644
3645        /// Sends the request.
3646        ///
3647        /// # Long running operations
3648        ///
3649        /// This starts, but does not poll, a longrunning operation. More information
3650        /// on [create_odb_network][crate::client::OracleDatabase::create_odb_network].
3651        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
3652            (*self.0.stub)
3653                .create_odb_network(self.0.request, self.0.options)
3654                .await
3655                .map(crate::Response::into_body)
3656        }
3657
3658        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_odb_network`.
3659        pub fn poller(
3660            self,
3661        ) -> impl google_cloud_lro::Poller<crate::model::OdbNetwork, crate::model::OperationMetadata>
3662        {
3663            type Operation = google_cloud_lro::internal::Operation<
3664                crate::model::OdbNetwork,
3665                crate::model::OperationMetadata,
3666            >;
3667            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3668            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3669
3670            let stub = self.0.stub.clone();
3671            let mut options = self.0.options.clone();
3672            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
3673            let query = move |name| {
3674                let stub = stub.clone();
3675                let options = options.clone();
3676                async {
3677                    let op = GetOperation::new(stub)
3678                        .set_name(name)
3679                        .with_options(options)
3680                        .send()
3681                        .await?;
3682                    Ok(Operation::new(op))
3683                }
3684            };
3685
3686            let start = move || async {
3687                let op = self.send().await?;
3688                Ok(Operation::new(op))
3689            };
3690
3691            google_cloud_lro::internal::new_poller(
3692                polling_error_policy,
3693                polling_backoff_policy,
3694                start,
3695                query,
3696            )
3697        }
3698
3699        /// Sets the value of [parent][crate::model::CreateOdbNetworkRequest::parent].
3700        ///
3701        /// This is a **required** field for requests.
3702        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3703            self.0.request.parent = v.into();
3704            self
3705        }
3706
3707        /// Sets the value of [odb_network_id][crate::model::CreateOdbNetworkRequest::odb_network_id].
3708        ///
3709        /// This is a **required** field for requests.
3710        pub fn set_odb_network_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3711            self.0.request.odb_network_id = v.into();
3712            self
3713        }
3714
3715        /// Sets the value of [odb_network][crate::model::CreateOdbNetworkRequest::odb_network].
3716        ///
3717        /// This is a **required** field for requests.
3718        pub fn set_odb_network<T>(mut self, v: T) -> Self
3719        where
3720            T: std::convert::Into<crate::model::OdbNetwork>,
3721        {
3722            self.0.request.odb_network = std::option::Option::Some(v.into());
3723            self
3724        }
3725
3726        /// Sets or clears the value of [odb_network][crate::model::CreateOdbNetworkRequest::odb_network].
3727        ///
3728        /// This is a **required** field for requests.
3729        pub fn set_or_clear_odb_network<T>(mut self, v: std::option::Option<T>) -> Self
3730        where
3731            T: std::convert::Into<crate::model::OdbNetwork>,
3732        {
3733            self.0.request.odb_network = v.map(|x| x.into());
3734            self
3735        }
3736
3737        /// Sets the value of [request_id][crate::model::CreateOdbNetworkRequest::request_id].
3738        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3739            self.0.request.request_id = v.into();
3740            self
3741        }
3742    }
3743
3744    #[doc(hidden)]
3745    impl crate::RequestBuilder for CreateOdbNetwork {
3746        fn request_options(&mut self) -> &mut crate::RequestOptions {
3747            &mut self.0.options
3748        }
3749    }
3750
3751    /// The request builder for [OracleDatabase::delete_odb_network][crate::client::OracleDatabase::delete_odb_network] calls.
3752    ///
3753    /// # Example
3754    /// ```
3755    /// # use google_cloud_oracledatabase_v1::builder::oracle_database::DeleteOdbNetwork;
3756    /// # async fn sample() -> google_cloud_oracledatabase_v1::Result<()> {
3757    /// use google_cloud_lro::Poller;
3758    ///
3759    /// let builder = prepare_request_builder();
3760    /// let response = builder.poller().until_done().await?;
3761    /// # Ok(()) }
3762    ///
3763    /// fn prepare_request_builder() -> DeleteOdbNetwork {
3764    ///   # panic!();
3765    ///   // ... details omitted ...
3766    /// }
3767    /// ```
3768    #[derive(Clone, Debug)]
3769    pub struct DeleteOdbNetwork(RequestBuilder<crate::model::DeleteOdbNetworkRequest>);
3770
3771    impl DeleteOdbNetwork {
3772        pub(crate) fn new(
3773            stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
3774        ) -> Self {
3775            Self(RequestBuilder::new(stub))
3776        }
3777
3778        /// Sets the full request, replacing any prior values.
3779        pub fn with_request<V: Into<crate::model::DeleteOdbNetworkRequest>>(
3780            mut self,
3781            v: V,
3782        ) -> Self {
3783            self.0.request = v.into();
3784            self
3785        }
3786
3787        /// Sets all the options, replacing any prior values.
3788        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3789            self.0.options = v.into();
3790            self
3791        }
3792
3793        /// Sends the request.
3794        ///
3795        /// # Long running operations
3796        ///
3797        /// This starts, but does not poll, a longrunning operation. More information
3798        /// on [delete_odb_network][crate::client::OracleDatabase::delete_odb_network].
3799        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
3800            (*self.0.stub)
3801                .delete_odb_network(self.0.request, self.0.options)
3802                .await
3803                .map(crate::Response::into_body)
3804        }
3805
3806        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_odb_network`.
3807        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
3808            type Operation =
3809                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
3810            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3811            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3812
3813            let stub = self.0.stub.clone();
3814            let mut options = self.0.options.clone();
3815            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
3816            let query = move |name| {
3817                let stub = stub.clone();
3818                let options = options.clone();
3819                async {
3820                    let op = GetOperation::new(stub)
3821                        .set_name(name)
3822                        .with_options(options)
3823                        .send()
3824                        .await?;
3825                    Ok(Operation::new(op))
3826                }
3827            };
3828
3829            let start = move || async {
3830                let op = self.send().await?;
3831                Ok(Operation::new(op))
3832            };
3833
3834            google_cloud_lro::internal::new_unit_response_poller(
3835                polling_error_policy,
3836                polling_backoff_policy,
3837                start,
3838                query,
3839            )
3840        }
3841
3842        /// Sets the value of [name][crate::model::DeleteOdbNetworkRequest::name].
3843        ///
3844        /// This is a **required** field for requests.
3845        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3846            self.0.request.name = v.into();
3847            self
3848        }
3849
3850        /// Sets the value of [request_id][crate::model::DeleteOdbNetworkRequest::request_id].
3851        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3852            self.0.request.request_id = v.into();
3853            self
3854        }
3855    }
3856
3857    #[doc(hidden)]
3858    impl crate::RequestBuilder for DeleteOdbNetwork {
3859        fn request_options(&mut self) -> &mut crate::RequestOptions {
3860            &mut self.0.options
3861        }
3862    }
3863
3864    /// The request builder for [OracleDatabase::list_odb_subnets][crate::client::OracleDatabase::list_odb_subnets] calls.
3865    ///
3866    /// # Example
3867    /// ```
3868    /// # use google_cloud_oracledatabase_v1::builder::oracle_database::ListOdbSubnets;
3869    /// # async fn sample() -> google_cloud_oracledatabase_v1::Result<()> {
3870    /// use google_cloud_gax::paginator::ItemPaginator;
3871    ///
3872    /// let builder = prepare_request_builder();
3873    /// let mut items = builder.by_item();
3874    /// while let Some(result) = items.next().await {
3875    ///   let item = result?;
3876    /// }
3877    /// # Ok(()) }
3878    ///
3879    /// fn prepare_request_builder() -> ListOdbSubnets {
3880    ///   # panic!();
3881    ///   // ... details omitted ...
3882    /// }
3883    /// ```
3884    #[derive(Clone, Debug)]
3885    pub struct ListOdbSubnets(RequestBuilder<crate::model::ListOdbSubnetsRequest>);
3886
3887    impl ListOdbSubnets {
3888        pub(crate) fn new(
3889            stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
3890        ) -> Self {
3891            Self(RequestBuilder::new(stub))
3892        }
3893
3894        /// Sets the full request, replacing any prior values.
3895        pub fn with_request<V: Into<crate::model::ListOdbSubnetsRequest>>(mut self, v: V) -> Self {
3896            self.0.request = v.into();
3897            self
3898        }
3899
3900        /// Sets all the options, replacing any prior values.
3901        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3902            self.0.options = v.into();
3903            self
3904        }
3905
3906        /// Sends the request.
3907        pub async fn send(self) -> Result<crate::model::ListOdbSubnetsResponse> {
3908            (*self.0.stub)
3909                .list_odb_subnets(self.0.request, self.0.options)
3910                .await
3911                .map(crate::Response::into_body)
3912        }
3913
3914        /// Streams each page in the collection.
3915        pub fn by_page(
3916            self,
3917        ) -> impl google_cloud_gax::paginator::Paginator<
3918            crate::model::ListOdbSubnetsResponse,
3919            crate::Error,
3920        > {
3921            use std::clone::Clone;
3922            let token = self.0.request.page_token.clone();
3923            let execute = move |token: String| {
3924                let mut builder = self.clone();
3925                builder.0.request = builder.0.request.set_page_token(token);
3926                builder.send()
3927            };
3928            google_cloud_gax::paginator::internal::new_paginator(token, execute)
3929        }
3930
3931        /// Streams each item in the collection.
3932        pub fn by_item(
3933            self,
3934        ) -> impl google_cloud_gax::paginator::ItemPaginator<
3935            crate::model::ListOdbSubnetsResponse,
3936            crate::Error,
3937        > {
3938            use google_cloud_gax::paginator::Paginator;
3939            self.by_page().items()
3940        }
3941
3942        /// Sets the value of [parent][crate::model::ListOdbSubnetsRequest::parent].
3943        ///
3944        /// This is a **required** field for requests.
3945        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3946            self.0.request.parent = v.into();
3947            self
3948        }
3949
3950        /// Sets the value of [page_size][crate::model::ListOdbSubnetsRequest::page_size].
3951        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
3952            self.0.request.page_size = v.into();
3953            self
3954        }
3955
3956        /// Sets the value of [page_token][crate::model::ListOdbSubnetsRequest::page_token].
3957        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
3958            self.0.request.page_token = v.into();
3959            self
3960        }
3961
3962        /// Sets the value of [filter][crate::model::ListOdbSubnetsRequest::filter].
3963        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
3964            self.0.request.filter = v.into();
3965            self
3966        }
3967
3968        /// Sets the value of [order_by][crate::model::ListOdbSubnetsRequest::order_by].
3969        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
3970            self.0.request.order_by = v.into();
3971            self
3972        }
3973    }
3974
3975    #[doc(hidden)]
3976    impl crate::RequestBuilder for ListOdbSubnets {
3977        fn request_options(&mut self) -> &mut crate::RequestOptions {
3978            &mut self.0.options
3979        }
3980    }
3981
3982    /// The request builder for [OracleDatabase::get_odb_subnet][crate::client::OracleDatabase::get_odb_subnet] calls.
3983    ///
3984    /// # Example
3985    /// ```
3986    /// # use google_cloud_oracledatabase_v1::builder::oracle_database::GetOdbSubnet;
3987    /// # async fn sample() -> google_cloud_oracledatabase_v1::Result<()> {
3988    ///
3989    /// let builder = prepare_request_builder();
3990    /// let response = builder.send().await?;
3991    /// # Ok(()) }
3992    ///
3993    /// fn prepare_request_builder() -> GetOdbSubnet {
3994    ///   # panic!();
3995    ///   // ... details omitted ...
3996    /// }
3997    /// ```
3998    #[derive(Clone, Debug)]
3999    pub struct GetOdbSubnet(RequestBuilder<crate::model::GetOdbSubnetRequest>);
4000
4001    impl GetOdbSubnet {
4002        pub(crate) fn new(
4003            stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
4004        ) -> Self {
4005            Self(RequestBuilder::new(stub))
4006        }
4007
4008        /// Sets the full request, replacing any prior values.
4009        pub fn with_request<V: Into<crate::model::GetOdbSubnetRequest>>(mut self, v: V) -> Self {
4010            self.0.request = v.into();
4011            self
4012        }
4013
4014        /// Sets all the options, replacing any prior values.
4015        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4016            self.0.options = v.into();
4017            self
4018        }
4019
4020        /// Sends the request.
4021        pub async fn send(self) -> Result<crate::model::OdbSubnet> {
4022            (*self.0.stub)
4023                .get_odb_subnet(self.0.request, self.0.options)
4024                .await
4025                .map(crate::Response::into_body)
4026        }
4027
4028        /// Sets the value of [name][crate::model::GetOdbSubnetRequest::name].
4029        ///
4030        /// This is a **required** field for requests.
4031        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4032            self.0.request.name = v.into();
4033            self
4034        }
4035    }
4036
4037    #[doc(hidden)]
4038    impl crate::RequestBuilder for GetOdbSubnet {
4039        fn request_options(&mut self) -> &mut crate::RequestOptions {
4040            &mut self.0.options
4041        }
4042    }
4043
4044    /// The request builder for [OracleDatabase::create_odb_subnet][crate::client::OracleDatabase::create_odb_subnet] calls.
4045    ///
4046    /// # Example
4047    /// ```
4048    /// # use google_cloud_oracledatabase_v1::builder::oracle_database::CreateOdbSubnet;
4049    /// # async fn sample() -> google_cloud_oracledatabase_v1::Result<()> {
4050    /// use google_cloud_lro::Poller;
4051    ///
4052    /// let builder = prepare_request_builder();
4053    /// let response = builder.poller().until_done().await?;
4054    /// # Ok(()) }
4055    ///
4056    /// fn prepare_request_builder() -> CreateOdbSubnet {
4057    ///   # panic!();
4058    ///   // ... details omitted ...
4059    /// }
4060    /// ```
4061    #[derive(Clone, Debug)]
4062    pub struct CreateOdbSubnet(RequestBuilder<crate::model::CreateOdbSubnetRequest>);
4063
4064    impl CreateOdbSubnet {
4065        pub(crate) fn new(
4066            stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
4067        ) -> Self {
4068            Self(RequestBuilder::new(stub))
4069        }
4070
4071        /// Sets the full request, replacing any prior values.
4072        pub fn with_request<V: Into<crate::model::CreateOdbSubnetRequest>>(mut self, v: V) -> Self {
4073            self.0.request = v.into();
4074            self
4075        }
4076
4077        /// Sets all the options, replacing any prior values.
4078        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4079            self.0.options = v.into();
4080            self
4081        }
4082
4083        /// Sends the request.
4084        ///
4085        /// # Long running operations
4086        ///
4087        /// This starts, but does not poll, a longrunning operation. More information
4088        /// on [create_odb_subnet][crate::client::OracleDatabase::create_odb_subnet].
4089        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
4090            (*self.0.stub)
4091                .create_odb_subnet(self.0.request, self.0.options)
4092                .await
4093                .map(crate::Response::into_body)
4094        }
4095
4096        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_odb_subnet`.
4097        pub fn poller(
4098            self,
4099        ) -> impl google_cloud_lro::Poller<crate::model::OdbSubnet, crate::model::OperationMetadata>
4100        {
4101            type Operation = google_cloud_lro::internal::Operation<
4102                crate::model::OdbSubnet,
4103                crate::model::OperationMetadata,
4104            >;
4105            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4106            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4107
4108            let stub = self.0.stub.clone();
4109            let mut options = self.0.options.clone();
4110            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
4111            let query = move |name| {
4112                let stub = stub.clone();
4113                let options = options.clone();
4114                async {
4115                    let op = GetOperation::new(stub)
4116                        .set_name(name)
4117                        .with_options(options)
4118                        .send()
4119                        .await?;
4120                    Ok(Operation::new(op))
4121                }
4122            };
4123
4124            let start = move || async {
4125                let op = self.send().await?;
4126                Ok(Operation::new(op))
4127            };
4128
4129            google_cloud_lro::internal::new_poller(
4130                polling_error_policy,
4131                polling_backoff_policy,
4132                start,
4133                query,
4134            )
4135        }
4136
4137        /// Sets the value of [parent][crate::model::CreateOdbSubnetRequest::parent].
4138        ///
4139        /// This is a **required** field for requests.
4140        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
4141            self.0.request.parent = v.into();
4142            self
4143        }
4144
4145        /// Sets the value of [odb_subnet_id][crate::model::CreateOdbSubnetRequest::odb_subnet_id].
4146        ///
4147        /// This is a **required** field for requests.
4148        pub fn set_odb_subnet_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
4149            self.0.request.odb_subnet_id = v.into();
4150            self
4151        }
4152
4153        /// Sets the value of [odb_subnet][crate::model::CreateOdbSubnetRequest::odb_subnet].
4154        ///
4155        /// This is a **required** field for requests.
4156        pub fn set_odb_subnet<T>(mut self, v: T) -> Self
4157        where
4158            T: std::convert::Into<crate::model::OdbSubnet>,
4159        {
4160            self.0.request.odb_subnet = std::option::Option::Some(v.into());
4161            self
4162        }
4163
4164        /// Sets or clears the value of [odb_subnet][crate::model::CreateOdbSubnetRequest::odb_subnet].
4165        ///
4166        /// This is a **required** field for requests.
4167        pub fn set_or_clear_odb_subnet<T>(mut self, v: std::option::Option<T>) -> Self
4168        where
4169            T: std::convert::Into<crate::model::OdbSubnet>,
4170        {
4171            self.0.request.odb_subnet = v.map(|x| x.into());
4172            self
4173        }
4174
4175        /// Sets the value of [request_id][crate::model::CreateOdbSubnetRequest::request_id].
4176        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
4177            self.0.request.request_id = v.into();
4178            self
4179        }
4180    }
4181
4182    #[doc(hidden)]
4183    impl crate::RequestBuilder for CreateOdbSubnet {
4184        fn request_options(&mut self) -> &mut crate::RequestOptions {
4185            &mut self.0.options
4186        }
4187    }
4188
4189    /// The request builder for [OracleDatabase::delete_odb_subnet][crate::client::OracleDatabase::delete_odb_subnet] calls.
4190    ///
4191    /// # Example
4192    /// ```
4193    /// # use google_cloud_oracledatabase_v1::builder::oracle_database::DeleteOdbSubnet;
4194    /// # async fn sample() -> google_cloud_oracledatabase_v1::Result<()> {
4195    /// use google_cloud_lro::Poller;
4196    ///
4197    /// let builder = prepare_request_builder();
4198    /// let response = builder.poller().until_done().await?;
4199    /// # Ok(()) }
4200    ///
4201    /// fn prepare_request_builder() -> DeleteOdbSubnet {
4202    ///   # panic!();
4203    ///   // ... details omitted ...
4204    /// }
4205    /// ```
4206    #[derive(Clone, Debug)]
4207    pub struct DeleteOdbSubnet(RequestBuilder<crate::model::DeleteOdbSubnetRequest>);
4208
4209    impl DeleteOdbSubnet {
4210        pub(crate) fn new(
4211            stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
4212        ) -> Self {
4213            Self(RequestBuilder::new(stub))
4214        }
4215
4216        /// Sets the full request, replacing any prior values.
4217        pub fn with_request<V: Into<crate::model::DeleteOdbSubnetRequest>>(mut self, v: V) -> Self {
4218            self.0.request = v.into();
4219            self
4220        }
4221
4222        /// Sets all the options, replacing any prior values.
4223        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4224            self.0.options = v.into();
4225            self
4226        }
4227
4228        /// Sends the request.
4229        ///
4230        /// # Long running operations
4231        ///
4232        /// This starts, but does not poll, a longrunning operation. More information
4233        /// on [delete_odb_subnet][crate::client::OracleDatabase::delete_odb_subnet].
4234        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
4235            (*self.0.stub)
4236                .delete_odb_subnet(self.0.request, self.0.options)
4237                .await
4238                .map(crate::Response::into_body)
4239        }
4240
4241        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_odb_subnet`.
4242        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
4243            type Operation =
4244                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
4245            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4246            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4247
4248            let stub = self.0.stub.clone();
4249            let mut options = self.0.options.clone();
4250            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
4251            let query = move |name| {
4252                let stub = stub.clone();
4253                let options = options.clone();
4254                async {
4255                    let op = GetOperation::new(stub)
4256                        .set_name(name)
4257                        .with_options(options)
4258                        .send()
4259                        .await?;
4260                    Ok(Operation::new(op))
4261                }
4262            };
4263
4264            let start = move || async {
4265                let op = self.send().await?;
4266                Ok(Operation::new(op))
4267            };
4268
4269            google_cloud_lro::internal::new_unit_response_poller(
4270                polling_error_policy,
4271                polling_backoff_policy,
4272                start,
4273                query,
4274            )
4275        }
4276
4277        /// Sets the value of [name][crate::model::DeleteOdbSubnetRequest::name].
4278        ///
4279        /// This is a **required** field for requests.
4280        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4281            self.0.request.name = v.into();
4282            self
4283        }
4284
4285        /// Sets the value of [request_id][crate::model::DeleteOdbSubnetRequest::request_id].
4286        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
4287            self.0.request.request_id = v.into();
4288            self
4289        }
4290    }
4291
4292    #[doc(hidden)]
4293    impl crate::RequestBuilder for DeleteOdbSubnet {
4294        fn request_options(&mut self) -> &mut crate::RequestOptions {
4295            &mut self.0.options
4296        }
4297    }
4298
4299    /// The request builder for [OracleDatabase::list_exadb_vm_clusters][crate::client::OracleDatabase::list_exadb_vm_clusters] calls.
4300    ///
4301    /// # Example
4302    /// ```
4303    /// # use google_cloud_oracledatabase_v1::builder::oracle_database::ListExadbVmClusters;
4304    /// # async fn sample() -> google_cloud_oracledatabase_v1::Result<()> {
4305    /// use google_cloud_gax::paginator::ItemPaginator;
4306    ///
4307    /// let builder = prepare_request_builder();
4308    /// let mut items = builder.by_item();
4309    /// while let Some(result) = items.next().await {
4310    ///   let item = result?;
4311    /// }
4312    /// # Ok(()) }
4313    ///
4314    /// fn prepare_request_builder() -> ListExadbVmClusters {
4315    ///   # panic!();
4316    ///   // ... details omitted ...
4317    /// }
4318    /// ```
4319    #[derive(Clone, Debug)]
4320    pub struct ListExadbVmClusters(RequestBuilder<crate::model::ListExadbVmClustersRequest>);
4321
4322    impl ListExadbVmClusters {
4323        pub(crate) fn new(
4324            stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
4325        ) -> Self {
4326            Self(RequestBuilder::new(stub))
4327        }
4328
4329        /// Sets the full request, replacing any prior values.
4330        pub fn with_request<V: Into<crate::model::ListExadbVmClustersRequest>>(
4331            mut self,
4332            v: V,
4333        ) -> Self {
4334            self.0.request = v.into();
4335            self
4336        }
4337
4338        /// Sets all the options, replacing any prior values.
4339        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4340            self.0.options = v.into();
4341            self
4342        }
4343
4344        /// Sends the request.
4345        pub async fn send(self) -> Result<crate::model::ListExadbVmClustersResponse> {
4346            (*self.0.stub)
4347                .list_exadb_vm_clusters(self.0.request, self.0.options)
4348                .await
4349                .map(crate::Response::into_body)
4350        }
4351
4352        /// Streams each page in the collection.
4353        pub fn by_page(
4354            self,
4355        ) -> impl google_cloud_gax::paginator::Paginator<
4356            crate::model::ListExadbVmClustersResponse,
4357            crate::Error,
4358        > {
4359            use std::clone::Clone;
4360            let token = self.0.request.page_token.clone();
4361            let execute = move |token: String| {
4362                let mut builder = self.clone();
4363                builder.0.request = builder.0.request.set_page_token(token);
4364                builder.send()
4365            };
4366            google_cloud_gax::paginator::internal::new_paginator(token, execute)
4367        }
4368
4369        /// Streams each item in the collection.
4370        pub fn by_item(
4371            self,
4372        ) -> impl google_cloud_gax::paginator::ItemPaginator<
4373            crate::model::ListExadbVmClustersResponse,
4374            crate::Error,
4375        > {
4376            use google_cloud_gax::paginator::Paginator;
4377            self.by_page().items()
4378        }
4379
4380        /// Sets the value of [parent][crate::model::ListExadbVmClustersRequest::parent].
4381        ///
4382        /// This is a **required** field for requests.
4383        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
4384            self.0.request.parent = v.into();
4385            self
4386        }
4387
4388        /// Sets the value of [page_size][crate::model::ListExadbVmClustersRequest::page_size].
4389        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
4390            self.0.request.page_size = v.into();
4391            self
4392        }
4393
4394        /// Sets the value of [page_token][crate::model::ListExadbVmClustersRequest::page_token].
4395        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
4396            self.0.request.page_token = v.into();
4397            self
4398        }
4399
4400        /// Sets the value of [filter][crate::model::ListExadbVmClustersRequest::filter].
4401        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
4402            self.0.request.filter = v.into();
4403            self
4404        }
4405
4406        /// Sets the value of [order_by][crate::model::ListExadbVmClustersRequest::order_by].
4407        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
4408            self.0.request.order_by = v.into();
4409            self
4410        }
4411    }
4412
4413    #[doc(hidden)]
4414    impl crate::RequestBuilder for ListExadbVmClusters {
4415        fn request_options(&mut self) -> &mut crate::RequestOptions {
4416            &mut self.0.options
4417        }
4418    }
4419
4420    /// The request builder for [OracleDatabase::get_exadb_vm_cluster][crate::client::OracleDatabase::get_exadb_vm_cluster] calls.
4421    ///
4422    /// # Example
4423    /// ```
4424    /// # use google_cloud_oracledatabase_v1::builder::oracle_database::GetExadbVmCluster;
4425    /// # async fn sample() -> google_cloud_oracledatabase_v1::Result<()> {
4426    ///
4427    /// let builder = prepare_request_builder();
4428    /// let response = builder.send().await?;
4429    /// # Ok(()) }
4430    ///
4431    /// fn prepare_request_builder() -> GetExadbVmCluster {
4432    ///   # panic!();
4433    ///   // ... details omitted ...
4434    /// }
4435    /// ```
4436    #[derive(Clone, Debug)]
4437    pub struct GetExadbVmCluster(RequestBuilder<crate::model::GetExadbVmClusterRequest>);
4438
4439    impl GetExadbVmCluster {
4440        pub(crate) fn new(
4441            stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
4442        ) -> Self {
4443            Self(RequestBuilder::new(stub))
4444        }
4445
4446        /// Sets the full request, replacing any prior values.
4447        pub fn with_request<V: Into<crate::model::GetExadbVmClusterRequest>>(
4448            mut self,
4449            v: V,
4450        ) -> Self {
4451            self.0.request = v.into();
4452            self
4453        }
4454
4455        /// Sets all the options, replacing any prior values.
4456        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4457            self.0.options = v.into();
4458            self
4459        }
4460
4461        /// Sends the request.
4462        pub async fn send(self) -> Result<crate::model::ExadbVmCluster> {
4463            (*self.0.stub)
4464                .get_exadb_vm_cluster(self.0.request, self.0.options)
4465                .await
4466                .map(crate::Response::into_body)
4467        }
4468
4469        /// Sets the value of [name][crate::model::GetExadbVmClusterRequest::name].
4470        ///
4471        /// This is a **required** field for requests.
4472        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4473            self.0.request.name = v.into();
4474            self
4475        }
4476    }
4477
4478    #[doc(hidden)]
4479    impl crate::RequestBuilder for GetExadbVmCluster {
4480        fn request_options(&mut self) -> &mut crate::RequestOptions {
4481            &mut self.0.options
4482        }
4483    }
4484
4485    /// The request builder for [OracleDatabase::create_exadb_vm_cluster][crate::client::OracleDatabase::create_exadb_vm_cluster] calls.
4486    ///
4487    /// # Example
4488    /// ```
4489    /// # use google_cloud_oracledatabase_v1::builder::oracle_database::CreateExadbVmCluster;
4490    /// # async fn sample() -> google_cloud_oracledatabase_v1::Result<()> {
4491    /// use google_cloud_lro::Poller;
4492    ///
4493    /// let builder = prepare_request_builder();
4494    /// let response = builder.poller().until_done().await?;
4495    /// # Ok(()) }
4496    ///
4497    /// fn prepare_request_builder() -> CreateExadbVmCluster {
4498    ///   # panic!();
4499    ///   // ... details omitted ...
4500    /// }
4501    /// ```
4502    #[derive(Clone, Debug)]
4503    pub struct CreateExadbVmCluster(RequestBuilder<crate::model::CreateExadbVmClusterRequest>);
4504
4505    impl CreateExadbVmCluster {
4506        pub(crate) fn new(
4507            stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
4508        ) -> Self {
4509            Self(RequestBuilder::new(stub))
4510        }
4511
4512        /// Sets the full request, replacing any prior values.
4513        pub fn with_request<V: Into<crate::model::CreateExadbVmClusterRequest>>(
4514            mut self,
4515            v: V,
4516        ) -> Self {
4517            self.0.request = v.into();
4518            self
4519        }
4520
4521        /// Sets all the options, replacing any prior values.
4522        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4523            self.0.options = v.into();
4524            self
4525        }
4526
4527        /// Sends the request.
4528        ///
4529        /// # Long running operations
4530        ///
4531        /// This starts, but does not poll, a longrunning operation. More information
4532        /// on [create_exadb_vm_cluster][crate::client::OracleDatabase::create_exadb_vm_cluster].
4533        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
4534            (*self.0.stub)
4535                .create_exadb_vm_cluster(self.0.request, self.0.options)
4536                .await
4537                .map(crate::Response::into_body)
4538        }
4539
4540        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_exadb_vm_cluster`.
4541        pub fn poller(
4542            self,
4543        ) -> impl google_cloud_lro::Poller<crate::model::ExadbVmCluster, crate::model::OperationMetadata>
4544        {
4545            type Operation = google_cloud_lro::internal::Operation<
4546                crate::model::ExadbVmCluster,
4547                crate::model::OperationMetadata,
4548            >;
4549            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4550            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4551
4552            let stub = self.0.stub.clone();
4553            let mut options = self.0.options.clone();
4554            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
4555            let query = move |name| {
4556                let stub = stub.clone();
4557                let options = options.clone();
4558                async {
4559                    let op = GetOperation::new(stub)
4560                        .set_name(name)
4561                        .with_options(options)
4562                        .send()
4563                        .await?;
4564                    Ok(Operation::new(op))
4565                }
4566            };
4567
4568            let start = move || async {
4569                let op = self.send().await?;
4570                Ok(Operation::new(op))
4571            };
4572
4573            google_cloud_lro::internal::new_poller(
4574                polling_error_policy,
4575                polling_backoff_policy,
4576                start,
4577                query,
4578            )
4579        }
4580
4581        /// Sets the value of [parent][crate::model::CreateExadbVmClusterRequest::parent].
4582        ///
4583        /// This is a **required** field for requests.
4584        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
4585            self.0.request.parent = v.into();
4586            self
4587        }
4588
4589        /// Sets the value of [exadb_vm_cluster_id][crate::model::CreateExadbVmClusterRequest::exadb_vm_cluster_id].
4590        ///
4591        /// This is a **required** field for requests.
4592        pub fn set_exadb_vm_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
4593            self.0.request.exadb_vm_cluster_id = v.into();
4594            self
4595        }
4596
4597        /// Sets the value of [exadb_vm_cluster][crate::model::CreateExadbVmClusterRequest::exadb_vm_cluster].
4598        ///
4599        /// This is a **required** field for requests.
4600        pub fn set_exadb_vm_cluster<T>(mut self, v: T) -> Self
4601        where
4602            T: std::convert::Into<crate::model::ExadbVmCluster>,
4603        {
4604            self.0.request.exadb_vm_cluster = std::option::Option::Some(v.into());
4605            self
4606        }
4607
4608        /// Sets or clears the value of [exadb_vm_cluster][crate::model::CreateExadbVmClusterRequest::exadb_vm_cluster].
4609        ///
4610        /// This is a **required** field for requests.
4611        pub fn set_or_clear_exadb_vm_cluster<T>(mut self, v: std::option::Option<T>) -> Self
4612        where
4613            T: std::convert::Into<crate::model::ExadbVmCluster>,
4614        {
4615            self.0.request.exadb_vm_cluster = v.map(|x| x.into());
4616            self
4617        }
4618
4619        /// Sets the value of [request_id][crate::model::CreateExadbVmClusterRequest::request_id].
4620        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
4621            self.0.request.request_id = v.into();
4622            self
4623        }
4624    }
4625
4626    #[doc(hidden)]
4627    impl crate::RequestBuilder for CreateExadbVmCluster {
4628        fn request_options(&mut self) -> &mut crate::RequestOptions {
4629            &mut self.0.options
4630        }
4631    }
4632
4633    /// The request builder for [OracleDatabase::delete_exadb_vm_cluster][crate::client::OracleDatabase::delete_exadb_vm_cluster] calls.
4634    ///
4635    /// # Example
4636    /// ```
4637    /// # use google_cloud_oracledatabase_v1::builder::oracle_database::DeleteExadbVmCluster;
4638    /// # async fn sample() -> google_cloud_oracledatabase_v1::Result<()> {
4639    /// use google_cloud_lro::Poller;
4640    ///
4641    /// let builder = prepare_request_builder();
4642    /// let response = builder.poller().until_done().await?;
4643    /// # Ok(()) }
4644    ///
4645    /// fn prepare_request_builder() -> DeleteExadbVmCluster {
4646    ///   # panic!();
4647    ///   // ... details omitted ...
4648    /// }
4649    /// ```
4650    #[derive(Clone, Debug)]
4651    pub struct DeleteExadbVmCluster(RequestBuilder<crate::model::DeleteExadbVmClusterRequest>);
4652
4653    impl DeleteExadbVmCluster {
4654        pub(crate) fn new(
4655            stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
4656        ) -> Self {
4657            Self(RequestBuilder::new(stub))
4658        }
4659
4660        /// Sets the full request, replacing any prior values.
4661        pub fn with_request<V: Into<crate::model::DeleteExadbVmClusterRequest>>(
4662            mut self,
4663            v: V,
4664        ) -> Self {
4665            self.0.request = v.into();
4666            self
4667        }
4668
4669        /// Sets all the options, replacing any prior values.
4670        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4671            self.0.options = v.into();
4672            self
4673        }
4674
4675        /// Sends the request.
4676        ///
4677        /// # Long running operations
4678        ///
4679        /// This starts, but does not poll, a longrunning operation. More information
4680        /// on [delete_exadb_vm_cluster][crate::client::OracleDatabase::delete_exadb_vm_cluster].
4681        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
4682            (*self.0.stub)
4683                .delete_exadb_vm_cluster(self.0.request, self.0.options)
4684                .await
4685                .map(crate::Response::into_body)
4686        }
4687
4688        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_exadb_vm_cluster`.
4689        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
4690            type Operation =
4691                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
4692            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4693            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4694
4695            let stub = self.0.stub.clone();
4696            let mut options = self.0.options.clone();
4697            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
4698            let query = move |name| {
4699                let stub = stub.clone();
4700                let options = options.clone();
4701                async {
4702                    let op = GetOperation::new(stub)
4703                        .set_name(name)
4704                        .with_options(options)
4705                        .send()
4706                        .await?;
4707                    Ok(Operation::new(op))
4708                }
4709            };
4710
4711            let start = move || async {
4712                let op = self.send().await?;
4713                Ok(Operation::new(op))
4714            };
4715
4716            google_cloud_lro::internal::new_unit_response_poller(
4717                polling_error_policy,
4718                polling_backoff_policy,
4719                start,
4720                query,
4721            )
4722        }
4723
4724        /// Sets the value of [name][crate::model::DeleteExadbVmClusterRequest::name].
4725        ///
4726        /// This is a **required** field for requests.
4727        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4728            self.0.request.name = v.into();
4729            self
4730        }
4731
4732        /// Sets the value of [request_id][crate::model::DeleteExadbVmClusterRequest::request_id].
4733        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
4734            self.0.request.request_id = v.into();
4735            self
4736        }
4737    }
4738
4739    #[doc(hidden)]
4740    impl crate::RequestBuilder for DeleteExadbVmCluster {
4741        fn request_options(&mut self) -> &mut crate::RequestOptions {
4742            &mut self.0.options
4743        }
4744    }
4745
4746    /// The request builder for [OracleDatabase::update_exadb_vm_cluster][crate::client::OracleDatabase::update_exadb_vm_cluster] calls.
4747    ///
4748    /// # Example
4749    /// ```
4750    /// # use google_cloud_oracledatabase_v1::builder::oracle_database::UpdateExadbVmCluster;
4751    /// # async fn sample() -> google_cloud_oracledatabase_v1::Result<()> {
4752    /// use google_cloud_lro::Poller;
4753    ///
4754    /// let builder = prepare_request_builder();
4755    /// let response = builder.poller().until_done().await?;
4756    /// # Ok(()) }
4757    ///
4758    /// fn prepare_request_builder() -> UpdateExadbVmCluster {
4759    ///   # panic!();
4760    ///   // ... details omitted ...
4761    /// }
4762    /// ```
4763    #[derive(Clone, Debug)]
4764    pub struct UpdateExadbVmCluster(RequestBuilder<crate::model::UpdateExadbVmClusterRequest>);
4765
4766    impl UpdateExadbVmCluster {
4767        pub(crate) fn new(
4768            stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
4769        ) -> Self {
4770            Self(RequestBuilder::new(stub))
4771        }
4772
4773        /// Sets the full request, replacing any prior values.
4774        pub fn with_request<V: Into<crate::model::UpdateExadbVmClusterRequest>>(
4775            mut self,
4776            v: V,
4777        ) -> Self {
4778            self.0.request = v.into();
4779            self
4780        }
4781
4782        /// Sets all the options, replacing any prior values.
4783        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4784            self.0.options = v.into();
4785            self
4786        }
4787
4788        /// Sends the request.
4789        ///
4790        /// # Long running operations
4791        ///
4792        /// This starts, but does not poll, a longrunning operation. More information
4793        /// on [update_exadb_vm_cluster][crate::client::OracleDatabase::update_exadb_vm_cluster].
4794        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
4795            (*self.0.stub)
4796                .update_exadb_vm_cluster(self.0.request, self.0.options)
4797                .await
4798                .map(crate::Response::into_body)
4799        }
4800
4801        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_exadb_vm_cluster`.
4802        pub fn poller(
4803            self,
4804        ) -> impl google_cloud_lro::Poller<crate::model::ExadbVmCluster, crate::model::OperationMetadata>
4805        {
4806            type Operation = google_cloud_lro::internal::Operation<
4807                crate::model::ExadbVmCluster,
4808                crate::model::OperationMetadata,
4809            >;
4810            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4811            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4812
4813            let stub = self.0.stub.clone();
4814            let mut options = self.0.options.clone();
4815            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
4816            let query = move |name| {
4817                let stub = stub.clone();
4818                let options = options.clone();
4819                async {
4820                    let op = GetOperation::new(stub)
4821                        .set_name(name)
4822                        .with_options(options)
4823                        .send()
4824                        .await?;
4825                    Ok(Operation::new(op))
4826                }
4827            };
4828
4829            let start = move || async {
4830                let op = self.send().await?;
4831                Ok(Operation::new(op))
4832            };
4833
4834            google_cloud_lro::internal::new_poller(
4835                polling_error_policy,
4836                polling_backoff_policy,
4837                start,
4838                query,
4839            )
4840        }
4841
4842        /// Sets the value of [update_mask][crate::model::UpdateExadbVmClusterRequest::update_mask].
4843        pub fn set_update_mask<T>(mut self, v: T) -> Self
4844        where
4845            T: std::convert::Into<wkt::FieldMask>,
4846        {
4847            self.0.request.update_mask = std::option::Option::Some(v.into());
4848            self
4849        }
4850
4851        /// Sets or clears the value of [update_mask][crate::model::UpdateExadbVmClusterRequest::update_mask].
4852        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
4853        where
4854            T: std::convert::Into<wkt::FieldMask>,
4855        {
4856            self.0.request.update_mask = v.map(|x| x.into());
4857            self
4858        }
4859
4860        /// Sets the value of [exadb_vm_cluster][crate::model::UpdateExadbVmClusterRequest::exadb_vm_cluster].
4861        ///
4862        /// This is a **required** field for requests.
4863        pub fn set_exadb_vm_cluster<T>(mut self, v: T) -> Self
4864        where
4865            T: std::convert::Into<crate::model::ExadbVmCluster>,
4866        {
4867            self.0.request.exadb_vm_cluster = std::option::Option::Some(v.into());
4868            self
4869        }
4870
4871        /// Sets or clears the value of [exadb_vm_cluster][crate::model::UpdateExadbVmClusterRequest::exadb_vm_cluster].
4872        ///
4873        /// This is a **required** field for requests.
4874        pub fn set_or_clear_exadb_vm_cluster<T>(mut self, v: std::option::Option<T>) -> Self
4875        where
4876            T: std::convert::Into<crate::model::ExadbVmCluster>,
4877        {
4878            self.0.request.exadb_vm_cluster = v.map(|x| x.into());
4879            self
4880        }
4881
4882        /// Sets the value of [request_id][crate::model::UpdateExadbVmClusterRequest::request_id].
4883        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
4884            self.0.request.request_id = v.into();
4885            self
4886        }
4887    }
4888
4889    #[doc(hidden)]
4890    impl crate::RequestBuilder for UpdateExadbVmCluster {
4891        fn request_options(&mut self) -> &mut crate::RequestOptions {
4892            &mut self.0.options
4893        }
4894    }
4895
4896    /// The request builder for [OracleDatabase::remove_virtual_machine_exadb_vm_cluster][crate::client::OracleDatabase::remove_virtual_machine_exadb_vm_cluster] calls.
4897    ///
4898    /// # Example
4899    /// ```
4900    /// # use google_cloud_oracledatabase_v1::builder::oracle_database::RemoveVirtualMachineExadbVmCluster;
4901    /// # async fn sample() -> google_cloud_oracledatabase_v1::Result<()> {
4902    /// use google_cloud_lro::Poller;
4903    ///
4904    /// let builder = prepare_request_builder();
4905    /// let response = builder.poller().until_done().await?;
4906    /// # Ok(()) }
4907    ///
4908    /// fn prepare_request_builder() -> RemoveVirtualMachineExadbVmCluster {
4909    ///   # panic!();
4910    ///   // ... details omitted ...
4911    /// }
4912    /// ```
4913    #[derive(Clone, Debug)]
4914    pub struct RemoveVirtualMachineExadbVmCluster(
4915        RequestBuilder<crate::model::RemoveVirtualMachineExadbVmClusterRequest>,
4916    );
4917
4918    impl RemoveVirtualMachineExadbVmCluster {
4919        pub(crate) fn new(
4920            stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
4921        ) -> Self {
4922            Self(RequestBuilder::new(stub))
4923        }
4924
4925        /// Sets the full request, replacing any prior values.
4926        pub fn with_request<V: Into<crate::model::RemoveVirtualMachineExadbVmClusterRequest>>(
4927            mut self,
4928            v: V,
4929        ) -> Self {
4930            self.0.request = v.into();
4931            self
4932        }
4933
4934        /// Sets all the options, replacing any prior values.
4935        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4936            self.0.options = v.into();
4937            self
4938        }
4939
4940        /// Sends the request.
4941        ///
4942        /// # Long running operations
4943        ///
4944        /// This starts, but does not poll, a longrunning operation. More information
4945        /// on [remove_virtual_machine_exadb_vm_cluster][crate::client::OracleDatabase::remove_virtual_machine_exadb_vm_cluster].
4946        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
4947            (*self.0.stub)
4948                .remove_virtual_machine_exadb_vm_cluster(self.0.request, self.0.options)
4949                .await
4950                .map(crate::Response::into_body)
4951        }
4952
4953        /// Creates a [Poller][google_cloud_lro::Poller] to work with `remove_virtual_machine_exadb_vm_cluster`.
4954        pub fn poller(
4955            self,
4956        ) -> impl google_cloud_lro::Poller<crate::model::ExadbVmCluster, crate::model::OperationMetadata>
4957        {
4958            type Operation = google_cloud_lro::internal::Operation<
4959                crate::model::ExadbVmCluster,
4960                crate::model::OperationMetadata,
4961            >;
4962            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4963            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4964
4965            let stub = self.0.stub.clone();
4966            let mut options = self.0.options.clone();
4967            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
4968            let query = move |name| {
4969                let stub = stub.clone();
4970                let options = options.clone();
4971                async {
4972                    let op = GetOperation::new(stub)
4973                        .set_name(name)
4974                        .with_options(options)
4975                        .send()
4976                        .await?;
4977                    Ok(Operation::new(op))
4978                }
4979            };
4980
4981            let start = move || async {
4982                let op = self.send().await?;
4983                Ok(Operation::new(op))
4984            };
4985
4986            google_cloud_lro::internal::new_poller(
4987                polling_error_policy,
4988                polling_backoff_policy,
4989                start,
4990                query,
4991            )
4992        }
4993
4994        /// Sets the value of [name][crate::model::RemoveVirtualMachineExadbVmClusterRequest::name].
4995        ///
4996        /// This is a **required** field for requests.
4997        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4998            self.0.request.name = v.into();
4999            self
5000        }
5001
5002        /// Sets the value of [request_id][crate::model::RemoveVirtualMachineExadbVmClusterRequest::request_id].
5003        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
5004            self.0.request.request_id = v.into();
5005            self
5006        }
5007
5008        /// Sets the value of [hostnames][crate::model::RemoveVirtualMachineExadbVmClusterRequest::hostnames].
5009        ///
5010        /// This is a **required** field for requests.
5011        pub fn set_hostnames<T, V>(mut self, v: T) -> Self
5012        where
5013            T: std::iter::IntoIterator<Item = V>,
5014            V: std::convert::Into<std::string::String>,
5015        {
5016            use std::iter::Iterator;
5017            self.0.request.hostnames = v.into_iter().map(|i| i.into()).collect();
5018            self
5019        }
5020    }
5021
5022    #[doc(hidden)]
5023    impl crate::RequestBuilder for RemoveVirtualMachineExadbVmCluster {
5024        fn request_options(&mut self) -> &mut crate::RequestOptions {
5025            &mut self.0.options
5026        }
5027    }
5028
5029    /// The request builder for [OracleDatabase::list_exascale_db_storage_vaults][crate::client::OracleDatabase::list_exascale_db_storage_vaults] calls.
5030    ///
5031    /// # Example
5032    /// ```
5033    /// # use google_cloud_oracledatabase_v1::builder::oracle_database::ListExascaleDbStorageVaults;
5034    /// # async fn sample() -> google_cloud_oracledatabase_v1::Result<()> {
5035    /// use google_cloud_gax::paginator::ItemPaginator;
5036    ///
5037    /// let builder = prepare_request_builder();
5038    /// let mut items = builder.by_item();
5039    /// while let Some(result) = items.next().await {
5040    ///   let item = result?;
5041    /// }
5042    /// # Ok(()) }
5043    ///
5044    /// fn prepare_request_builder() -> ListExascaleDbStorageVaults {
5045    ///   # panic!();
5046    ///   // ... details omitted ...
5047    /// }
5048    /// ```
5049    #[derive(Clone, Debug)]
5050    pub struct ListExascaleDbStorageVaults(
5051        RequestBuilder<crate::model::ListExascaleDbStorageVaultsRequest>,
5052    );
5053
5054    impl ListExascaleDbStorageVaults {
5055        pub(crate) fn new(
5056            stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
5057        ) -> Self {
5058            Self(RequestBuilder::new(stub))
5059        }
5060
5061        /// Sets the full request, replacing any prior values.
5062        pub fn with_request<V: Into<crate::model::ListExascaleDbStorageVaultsRequest>>(
5063            mut self,
5064            v: V,
5065        ) -> Self {
5066            self.0.request = v.into();
5067            self
5068        }
5069
5070        /// Sets all the options, replacing any prior values.
5071        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5072            self.0.options = v.into();
5073            self
5074        }
5075
5076        /// Sends the request.
5077        pub async fn send(self) -> Result<crate::model::ListExascaleDbStorageVaultsResponse> {
5078            (*self.0.stub)
5079                .list_exascale_db_storage_vaults(self.0.request, self.0.options)
5080                .await
5081                .map(crate::Response::into_body)
5082        }
5083
5084        /// Streams each page in the collection.
5085        pub fn by_page(
5086            self,
5087        ) -> impl google_cloud_gax::paginator::Paginator<
5088            crate::model::ListExascaleDbStorageVaultsResponse,
5089            crate::Error,
5090        > {
5091            use std::clone::Clone;
5092            let token = self.0.request.page_token.clone();
5093            let execute = move |token: String| {
5094                let mut builder = self.clone();
5095                builder.0.request = builder.0.request.set_page_token(token);
5096                builder.send()
5097            };
5098            google_cloud_gax::paginator::internal::new_paginator(token, execute)
5099        }
5100
5101        /// Streams each item in the collection.
5102        pub fn by_item(
5103            self,
5104        ) -> impl google_cloud_gax::paginator::ItemPaginator<
5105            crate::model::ListExascaleDbStorageVaultsResponse,
5106            crate::Error,
5107        > {
5108            use google_cloud_gax::paginator::Paginator;
5109            self.by_page().items()
5110        }
5111
5112        /// Sets the value of [parent][crate::model::ListExascaleDbStorageVaultsRequest::parent].
5113        ///
5114        /// This is a **required** field for requests.
5115        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5116            self.0.request.parent = v.into();
5117            self
5118        }
5119
5120        /// Sets the value of [page_size][crate::model::ListExascaleDbStorageVaultsRequest::page_size].
5121        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
5122            self.0.request.page_size = v.into();
5123            self
5124        }
5125
5126        /// Sets the value of [page_token][crate::model::ListExascaleDbStorageVaultsRequest::page_token].
5127        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
5128            self.0.request.page_token = v.into();
5129            self
5130        }
5131
5132        /// Sets the value of [filter][crate::model::ListExascaleDbStorageVaultsRequest::filter].
5133        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
5134            self.0.request.filter = v.into();
5135            self
5136        }
5137
5138        /// Sets the value of [order_by][crate::model::ListExascaleDbStorageVaultsRequest::order_by].
5139        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
5140            self.0.request.order_by = v.into();
5141            self
5142        }
5143    }
5144
5145    #[doc(hidden)]
5146    impl crate::RequestBuilder for ListExascaleDbStorageVaults {
5147        fn request_options(&mut self) -> &mut crate::RequestOptions {
5148            &mut self.0.options
5149        }
5150    }
5151
5152    /// The request builder for [OracleDatabase::get_exascale_db_storage_vault][crate::client::OracleDatabase::get_exascale_db_storage_vault] calls.
5153    ///
5154    /// # Example
5155    /// ```
5156    /// # use google_cloud_oracledatabase_v1::builder::oracle_database::GetExascaleDbStorageVault;
5157    /// # async fn sample() -> google_cloud_oracledatabase_v1::Result<()> {
5158    ///
5159    /// let builder = prepare_request_builder();
5160    /// let response = builder.send().await?;
5161    /// # Ok(()) }
5162    ///
5163    /// fn prepare_request_builder() -> GetExascaleDbStorageVault {
5164    ///   # panic!();
5165    ///   // ... details omitted ...
5166    /// }
5167    /// ```
5168    #[derive(Clone, Debug)]
5169    pub struct GetExascaleDbStorageVault(
5170        RequestBuilder<crate::model::GetExascaleDbStorageVaultRequest>,
5171    );
5172
5173    impl GetExascaleDbStorageVault {
5174        pub(crate) fn new(
5175            stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
5176        ) -> Self {
5177            Self(RequestBuilder::new(stub))
5178        }
5179
5180        /// Sets the full request, replacing any prior values.
5181        pub fn with_request<V: Into<crate::model::GetExascaleDbStorageVaultRequest>>(
5182            mut self,
5183            v: V,
5184        ) -> Self {
5185            self.0.request = v.into();
5186            self
5187        }
5188
5189        /// Sets all the options, replacing any prior values.
5190        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5191            self.0.options = v.into();
5192            self
5193        }
5194
5195        /// Sends the request.
5196        pub async fn send(self) -> Result<crate::model::ExascaleDbStorageVault> {
5197            (*self.0.stub)
5198                .get_exascale_db_storage_vault(self.0.request, self.0.options)
5199                .await
5200                .map(crate::Response::into_body)
5201        }
5202
5203        /// Sets the value of [name][crate::model::GetExascaleDbStorageVaultRequest::name].
5204        ///
5205        /// This is a **required** field for requests.
5206        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5207            self.0.request.name = v.into();
5208            self
5209        }
5210    }
5211
5212    #[doc(hidden)]
5213    impl crate::RequestBuilder for GetExascaleDbStorageVault {
5214        fn request_options(&mut self) -> &mut crate::RequestOptions {
5215            &mut self.0.options
5216        }
5217    }
5218
5219    /// The request builder for [OracleDatabase::create_exascale_db_storage_vault][crate::client::OracleDatabase::create_exascale_db_storage_vault] calls.
5220    ///
5221    /// # Example
5222    /// ```
5223    /// # use google_cloud_oracledatabase_v1::builder::oracle_database::CreateExascaleDbStorageVault;
5224    /// # async fn sample() -> google_cloud_oracledatabase_v1::Result<()> {
5225    /// use google_cloud_lro::Poller;
5226    ///
5227    /// let builder = prepare_request_builder();
5228    /// let response = builder.poller().until_done().await?;
5229    /// # Ok(()) }
5230    ///
5231    /// fn prepare_request_builder() -> CreateExascaleDbStorageVault {
5232    ///   # panic!();
5233    ///   // ... details omitted ...
5234    /// }
5235    /// ```
5236    #[derive(Clone, Debug)]
5237    pub struct CreateExascaleDbStorageVault(
5238        RequestBuilder<crate::model::CreateExascaleDbStorageVaultRequest>,
5239    );
5240
5241    impl CreateExascaleDbStorageVault {
5242        pub(crate) fn new(
5243            stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
5244        ) -> Self {
5245            Self(RequestBuilder::new(stub))
5246        }
5247
5248        /// Sets the full request, replacing any prior values.
5249        pub fn with_request<V: Into<crate::model::CreateExascaleDbStorageVaultRequest>>(
5250            mut self,
5251            v: V,
5252        ) -> Self {
5253            self.0.request = v.into();
5254            self
5255        }
5256
5257        /// Sets all the options, replacing any prior values.
5258        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5259            self.0.options = v.into();
5260            self
5261        }
5262
5263        /// Sends the request.
5264        ///
5265        /// # Long running operations
5266        ///
5267        /// This starts, but does not poll, a longrunning operation. More information
5268        /// on [create_exascale_db_storage_vault][crate::client::OracleDatabase::create_exascale_db_storage_vault].
5269        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
5270            (*self.0.stub)
5271                .create_exascale_db_storage_vault(self.0.request, self.0.options)
5272                .await
5273                .map(crate::Response::into_body)
5274        }
5275
5276        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_exascale_db_storage_vault`.
5277        pub fn poller(
5278            self,
5279        ) -> impl google_cloud_lro::Poller<
5280            crate::model::ExascaleDbStorageVault,
5281            crate::model::OperationMetadata,
5282        > {
5283            type Operation = google_cloud_lro::internal::Operation<
5284                crate::model::ExascaleDbStorageVault,
5285                crate::model::OperationMetadata,
5286            >;
5287            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
5288            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
5289
5290            let stub = self.0.stub.clone();
5291            let mut options = self.0.options.clone();
5292            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
5293            let query = move |name| {
5294                let stub = stub.clone();
5295                let options = options.clone();
5296                async {
5297                    let op = GetOperation::new(stub)
5298                        .set_name(name)
5299                        .with_options(options)
5300                        .send()
5301                        .await?;
5302                    Ok(Operation::new(op))
5303                }
5304            };
5305
5306            let start = move || async {
5307                let op = self.send().await?;
5308                Ok(Operation::new(op))
5309            };
5310
5311            google_cloud_lro::internal::new_poller(
5312                polling_error_policy,
5313                polling_backoff_policy,
5314                start,
5315                query,
5316            )
5317        }
5318
5319        /// Sets the value of [parent][crate::model::CreateExascaleDbStorageVaultRequest::parent].
5320        ///
5321        /// This is a **required** field for requests.
5322        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5323            self.0.request.parent = v.into();
5324            self
5325        }
5326
5327        /// Sets the value of [exascale_db_storage_vault_id][crate::model::CreateExascaleDbStorageVaultRequest::exascale_db_storage_vault_id].
5328        ///
5329        /// This is a **required** field for requests.
5330        pub fn set_exascale_db_storage_vault_id<T: Into<std::string::String>>(
5331            mut self,
5332            v: T,
5333        ) -> Self {
5334            self.0.request.exascale_db_storage_vault_id = v.into();
5335            self
5336        }
5337
5338        /// Sets the value of [exascale_db_storage_vault][crate::model::CreateExascaleDbStorageVaultRequest::exascale_db_storage_vault].
5339        ///
5340        /// This is a **required** field for requests.
5341        pub fn set_exascale_db_storage_vault<T>(mut self, v: T) -> Self
5342        where
5343            T: std::convert::Into<crate::model::ExascaleDbStorageVault>,
5344        {
5345            self.0.request.exascale_db_storage_vault = std::option::Option::Some(v.into());
5346            self
5347        }
5348
5349        /// Sets or clears the value of [exascale_db_storage_vault][crate::model::CreateExascaleDbStorageVaultRequest::exascale_db_storage_vault].
5350        ///
5351        /// This is a **required** field for requests.
5352        pub fn set_or_clear_exascale_db_storage_vault<T>(
5353            mut self,
5354            v: std::option::Option<T>,
5355        ) -> Self
5356        where
5357            T: std::convert::Into<crate::model::ExascaleDbStorageVault>,
5358        {
5359            self.0.request.exascale_db_storage_vault = v.map(|x| x.into());
5360            self
5361        }
5362
5363        /// Sets the value of [request_id][crate::model::CreateExascaleDbStorageVaultRequest::request_id].
5364        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
5365            self.0.request.request_id = v.into();
5366            self
5367        }
5368    }
5369
5370    #[doc(hidden)]
5371    impl crate::RequestBuilder for CreateExascaleDbStorageVault {
5372        fn request_options(&mut self) -> &mut crate::RequestOptions {
5373            &mut self.0.options
5374        }
5375    }
5376
5377    /// The request builder for [OracleDatabase::delete_exascale_db_storage_vault][crate::client::OracleDatabase::delete_exascale_db_storage_vault] calls.
5378    ///
5379    /// # Example
5380    /// ```
5381    /// # use google_cloud_oracledatabase_v1::builder::oracle_database::DeleteExascaleDbStorageVault;
5382    /// # async fn sample() -> google_cloud_oracledatabase_v1::Result<()> {
5383    /// use google_cloud_lro::Poller;
5384    ///
5385    /// let builder = prepare_request_builder();
5386    /// let response = builder.poller().until_done().await?;
5387    /// # Ok(()) }
5388    ///
5389    /// fn prepare_request_builder() -> DeleteExascaleDbStorageVault {
5390    ///   # panic!();
5391    ///   // ... details omitted ...
5392    /// }
5393    /// ```
5394    #[derive(Clone, Debug)]
5395    pub struct DeleteExascaleDbStorageVault(
5396        RequestBuilder<crate::model::DeleteExascaleDbStorageVaultRequest>,
5397    );
5398
5399    impl DeleteExascaleDbStorageVault {
5400        pub(crate) fn new(
5401            stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
5402        ) -> Self {
5403            Self(RequestBuilder::new(stub))
5404        }
5405
5406        /// Sets the full request, replacing any prior values.
5407        pub fn with_request<V: Into<crate::model::DeleteExascaleDbStorageVaultRequest>>(
5408            mut self,
5409            v: V,
5410        ) -> Self {
5411            self.0.request = v.into();
5412            self
5413        }
5414
5415        /// Sets all the options, replacing any prior values.
5416        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5417            self.0.options = v.into();
5418            self
5419        }
5420
5421        /// Sends the request.
5422        ///
5423        /// # Long running operations
5424        ///
5425        /// This starts, but does not poll, a longrunning operation. More information
5426        /// on [delete_exascale_db_storage_vault][crate::client::OracleDatabase::delete_exascale_db_storage_vault].
5427        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
5428            (*self.0.stub)
5429                .delete_exascale_db_storage_vault(self.0.request, self.0.options)
5430                .await
5431                .map(crate::Response::into_body)
5432        }
5433
5434        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_exascale_db_storage_vault`.
5435        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
5436            type Operation =
5437                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
5438            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
5439            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
5440
5441            let stub = self.0.stub.clone();
5442            let mut options = self.0.options.clone();
5443            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
5444            let query = move |name| {
5445                let stub = stub.clone();
5446                let options = options.clone();
5447                async {
5448                    let op = GetOperation::new(stub)
5449                        .set_name(name)
5450                        .with_options(options)
5451                        .send()
5452                        .await?;
5453                    Ok(Operation::new(op))
5454                }
5455            };
5456
5457            let start = move || async {
5458                let op = self.send().await?;
5459                Ok(Operation::new(op))
5460            };
5461
5462            google_cloud_lro::internal::new_unit_response_poller(
5463                polling_error_policy,
5464                polling_backoff_policy,
5465                start,
5466                query,
5467            )
5468        }
5469
5470        /// Sets the value of [name][crate::model::DeleteExascaleDbStorageVaultRequest::name].
5471        ///
5472        /// This is a **required** field for requests.
5473        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5474            self.0.request.name = v.into();
5475            self
5476        }
5477
5478        /// Sets the value of [request_id][crate::model::DeleteExascaleDbStorageVaultRequest::request_id].
5479        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
5480            self.0.request.request_id = v.into();
5481            self
5482        }
5483    }
5484
5485    #[doc(hidden)]
5486    impl crate::RequestBuilder for DeleteExascaleDbStorageVault {
5487        fn request_options(&mut self) -> &mut crate::RequestOptions {
5488            &mut self.0.options
5489        }
5490    }
5491
5492    /// The request builder for [OracleDatabase::list_db_system_initial_storage_sizes][crate::client::OracleDatabase::list_db_system_initial_storage_sizes] calls.
5493    ///
5494    /// # Example
5495    /// ```
5496    /// # use google_cloud_oracledatabase_v1::builder::oracle_database::ListDbSystemInitialStorageSizes;
5497    /// # async fn sample() -> google_cloud_oracledatabase_v1::Result<()> {
5498    /// use google_cloud_gax::paginator::ItemPaginator;
5499    ///
5500    /// let builder = prepare_request_builder();
5501    /// let mut items = builder.by_item();
5502    /// while let Some(result) = items.next().await {
5503    ///   let item = result?;
5504    /// }
5505    /// # Ok(()) }
5506    ///
5507    /// fn prepare_request_builder() -> ListDbSystemInitialStorageSizes {
5508    ///   # panic!();
5509    ///   // ... details omitted ...
5510    /// }
5511    /// ```
5512    #[derive(Clone, Debug)]
5513    pub struct ListDbSystemInitialStorageSizes(
5514        RequestBuilder<crate::model::ListDbSystemInitialStorageSizesRequest>,
5515    );
5516
5517    impl ListDbSystemInitialStorageSizes {
5518        pub(crate) fn new(
5519            stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
5520        ) -> Self {
5521            Self(RequestBuilder::new(stub))
5522        }
5523
5524        /// Sets the full request, replacing any prior values.
5525        pub fn with_request<V: Into<crate::model::ListDbSystemInitialStorageSizesRequest>>(
5526            mut self,
5527            v: V,
5528        ) -> Self {
5529            self.0.request = v.into();
5530            self
5531        }
5532
5533        /// Sets all the options, replacing any prior values.
5534        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5535            self.0.options = v.into();
5536            self
5537        }
5538
5539        /// Sends the request.
5540        pub async fn send(self) -> Result<crate::model::ListDbSystemInitialStorageSizesResponse> {
5541            (*self.0.stub)
5542                .list_db_system_initial_storage_sizes(self.0.request, self.0.options)
5543                .await
5544                .map(crate::Response::into_body)
5545        }
5546
5547        /// Streams each page in the collection.
5548        pub fn by_page(
5549            self,
5550        ) -> impl google_cloud_gax::paginator::Paginator<
5551            crate::model::ListDbSystemInitialStorageSizesResponse,
5552            crate::Error,
5553        > {
5554            use std::clone::Clone;
5555            let token = self.0.request.page_token.clone();
5556            let execute = move |token: String| {
5557                let mut builder = self.clone();
5558                builder.0.request = builder.0.request.set_page_token(token);
5559                builder.send()
5560            };
5561            google_cloud_gax::paginator::internal::new_paginator(token, execute)
5562        }
5563
5564        /// Streams each item in the collection.
5565        pub fn by_item(
5566            self,
5567        ) -> impl google_cloud_gax::paginator::ItemPaginator<
5568            crate::model::ListDbSystemInitialStorageSizesResponse,
5569            crate::Error,
5570        > {
5571            use google_cloud_gax::paginator::Paginator;
5572            self.by_page().items()
5573        }
5574
5575        /// Sets the value of [parent][crate::model::ListDbSystemInitialStorageSizesRequest::parent].
5576        ///
5577        /// This is a **required** field for requests.
5578        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5579            self.0.request.parent = v.into();
5580            self
5581        }
5582
5583        /// Sets the value of [page_size][crate::model::ListDbSystemInitialStorageSizesRequest::page_size].
5584        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
5585            self.0.request.page_size = v.into();
5586            self
5587        }
5588
5589        /// Sets the value of [page_token][crate::model::ListDbSystemInitialStorageSizesRequest::page_token].
5590        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
5591            self.0.request.page_token = v.into();
5592            self
5593        }
5594    }
5595
5596    #[doc(hidden)]
5597    impl crate::RequestBuilder for ListDbSystemInitialStorageSizes {
5598        fn request_options(&mut self) -> &mut crate::RequestOptions {
5599            &mut self.0.options
5600        }
5601    }
5602
5603    /// The request builder for [OracleDatabase::list_databases][crate::client::OracleDatabase::list_databases] calls.
5604    ///
5605    /// # Example
5606    /// ```
5607    /// # use google_cloud_oracledatabase_v1::builder::oracle_database::ListDatabases;
5608    /// # async fn sample() -> google_cloud_oracledatabase_v1::Result<()> {
5609    /// use google_cloud_gax::paginator::ItemPaginator;
5610    ///
5611    /// let builder = prepare_request_builder();
5612    /// let mut items = builder.by_item();
5613    /// while let Some(result) = items.next().await {
5614    ///   let item = result?;
5615    /// }
5616    /// # Ok(()) }
5617    ///
5618    /// fn prepare_request_builder() -> ListDatabases {
5619    ///   # panic!();
5620    ///   // ... details omitted ...
5621    /// }
5622    /// ```
5623    #[derive(Clone, Debug)]
5624    pub struct ListDatabases(RequestBuilder<crate::model::ListDatabasesRequest>);
5625
5626    impl ListDatabases {
5627        pub(crate) fn new(
5628            stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
5629        ) -> Self {
5630            Self(RequestBuilder::new(stub))
5631        }
5632
5633        /// Sets the full request, replacing any prior values.
5634        pub fn with_request<V: Into<crate::model::ListDatabasesRequest>>(mut self, v: V) -> Self {
5635            self.0.request = v.into();
5636            self
5637        }
5638
5639        /// Sets all the options, replacing any prior values.
5640        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5641            self.0.options = v.into();
5642            self
5643        }
5644
5645        /// Sends the request.
5646        pub async fn send(self) -> Result<crate::model::ListDatabasesResponse> {
5647            (*self.0.stub)
5648                .list_databases(self.0.request, self.0.options)
5649                .await
5650                .map(crate::Response::into_body)
5651        }
5652
5653        /// Streams each page in the collection.
5654        pub fn by_page(
5655            self,
5656        ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListDatabasesResponse, crate::Error>
5657        {
5658            use std::clone::Clone;
5659            let token = self.0.request.page_token.clone();
5660            let execute = move |token: String| {
5661                let mut builder = self.clone();
5662                builder.0.request = builder.0.request.set_page_token(token);
5663                builder.send()
5664            };
5665            google_cloud_gax::paginator::internal::new_paginator(token, execute)
5666        }
5667
5668        /// Streams each item in the collection.
5669        pub fn by_item(
5670            self,
5671        ) -> impl google_cloud_gax::paginator::ItemPaginator<
5672            crate::model::ListDatabasesResponse,
5673            crate::Error,
5674        > {
5675            use google_cloud_gax::paginator::Paginator;
5676            self.by_page().items()
5677        }
5678
5679        /// Sets the value of [parent][crate::model::ListDatabasesRequest::parent].
5680        ///
5681        /// This is a **required** field for requests.
5682        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5683            self.0.request.parent = v.into();
5684            self
5685        }
5686
5687        /// Sets the value of [page_size][crate::model::ListDatabasesRequest::page_size].
5688        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
5689            self.0.request.page_size = v.into();
5690            self
5691        }
5692
5693        /// Sets the value of [page_token][crate::model::ListDatabasesRequest::page_token].
5694        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
5695            self.0.request.page_token = v.into();
5696            self
5697        }
5698
5699        /// Sets the value of [filter][crate::model::ListDatabasesRequest::filter].
5700        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
5701            self.0.request.filter = v.into();
5702            self
5703        }
5704    }
5705
5706    #[doc(hidden)]
5707    impl crate::RequestBuilder for ListDatabases {
5708        fn request_options(&mut self) -> &mut crate::RequestOptions {
5709            &mut self.0.options
5710        }
5711    }
5712
5713    /// The request builder for [OracleDatabase::get_database][crate::client::OracleDatabase::get_database] calls.
5714    ///
5715    /// # Example
5716    /// ```
5717    /// # use google_cloud_oracledatabase_v1::builder::oracle_database::GetDatabase;
5718    /// # async fn sample() -> google_cloud_oracledatabase_v1::Result<()> {
5719    ///
5720    /// let builder = prepare_request_builder();
5721    /// let response = builder.send().await?;
5722    /// # Ok(()) }
5723    ///
5724    /// fn prepare_request_builder() -> GetDatabase {
5725    ///   # panic!();
5726    ///   // ... details omitted ...
5727    /// }
5728    /// ```
5729    #[derive(Clone, Debug)]
5730    pub struct GetDatabase(RequestBuilder<crate::model::GetDatabaseRequest>);
5731
5732    impl GetDatabase {
5733        pub(crate) fn new(
5734            stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
5735        ) -> Self {
5736            Self(RequestBuilder::new(stub))
5737        }
5738
5739        /// Sets the full request, replacing any prior values.
5740        pub fn with_request<V: Into<crate::model::GetDatabaseRequest>>(mut self, v: V) -> Self {
5741            self.0.request = v.into();
5742            self
5743        }
5744
5745        /// Sets all the options, replacing any prior values.
5746        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5747            self.0.options = v.into();
5748            self
5749        }
5750
5751        /// Sends the request.
5752        pub async fn send(self) -> Result<crate::model::Database> {
5753            (*self.0.stub)
5754                .get_database(self.0.request, self.0.options)
5755                .await
5756                .map(crate::Response::into_body)
5757        }
5758
5759        /// Sets the value of [name][crate::model::GetDatabaseRequest::name].
5760        ///
5761        /// This is a **required** field for requests.
5762        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5763            self.0.request.name = v.into();
5764            self
5765        }
5766    }
5767
5768    #[doc(hidden)]
5769    impl crate::RequestBuilder for GetDatabase {
5770        fn request_options(&mut self) -> &mut crate::RequestOptions {
5771            &mut self.0.options
5772        }
5773    }
5774
5775    /// The request builder for [OracleDatabase::list_pluggable_databases][crate::client::OracleDatabase::list_pluggable_databases] calls.
5776    ///
5777    /// # Example
5778    /// ```
5779    /// # use google_cloud_oracledatabase_v1::builder::oracle_database::ListPluggableDatabases;
5780    /// # async fn sample() -> google_cloud_oracledatabase_v1::Result<()> {
5781    /// use google_cloud_gax::paginator::ItemPaginator;
5782    ///
5783    /// let builder = prepare_request_builder();
5784    /// let mut items = builder.by_item();
5785    /// while let Some(result) = items.next().await {
5786    ///   let item = result?;
5787    /// }
5788    /// # Ok(()) }
5789    ///
5790    /// fn prepare_request_builder() -> ListPluggableDatabases {
5791    ///   # panic!();
5792    ///   // ... details omitted ...
5793    /// }
5794    /// ```
5795    #[derive(Clone, Debug)]
5796    pub struct ListPluggableDatabases(RequestBuilder<crate::model::ListPluggableDatabasesRequest>);
5797
5798    impl ListPluggableDatabases {
5799        pub(crate) fn new(
5800            stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
5801        ) -> Self {
5802            Self(RequestBuilder::new(stub))
5803        }
5804
5805        /// Sets the full request, replacing any prior values.
5806        pub fn with_request<V: Into<crate::model::ListPluggableDatabasesRequest>>(
5807            mut self,
5808            v: V,
5809        ) -> Self {
5810            self.0.request = v.into();
5811            self
5812        }
5813
5814        /// Sets all the options, replacing any prior values.
5815        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5816            self.0.options = v.into();
5817            self
5818        }
5819
5820        /// Sends the request.
5821        pub async fn send(self) -> Result<crate::model::ListPluggableDatabasesResponse> {
5822            (*self.0.stub)
5823                .list_pluggable_databases(self.0.request, self.0.options)
5824                .await
5825                .map(crate::Response::into_body)
5826        }
5827
5828        /// Streams each page in the collection.
5829        pub fn by_page(
5830            self,
5831        ) -> impl google_cloud_gax::paginator::Paginator<
5832            crate::model::ListPluggableDatabasesResponse,
5833            crate::Error,
5834        > {
5835            use std::clone::Clone;
5836            let token = self.0.request.page_token.clone();
5837            let execute = move |token: String| {
5838                let mut builder = self.clone();
5839                builder.0.request = builder.0.request.set_page_token(token);
5840                builder.send()
5841            };
5842            google_cloud_gax::paginator::internal::new_paginator(token, execute)
5843        }
5844
5845        /// Streams each item in the collection.
5846        pub fn by_item(
5847            self,
5848        ) -> impl google_cloud_gax::paginator::ItemPaginator<
5849            crate::model::ListPluggableDatabasesResponse,
5850            crate::Error,
5851        > {
5852            use google_cloud_gax::paginator::Paginator;
5853            self.by_page().items()
5854        }
5855
5856        /// Sets the value of [parent][crate::model::ListPluggableDatabasesRequest::parent].
5857        ///
5858        /// This is a **required** field for requests.
5859        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5860            self.0.request.parent = v.into();
5861            self
5862        }
5863
5864        /// Sets the value of [page_size][crate::model::ListPluggableDatabasesRequest::page_size].
5865        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
5866            self.0.request.page_size = v.into();
5867            self
5868        }
5869
5870        /// Sets the value of [page_token][crate::model::ListPluggableDatabasesRequest::page_token].
5871        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
5872            self.0.request.page_token = v.into();
5873            self
5874        }
5875
5876        /// Sets the value of [filter][crate::model::ListPluggableDatabasesRequest::filter].
5877        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
5878            self.0.request.filter = v.into();
5879            self
5880        }
5881    }
5882
5883    #[doc(hidden)]
5884    impl crate::RequestBuilder for ListPluggableDatabases {
5885        fn request_options(&mut self) -> &mut crate::RequestOptions {
5886            &mut self.0.options
5887        }
5888    }
5889
5890    /// The request builder for [OracleDatabase::get_pluggable_database][crate::client::OracleDatabase::get_pluggable_database] calls.
5891    ///
5892    /// # Example
5893    /// ```
5894    /// # use google_cloud_oracledatabase_v1::builder::oracle_database::GetPluggableDatabase;
5895    /// # async fn sample() -> google_cloud_oracledatabase_v1::Result<()> {
5896    ///
5897    /// let builder = prepare_request_builder();
5898    /// let response = builder.send().await?;
5899    /// # Ok(()) }
5900    ///
5901    /// fn prepare_request_builder() -> GetPluggableDatabase {
5902    ///   # panic!();
5903    ///   // ... details omitted ...
5904    /// }
5905    /// ```
5906    #[derive(Clone, Debug)]
5907    pub struct GetPluggableDatabase(RequestBuilder<crate::model::GetPluggableDatabaseRequest>);
5908
5909    impl GetPluggableDatabase {
5910        pub(crate) fn new(
5911            stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
5912        ) -> Self {
5913            Self(RequestBuilder::new(stub))
5914        }
5915
5916        /// Sets the full request, replacing any prior values.
5917        pub fn with_request<V: Into<crate::model::GetPluggableDatabaseRequest>>(
5918            mut self,
5919            v: V,
5920        ) -> Self {
5921            self.0.request = v.into();
5922            self
5923        }
5924
5925        /// Sets all the options, replacing any prior values.
5926        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5927            self.0.options = v.into();
5928            self
5929        }
5930
5931        /// Sends the request.
5932        pub async fn send(self) -> Result<crate::model::PluggableDatabase> {
5933            (*self.0.stub)
5934                .get_pluggable_database(self.0.request, self.0.options)
5935                .await
5936                .map(crate::Response::into_body)
5937        }
5938
5939        /// Sets the value of [name][crate::model::GetPluggableDatabaseRequest::name].
5940        ///
5941        /// This is a **required** field for requests.
5942        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5943            self.0.request.name = v.into();
5944            self
5945        }
5946    }
5947
5948    #[doc(hidden)]
5949    impl crate::RequestBuilder for GetPluggableDatabase {
5950        fn request_options(&mut self) -> &mut crate::RequestOptions {
5951            &mut self.0.options
5952        }
5953    }
5954
5955    /// The request builder for [OracleDatabase::list_db_systems][crate::client::OracleDatabase::list_db_systems] calls.
5956    ///
5957    /// # Example
5958    /// ```
5959    /// # use google_cloud_oracledatabase_v1::builder::oracle_database::ListDbSystems;
5960    /// # async fn sample() -> google_cloud_oracledatabase_v1::Result<()> {
5961    /// use google_cloud_gax::paginator::ItemPaginator;
5962    ///
5963    /// let builder = prepare_request_builder();
5964    /// let mut items = builder.by_item();
5965    /// while let Some(result) = items.next().await {
5966    ///   let item = result?;
5967    /// }
5968    /// # Ok(()) }
5969    ///
5970    /// fn prepare_request_builder() -> ListDbSystems {
5971    ///   # panic!();
5972    ///   // ... details omitted ...
5973    /// }
5974    /// ```
5975    #[derive(Clone, Debug)]
5976    pub struct ListDbSystems(RequestBuilder<crate::model::ListDbSystemsRequest>);
5977
5978    impl ListDbSystems {
5979        pub(crate) fn new(
5980            stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
5981        ) -> Self {
5982            Self(RequestBuilder::new(stub))
5983        }
5984
5985        /// Sets the full request, replacing any prior values.
5986        pub fn with_request<V: Into<crate::model::ListDbSystemsRequest>>(mut self, v: V) -> Self {
5987            self.0.request = v.into();
5988            self
5989        }
5990
5991        /// Sets all the options, replacing any prior values.
5992        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5993            self.0.options = v.into();
5994            self
5995        }
5996
5997        /// Sends the request.
5998        pub async fn send(self) -> Result<crate::model::ListDbSystemsResponse> {
5999            (*self.0.stub)
6000                .list_db_systems(self.0.request, self.0.options)
6001                .await
6002                .map(crate::Response::into_body)
6003        }
6004
6005        /// Streams each page in the collection.
6006        pub fn by_page(
6007            self,
6008        ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListDbSystemsResponse, crate::Error>
6009        {
6010            use std::clone::Clone;
6011            let token = self.0.request.page_token.clone();
6012            let execute = move |token: String| {
6013                let mut builder = self.clone();
6014                builder.0.request = builder.0.request.set_page_token(token);
6015                builder.send()
6016            };
6017            google_cloud_gax::paginator::internal::new_paginator(token, execute)
6018        }
6019
6020        /// Streams each item in the collection.
6021        pub fn by_item(
6022            self,
6023        ) -> impl google_cloud_gax::paginator::ItemPaginator<
6024            crate::model::ListDbSystemsResponse,
6025            crate::Error,
6026        > {
6027            use google_cloud_gax::paginator::Paginator;
6028            self.by_page().items()
6029        }
6030
6031        /// Sets the value of [parent][crate::model::ListDbSystemsRequest::parent].
6032        ///
6033        /// This is a **required** field for requests.
6034        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
6035            self.0.request.parent = v.into();
6036            self
6037        }
6038
6039        /// Sets the value of [page_size][crate::model::ListDbSystemsRequest::page_size].
6040        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
6041            self.0.request.page_size = v.into();
6042            self
6043        }
6044
6045        /// Sets the value of [page_token][crate::model::ListDbSystemsRequest::page_token].
6046        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
6047            self.0.request.page_token = v.into();
6048            self
6049        }
6050
6051        /// Sets the value of [filter][crate::model::ListDbSystemsRequest::filter].
6052        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
6053            self.0.request.filter = v.into();
6054            self
6055        }
6056
6057        /// Sets the value of [order_by][crate::model::ListDbSystemsRequest::order_by].
6058        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
6059            self.0.request.order_by = v.into();
6060            self
6061        }
6062    }
6063
6064    #[doc(hidden)]
6065    impl crate::RequestBuilder for ListDbSystems {
6066        fn request_options(&mut self) -> &mut crate::RequestOptions {
6067            &mut self.0.options
6068        }
6069    }
6070
6071    /// The request builder for [OracleDatabase::get_db_system][crate::client::OracleDatabase::get_db_system] calls.
6072    ///
6073    /// # Example
6074    /// ```
6075    /// # use google_cloud_oracledatabase_v1::builder::oracle_database::GetDbSystem;
6076    /// # async fn sample() -> google_cloud_oracledatabase_v1::Result<()> {
6077    ///
6078    /// let builder = prepare_request_builder();
6079    /// let response = builder.send().await?;
6080    /// # Ok(()) }
6081    ///
6082    /// fn prepare_request_builder() -> GetDbSystem {
6083    ///   # panic!();
6084    ///   // ... details omitted ...
6085    /// }
6086    /// ```
6087    #[derive(Clone, Debug)]
6088    pub struct GetDbSystem(RequestBuilder<crate::model::GetDbSystemRequest>);
6089
6090    impl GetDbSystem {
6091        pub(crate) fn new(
6092            stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
6093        ) -> Self {
6094            Self(RequestBuilder::new(stub))
6095        }
6096
6097        /// Sets the full request, replacing any prior values.
6098        pub fn with_request<V: Into<crate::model::GetDbSystemRequest>>(mut self, v: V) -> Self {
6099            self.0.request = v.into();
6100            self
6101        }
6102
6103        /// Sets all the options, replacing any prior values.
6104        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6105            self.0.options = v.into();
6106            self
6107        }
6108
6109        /// Sends the request.
6110        pub async fn send(self) -> Result<crate::model::DbSystem> {
6111            (*self.0.stub)
6112                .get_db_system(self.0.request, self.0.options)
6113                .await
6114                .map(crate::Response::into_body)
6115        }
6116
6117        /// Sets the value of [name][crate::model::GetDbSystemRequest::name].
6118        ///
6119        /// This is a **required** field for requests.
6120        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6121            self.0.request.name = v.into();
6122            self
6123        }
6124    }
6125
6126    #[doc(hidden)]
6127    impl crate::RequestBuilder for GetDbSystem {
6128        fn request_options(&mut self) -> &mut crate::RequestOptions {
6129            &mut self.0.options
6130        }
6131    }
6132
6133    /// The request builder for [OracleDatabase::create_db_system][crate::client::OracleDatabase::create_db_system] calls.
6134    ///
6135    /// # Example
6136    /// ```
6137    /// # use google_cloud_oracledatabase_v1::builder::oracle_database::CreateDbSystem;
6138    /// # async fn sample() -> google_cloud_oracledatabase_v1::Result<()> {
6139    /// use google_cloud_lro::Poller;
6140    ///
6141    /// let builder = prepare_request_builder();
6142    /// let response = builder.poller().until_done().await?;
6143    /// # Ok(()) }
6144    ///
6145    /// fn prepare_request_builder() -> CreateDbSystem {
6146    ///   # panic!();
6147    ///   // ... details omitted ...
6148    /// }
6149    /// ```
6150    #[derive(Clone, Debug)]
6151    pub struct CreateDbSystem(RequestBuilder<crate::model::CreateDbSystemRequest>);
6152
6153    impl CreateDbSystem {
6154        pub(crate) fn new(
6155            stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
6156        ) -> Self {
6157            Self(RequestBuilder::new(stub))
6158        }
6159
6160        /// Sets the full request, replacing any prior values.
6161        pub fn with_request<V: Into<crate::model::CreateDbSystemRequest>>(mut self, v: V) -> Self {
6162            self.0.request = v.into();
6163            self
6164        }
6165
6166        /// Sets all the options, replacing any prior values.
6167        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6168            self.0.options = v.into();
6169            self
6170        }
6171
6172        /// Sends the request.
6173        ///
6174        /// # Long running operations
6175        ///
6176        /// This starts, but does not poll, a longrunning operation. More information
6177        /// on [create_db_system][crate::client::OracleDatabase::create_db_system].
6178        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
6179            (*self.0.stub)
6180                .create_db_system(self.0.request, self.0.options)
6181                .await
6182                .map(crate::Response::into_body)
6183        }
6184
6185        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_db_system`.
6186        pub fn poller(
6187            self,
6188        ) -> impl google_cloud_lro::Poller<crate::model::DbSystem, crate::model::OperationMetadata>
6189        {
6190            type Operation = google_cloud_lro::internal::Operation<
6191                crate::model::DbSystem,
6192                crate::model::OperationMetadata,
6193            >;
6194            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6195            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6196
6197            let stub = self.0.stub.clone();
6198            let mut options = self.0.options.clone();
6199            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
6200            let query = move |name| {
6201                let stub = stub.clone();
6202                let options = options.clone();
6203                async {
6204                    let op = GetOperation::new(stub)
6205                        .set_name(name)
6206                        .with_options(options)
6207                        .send()
6208                        .await?;
6209                    Ok(Operation::new(op))
6210                }
6211            };
6212
6213            let start = move || async {
6214                let op = self.send().await?;
6215                Ok(Operation::new(op))
6216            };
6217
6218            google_cloud_lro::internal::new_poller(
6219                polling_error_policy,
6220                polling_backoff_policy,
6221                start,
6222                query,
6223            )
6224        }
6225
6226        /// Sets the value of [parent][crate::model::CreateDbSystemRequest::parent].
6227        ///
6228        /// This is a **required** field for requests.
6229        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
6230            self.0.request.parent = v.into();
6231            self
6232        }
6233
6234        /// Sets the value of [db_system_id][crate::model::CreateDbSystemRequest::db_system_id].
6235        ///
6236        /// This is a **required** field for requests.
6237        pub fn set_db_system_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
6238            self.0.request.db_system_id = v.into();
6239            self
6240        }
6241
6242        /// Sets the value of [db_system][crate::model::CreateDbSystemRequest::db_system].
6243        ///
6244        /// This is a **required** field for requests.
6245        pub fn set_db_system<T>(mut self, v: T) -> Self
6246        where
6247            T: std::convert::Into<crate::model::DbSystem>,
6248        {
6249            self.0.request.db_system = std::option::Option::Some(v.into());
6250            self
6251        }
6252
6253        /// Sets or clears the value of [db_system][crate::model::CreateDbSystemRequest::db_system].
6254        ///
6255        /// This is a **required** field for requests.
6256        pub fn set_or_clear_db_system<T>(mut self, v: std::option::Option<T>) -> Self
6257        where
6258            T: std::convert::Into<crate::model::DbSystem>,
6259        {
6260            self.0.request.db_system = v.map(|x| x.into());
6261            self
6262        }
6263
6264        /// Sets the value of [request_id][crate::model::CreateDbSystemRequest::request_id].
6265        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
6266            self.0.request.request_id = v.into();
6267            self
6268        }
6269    }
6270
6271    #[doc(hidden)]
6272    impl crate::RequestBuilder for CreateDbSystem {
6273        fn request_options(&mut self) -> &mut crate::RequestOptions {
6274            &mut self.0.options
6275        }
6276    }
6277
6278    /// The request builder for [OracleDatabase::delete_db_system][crate::client::OracleDatabase::delete_db_system] calls.
6279    ///
6280    /// # Example
6281    /// ```
6282    /// # use google_cloud_oracledatabase_v1::builder::oracle_database::DeleteDbSystem;
6283    /// # async fn sample() -> google_cloud_oracledatabase_v1::Result<()> {
6284    /// use google_cloud_lro::Poller;
6285    ///
6286    /// let builder = prepare_request_builder();
6287    /// let response = builder.poller().until_done().await?;
6288    /// # Ok(()) }
6289    ///
6290    /// fn prepare_request_builder() -> DeleteDbSystem {
6291    ///   # panic!();
6292    ///   // ... details omitted ...
6293    /// }
6294    /// ```
6295    #[derive(Clone, Debug)]
6296    pub struct DeleteDbSystem(RequestBuilder<crate::model::DeleteDbSystemRequest>);
6297
6298    impl DeleteDbSystem {
6299        pub(crate) fn new(
6300            stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
6301        ) -> Self {
6302            Self(RequestBuilder::new(stub))
6303        }
6304
6305        /// Sets the full request, replacing any prior values.
6306        pub fn with_request<V: Into<crate::model::DeleteDbSystemRequest>>(mut self, v: V) -> Self {
6307            self.0.request = v.into();
6308            self
6309        }
6310
6311        /// Sets all the options, replacing any prior values.
6312        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6313            self.0.options = v.into();
6314            self
6315        }
6316
6317        /// Sends the request.
6318        ///
6319        /// # Long running operations
6320        ///
6321        /// This starts, but does not poll, a longrunning operation. More information
6322        /// on [delete_db_system][crate::client::OracleDatabase::delete_db_system].
6323        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
6324            (*self.0.stub)
6325                .delete_db_system(self.0.request, self.0.options)
6326                .await
6327                .map(crate::Response::into_body)
6328        }
6329
6330        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_db_system`.
6331        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
6332            type Operation =
6333                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
6334            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6335            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6336
6337            let stub = self.0.stub.clone();
6338            let mut options = self.0.options.clone();
6339            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
6340            let query = move |name| {
6341                let stub = stub.clone();
6342                let options = options.clone();
6343                async {
6344                    let op = GetOperation::new(stub)
6345                        .set_name(name)
6346                        .with_options(options)
6347                        .send()
6348                        .await?;
6349                    Ok(Operation::new(op))
6350                }
6351            };
6352
6353            let start = move || async {
6354                let op = self.send().await?;
6355                Ok(Operation::new(op))
6356            };
6357
6358            google_cloud_lro::internal::new_unit_response_poller(
6359                polling_error_policy,
6360                polling_backoff_policy,
6361                start,
6362                query,
6363            )
6364        }
6365
6366        /// Sets the value of [name][crate::model::DeleteDbSystemRequest::name].
6367        ///
6368        /// This is a **required** field for requests.
6369        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6370            self.0.request.name = v.into();
6371            self
6372        }
6373
6374        /// Sets the value of [request_id][crate::model::DeleteDbSystemRequest::request_id].
6375        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
6376            self.0.request.request_id = v.into();
6377            self
6378        }
6379    }
6380
6381    #[doc(hidden)]
6382    impl crate::RequestBuilder for DeleteDbSystem {
6383        fn request_options(&mut self) -> &mut crate::RequestOptions {
6384            &mut self.0.options
6385        }
6386    }
6387
6388    /// The request builder for [OracleDatabase::list_db_versions][crate::client::OracleDatabase::list_db_versions] calls.
6389    ///
6390    /// # Example
6391    /// ```
6392    /// # use google_cloud_oracledatabase_v1::builder::oracle_database::ListDbVersions;
6393    /// # async fn sample() -> google_cloud_oracledatabase_v1::Result<()> {
6394    /// use google_cloud_gax::paginator::ItemPaginator;
6395    ///
6396    /// let builder = prepare_request_builder();
6397    /// let mut items = builder.by_item();
6398    /// while let Some(result) = items.next().await {
6399    ///   let item = result?;
6400    /// }
6401    /// # Ok(()) }
6402    ///
6403    /// fn prepare_request_builder() -> ListDbVersions {
6404    ///   # panic!();
6405    ///   // ... details omitted ...
6406    /// }
6407    /// ```
6408    #[derive(Clone, Debug)]
6409    pub struct ListDbVersions(RequestBuilder<crate::model::ListDbVersionsRequest>);
6410
6411    impl ListDbVersions {
6412        pub(crate) fn new(
6413            stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
6414        ) -> Self {
6415            Self(RequestBuilder::new(stub))
6416        }
6417
6418        /// Sets the full request, replacing any prior values.
6419        pub fn with_request<V: Into<crate::model::ListDbVersionsRequest>>(mut self, v: V) -> Self {
6420            self.0.request = v.into();
6421            self
6422        }
6423
6424        /// Sets all the options, replacing any prior values.
6425        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6426            self.0.options = v.into();
6427            self
6428        }
6429
6430        /// Sends the request.
6431        pub async fn send(self) -> Result<crate::model::ListDbVersionsResponse> {
6432            (*self.0.stub)
6433                .list_db_versions(self.0.request, self.0.options)
6434                .await
6435                .map(crate::Response::into_body)
6436        }
6437
6438        /// Streams each page in the collection.
6439        pub fn by_page(
6440            self,
6441        ) -> impl google_cloud_gax::paginator::Paginator<
6442            crate::model::ListDbVersionsResponse,
6443            crate::Error,
6444        > {
6445            use std::clone::Clone;
6446            let token = self.0.request.page_token.clone();
6447            let execute = move |token: String| {
6448                let mut builder = self.clone();
6449                builder.0.request = builder.0.request.set_page_token(token);
6450                builder.send()
6451            };
6452            google_cloud_gax::paginator::internal::new_paginator(token, execute)
6453        }
6454
6455        /// Streams each item in the collection.
6456        pub fn by_item(
6457            self,
6458        ) -> impl google_cloud_gax::paginator::ItemPaginator<
6459            crate::model::ListDbVersionsResponse,
6460            crate::Error,
6461        > {
6462            use google_cloud_gax::paginator::Paginator;
6463            self.by_page().items()
6464        }
6465
6466        /// Sets the value of [parent][crate::model::ListDbVersionsRequest::parent].
6467        ///
6468        /// This is a **required** field for requests.
6469        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
6470            self.0.request.parent = v.into();
6471            self
6472        }
6473
6474        /// Sets the value of [page_size][crate::model::ListDbVersionsRequest::page_size].
6475        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
6476            self.0.request.page_size = v.into();
6477            self
6478        }
6479
6480        /// Sets the value of [page_token][crate::model::ListDbVersionsRequest::page_token].
6481        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
6482            self.0.request.page_token = v.into();
6483            self
6484        }
6485
6486        /// Sets the value of [filter][crate::model::ListDbVersionsRequest::filter].
6487        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
6488            self.0.request.filter = v.into();
6489            self
6490        }
6491    }
6492
6493    #[doc(hidden)]
6494    impl crate::RequestBuilder for ListDbVersions {
6495        fn request_options(&mut self) -> &mut crate::RequestOptions {
6496            &mut self.0.options
6497        }
6498    }
6499
6500    /// The request builder for [OracleDatabase::list_database_character_sets][crate::client::OracleDatabase::list_database_character_sets] calls.
6501    ///
6502    /// # Example
6503    /// ```
6504    /// # use google_cloud_oracledatabase_v1::builder::oracle_database::ListDatabaseCharacterSets;
6505    /// # async fn sample() -> google_cloud_oracledatabase_v1::Result<()> {
6506    /// use google_cloud_gax::paginator::ItemPaginator;
6507    ///
6508    /// let builder = prepare_request_builder();
6509    /// let mut items = builder.by_item();
6510    /// while let Some(result) = items.next().await {
6511    ///   let item = result?;
6512    /// }
6513    /// # Ok(()) }
6514    ///
6515    /// fn prepare_request_builder() -> ListDatabaseCharacterSets {
6516    ///   # panic!();
6517    ///   // ... details omitted ...
6518    /// }
6519    /// ```
6520    #[derive(Clone, Debug)]
6521    pub struct ListDatabaseCharacterSets(
6522        RequestBuilder<crate::model::ListDatabaseCharacterSetsRequest>,
6523    );
6524
6525    impl ListDatabaseCharacterSets {
6526        pub(crate) fn new(
6527            stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
6528        ) -> Self {
6529            Self(RequestBuilder::new(stub))
6530        }
6531
6532        /// Sets the full request, replacing any prior values.
6533        pub fn with_request<V: Into<crate::model::ListDatabaseCharacterSetsRequest>>(
6534            mut self,
6535            v: V,
6536        ) -> Self {
6537            self.0.request = v.into();
6538            self
6539        }
6540
6541        /// Sets all the options, replacing any prior values.
6542        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6543            self.0.options = v.into();
6544            self
6545        }
6546
6547        /// Sends the request.
6548        pub async fn send(self) -> Result<crate::model::ListDatabaseCharacterSetsResponse> {
6549            (*self.0.stub)
6550                .list_database_character_sets(self.0.request, self.0.options)
6551                .await
6552                .map(crate::Response::into_body)
6553        }
6554
6555        /// Streams each page in the collection.
6556        pub fn by_page(
6557            self,
6558        ) -> impl google_cloud_gax::paginator::Paginator<
6559            crate::model::ListDatabaseCharacterSetsResponse,
6560            crate::Error,
6561        > {
6562            use std::clone::Clone;
6563            let token = self.0.request.page_token.clone();
6564            let execute = move |token: String| {
6565                let mut builder = self.clone();
6566                builder.0.request = builder.0.request.set_page_token(token);
6567                builder.send()
6568            };
6569            google_cloud_gax::paginator::internal::new_paginator(token, execute)
6570        }
6571
6572        /// Streams each item in the collection.
6573        pub fn by_item(
6574            self,
6575        ) -> impl google_cloud_gax::paginator::ItemPaginator<
6576            crate::model::ListDatabaseCharacterSetsResponse,
6577            crate::Error,
6578        > {
6579            use google_cloud_gax::paginator::Paginator;
6580            self.by_page().items()
6581        }
6582
6583        /// Sets the value of [parent][crate::model::ListDatabaseCharacterSetsRequest::parent].
6584        ///
6585        /// This is a **required** field for requests.
6586        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
6587            self.0.request.parent = v.into();
6588            self
6589        }
6590
6591        /// Sets the value of [page_size][crate::model::ListDatabaseCharacterSetsRequest::page_size].
6592        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
6593            self.0.request.page_size = v.into();
6594            self
6595        }
6596
6597        /// Sets the value of [page_token][crate::model::ListDatabaseCharacterSetsRequest::page_token].
6598        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
6599            self.0.request.page_token = v.into();
6600            self
6601        }
6602
6603        /// Sets the value of [filter][crate::model::ListDatabaseCharacterSetsRequest::filter].
6604        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
6605            self.0.request.filter = v.into();
6606            self
6607        }
6608    }
6609
6610    #[doc(hidden)]
6611    impl crate::RequestBuilder for ListDatabaseCharacterSets {
6612        fn request_options(&mut self) -> &mut crate::RequestOptions {
6613            &mut self.0.options
6614        }
6615    }
6616
6617    /// The request builder for [OracleDatabase::list_locations][crate::client::OracleDatabase::list_locations] calls.
6618    ///
6619    /// # Example
6620    /// ```
6621    /// # use google_cloud_oracledatabase_v1::builder::oracle_database::ListLocations;
6622    /// # async fn sample() -> google_cloud_oracledatabase_v1::Result<()> {
6623    /// use google_cloud_gax::paginator::ItemPaginator;
6624    ///
6625    /// let builder = prepare_request_builder();
6626    /// let mut items = builder.by_item();
6627    /// while let Some(result) = items.next().await {
6628    ///   let item = result?;
6629    /// }
6630    /// # Ok(()) }
6631    ///
6632    /// fn prepare_request_builder() -> ListLocations {
6633    ///   # panic!();
6634    ///   // ... details omitted ...
6635    /// }
6636    /// ```
6637    #[derive(Clone, Debug)]
6638    pub struct ListLocations(RequestBuilder<google_cloud_location::model::ListLocationsRequest>);
6639
6640    impl ListLocations {
6641        pub(crate) fn new(
6642            stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
6643        ) -> Self {
6644            Self(RequestBuilder::new(stub))
6645        }
6646
6647        /// Sets the full request, replacing any prior values.
6648        pub fn with_request<V: Into<google_cloud_location::model::ListLocationsRequest>>(
6649            mut self,
6650            v: V,
6651        ) -> Self {
6652            self.0.request = v.into();
6653            self
6654        }
6655
6656        /// Sets all the options, replacing any prior values.
6657        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6658            self.0.options = v.into();
6659            self
6660        }
6661
6662        /// Sends the request.
6663        pub async fn send(self) -> Result<google_cloud_location::model::ListLocationsResponse> {
6664            (*self.0.stub)
6665                .list_locations(self.0.request, self.0.options)
6666                .await
6667                .map(crate::Response::into_body)
6668        }
6669
6670        /// Streams each page in the collection.
6671        pub fn by_page(
6672            self,
6673        ) -> impl google_cloud_gax::paginator::Paginator<
6674            google_cloud_location::model::ListLocationsResponse,
6675            crate::Error,
6676        > {
6677            use std::clone::Clone;
6678            let token = self.0.request.page_token.clone();
6679            let execute = move |token: String| {
6680                let mut builder = self.clone();
6681                builder.0.request = builder.0.request.set_page_token(token);
6682                builder.send()
6683            };
6684            google_cloud_gax::paginator::internal::new_paginator(token, execute)
6685        }
6686
6687        /// Streams each item in the collection.
6688        pub fn by_item(
6689            self,
6690        ) -> impl google_cloud_gax::paginator::ItemPaginator<
6691            google_cloud_location::model::ListLocationsResponse,
6692            crate::Error,
6693        > {
6694            use google_cloud_gax::paginator::Paginator;
6695            self.by_page().items()
6696        }
6697
6698        /// Sets the value of [name][google_cloud_location::model::ListLocationsRequest::name].
6699        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6700            self.0.request.name = v.into();
6701            self
6702        }
6703
6704        /// Sets the value of [filter][google_cloud_location::model::ListLocationsRequest::filter].
6705        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
6706            self.0.request.filter = v.into();
6707            self
6708        }
6709
6710        /// Sets the value of [page_size][google_cloud_location::model::ListLocationsRequest::page_size].
6711        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
6712            self.0.request.page_size = v.into();
6713            self
6714        }
6715
6716        /// Sets the value of [page_token][google_cloud_location::model::ListLocationsRequest::page_token].
6717        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
6718            self.0.request.page_token = v.into();
6719            self
6720        }
6721    }
6722
6723    #[doc(hidden)]
6724    impl crate::RequestBuilder for ListLocations {
6725        fn request_options(&mut self) -> &mut crate::RequestOptions {
6726            &mut self.0.options
6727        }
6728    }
6729
6730    /// The request builder for [OracleDatabase::get_location][crate::client::OracleDatabase::get_location] calls.
6731    ///
6732    /// # Example
6733    /// ```
6734    /// # use google_cloud_oracledatabase_v1::builder::oracle_database::GetLocation;
6735    /// # async fn sample() -> google_cloud_oracledatabase_v1::Result<()> {
6736    ///
6737    /// let builder = prepare_request_builder();
6738    /// let response = builder.send().await?;
6739    /// # Ok(()) }
6740    ///
6741    /// fn prepare_request_builder() -> GetLocation {
6742    ///   # panic!();
6743    ///   // ... details omitted ...
6744    /// }
6745    /// ```
6746    #[derive(Clone, Debug)]
6747    pub struct GetLocation(RequestBuilder<google_cloud_location::model::GetLocationRequest>);
6748
6749    impl GetLocation {
6750        pub(crate) fn new(
6751            stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
6752        ) -> Self {
6753            Self(RequestBuilder::new(stub))
6754        }
6755
6756        /// Sets the full request, replacing any prior values.
6757        pub fn with_request<V: Into<google_cloud_location::model::GetLocationRequest>>(
6758            mut self,
6759            v: V,
6760        ) -> Self {
6761            self.0.request = v.into();
6762            self
6763        }
6764
6765        /// Sets all the options, replacing any prior values.
6766        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6767            self.0.options = v.into();
6768            self
6769        }
6770
6771        /// Sends the request.
6772        pub async fn send(self) -> Result<google_cloud_location::model::Location> {
6773            (*self.0.stub)
6774                .get_location(self.0.request, self.0.options)
6775                .await
6776                .map(crate::Response::into_body)
6777        }
6778
6779        /// Sets the value of [name][google_cloud_location::model::GetLocationRequest::name].
6780        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6781            self.0.request.name = v.into();
6782            self
6783        }
6784    }
6785
6786    #[doc(hidden)]
6787    impl crate::RequestBuilder for GetLocation {
6788        fn request_options(&mut self) -> &mut crate::RequestOptions {
6789            &mut self.0.options
6790        }
6791    }
6792
6793    /// The request builder for [OracleDatabase::list_operations][crate::client::OracleDatabase::list_operations] calls.
6794    ///
6795    /// # Example
6796    /// ```
6797    /// # use google_cloud_oracledatabase_v1::builder::oracle_database::ListOperations;
6798    /// # async fn sample() -> google_cloud_oracledatabase_v1::Result<()> {
6799    /// use google_cloud_gax::paginator::ItemPaginator;
6800    ///
6801    /// let builder = prepare_request_builder();
6802    /// let mut items = builder.by_item();
6803    /// while let Some(result) = items.next().await {
6804    ///   let item = result?;
6805    /// }
6806    /// # Ok(()) }
6807    ///
6808    /// fn prepare_request_builder() -> ListOperations {
6809    ///   # panic!();
6810    ///   // ... details omitted ...
6811    /// }
6812    /// ```
6813    #[derive(Clone, Debug)]
6814    pub struct ListOperations(
6815        RequestBuilder<google_cloud_longrunning::model::ListOperationsRequest>,
6816    );
6817
6818    impl ListOperations {
6819        pub(crate) fn new(
6820            stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
6821        ) -> Self {
6822            Self(RequestBuilder::new(stub))
6823        }
6824
6825        /// Sets the full request, replacing any prior values.
6826        pub fn with_request<V: Into<google_cloud_longrunning::model::ListOperationsRequest>>(
6827            mut self,
6828            v: V,
6829        ) -> Self {
6830            self.0.request = v.into();
6831            self
6832        }
6833
6834        /// Sets all the options, replacing any prior values.
6835        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6836            self.0.options = v.into();
6837            self
6838        }
6839
6840        /// Sends the request.
6841        pub async fn send(self) -> Result<google_cloud_longrunning::model::ListOperationsResponse> {
6842            (*self.0.stub)
6843                .list_operations(self.0.request, self.0.options)
6844                .await
6845                .map(crate::Response::into_body)
6846        }
6847
6848        /// Streams each page in the collection.
6849        pub fn by_page(
6850            self,
6851        ) -> impl google_cloud_gax::paginator::Paginator<
6852            google_cloud_longrunning::model::ListOperationsResponse,
6853            crate::Error,
6854        > {
6855            use std::clone::Clone;
6856            let token = self.0.request.page_token.clone();
6857            let execute = move |token: String| {
6858                let mut builder = self.clone();
6859                builder.0.request = builder.0.request.set_page_token(token);
6860                builder.send()
6861            };
6862            google_cloud_gax::paginator::internal::new_paginator(token, execute)
6863        }
6864
6865        /// Streams each item in the collection.
6866        pub fn by_item(
6867            self,
6868        ) -> impl google_cloud_gax::paginator::ItemPaginator<
6869            google_cloud_longrunning::model::ListOperationsResponse,
6870            crate::Error,
6871        > {
6872            use google_cloud_gax::paginator::Paginator;
6873            self.by_page().items()
6874        }
6875
6876        /// Sets the value of [name][google_cloud_longrunning::model::ListOperationsRequest::name].
6877        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6878            self.0.request.name = v.into();
6879            self
6880        }
6881
6882        /// Sets the value of [filter][google_cloud_longrunning::model::ListOperationsRequest::filter].
6883        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
6884            self.0.request.filter = v.into();
6885            self
6886        }
6887
6888        /// Sets the value of [page_size][google_cloud_longrunning::model::ListOperationsRequest::page_size].
6889        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
6890            self.0.request.page_size = v.into();
6891            self
6892        }
6893
6894        /// Sets the value of [page_token][google_cloud_longrunning::model::ListOperationsRequest::page_token].
6895        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
6896            self.0.request.page_token = v.into();
6897            self
6898        }
6899
6900        /// Sets the value of [return_partial_success][google_cloud_longrunning::model::ListOperationsRequest::return_partial_success].
6901        pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
6902            self.0.request.return_partial_success = v.into();
6903            self
6904        }
6905    }
6906
6907    #[doc(hidden)]
6908    impl crate::RequestBuilder for ListOperations {
6909        fn request_options(&mut self) -> &mut crate::RequestOptions {
6910            &mut self.0.options
6911        }
6912    }
6913
6914    /// The request builder for [OracleDatabase::get_operation][crate::client::OracleDatabase::get_operation] calls.
6915    ///
6916    /// # Example
6917    /// ```
6918    /// # use google_cloud_oracledatabase_v1::builder::oracle_database::GetOperation;
6919    /// # async fn sample() -> google_cloud_oracledatabase_v1::Result<()> {
6920    ///
6921    /// let builder = prepare_request_builder();
6922    /// let response = builder.send().await?;
6923    /// # Ok(()) }
6924    ///
6925    /// fn prepare_request_builder() -> GetOperation {
6926    ///   # panic!();
6927    ///   // ... details omitted ...
6928    /// }
6929    /// ```
6930    #[derive(Clone, Debug)]
6931    pub struct GetOperation(RequestBuilder<google_cloud_longrunning::model::GetOperationRequest>);
6932
6933    impl GetOperation {
6934        pub(crate) fn new(
6935            stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
6936        ) -> Self {
6937            Self(RequestBuilder::new(stub))
6938        }
6939
6940        /// Sets the full request, replacing any prior values.
6941        pub fn with_request<V: Into<google_cloud_longrunning::model::GetOperationRequest>>(
6942            mut self,
6943            v: V,
6944        ) -> Self {
6945            self.0.request = v.into();
6946            self
6947        }
6948
6949        /// Sets all the options, replacing any prior values.
6950        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6951            self.0.options = v.into();
6952            self
6953        }
6954
6955        /// Sends the request.
6956        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
6957            (*self.0.stub)
6958                .get_operation(self.0.request, self.0.options)
6959                .await
6960                .map(crate::Response::into_body)
6961        }
6962
6963        /// Sets the value of [name][google_cloud_longrunning::model::GetOperationRequest::name].
6964        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6965            self.0.request.name = v.into();
6966            self
6967        }
6968    }
6969
6970    #[doc(hidden)]
6971    impl crate::RequestBuilder for GetOperation {
6972        fn request_options(&mut self) -> &mut crate::RequestOptions {
6973            &mut self.0.options
6974        }
6975    }
6976
6977    /// The request builder for [OracleDatabase::delete_operation][crate::client::OracleDatabase::delete_operation] calls.
6978    ///
6979    /// # Example
6980    /// ```
6981    /// # use google_cloud_oracledatabase_v1::builder::oracle_database::DeleteOperation;
6982    /// # async fn sample() -> google_cloud_oracledatabase_v1::Result<()> {
6983    ///
6984    /// let builder = prepare_request_builder();
6985    /// let response = builder.send().await?;
6986    /// # Ok(()) }
6987    ///
6988    /// fn prepare_request_builder() -> DeleteOperation {
6989    ///   # panic!();
6990    ///   // ... details omitted ...
6991    /// }
6992    /// ```
6993    #[derive(Clone, Debug)]
6994    pub struct DeleteOperation(
6995        RequestBuilder<google_cloud_longrunning::model::DeleteOperationRequest>,
6996    );
6997
6998    impl DeleteOperation {
6999        pub(crate) fn new(
7000            stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
7001        ) -> Self {
7002            Self(RequestBuilder::new(stub))
7003        }
7004
7005        /// Sets the full request, replacing any prior values.
7006        pub fn with_request<V: Into<google_cloud_longrunning::model::DeleteOperationRequest>>(
7007            mut self,
7008            v: V,
7009        ) -> Self {
7010            self.0.request = v.into();
7011            self
7012        }
7013
7014        /// Sets all the options, replacing any prior values.
7015        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7016            self.0.options = v.into();
7017            self
7018        }
7019
7020        /// Sends the request.
7021        pub async fn send(self) -> Result<()> {
7022            (*self.0.stub)
7023                .delete_operation(self.0.request, self.0.options)
7024                .await
7025                .map(crate::Response::into_body)
7026        }
7027
7028        /// Sets the value of [name][google_cloud_longrunning::model::DeleteOperationRequest::name].
7029        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7030            self.0.request.name = v.into();
7031            self
7032        }
7033    }
7034
7035    #[doc(hidden)]
7036    impl crate::RequestBuilder for DeleteOperation {
7037        fn request_options(&mut self) -> &mut crate::RequestOptions {
7038            &mut self.0.options
7039        }
7040    }
7041
7042    /// The request builder for [OracleDatabase::cancel_operation][crate::client::OracleDatabase::cancel_operation] calls.
7043    ///
7044    /// # Example
7045    /// ```
7046    /// # use google_cloud_oracledatabase_v1::builder::oracle_database::CancelOperation;
7047    /// # async fn sample() -> google_cloud_oracledatabase_v1::Result<()> {
7048    ///
7049    /// let builder = prepare_request_builder();
7050    /// let response = builder.send().await?;
7051    /// # Ok(()) }
7052    ///
7053    /// fn prepare_request_builder() -> CancelOperation {
7054    ///   # panic!();
7055    ///   // ... details omitted ...
7056    /// }
7057    /// ```
7058    #[derive(Clone, Debug)]
7059    pub struct CancelOperation(
7060        RequestBuilder<google_cloud_longrunning::model::CancelOperationRequest>,
7061    );
7062
7063    impl CancelOperation {
7064        pub(crate) fn new(
7065            stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
7066        ) -> Self {
7067            Self(RequestBuilder::new(stub))
7068        }
7069
7070        /// Sets the full request, replacing any prior values.
7071        pub fn with_request<V: Into<google_cloud_longrunning::model::CancelOperationRequest>>(
7072            mut self,
7073            v: V,
7074        ) -> Self {
7075            self.0.request = v.into();
7076            self
7077        }
7078
7079        /// Sets all the options, replacing any prior values.
7080        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7081            self.0.options = v.into();
7082            self
7083        }
7084
7085        /// Sends the request.
7086        pub async fn send(self) -> Result<()> {
7087            (*self.0.stub)
7088                .cancel_operation(self.0.request, self.0.options)
7089                .await
7090                .map(crate::Response::into_body)
7091        }
7092
7093        /// Sets the value of [name][google_cloud_longrunning::model::CancelOperationRequest::name].
7094        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7095            self.0.request.name = v.into();
7096            self
7097        }
7098    }
7099
7100    #[doc(hidden)]
7101    impl crate::RequestBuilder for CancelOperation {
7102        fn request_options(&mut self) -> &mut crate::RequestOptions {
7103            &mut self.0.options
7104        }
7105    }
7106}