1pub mod oracle_database {
18 use crate::Result;
19
20 pub type ClientBuilder =
34 gax::client_builder::ClientBuilder<client::Factory, gaxi::options::Credentials>;
35
36 pub(crate) mod client {
37 use super::super::super::client::OracleDatabase;
38 pub struct Factory;
39 impl gax::client_builder::internal::ClientFactory for Factory {
40 type Client = OracleDatabase;
41 type Credentials = gaxi::options::Credentials;
42 async fn build(
43 self,
44 config: gaxi::options::ClientConfig,
45 ) -> gax::client_builder::Result<Self::Client> {
46 Self::Client::new(config).await
47 }
48 }
49 }
50
51 #[derive(Clone, Debug)]
53 pub(crate) struct RequestBuilder<R: std::default::Default> {
54 stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
55 request: R,
56 options: gax::options::RequestOptions,
57 }
58
59 impl<R> RequestBuilder<R>
60 where
61 R: std::default::Default,
62 {
63 pub(crate) fn new(
64 stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
65 ) -> Self {
66 Self {
67 stub,
68 request: R::default(),
69 options: gax::options::RequestOptions::default(),
70 }
71 }
72 }
73
74 #[derive(Clone, Debug)]
96 pub struct ListCloudExadataInfrastructures(
97 RequestBuilder<crate::model::ListCloudExadataInfrastructuresRequest>,
98 );
99
100 impl ListCloudExadataInfrastructures {
101 pub(crate) fn new(
102 stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
103 ) -> Self {
104 Self(RequestBuilder::new(stub))
105 }
106
107 pub fn with_request<V: Into<crate::model::ListCloudExadataInfrastructuresRequest>>(
109 mut self,
110 v: V,
111 ) -> Self {
112 self.0.request = v.into();
113 self
114 }
115
116 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
118 self.0.options = v.into();
119 self
120 }
121
122 pub async fn send(self) -> Result<crate::model::ListCloudExadataInfrastructuresResponse> {
124 (*self.0.stub)
125 .list_cloud_exadata_infrastructures(self.0.request, self.0.options)
126 .await
127 .map(gax::response::Response::into_body)
128 }
129
130 pub fn by_page(
132 self,
133 ) -> impl gax::paginator::Paginator<
134 crate::model::ListCloudExadataInfrastructuresResponse,
135 gax::error::Error,
136 > {
137 use std::clone::Clone;
138 let token = self.0.request.page_token.clone();
139 let execute = move |token: String| {
140 let mut builder = self.clone();
141 builder.0.request = builder.0.request.set_page_token(token);
142 builder.send()
143 };
144 gax::paginator::internal::new_paginator(token, execute)
145 }
146
147 pub fn by_item(
149 self,
150 ) -> impl gax::paginator::ItemPaginator<
151 crate::model::ListCloudExadataInfrastructuresResponse,
152 gax::error::Error,
153 > {
154 use gax::paginator::Paginator;
155 self.by_page().items()
156 }
157
158 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
162 self.0.request.parent = v.into();
163 self
164 }
165
166 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
168 self.0.request.page_size = v.into();
169 self
170 }
171
172 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
174 self.0.request.page_token = v.into();
175 self
176 }
177 }
178
179 #[doc(hidden)]
180 impl gax::options::internal::RequestBuilder for ListCloudExadataInfrastructures {
181 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
182 &mut self.0.options
183 }
184 }
185
186 #[derive(Clone, Debug)]
204 pub struct GetCloudExadataInfrastructure(
205 RequestBuilder<crate::model::GetCloudExadataInfrastructureRequest>,
206 );
207
208 impl GetCloudExadataInfrastructure {
209 pub(crate) fn new(
210 stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
211 ) -> Self {
212 Self(RequestBuilder::new(stub))
213 }
214
215 pub fn with_request<V: Into<crate::model::GetCloudExadataInfrastructureRequest>>(
217 mut self,
218 v: V,
219 ) -> Self {
220 self.0.request = v.into();
221 self
222 }
223
224 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
226 self.0.options = v.into();
227 self
228 }
229
230 pub async fn send(self) -> Result<crate::model::CloudExadataInfrastructure> {
232 (*self.0.stub)
233 .get_cloud_exadata_infrastructure(self.0.request, self.0.options)
234 .await
235 .map(gax::response::Response::into_body)
236 }
237
238 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
242 self.0.request.name = v.into();
243 self
244 }
245 }
246
247 #[doc(hidden)]
248 impl gax::options::internal::RequestBuilder for GetCloudExadataInfrastructure {
249 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
250 &mut self.0.options
251 }
252 }
253
254 #[derive(Clone, Debug)]
273 pub struct CreateCloudExadataInfrastructure(
274 RequestBuilder<crate::model::CreateCloudExadataInfrastructureRequest>,
275 );
276
277 impl CreateCloudExadataInfrastructure {
278 pub(crate) fn new(
279 stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
280 ) -> Self {
281 Self(RequestBuilder::new(stub))
282 }
283
284 pub fn with_request<V: Into<crate::model::CreateCloudExadataInfrastructureRequest>>(
286 mut self,
287 v: V,
288 ) -> Self {
289 self.0.request = v.into();
290 self
291 }
292
293 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
295 self.0.options = v.into();
296 self
297 }
298
299 pub async fn send(self) -> Result<longrunning::model::Operation> {
306 (*self.0.stub)
307 .create_cloud_exadata_infrastructure(self.0.request, self.0.options)
308 .await
309 .map(gax::response::Response::into_body)
310 }
311
312 pub fn poller(
314 self,
315 ) -> impl lro::Poller<crate::model::CloudExadataInfrastructure, crate::model::OperationMetadata>
316 {
317 type Operation = lro::internal::Operation<
318 crate::model::CloudExadataInfrastructure,
319 crate::model::OperationMetadata,
320 >;
321 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
322 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
323
324 let stub = self.0.stub.clone();
325 let mut options = self.0.options.clone();
326 options.set_retry_policy(gax::retry_policy::NeverRetry);
327 let query = move |name| {
328 let stub = stub.clone();
329 let options = options.clone();
330 async {
331 let op = GetOperation::new(stub)
332 .set_name(name)
333 .with_options(options)
334 .send()
335 .await?;
336 Ok(Operation::new(op))
337 }
338 };
339
340 let start = move || async {
341 let op = self.send().await?;
342 Ok(Operation::new(op))
343 };
344
345 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
346 }
347
348 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
352 self.0.request.parent = v.into();
353 self
354 }
355
356 pub fn set_cloud_exadata_infrastructure_id<T: Into<std::string::String>>(
360 mut self,
361 v: T,
362 ) -> Self {
363 self.0.request.cloud_exadata_infrastructure_id = v.into();
364 self
365 }
366
367 pub fn set_cloud_exadata_infrastructure<T>(mut self, v: T) -> Self
371 where
372 T: std::convert::Into<crate::model::CloudExadataInfrastructure>,
373 {
374 self.0.request.cloud_exadata_infrastructure = std::option::Option::Some(v.into());
375 self
376 }
377
378 pub fn set_or_clear_cloud_exadata_infrastructure<T>(
382 mut self,
383 v: std::option::Option<T>,
384 ) -> Self
385 where
386 T: std::convert::Into<crate::model::CloudExadataInfrastructure>,
387 {
388 self.0.request.cloud_exadata_infrastructure = v.map(|x| x.into());
389 self
390 }
391
392 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
394 self.0.request.request_id = v.into();
395 self
396 }
397 }
398
399 #[doc(hidden)]
400 impl gax::options::internal::RequestBuilder for CreateCloudExadataInfrastructure {
401 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
402 &mut self.0.options
403 }
404 }
405
406 #[derive(Clone, Debug)]
425 pub struct DeleteCloudExadataInfrastructure(
426 RequestBuilder<crate::model::DeleteCloudExadataInfrastructureRequest>,
427 );
428
429 impl DeleteCloudExadataInfrastructure {
430 pub(crate) fn new(
431 stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
432 ) -> Self {
433 Self(RequestBuilder::new(stub))
434 }
435
436 pub fn with_request<V: Into<crate::model::DeleteCloudExadataInfrastructureRequest>>(
438 mut self,
439 v: V,
440 ) -> Self {
441 self.0.request = v.into();
442 self
443 }
444
445 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
447 self.0.options = v.into();
448 self
449 }
450
451 pub async fn send(self) -> Result<longrunning::model::Operation> {
458 (*self.0.stub)
459 .delete_cloud_exadata_infrastructure(self.0.request, self.0.options)
460 .await
461 .map(gax::response::Response::into_body)
462 }
463
464 pub fn poller(self) -> impl lro::Poller<(), crate::model::OperationMetadata> {
466 type Operation = lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
467 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
468 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
469
470 let stub = self.0.stub.clone();
471 let mut options = self.0.options.clone();
472 options.set_retry_policy(gax::retry_policy::NeverRetry);
473 let query = move |name| {
474 let stub = stub.clone();
475 let options = options.clone();
476 async {
477 let op = GetOperation::new(stub)
478 .set_name(name)
479 .with_options(options)
480 .send()
481 .await?;
482 Ok(Operation::new(op))
483 }
484 };
485
486 let start = move || async {
487 let op = self.send().await?;
488 Ok(Operation::new(op))
489 };
490
491 lro::internal::new_unit_response_poller(
492 polling_error_policy,
493 polling_backoff_policy,
494 start,
495 query,
496 )
497 }
498
499 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
503 self.0.request.name = v.into();
504 self
505 }
506
507 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
509 self.0.request.request_id = v.into();
510 self
511 }
512
513 pub fn set_force<T: Into<bool>>(mut self, v: T) -> Self {
515 self.0.request.force = v.into();
516 self
517 }
518 }
519
520 #[doc(hidden)]
521 impl gax::options::internal::RequestBuilder for DeleteCloudExadataInfrastructure {
522 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
523 &mut self.0.options
524 }
525 }
526
527 #[derive(Clone, Debug)]
549 pub struct ListCloudVmClusters(RequestBuilder<crate::model::ListCloudVmClustersRequest>);
550
551 impl ListCloudVmClusters {
552 pub(crate) fn new(
553 stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
554 ) -> Self {
555 Self(RequestBuilder::new(stub))
556 }
557
558 pub fn with_request<V: Into<crate::model::ListCloudVmClustersRequest>>(
560 mut self,
561 v: V,
562 ) -> Self {
563 self.0.request = v.into();
564 self
565 }
566
567 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
569 self.0.options = v.into();
570 self
571 }
572
573 pub async fn send(self) -> Result<crate::model::ListCloudVmClustersResponse> {
575 (*self.0.stub)
576 .list_cloud_vm_clusters(self.0.request, self.0.options)
577 .await
578 .map(gax::response::Response::into_body)
579 }
580
581 pub fn by_page(
583 self,
584 ) -> impl gax::paginator::Paginator<crate::model::ListCloudVmClustersResponse, gax::error::Error>
585 {
586 use std::clone::Clone;
587 let token = self.0.request.page_token.clone();
588 let execute = move |token: String| {
589 let mut builder = self.clone();
590 builder.0.request = builder.0.request.set_page_token(token);
591 builder.send()
592 };
593 gax::paginator::internal::new_paginator(token, execute)
594 }
595
596 pub fn by_item(
598 self,
599 ) -> impl gax::paginator::ItemPaginator<
600 crate::model::ListCloudVmClustersResponse,
601 gax::error::Error,
602 > {
603 use gax::paginator::Paginator;
604 self.by_page().items()
605 }
606
607 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
611 self.0.request.parent = v.into();
612 self
613 }
614
615 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
617 self.0.request.page_size = v.into();
618 self
619 }
620
621 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
623 self.0.request.page_token = v.into();
624 self
625 }
626
627 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
629 self.0.request.filter = v.into();
630 self
631 }
632 }
633
634 #[doc(hidden)]
635 impl gax::options::internal::RequestBuilder for ListCloudVmClusters {
636 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
637 &mut self.0.options
638 }
639 }
640
641 #[derive(Clone, Debug)]
659 pub struct GetCloudVmCluster(RequestBuilder<crate::model::GetCloudVmClusterRequest>);
660
661 impl GetCloudVmCluster {
662 pub(crate) fn new(
663 stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
664 ) -> Self {
665 Self(RequestBuilder::new(stub))
666 }
667
668 pub fn with_request<V: Into<crate::model::GetCloudVmClusterRequest>>(
670 mut self,
671 v: V,
672 ) -> Self {
673 self.0.request = v.into();
674 self
675 }
676
677 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
679 self.0.options = v.into();
680 self
681 }
682
683 pub async fn send(self) -> Result<crate::model::CloudVmCluster> {
685 (*self.0.stub)
686 .get_cloud_vm_cluster(self.0.request, self.0.options)
687 .await
688 .map(gax::response::Response::into_body)
689 }
690
691 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
695 self.0.request.name = v.into();
696 self
697 }
698 }
699
700 #[doc(hidden)]
701 impl gax::options::internal::RequestBuilder for GetCloudVmCluster {
702 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
703 &mut self.0.options
704 }
705 }
706
707 #[derive(Clone, Debug)]
726 pub struct CreateCloudVmCluster(RequestBuilder<crate::model::CreateCloudVmClusterRequest>);
727
728 impl CreateCloudVmCluster {
729 pub(crate) fn new(
730 stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
731 ) -> Self {
732 Self(RequestBuilder::new(stub))
733 }
734
735 pub fn with_request<V: Into<crate::model::CreateCloudVmClusterRequest>>(
737 mut self,
738 v: V,
739 ) -> Self {
740 self.0.request = v.into();
741 self
742 }
743
744 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
746 self.0.options = v.into();
747 self
748 }
749
750 pub async fn send(self) -> Result<longrunning::model::Operation> {
757 (*self.0.stub)
758 .create_cloud_vm_cluster(self.0.request, self.0.options)
759 .await
760 .map(gax::response::Response::into_body)
761 }
762
763 pub fn poller(
765 self,
766 ) -> impl lro::Poller<crate::model::CloudVmCluster, crate::model::OperationMetadata>
767 {
768 type Operation = lro::internal::Operation<
769 crate::model::CloudVmCluster,
770 crate::model::OperationMetadata,
771 >;
772 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
773 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
774
775 let stub = self.0.stub.clone();
776 let mut options = self.0.options.clone();
777 options.set_retry_policy(gax::retry_policy::NeverRetry);
778 let query = move |name| {
779 let stub = stub.clone();
780 let options = options.clone();
781 async {
782 let op = GetOperation::new(stub)
783 .set_name(name)
784 .with_options(options)
785 .send()
786 .await?;
787 Ok(Operation::new(op))
788 }
789 };
790
791 let start = move || async {
792 let op = self.send().await?;
793 Ok(Operation::new(op))
794 };
795
796 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
797 }
798
799 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
803 self.0.request.parent = v.into();
804 self
805 }
806
807 pub fn set_cloud_vm_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
811 self.0.request.cloud_vm_cluster_id = v.into();
812 self
813 }
814
815 pub fn set_cloud_vm_cluster<T>(mut self, v: T) -> Self
819 where
820 T: std::convert::Into<crate::model::CloudVmCluster>,
821 {
822 self.0.request.cloud_vm_cluster = std::option::Option::Some(v.into());
823 self
824 }
825
826 pub fn set_or_clear_cloud_vm_cluster<T>(mut self, v: std::option::Option<T>) -> Self
830 where
831 T: std::convert::Into<crate::model::CloudVmCluster>,
832 {
833 self.0.request.cloud_vm_cluster = v.map(|x| x.into());
834 self
835 }
836
837 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
839 self.0.request.request_id = v.into();
840 self
841 }
842 }
843
844 #[doc(hidden)]
845 impl gax::options::internal::RequestBuilder for CreateCloudVmCluster {
846 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
847 &mut self.0.options
848 }
849 }
850
851 #[derive(Clone, Debug)]
870 pub struct DeleteCloudVmCluster(RequestBuilder<crate::model::DeleteCloudVmClusterRequest>);
871
872 impl DeleteCloudVmCluster {
873 pub(crate) fn new(
874 stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
875 ) -> Self {
876 Self(RequestBuilder::new(stub))
877 }
878
879 pub fn with_request<V: Into<crate::model::DeleteCloudVmClusterRequest>>(
881 mut self,
882 v: V,
883 ) -> Self {
884 self.0.request = v.into();
885 self
886 }
887
888 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
890 self.0.options = v.into();
891 self
892 }
893
894 pub async fn send(self) -> Result<longrunning::model::Operation> {
901 (*self.0.stub)
902 .delete_cloud_vm_cluster(self.0.request, self.0.options)
903 .await
904 .map(gax::response::Response::into_body)
905 }
906
907 pub fn poller(self) -> impl lro::Poller<(), crate::model::OperationMetadata> {
909 type Operation = lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
910 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
911 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
912
913 let stub = self.0.stub.clone();
914 let mut options = self.0.options.clone();
915 options.set_retry_policy(gax::retry_policy::NeverRetry);
916 let query = move |name| {
917 let stub = stub.clone();
918 let options = options.clone();
919 async {
920 let op = GetOperation::new(stub)
921 .set_name(name)
922 .with_options(options)
923 .send()
924 .await?;
925 Ok(Operation::new(op))
926 }
927 };
928
929 let start = move || async {
930 let op = self.send().await?;
931 Ok(Operation::new(op))
932 };
933
934 lro::internal::new_unit_response_poller(
935 polling_error_policy,
936 polling_backoff_policy,
937 start,
938 query,
939 )
940 }
941
942 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
946 self.0.request.name = v.into();
947 self
948 }
949
950 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
952 self.0.request.request_id = v.into();
953 self
954 }
955
956 pub fn set_force<T: Into<bool>>(mut self, v: T) -> Self {
958 self.0.request.force = v.into();
959 self
960 }
961 }
962
963 #[doc(hidden)]
964 impl gax::options::internal::RequestBuilder for DeleteCloudVmCluster {
965 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
966 &mut self.0.options
967 }
968 }
969
970 #[derive(Clone, Debug)]
992 pub struct ListEntitlements(RequestBuilder<crate::model::ListEntitlementsRequest>);
993
994 impl ListEntitlements {
995 pub(crate) fn new(
996 stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
997 ) -> Self {
998 Self(RequestBuilder::new(stub))
999 }
1000
1001 pub fn with_request<V: Into<crate::model::ListEntitlementsRequest>>(
1003 mut self,
1004 v: V,
1005 ) -> Self {
1006 self.0.request = v.into();
1007 self
1008 }
1009
1010 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1012 self.0.options = v.into();
1013 self
1014 }
1015
1016 pub async fn send(self) -> Result<crate::model::ListEntitlementsResponse> {
1018 (*self.0.stub)
1019 .list_entitlements(self.0.request, self.0.options)
1020 .await
1021 .map(gax::response::Response::into_body)
1022 }
1023
1024 pub fn by_page(
1026 self,
1027 ) -> impl gax::paginator::Paginator<crate::model::ListEntitlementsResponse, gax::error::Error>
1028 {
1029 use std::clone::Clone;
1030 let token = self.0.request.page_token.clone();
1031 let execute = move |token: String| {
1032 let mut builder = self.clone();
1033 builder.0.request = builder.0.request.set_page_token(token);
1034 builder.send()
1035 };
1036 gax::paginator::internal::new_paginator(token, execute)
1037 }
1038
1039 pub fn by_item(
1041 self,
1042 ) -> impl gax::paginator::ItemPaginator<crate::model::ListEntitlementsResponse, gax::error::Error>
1043 {
1044 use gax::paginator::Paginator;
1045 self.by_page().items()
1046 }
1047
1048 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1052 self.0.request.parent = v.into();
1053 self
1054 }
1055
1056 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1058 self.0.request.page_size = v.into();
1059 self
1060 }
1061
1062 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1064 self.0.request.page_token = v.into();
1065 self
1066 }
1067 }
1068
1069 #[doc(hidden)]
1070 impl gax::options::internal::RequestBuilder for ListEntitlements {
1071 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1072 &mut self.0.options
1073 }
1074 }
1075
1076 #[derive(Clone, Debug)]
1098 pub struct ListDbServers(RequestBuilder<crate::model::ListDbServersRequest>);
1099
1100 impl ListDbServers {
1101 pub(crate) fn new(
1102 stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
1103 ) -> Self {
1104 Self(RequestBuilder::new(stub))
1105 }
1106
1107 pub fn with_request<V: Into<crate::model::ListDbServersRequest>>(mut self, v: V) -> Self {
1109 self.0.request = v.into();
1110 self
1111 }
1112
1113 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1115 self.0.options = v.into();
1116 self
1117 }
1118
1119 pub async fn send(self) -> Result<crate::model::ListDbServersResponse> {
1121 (*self.0.stub)
1122 .list_db_servers(self.0.request, self.0.options)
1123 .await
1124 .map(gax::response::Response::into_body)
1125 }
1126
1127 pub fn by_page(
1129 self,
1130 ) -> impl gax::paginator::Paginator<crate::model::ListDbServersResponse, gax::error::Error>
1131 {
1132 use std::clone::Clone;
1133 let token = self.0.request.page_token.clone();
1134 let execute = move |token: String| {
1135 let mut builder = self.clone();
1136 builder.0.request = builder.0.request.set_page_token(token);
1137 builder.send()
1138 };
1139 gax::paginator::internal::new_paginator(token, execute)
1140 }
1141
1142 pub fn by_item(
1144 self,
1145 ) -> impl gax::paginator::ItemPaginator<crate::model::ListDbServersResponse, gax::error::Error>
1146 {
1147 use gax::paginator::Paginator;
1148 self.by_page().items()
1149 }
1150
1151 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1155 self.0.request.parent = v.into();
1156 self
1157 }
1158
1159 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1161 self.0.request.page_size = v.into();
1162 self
1163 }
1164
1165 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1167 self.0.request.page_token = v.into();
1168 self
1169 }
1170 }
1171
1172 #[doc(hidden)]
1173 impl gax::options::internal::RequestBuilder for ListDbServers {
1174 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1175 &mut self.0.options
1176 }
1177 }
1178
1179 #[derive(Clone, Debug)]
1201 pub struct ListDbNodes(RequestBuilder<crate::model::ListDbNodesRequest>);
1202
1203 impl ListDbNodes {
1204 pub(crate) fn new(
1205 stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
1206 ) -> Self {
1207 Self(RequestBuilder::new(stub))
1208 }
1209
1210 pub fn with_request<V: Into<crate::model::ListDbNodesRequest>>(mut self, v: V) -> Self {
1212 self.0.request = v.into();
1213 self
1214 }
1215
1216 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1218 self.0.options = v.into();
1219 self
1220 }
1221
1222 pub async fn send(self) -> Result<crate::model::ListDbNodesResponse> {
1224 (*self.0.stub)
1225 .list_db_nodes(self.0.request, self.0.options)
1226 .await
1227 .map(gax::response::Response::into_body)
1228 }
1229
1230 pub fn by_page(
1232 self,
1233 ) -> impl gax::paginator::Paginator<crate::model::ListDbNodesResponse, gax::error::Error>
1234 {
1235 use std::clone::Clone;
1236 let token = self.0.request.page_token.clone();
1237 let execute = move |token: String| {
1238 let mut builder = self.clone();
1239 builder.0.request = builder.0.request.set_page_token(token);
1240 builder.send()
1241 };
1242 gax::paginator::internal::new_paginator(token, execute)
1243 }
1244
1245 pub fn by_item(
1247 self,
1248 ) -> impl gax::paginator::ItemPaginator<crate::model::ListDbNodesResponse, gax::error::Error>
1249 {
1250 use gax::paginator::Paginator;
1251 self.by_page().items()
1252 }
1253
1254 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1258 self.0.request.parent = v.into();
1259 self
1260 }
1261
1262 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1264 self.0.request.page_size = v.into();
1265 self
1266 }
1267
1268 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1270 self.0.request.page_token = v.into();
1271 self
1272 }
1273 }
1274
1275 #[doc(hidden)]
1276 impl gax::options::internal::RequestBuilder for ListDbNodes {
1277 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1278 &mut self.0.options
1279 }
1280 }
1281
1282 #[derive(Clone, Debug)]
1304 pub struct ListGiVersions(RequestBuilder<crate::model::ListGiVersionsRequest>);
1305
1306 impl ListGiVersions {
1307 pub(crate) fn new(
1308 stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
1309 ) -> Self {
1310 Self(RequestBuilder::new(stub))
1311 }
1312
1313 pub fn with_request<V: Into<crate::model::ListGiVersionsRequest>>(mut self, v: V) -> Self {
1315 self.0.request = v.into();
1316 self
1317 }
1318
1319 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1321 self.0.options = v.into();
1322 self
1323 }
1324
1325 pub async fn send(self) -> Result<crate::model::ListGiVersionsResponse> {
1327 (*self.0.stub)
1328 .list_gi_versions(self.0.request, self.0.options)
1329 .await
1330 .map(gax::response::Response::into_body)
1331 }
1332
1333 pub fn by_page(
1335 self,
1336 ) -> impl gax::paginator::Paginator<crate::model::ListGiVersionsResponse, gax::error::Error>
1337 {
1338 use std::clone::Clone;
1339 let token = self.0.request.page_token.clone();
1340 let execute = move |token: String| {
1341 let mut builder = self.clone();
1342 builder.0.request = builder.0.request.set_page_token(token);
1343 builder.send()
1344 };
1345 gax::paginator::internal::new_paginator(token, execute)
1346 }
1347
1348 pub fn by_item(
1350 self,
1351 ) -> impl gax::paginator::ItemPaginator<crate::model::ListGiVersionsResponse, gax::error::Error>
1352 {
1353 use gax::paginator::Paginator;
1354 self.by_page().items()
1355 }
1356
1357 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1361 self.0.request.parent = v.into();
1362 self
1363 }
1364
1365 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1367 self.0.request.page_size = v.into();
1368 self
1369 }
1370
1371 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1373 self.0.request.page_token = v.into();
1374 self
1375 }
1376 }
1377
1378 #[doc(hidden)]
1379 impl gax::options::internal::RequestBuilder for ListGiVersions {
1380 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1381 &mut self.0.options
1382 }
1383 }
1384
1385 #[derive(Clone, Debug)]
1407 pub struct ListDbSystemShapes(RequestBuilder<crate::model::ListDbSystemShapesRequest>);
1408
1409 impl ListDbSystemShapes {
1410 pub(crate) fn new(
1411 stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
1412 ) -> Self {
1413 Self(RequestBuilder::new(stub))
1414 }
1415
1416 pub fn with_request<V: Into<crate::model::ListDbSystemShapesRequest>>(
1418 mut self,
1419 v: V,
1420 ) -> Self {
1421 self.0.request = v.into();
1422 self
1423 }
1424
1425 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1427 self.0.options = v.into();
1428 self
1429 }
1430
1431 pub async fn send(self) -> Result<crate::model::ListDbSystemShapesResponse> {
1433 (*self.0.stub)
1434 .list_db_system_shapes(self.0.request, self.0.options)
1435 .await
1436 .map(gax::response::Response::into_body)
1437 }
1438
1439 pub fn by_page(
1441 self,
1442 ) -> impl gax::paginator::Paginator<crate::model::ListDbSystemShapesResponse, gax::error::Error>
1443 {
1444 use std::clone::Clone;
1445 let token = self.0.request.page_token.clone();
1446 let execute = move |token: String| {
1447 let mut builder = self.clone();
1448 builder.0.request = builder.0.request.set_page_token(token);
1449 builder.send()
1450 };
1451 gax::paginator::internal::new_paginator(token, execute)
1452 }
1453
1454 pub fn by_item(
1456 self,
1457 ) -> impl gax::paginator::ItemPaginator<
1458 crate::model::ListDbSystemShapesResponse,
1459 gax::error::Error,
1460 > {
1461 use gax::paginator::Paginator;
1462 self.by_page().items()
1463 }
1464
1465 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1469 self.0.request.parent = v.into();
1470 self
1471 }
1472
1473 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1475 self.0.request.page_size = v.into();
1476 self
1477 }
1478
1479 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1481 self.0.request.page_token = v.into();
1482 self
1483 }
1484 }
1485
1486 #[doc(hidden)]
1487 impl gax::options::internal::RequestBuilder for ListDbSystemShapes {
1488 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1489 &mut self.0.options
1490 }
1491 }
1492
1493 #[derive(Clone, Debug)]
1515 pub struct ListAutonomousDatabases(
1516 RequestBuilder<crate::model::ListAutonomousDatabasesRequest>,
1517 );
1518
1519 impl ListAutonomousDatabases {
1520 pub(crate) fn new(
1521 stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
1522 ) -> Self {
1523 Self(RequestBuilder::new(stub))
1524 }
1525
1526 pub fn with_request<V: Into<crate::model::ListAutonomousDatabasesRequest>>(
1528 mut self,
1529 v: V,
1530 ) -> Self {
1531 self.0.request = v.into();
1532 self
1533 }
1534
1535 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1537 self.0.options = v.into();
1538 self
1539 }
1540
1541 pub async fn send(self) -> Result<crate::model::ListAutonomousDatabasesResponse> {
1543 (*self.0.stub)
1544 .list_autonomous_databases(self.0.request, self.0.options)
1545 .await
1546 .map(gax::response::Response::into_body)
1547 }
1548
1549 pub fn by_page(
1551 self,
1552 ) -> impl gax::paginator::Paginator<
1553 crate::model::ListAutonomousDatabasesResponse,
1554 gax::error::Error,
1555 > {
1556 use std::clone::Clone;
1557 let token = self.0.request.page_token.clone();
1558 let execute = move |token: String| {
1559 let mut builder = self.clone();
1560 builder.0.request = builder.0.request.set_page_token(token);
1561 builder.send()
1562 };
1563 gax::paginator::internal::new_paginator(token, execute)
1564 }
1565
1566 pub fn by_item(
1568 self,
1569 ) -> impl gax::paginator::ItemPaginator<
1570 crate::model::ListAutonomousDatabasesResponse,
1571 gax::error::Error,
1572 > {
1573 use gax::paginator::Paginator;
1574 self.by_page().items()
1575 }
1576
1577 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1581 self.0.request.parent = v.into();
1582 self
1583 }
1584
1585 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1587 self.0.request.page_size = v.into();
1588 self
1589 }
1590
1591 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1593 self.0.request.page_token = v.into();
1594 self
1595 }
1596
1597 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
1599 self.0.request.filter = v.into();
1600 self
1601 }
1602
1603 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
1605 self.0.request.order_by = v.into();
1606 self
1607 }
1608 }
1609
1610 #[doc(hidden)]
1611 impl gax::options::internal::RequestBuilder for ListAutonomousDatabases {
1612 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1613 &mut self.0.options
1614 }
1615 }
1616
1617 #[derive(Clone, Debug)]
1635 pub struct GetAutonomousDatabase(RequestBuilder<crate::model::GetAutonomousDatabaseRequest>);
1636
1637 impl GetAutonomousDatabase {
1638 pub(crate) fn new(
1639 stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
1640 ) -> Self {
1641 Self(RequestBuilder::new(stub))
1642 }
1643
1644 pub fn with_request<V: Into<crate::model::GetAutonomousDatabaseRequest>>(
1646 mut self,
1647 v: V,
1648 ) -> Self {
1649 self.0.request = v.into();
1650 self
1651 }
1652
1653 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1655 self.0.options = v.into();
1656 self
1657 }
1658
1659 pub async fn send(self) -> Result<crate::model::AutonomousDatabase> {
1661 (*self.0.stub)
1662 .get_autonomous_database(self.0.request, self.0.options)
1663 .await
1664 .map(gax::response::Response::into_body)
1665 }
1666
1667 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1671 self.0.request.name = v.into();
1672 self
1673 }
1674 }
1675
1676 #[doc(hidden)]
1677 impl gax::options::internal::RequestBuilder for GetAutonomousDatabase {
1678 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1679 &mut self.0.options
1680 }
1681 }
1682
1683 #[derive(Clone, Debug)]
1702 pub struct CreateAutonomousDatabase(
1703 RequestBuilder<crate::model::CreateAutonomousDatabaseRequest>,
1704 );
1705
1706 impl CreateAutonomousDatabase {
1707 pub(crate) fn new(
1708 stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
1709 ) -> Self {
1710 Self(RequestBuilder::new(stub))
1711 }
1712
1713 pub fn with_request<V: Into<crate::model::CreateAutonomousDatabaseRequest>>(
1715 mut self,
1716 v: V,
1717 ) -> Self {
1718 self.0.request = v.into();
1719 self
1720 }
1721
1722 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1724 self.0.options = v.into();
1725 self
1726 }
1727
1728 pub async fn send(self) -> Result<longrunning::model::Operation> {
1735 (*self.0.stub)
1736 .create_autonomous_database(self.0.request, self.0.options)
1737 .await
1738 .map(gax::response::Response::into_body)
1739 }
1740
1741 pub fn poller(
1743 self,
1744 ) -> impl lro::Poller<crate::model::AutonomousDatabase, crate::model::OperationMetadata>
1745 {
1746 type Operation = lro::internal::Operation<
1747 crate::model::AutonomousDatabase,
1748 crate::model::OperationMetadata,
1749 >;
1750 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1751 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1752
1753 let stub = self.0.stub.clone();
1754 let mut options = self.0.options.clone();
1755 options.set_retry_policy(gax::retry_policy::NeverRetry);
1756 let query = move |name| {
1757 let stub = stub.clone();
1758 let options = options.clone();
1759 async {
1760 let op = GetOperation::new(stub)
1761 .set_name(name)
1762 .with_options(options)
1763 .send()
1764 .await?;
1765 Ok(Operation::new(op))
1766 }
1767 };
1768
1769 let start = move || async {
1770 let op = self.send().await?;
1771 Ok(Operation::new(op))
1772 };
1773
1774 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
1775 }
1776
1777 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1781 self.0.request.parent = v.into();
1782 self
1783 }
1784
1785 pub fn set_autonomous_database_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1789 self.0.request.autonomous_database_id = v.into();
1790 self
1791 }
1792
1793 pub fn set_autonomous_database<T>(mut self, v: T) -> Self
1797 where
1798 T: std::convert::Into<crate::model::AutonomousDatabase>,
1799 {
1800 self.0.request.autonomous_database = std::option::Option::Some(v.into());
1801 self
1802 }
1803
1804 pub fn set_or_clear_autonomous_database<T>(mut self, v: std::option::Option<T>) -> Self
1808 where
1809 T: std::convert::Into<crate::model::AutonomousDatabase>,
1810 {
1811 self.0.request.autonomous_database = v.map(|x| x.into());
1812 self
1813 }
1814
1815 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1817 self.0.request.request_id = v.into();
1818 self
1819 }
1820 }
1821
1822 #[doc(hidden)]
1823 impl gax::options::internal::RequestBuilder for CreateAutonomousDatabase {
1824 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1825 &mut self.0.options
1826 }
1827 }
1828
1829 #[derive(Clone, Debug)]
1848 pub struct DeleteAutonomousDatabase(
1849 RequestBuilder<crate::model::DeleteAutonomousDatabaseRequest>,
1850 );
1851
1852 impl DeleteAutonomousDatabase {
1853 pub(crate) fn new(
1854 stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
1855 ) -> Self {
1856 Self(RequestBuilder::new(stub))
1857 }
1858
1859 pub fn with_request<V: Into<crate::model::DeleteAutonomousDatabaseRequest>>(
1861 mut self,
1862 v: V,
1863 ) -> Self {
1864 self.0.request = v.into();
1865 self
1866 }
1867
1868 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1870 self.0.options = v.into();
1871 self
1872 }
1873
1874 pub async fn send(self) -> Result<longrunning::model::Operation> {
1881 (*self.0.stub)
1882 .delete_autonomous_database(self.0.request, self.0.options)
1883 .await
1884 .map(gax::response::Response::into_body)
1885 }
1886
1887 pub fn poller(self) -> impl lro::Poller<(), crate::model::OperationMetadata> {
1889 type Operation = lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
1890 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1891 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1892
1893 let stub = self.0.stub.clone();
1894 let mut options = self.0.options.clone();
1895 options.set_retry_policy(gax::retry_policy::NeverRetry);
1896 let query = move |name| {
1897 let stub = stub.clone();
1898 let options = options.clone();
1899 async {
1900 let op = GetOperation::new(stub)
1901 .set_name(name)
1902 .with_options(options)
1903 .send()
1904 .await?;
1905 Ok(Operation::new(op))
1906 }
1907 };
1908
1909 let start = move || async {
1910 let op = self.send().await?;
1911 Ok(Operation::new(op))
1912 };
1913
1914 lro::internal::new_unit_response_poller(
1915 polling_error_policy,
1916 polling_backoff_policy,
1917 start,
1918 query,
1919 )
1920 }
1921
1922 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1926 self.0.request.name = v.into();
1927 self
1928 }
1929
1930 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1932 self.0.request.request_id = v.into();
1933 self
1934 }
1935 }
1936
1937 #[doc(hidden)]
1938 impl gax::options::internal::RequestBuilder for DeleteAutonomousDatabase {
1939 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1940 &mut self.0.options
1941 }
1942 }
1943
1944 #[derive(Clone, Debug)]
1963 pub struct RestoreAutonomousDatabase(
1964 RequestBuilder<crate::model::RestoreAutonomousDatabaseRequest>,
1965 );
1966
1967 impl RestoreAutonomousDatabase {
1968 pub(crate) fn new(
1969 stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
1970 ) -> Self {
1971 Self(RequestBuilder::new(stub))
1972 }
1973
1974 pub fn with_request<V: Into<crate::model::RestoreAutonomousDatabaseRequest>>(
1976 mut self,
1977 v: V,
1978 ) -> Self {
1979 self.0.request = v.into();
1980 self
1981 }
1982
1983 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1985 self.0.options = v.into();
1986 self
1987 }
1988
1989 pub async fn send(self) -> Result<longrunning::model::Operation> {
1996 (*self.0.stub)
1997 .restore_autonomous_database(self.0.request, self.0.options)
1998 .await
1999 .map(gax::response::Response::into_body)
2000 }
2001
2002 pub fn poller(
2004 self,
2005 ) -> impl lro::Poller<crate::model::AutonomousDatabase, crate::model::OperationMetadata>
2006 {
2007 type Operation = lro::internal::Operation<
2008 crate::model::AutonomousDatabase,
2009 crate::model::OperationMetadata,
2010 >;
2011 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2012 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2013
2014 let stub = self.0.stub.clone();
2015 let mut options = self.0.options.clone();
2016 options.set_retry_policy(gax::retry_policy::NeverRetry);
2017 let query = move |name| {
2018 let stub = stub.clone();
2019 let options = options.clone();
2020 async {
2021 let op = GetOperation::new(stub)
2022 .set_name(name)
2023 .with_options(options)
2024 .send()
2025 .await?;
2026 Ok(Operation::new(op))
2027 }
2028 };
2029
2030 let start = move || async {
2031 let op = self.send().await?;
2032 Ok(Operation::new(op))
2033 };
2034
2035 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
2036 }
2037
2038 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2042 self.0.request.name = v.into();
2043 self
2044 }
2045
2046 pub fn set_restore_time<T>(mut self, v: T) -> Self
2050 where
2051 T: std::convert::Into<wkt::Timestamp>,
2052 {
2053 self.0.request.restore_time = std::option::Option::Some(v.into());
2054 self
2055 }
2056
2057 pub fn set_or_clear_restore_time<T>(mut self, v: std::option::Option<T>) -> Self
2061 where
2062 T: std::convert::Into<wkt::Timestamp>,
2063 {
2064 self.0.request.restore_time = v.map(|x| x.into());
2065 self
2066 }
2067 }
2068
2069 #[doc(hidden)]
2070 impl gax::options::internal::RequestBuilder for RestoreAutonomousDatabase {
2071 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2072 &mut self.0.options
2073 }
2074 }
2075
2076 #[derive(Clone, Debug)]
2094 pub struct GenerateAutonomousDatabaseWallet(
2095 RequestBuilder<crate::model::GenerateAutonomousDatabaseWalletRequest>,
2096 );
2097
2098 impl GenerateAutonomousDatabaseWallet {
2099 pub(crate) fn new(
2100 stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
2101 ) -> Self {
2102 Self(RequestBuilder::new(stub))
2103 }
2104
2105 pub fn with_request<V: Into<crate::model::GenerateAutonomousDatabaseWalletRequest>>(
2107 mut self,
2108 v: V,
2109 ) -> Self {
2110 self.0.request = v.into();
2111 self
2112 }
2113
2114 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2116 self.0.options = v.into();
2117 self
2118 }
2119
2120 pub async fn send(self) -> Result<crate::model::GenerateAutonomousDatabaseWalletResponse> {
2122 (*self.0.stub)
2123 .generate_autonomous_database_wallet(self.0.request, self.0.options)
2124 .await
2125 .map(gax::response::Response::into_body)
2126 }
2127
2128 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2132 self.0.request.name = v.into();
2133 self
2134 }
2135
2136 pub fn set_type<T: Into<crate::model::GenerateType>>(mut self, v: T) -> Self {
2138 self.0.request.r#type = v.into();
2139 self
2140 }
2141
2142 pub fn set_is_regional<T: Into<bool>>(mut self, v: T) -> Self {
2144 self.0.request.is_regional = v.into();
2145 self
2146 }
2147
2148 pub fn set_password<T: Into<std::string::String>>(mut self, v: T) -> Self {
2152 self.0.request.password = v.into();
2153 self
2154 }
2155 }
2156
2157 #[doc(hidden)]
2158 impl gax::options::internal::RequestBuilder for GenerateAutonomousDatabaseWallet {
2159 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2160 &mut self.0.options
2161 }
2162 }
2163
2164 #[derive(Clone, Debug)]
2186 pub struct ListAutonomousDbVersions(
2187 RequestBuilder<crate::model::ListAutonomousDbVersionsRequest>,
2188 );
2189
2190 impl ListAutonomousDbVersions {
2191 pub(crate) fn new(
2192 stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
2193 ) -> Self {
2194 Self(RequestBuilder::new(stub))
2195 }
2196
2197 pub fn with_request<V: Into<crate::model::ListAutonomousDbVersionsRequest>>(
2199 mut self,
2200 v: V,
2201 ) -> Self {
2202 self.0.request = v.into();
2203 self
2204 }
2205
2206 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2208 self.0.options = v.into();
2209 self
2210 }
2211
2212 pub async fn send(self) -> Result<crate::model::ListAutonomousDbVersionsResponse> {
2214 (*self.0.stub)
2215 .list_autonomous_db_versions(self.0.request, self.0.options)
2216 .await
2217 .map(gax::response::Response::into_body)
2218 }
2219
2220 pub fn by_page(
2222 self,
2223 ) -> impl gax::paginator::Paginator<
2224 crate::model::ListAutonomousDbVersionsResponse,
2225 gax::error::Error,
2226 > {
2227 use std::clone::Clone;
2228 let token = self.0.request.page_token.clone();
2229 let execute = move |token: String| {
2230 let mut builder = self.clone();
2231 builder.0.request = builder.0.request.set_page_token(token);
2232 builder.send()
2233 };
2234 gax::paginator::internal::new_paginator(token, execute)
2235 }
2236
2237 pub fn by_item(
2239 self,
2240 ) -> impl gax::paginator::ItemPaginator<
2241 crate::model::ListAutonomousDbVersionsResponse,
2242 gax::error::Error,
2243 > {
2244 use gax::paginator::Paginator;
2245 self.by_page().items()
2246 }
2247
2248 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2252 self.0.request.parent = v.into();
2253 self
2254 }
2255
2256 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2258 self.0.request.page_size = v.into();
2259 self
2260 }
2261
2262 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2264 self.0.request.page_token = v.into();
2265 self
2266 }
2267 }
2268
2269 #[doc(hidden)]
2270 impl gax::options::internal::RequestBuilder for ListAutonomousDbVersions {
2271 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2272 &mut self.0.options
2273 }
2274 }
2275
2276 #[derive(Clone, Debug)]
2298 pub struct ListAutonomousDatabaseCharacterSets(
2299 RequestBuilder<crate::model::ListAutonomousDatabaseCharacterSetsRequest>,
2300 );
2301
2302 impl ListAutonomousDatabaseCharacterSets {
2303 pub(crate) fn new(
2304 stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
2305 ) -> Self {
2306 Self(RequestBuilder::new(stub))
2307 }
2308
2309 pub fn with_request<V: Into<crate::model::ListAutonomousDatabaseCharacterSetsRequest>>(
2311 mut self,
2312 v: V,
2313 ) -> Self {
2314 self.0.request = v.into();
2315 self
2316 }
2317
2318 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2320 self.0.options = v.into();
2321 self
2322 }
2323
2324 pub async fn send(
2326 self,
2327 ) -> Result<crate::model::ListAutonomousDatabaseCharacterSetsResponse> {
2328 (*self.0.stub)
2329 .list_autonomous_database_character_sets(self.0.request, self.0.options)
2330 .await
2331 .map(gax::response::Response::into_body)
2332 }
2333
2334 pub fn by_page(
2336 self,
2337 ) -> impl gax::paginator::Paginator<
2338 crate::model::ListAutonomousDatabaseCharacterSetsResponse,
2339 gax::error::Error,
2340 > {
2341 use std::clone::Clone;
2342 let token = self.0.request.page_token.clone();
2343 let execute = move |token: String| {
2344 let mut builder = self.clone();
2345 builder.0.request = builder.0.request.set_page_token(token);
2346 builder.send()
2347 };
2348 gax::paginator::internal::new_paginator(token, execute)
2349 }
2350
2351 pub fn by_item(
2353 self,
2354 ) -> impl gax::paginator::ItemPaginator<
2355 crate::model::ListAutonomousDatabaseCharacterSetsResponse,
2356 gax::error::Error,
2357 > {
2358 use gax::paginator::Paginator;
2359 self.by_page().items()
2360 }
2361
2362 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2366 self.0.request.parent = v.into();
2367 self
2368 }
2369
2370 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2372 self.0.request.page_size = v.into();
2373 self
2374 }
2375
2376 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2378 self.0.request.page_token = v.into();
2379 self
2380 }
2381
2382 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
2384 self.0.request.filter = v.into();
2385 self
2386 }
2387 }
2388
2389 #[doc(hidden)]
2390 impl gax::options::internal::RequestBuilder for ListAutonomousDatabaseCharacterSets {
2391 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2392 &mut self.0.options
2393 }
2394 }
2395
2396 #[derive(Clone, Debug)]
2418 pub struct ListAutonomousDatabaseBackups(
2419 RequestBuilder<crate::model::ListAutonomousDatabaseBackupsRequest>,
2420 );
2421
2422 impl ListAutonomousDatabaseBackups {
2423 pub(crate) fn new(
2424 stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
2425 ) -> Self {
2426 Self(RequestBuilder::new(stub))
2427 }
2428
2429 pub fn with_request<V: Into<crate::model::ListAutonomousDatabaseBackupsRequest>>(
2431 mut self,
2432 v: V,
2433 ) -> Self {
2434 self.0.request = v.into();
2435 self
2436 }
2437
2438 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2440 self.0.options = v.into();
2441 self
2442 }
2443
2444 pub async fn send(self) -> Result<crate::model::ListAutonomousDatabaseBackupsResponse> {
2446 (*self.0.stub)
2447 .list_autonomous_database_backups(self.0.request, self.0.options)
2448 .await
2449 .map(gax::response::Response::into_body)
2450 }
2451
2452 pub fn by_page(
2454 self,
2455 ) -> impl gax::paginator::Paginator<
2456 crate::model::ListAutonomousDatabaseBackupsResponse,
2457 gax::error::Error,
2458 > {
2459 use std::clone::Clone;
2460 let token = self.0.request.page_token.clone();
2461 let execute = move |token: String| {
2462 let mut builder = self.clone();
2463 builder.0.request = builder.0.request.set_page_token(token);
2464 builder.send()
2465 };
2466 gax::paginator::internal::new_paginator(token, execute)
2467 }
2468
2469 pub fn by_item(
2471 self,
2472 ) -> impl gax::paginator::ItemPaginator<
2473 crate::model::ListAutonomousDatabaseBackupsResponse,
2474 gax::error::Error,
2475 > {
2476 use gax::paginator::Paginator;
2477 self.by_page().items()
2478 }
2479
2480 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2484 self.0.request.parent = v.into();
2485 self
2486 }
2487
2488 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
2490 self.0.request.filter = v.into();
2491 self
2492 }
2493
2494 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2496 self.0.request.page_size = v.into();
2497 self
2498 }
2499
2500 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2502 self.0.request.page_token = v.into();
2503 self
2504 }
2505 }
2506
2507 #[doc(hidden)]
2508 impl gax::options::internal::RequestBuilder for ListAutonomousDatabaseBackups {
2509 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2510 &mut self.0.options
2511 }
2512 }
2513
2514 #[derive(Clone, Debug)]
2533 pub struct StopAutonomousDatabase(RequestBuilder<crate::model::StopAutonomousDatabaseRequest>);
2534
2535 impl StopAutonomousDatabase {
2536 pub(crate) fn new(
2537 stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
2538 ) -> Self {
2539 Self(RequestBuilder::new(stub))
2540 }
2541
2542 pub fn with_request<V: Into<crate::model::StopAutonomousDatabaseRequest>>(
2544 mut self,
2545 v: V,
2546 ) -> Self {
2547 self.0.request = v.into();
2548 self
2549 }
2550
2551 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2553 self.0.options = v.into();
2554 self
2555 }
2556
2557 pub async fn send(self) -> Result<longrunning::model::Operation> {
2564 (*self.0.stub)
2565 .stop_autonomous_database(self.0.request, self.0.options)
2566 .await
2567 .map(gax::response::Response::into_body)
2568 }
2569
2570 pub fn poller(
2572 self,
2573 ) -> impl lro::Poller<crate::model::AutonomousDatabase, crate::model::OperationMetadata>
2574 {
2575 type Operation = lro::internal::Operation<
2576 crate::model::AutonomousDatabase,
2577 crate::model::OperationMetadata,
2578 >;
2579 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2580 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2581
2582 let stub = self.0.stub.clone();
2583 let mut options = self.0.options.clone();
2584 options.set_retry_policy(gax::retry_policy::NeverRetry);
2585 let query = move |name| {
2586 let stub = stub.clone();
2587 let options = options.clone();
2588 async {
2589 let op = GetOperation::new(stub)
2590 .set_name(name)
2591 .with_options(options)
2592 .send()
2593 .await?;
2594 Ok(Operation::new(op))
2595 }
2596 };
2597
2598 let start = move || async {
2599 let op = self.send().await?;
2600 Ok(Operation::new(op))
2601 };
2602
2603 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
2604 }
2605
2606 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2610 self.0.request.name = v.into();
2611 self
2612 }
2613 }
2614
2615 #[doc(hidden)]
2616 impl gax::options::internal::RequestBuilder for StopAutonomousDatabase {
2617 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2618 &mut self.0.options
2619 }
2620 }
2621
2622 #[derive(Clone, Debug)]
2641 pub struct StartAutonomousDatabase(
2642 RequestBuilder<crate::model::StartAutonomousDatabaseRequest>,
2643 );
2644
2645 impl StartAutonomousDatabase {
2646 pub(crate) fn new(
2647 stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
2648 ) -> Self {
2649 Self(RequestBuilder::new(stub))
2650 }
2651
2652 pub fn with_request<V: Into<crate::model::StartAutonomousDatabaseRequest>>(
2654 mut self,
2655 v: V,
2656 ) -> Self {
2657 self.0.request = v.into();
2658 self
2659 }
2660
2661 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2663 self.0.options = v.into();
2664 self
2665 }
2666
2667 pub async fn send(self) -> Result<longrunning::model::Operation> {
2674 (*self.0.stub)
2675 .start_autonomous_database(self.0.request, self.0.options)
2676 .await
2677 .map(gax::response::Response::into_body)
2678 }
2679
2680 pub fn poller(
2682 self,
2683 ) -> impl lro::Poller<crate::model::AutonomousDatabase, crate::model::OperationMetadata>
2684 {
2685 type Operation = lro::internal::Operation<
2686 crate::model::AutonomousDatabase,
2687 crate::model::OperationMetadata,
2688 >;
2689 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2690 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2691
2692 let stub = self.0.stub.clone();
2693 let mut options = self.0.options.clone();
2694 options.set_retry_policy(gax::retry_policy::NeverRetry);
2695 let query = move |name| {
2696 let stub = stub.clone();
2697 let options = options.clone();
2698 async {
2699 let op = GetOperation::new(stub)
2700 .set_name(name)
2701 .with_options(options)
2702 .send()
2703 .await?;
2704 Ok(Operation::new(op))
2705 }
2706 };
2707
2708 let start = move || async {
2709 let op = self.send().await?;
2710 Ok(Operation::new(op))
2711 };
2712
2713 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
2714 }
2715
2716 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2720 self.0.request.name = v.into();
2721 self
2722 }
2723 }
2724
2725 #[doc(hidden)]
2726 impl gax::options::internal::RequestBuilder for StartAutonomousDatabase {
2727 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2728 &mut self.0.options
2729 }
2730 }
2731
2732 #[derive(Clone, Debug)]
2751 pub struct RestartAutonomousDatabase(
2752 RequestBuilder<crate::model::RestartAutonomousDatabaseRequest>,
2753 );
2754
2755 impl RestartAutonomousDatabase {
2756 pub(crate) fn new(
2757 stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
2758 ) -> Self {
2759 Self(RequestBuilder::new(stub))
2760 }
2761
2762 pub fn with_request<V: Into<crate::model::RestartAutonomousDatabaseRequest>>(
2764 mut self,
2765 v: V,
2766 ) -> Self {
2767 self.0.request = v.into();
2768 self
2769 }
2770
2771 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2773 self.0.options = v.into();
2774 self
2775 }
2776
2777 pub async fn send(self) -> Result<longrunning::model::Operation> {
2784 (*self.0.stub)
2785 .restart_autonomous_database(self.0.request, self.0.options)
2786 .await
2787 .map(gax::response::Response::into_body)
2788 }
2789
2790 pub fn poller(
2792 self,
2793 ) -> impl lro::Poller<crate::model::AutonomousDatabase, crate::model::OperationMetadata>
2794 {
2795 type Operation = lro::internal::Operation<
2796 crate::model::AutonomousDatabase,
2797 crate::model::OperationMetadata,
2798 >;
2799 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2800 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2801
2802 let stub = self.0.stub.clone();
2803 let mut options = self.0.options.clone();
2804 options.set_retry_policy(gax::retry_policy::NeverRetry);
2805 let query = move |name| {
2806 let stub = stub.clone();
2807 let options = options.clone();
2808 async {
2809 let op = GetOperation::new(stub)
2810 .set_name(name)
2811 .with_options(options)
2812 .send()
2813 .await?;
2814 Ok(Operation::new(op))
2815 }
2816 };
2817
2818 let start = move || async {
2819 let op = self.send().await?;
2820 Ok(Operation::new(op))
2821 };
2822
2823 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
2824 }
2825
2826 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2830 self.0.request.name = v.into();
2831 self
2832 }
2833 }
2834
2835 #[doc(hidden)]
2836 impl gax::options::internal::RequestBuilder for RestartAutonomousDatabase {
2837 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2838 &mut self.0.options
2839 }
2840 }
2841
2842 #[derive(Clone, Debug)]
2864 pub struct ListLocations(RequestBuilder<location::model::ListLocationsRequest>);
2865
2866 impl ListLocations {
2867 pub(crate) fn new(
2868 stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
2869 ) -> Self {
2870 Self(RequestBuilder::new(stub))
2871 }
2872
2873 pub fn with_request<V: Into<location::model::ListLocationsRequest>>(
2875 mut self,
2876 v: V,
2877 ) -> Self {
2878 self.0.request = v.into();
2879 self
2880 }
2881
2882 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2884 self.0.options = v.into();
2885 self
2886 }
2887
2888 pub async fn send(self) -> Result<location::model::ListLocationsResponse> {
2890 (*self.0.stub)
2891 .list_locations(self.0.request, self.0.options)
2892 .await
2893 .map(gax::response::Response::into_body)
2894 }
2895
2896 pub fn by_page(
2898 self,
2899 ) -> impl gax::paginator::Paginator<location::model::ListLocationsResponse, gax::error::Error>
2900 {
2901 use std::clone::Clone;
2902 let token = self.0.request.page_token.clone();
2903 let execute = move |token: String| {
2904 let mut builder = self.clone();
2905 builder.0.request = builder.0.request.set_page_token(token);
2906 builder.send()
2907 };
2908 gax::paginator::internal::new_paginator(token, execute)
2909 }
2910
2911 pub fn by_item(
2913 self,
2914 ) -> impl gax::paginator::ItemPaginator<location::model::ListLocationsResponse, gax::error::Error>
2915 {
2916 use gax::paginator::Paginator;
2917 self.by_page().items()
2918 }
2919
2920 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2922 self.0.request.name = v.into();
2923 self
2924 }
2925
2926 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
2928 self.0.request.filter = v.into();
2929 self
2930 }
2931
2932 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2934 self.0.request.page_size = v.into();
2935 self
2936 }
2937
2938 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2940 self.0.request.page_token = v.into();
2941 self
2942 }
2943 }
2944
2945 #[doc(hidden)]
2946 impl gax::options::internal::RequestBuilder for ListLocations {
2947 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2948 &mut self.0.options
2949 }
2950 }
2951
2952 #[derive(Clone, Debug)]
2970 pub struct GetLocation(RequestBuilder<location::model::GetLocationRequest>);
2971
2972 impl GetLocation {
2973 pub(crate) fn new(
2974 stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
2975 ) -> Self {
2976 Self(RequestBuilder::new(stub))
2977 }
2978
2979 pub fn with_request<V: Into<location::model::GetLocationRequest>>(mut self, v: V) -> Self {
2981 self.0.request = v.into();
2982 self
2983 }
2984
2985 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2987 self.0.options = v.into();
2988 self
2989 }
2990
2991 pub async fn send(self) -> Result<location::model::Location> {
2993 (*self.0.stub)
2994 .get_location(self.0.request, self.0.options)
2995 .await
2996 .map(gax::response::Response::into_body)
2997 }
2998
2999 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3001 self.0.request.name = v.into();
3002 self
3003 }
3004 }
3005
3006 #[doc(hidden)]
3007 impl gax::options::internal::RequestBuilder for GetLocation {
3008 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3009 &mut self.0.options
3010 }
3011 }
3012
3013 #[derive(Clone, Debug)]
3035 pub struct ListOperations(RequestBuilder<longrunning::model::ListOperationsRequest>);
3036
3037 impl ListOperations {
3038 pub(crate) fn new(
3039 stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
3040 ) -> Self {
3041 Self(RequestBuilder::new(stub))
3042 }
3043
3044 pub fn with_request<V: Into<longrunning::model::ListOperationsRequest>>(
3046 mut self,
3047 v: V,
3048 ) -> Self {
3049 self.0.request = v.into();
3050 self
3051 }
3052
3053 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3055 self.0.options = v.into();
3056 self
3057 }
3058
3059 pub async fn send(self) -> Result<longrunning::model::ListOperationsResponse> {
3061 (*self.0.stub)
3062 .list_operations(self.0.request, self.0.options)
3063 .await
3064 .map(gax::response::Response::into_body)
3065 }
3066
3067 pub fn by_page(
3069 self,
3070 ) -> impl gax::paginator::Paginator<longrunning::model::ListOperationsResponse, gax::error::Error>
3071 {
3072 use std::clone::Clone;
3073 let token = self.0.request.page_token.clone();
3074 let execute = move |token: String| {
3075 let mut builder = self.clone();
3076 builder.0.request = builder.0.request.set_page_token(token);
3077 builder.send()
3078 };
3079 gax::paginator::internal::new_paginator(token, execute)
3080 }
3081
3082 pub fn by_item(
3084 self,
3085 ) -> impl gax::paginator::ItemPaginator<
3086 longrunning::model::ListOperationsResponse,
3087 gax::error::Error,
3088 > {
3089 use gax::paginator::Paginator;
3090 self.by_page().items()
3091 }
3092
3093 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3095 self.0.request.name = v.into();
3096 self
3097 }
3098
3099 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
3101 self.0.request.filter = v.into();
3102 self
3103 }
3104
3105 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
3107 self.0.request.page_size = v.into();
3108 self
3109 }
3110
3111 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
3113 self.0.request.page_token = v.into();
3114 self
3115 }
3116 }
3117
3118 #[doc(hidden)]
3119 impl gax::options::internal::RequestBuilder for ListOperations {
3120 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3121 &mut self.0.options
3122 }
3123 }
3124
3125 #[derive(Clone, Debug)]
3143 pub struct GetOperation(RequestBuilder<longrunning::model::GetOperationRequest>);
3144
3145 impl GetOperation {
3146 pub(crate) fn new(
3147 stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
3148 ) -> Self {
3149 Self(RequestBuilder::new(stub))
3150 }
3151
3152 pub fn with_request<V: Into<longrunning::model::GetOperationRequest>>(
3154 mut self,
3155 v: V,
3156 ) -> Self {
3157 self.0.request = v.into();
3158 self
3159 }
3160
3161 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3163 self.0.options = v.into();
3164 self
3165 }
3166
3167 pub async fn send(self) -> Result<longrunning::model::Operation> {
3169 (*self.0.stub)
3170 .get_operation(self.0.request, self.0.options)
3171 .await
3172 .map(gax::response::Response::into_body)
3173 }
3174
3175 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3177 self.0.request.name = v.into();
3178 self
3179 }
3180 }
3181
3182 #[doc(hidden)]
3183 impl gax::options::internal::RequestBuilder for GetOperation {
3184 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3185 &mut self.0.options
3186 }
3187 }
3188
3189 #[derive(Clone, Debug)]
3207 pub struct DeleteOperation(RequestBuilder<longrunning::model::DeleteOperationRequest>);
3208
3209 impl DeleteOperation {
3210 pub(crate) fn new(
3211 stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
3212 ) -> Self {
3213 Self(RequestBuilder::new(stub))
3214 }
3215
3216 pub fn with_request<V: Into<longrunning::model::DeleteOperationRequest>>(
3218 mut self,
3219 v: V,
3220 ) -> Self {
3221 self.0.request = v.into();
3222 self
3223 }
3224
3225 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3227 self.0.options = v.into();
3228 self
3229 }
3230
3231 pub async fn send(self) -> Result<()> {
3233 (*self.0.stub)
3234 .delete_operation(self.0.request, self.0.options)
3235 .await
3236 .map(gax::response::Response::into_body)
3237 }
3238
3239 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3241 self.0.request.name = v.into();
3242 self
3243 }
3244 }
3245
3246 #[doc(hidden)]
3247 impl gax::options::internal::RequestBuilder for DeleteOperation {
3248 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3249 &mut self.0.options
3250 }
3251 }
3252
3253 #[derive(Clone, Debug)]
3271 pub struct CancelOperation(RequestBuilder<longrunning::model::CancelOperationRequest>);
3272
3273 impl CancelOperation {
3274 pub(crate) fn new(
3275 stub: std::sync::Arc<dyn super::super::stub::dynamic::OracleDatabase>,
3276 ) -> Self {
3277 Self(RequestBuilder::new(stub))
3278 }
3279
3280 pub fn with_request<V: Into<longrunning::model::CancelOperationRequest>>(
3282 mut self,
3283 v: V,
3284 ) -> Self {
3285 self.0.request = v.into();
3286 self
3287 }
3288
3289 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3291 self.0.options = v.into();
3292 self
3293 }
3294
3295 pub async fn send(self) -> Result<()> {
3297 (*self.0.stub)
3298 .cancel_operation(self.0.request, self.0.options)
3299 .await
3300 .map(gax::response::Response::into_body)
3301 }
3302
3303 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3305 self.0.request.name = v.into();
3306 self
3307 }
3308 }
3309
3310 #[doc(hidden)]
3311 impl gax::options::internal::RequestBuilder for CancelOperation {
3312 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3313 &mut self.0.options
3314 }
3315 }
3316}