1pub mod oracle_database {
18 use crate::Result;
19
20 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 #[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 #[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 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 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
116 self.0.options = v.into();
117 self
118 }
119
120 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 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 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 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 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 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 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 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 #[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 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 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
235 self.0.options = v.into();
236 self
237 }
238
239 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 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 #[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 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 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
303 self.0.options = v.into();
304 self
305 }
306
307 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 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 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 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 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 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 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 #[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 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 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
461 self.0.options = v.into();
462 self
463 }
464
465 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 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 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 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 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 #[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 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 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
583 self.0.options = v.into();
584 self
585 }
586
587 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 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 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 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 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 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 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 #[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 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 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
694 self.0.options = v.into();
695 self
696 }
697
698 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 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 #[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 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 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
760 self.0.options = v.into();
761 self
762 }
763
764 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 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 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 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 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 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 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 #[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 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 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
908 self.0.options = v.into();
909 self
910 }
911
912 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 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 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 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 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 #[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 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 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1030 self.0.options = v.into();
1031 self
1032 }
1033
1034 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 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 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 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 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 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 #[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 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 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1136 self.0.options = v.into();
1137 self
1138 }
1139
1140 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 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 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 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 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 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 #[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 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 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1240 self.0.options = v.into();
1241 self
1242 }
1243
1244 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 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 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 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 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 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 #[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 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 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1344 self.0.options = v.into();
1345 self
1346 }
1347
1348 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 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 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 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 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 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 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 #[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 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 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1459 self.0.options = v.into();
1460 self
1461 }
1462
1463 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 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 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 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 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 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 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 #[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 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 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1574 self.0.options = v.into();
1575 self
1576 }
1577
1578 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 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 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 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 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 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 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 #[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 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 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1691 self.0.options = v.into();
1692 self
1693 }
1694
1695 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 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 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 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 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 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 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 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 #[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 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 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1808 self.0.options = v.into();
1809 self
1810 }
1811
1812 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 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 #[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 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 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1876 self.0.options = v.into();
1877 self
1878 }
1879
1880 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 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 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 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 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 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 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 #[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 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 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2028 self.0.options = v.into();
2029 self
2030 }
2031
2032 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 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 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 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 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 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 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 #[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 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 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2182 self.0.options = v.into();
2183 self
2184 }
2185
2186 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 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 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 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 #[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 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 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2297 self.0.options = v.into();
2298 self
2299 }
2300
2301 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 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 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 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 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 #[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 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 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2434 self.0.options = v.into();
2435 self
2436 }
2437
2438 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 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 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 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 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 #[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 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 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2525 self.0.options = v.into();
2526 self
2527 }
2528
2529 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 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 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 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 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 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 #[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 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 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2636 self.0.options = v.into();
2637 self
2638 }
2639
2640 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 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 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 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 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 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 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 #[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 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 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2755 self.0.options = v.into();
2756 self
2757 }
2758
2759 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 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 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 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 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 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 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 #[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 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 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2867 self.0.options = v.into();
2868 self
2869 }
2870
2871 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 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 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 #[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 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 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2983 self.0.options = v.into();
2984 self
2985 }
2986
2987 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 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 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 #[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 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 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3099 self.0.options = v.into();
3100 self
3101 }
3102
3103 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 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 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 #[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 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 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3215 self.0.options = v.into();
3216 self
3217 }
3218
3219 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 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 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 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 #[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 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 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3339 self.0.options = v.into();
3340 self
3341 }
3342
3343 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 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 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 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 #[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 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 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3461 self.0.options = v.into();
3462 self
3463 }
3464
3465 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 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 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 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 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 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 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 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 #[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 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 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3575 self.0.options = v.into();
3576 self
3577 }
3578
3579 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 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 #[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 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 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3641 self.0.options = v.into();
3642 self
3643 }
3644
3645 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 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 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 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 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 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 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 #[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 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 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3789 self.0.options = v.into();
3790 self
3791 }
3792
3793 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 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 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 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 #[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 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 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3902 self.0.options = v.into();
3903 self
3904 }
3905
3906 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 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 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 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 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 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 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 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 #[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 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 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4016 self.0.options = v.into();
4017 self
4018 }
4019
4020 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 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 #[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 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 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4079 self.0.options = v.into();
4080 self
4081 }
4082
4083 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 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 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 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 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 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 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 #[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 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 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4224 self.0.options = v.into();
4225 self
4226 }
4227
4228 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 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 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 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 #[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 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 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4340 self.0.options = v.into();
4341 self
4342 }
4343
4344 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 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 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 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 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 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 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 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 #[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 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 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4457 self.0.options = v.into();
4458 self
4459 }
4460
4461 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 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 #[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 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 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4523 self.0.options = v.into();
4524 self
4525 }
4526
4527 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 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 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 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 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 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 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 #[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 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 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4671 self.0.options = v.into();
4672 self
4673 }
4674
4675 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 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 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 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 #[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 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 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4784 self.0.options = v.into();
4785 self
4786 }
4787
4788 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 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 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 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 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 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 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 #[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 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 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4936 self.0.options = v.into();
4937 self
4938 }
4939
4940 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 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 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 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 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 #[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 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 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5072 self.0.options = v.into();
5073 self
5074 }
5075
5076 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 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 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 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 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 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 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 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 #[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 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 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5191 self.0.options = v.into();
5192 self
5193 }
5194
5195 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 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 #[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 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 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5259 self.0.options = v.into();
5260 self
5261 }
5262
5263 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 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 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 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 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 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 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 #[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 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 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5417 self.0.options = v.into();
5418 self
5419 }
5420
5421 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 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 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 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 #[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 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 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5535 self.0.options = v.into();
5536 self
5537 }
5538
5539 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 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 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 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 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 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 #[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 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 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5641 self.0.options = v.into();
5642 self
5643 }
5644
5645 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 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 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 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 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 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 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 #[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 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 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5747 self.0.options = v.into();
5748 self
5749 }
5750
5751 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 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 #[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 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 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5816 self.0.options = v.into();
5817 self
5818 }
5819
5820 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 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 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 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 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 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 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 #[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 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 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5927 self.0.options = v.into();
5928 self
5929 }
5930
5931 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 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 #[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 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 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5993 self.0.options = v.into();
5994 self
5995 }
5996
5997 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 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 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 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 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 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 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 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 #[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 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 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6105 self.0.options = v.into();
6106 self
6107 }
6108
6109 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 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 #[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 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 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6168 self.0.options = v.into();
6169 self
6170 }
6171
6172 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 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 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 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 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 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 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 #[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 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 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6313 self.0.options = v.into();
6314 self
6315 }
6316
6317 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 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 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 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 #[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 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 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6426 self.0.options = v.into();
6427 self
6428 }
6429
6430 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 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 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 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 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 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 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 #[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 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 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6543 self.0.options = v.into();
6544 self
6545 }
6546
6547 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 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 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 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 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 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 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 #[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 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 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6658 self.0.options = v.into();
6659 self
6660 }
6661
6662 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 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 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 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 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 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 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 #[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 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 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6767 self.0.options = v.into();
6768 self
6769 }
6770
6771 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 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 #[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 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 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6836 self.0.options = v.into();
6837 self
6838 }
6839
6840 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 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 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 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 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 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 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 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 #[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 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 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6951 self.0.options = v.into();
6952 self
6953 }
6954
6955 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 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 #[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 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 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7016 self.0.options = v.into();
7017 self
7018 }
7019
7020 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 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 #[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 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 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7081 self.0.options = v.into();
7082 self
7083 }
7084
7085 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 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}