1pub mod bigtable_instance_admin {
19 use crate::Result;
20
21 pub type ClientBuilder = crate::ClientBuilder<client::Factory, gaxi::options::Credentials>;
35
36 pub(crate) mod client {
37 use super::super::super::client::BigtableInstanceAdmin;
38 pub struct Factory;
39 impl crate::ClientFactory for Factory {
40 type Client = BigtableInstanceAdmin;
41 type Credentials = gaxi::options::Credentials;
42 async fn build(
43 self,
44 config: gaxi::options::ClientConfig,
45 ) -> crate::ClientBuilderResult<Self::Client> {
46 Self::Client::new(config).await
47 }
48 }
49 }
50
51 #[derive(Clone, Debug)]
53 pub(crate) struct RequestBuilder<R: std::default::Default> {
54 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
55 request: R,
56 options: crate::RequestOptions,
57 }
58
59 impl<R> RequestBuilder<R>
60 where
61 R: std::default::Default,
62 {
63 pub(crate) fn new(
64 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
65 ) -> Self {
66 Self {
67 stub,
68 request: R::default(),
69 options: crate::RequestOptions::default(),
70 }
71 }
72 }
73
74 #[derive(Clone, Debug)]
92 pub struct CreateInstance(RequestBuilder<crate::model::CreateInstanceRequest>);
93
94 impl CreateInstance {
95 pub(crate) fn new(
96 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
97 ) -> Self {
98 Self(RequestBuilder::new(stub))
99 }
100
101 pub fn with_request<V: Into<crate::model::CreateInstanceRequest>>(mut self, v: V) -> Self {
103 self.0.request = v.into();
104 self
105 }
106
107 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
109 self.0.options = v.into();
110 self
111 }
112
113 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
120 (*self.0.stub)
121 .create_instance(self.0.request, self.0.options)
122 .await
123 .map(crate::Response::into_body)
124 }
125
126 pub fn poller(
128 self,
129 ) -> impl google_cloud_lro::Poller<crate::model::Instance, crate::model::CreateInstanceMetadata>
130 {
131 type Operation = google_cloud_lro::internal::Operation<
132 crate::model::Instance,
133 crate::model::CreateInstanceMetadata,
134 >;
135 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
136 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
137 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
138 if let Some(ref mut details) = poller_options.tracing {
139 details.method_name = "google_cloud_bigtable_admin_v2::client::BigtableInstanceAdmin::create_instance::until_done";
140 }
141
142 let stub = self.0.stub.clone();
143 let mut options = self.0.options.clone();
144 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
145 let query = move |name| {
146 let stub = stub.clone();
147 let options = options.clone();
148 async {
149 let op = GetOperation::new(stub)
150 .set_name(name)
151 .with_options(options)
152 .send()
153 .await?;
154 Ok(Operation::new(op))
155 }
156 };
157
158 let start = move || async {
159 let op = self.send().await?;
160 Ok(Operation::new(op))
161 };
162
163 use google_cloud_lro::internal::PollerExt;
164 {
165 google_cloud_lro::internal::new_poller(
166 polling_error_policy,
167 polling_backoff_policy,
168 start,
169 query,
170 )
171 }
172 .with_options(poller_options)
173 }
174
175 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
179 self.0.request.parent = v.into();
180 self
181 }
182
183 pub fn set_instance_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
187 self.0.request.instance_id = v.into();
188 self
189 }
190
191 pub fn set_instance<T>(mut self, v: T) -> Self
195 where
196 T: std::convert::Into<crate::model::Instance>,
197 {
198 self.0.request.instance = std::option::Option::Some(v.into());
199 self
200 }
201
202 pub fn set_or_clear_instance<T>(mut self, v: std::option::Option<T>) -> Self
206 where
207 T: std::convert::Into<crate::model::Instance>,
208 {
209 self.0.request.instance = v.map(|x| x.into());
210 self
211 }
212
213 pub fn set_clusters<T, K, V>(mut self, v: T) -> Self
217 where
218 T: std::iter::IntoIterator<Item = (K, V)>,
219 K: std::convert::Into<std::string::String>,
220 V: std::convert::Into<crate::model::Cluster>,
221 {
222 self.0.request.clusters = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
223 self
224 }
225 }
226
227 #[doc(hidden)]
228 impl crate::RequestBuilder for CreateInstance {
229 fn request_options(&mut self) -> &mut crate::RequestOptions {
230 &mut self.0.options
231 }
232 }
233
234 #[derive(Clone, Debug)]
251 pub struct GetInstance(RequestBuilder<crate::model::GetInstanceRequest>);
252
253 impl GetInstance {
254 pub(crate) fn new(
255 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
256 ) -> Self {
257 Self(RequestBuilder::new(stub))
258 }
259
260 pub fn with_request<V: Into<crate::model::GetInstanceRequest>>(mut self, v: V) -> Self {
262 self.0.request = v.into();
263 self
264 }
265
266 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
268 self.0.options = v.into();
269 self
270 }
271
272 pub async fn send(self) -> Result<crate::model::Instance> {
274 (*self.0.stub)
275 .get_instance(self.0.request, self.0.options)
276 .await
277 .map(crate::Response::into_body)
278 }
279
280 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
284 self.0.request.name = v.into();
285 self
286 }
287 }
288
289 #[doc(hidden)]
290 impl crate::RequestBuilder for GetInstance {
291 fn request_options(&mut self) -> &mut crate::RequestOptions {
292 &mut self.0.options
293 }
294 }
295
296 #[derive(Clone, Debug)]
313 pub struct ListInstances(RequestBuilder<crate::model::ListInstancesRequest>);
314
315 impl ListInstances {
316 pub(crate) fn new(
317 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
318 ) -> Self {
319 Self(RequestBuilder::new(stub))
320 }
321
322 pub fn with_request<V: Into<crate::model::ListInstancesRequest>>(mut self, v: V) -> Self {
324 self.0.request = v.into();
325 self
326 }
327
328 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
330 self.0.options = v.into();
331 self
332 }
333
334 pub async fn send(self) -> Result<crate::model::ListInstancesResponse> {
336 (*self.0.stub)
337 .list_instances(self.0.request, self.0.options)
338 .await
339 .map(crate::Response::into_body)
340 }
341
342 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
346 self.0.request.parent = v.into();
347 self
348 }
349
350 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
352 self.0.request.page_token = v.into();
353 self
354 }
355 }
356
357 #[doc(hidden)]
358 impl crate::RequestBuilder for ListInstances {
359 fn request_options(&mut self) -> &mut crate::RequestOptions {
360 &mut self.0.options
361 }
362 }
363
364 #[derive(Clone, Debug)]
381 pub struct UpdateInstance(RequestBuilder<crate::model::Instance>);
382
383 impl UpdateInstance {
384 pub(crate) fn new(
385 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
386 ) -> Self {
387 Self(RequestBuilder::new(stub))
388 }
389
390 pub fn with_request<V: Into<crate::model::Instance>>(mut self, v: V) -> Self {
392 self.0.request = v.into();
393 self
394 }
395
396 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
398 self.0.options = v.into();
399 self
400 }
401
402 pub async fn send(self) -> Result<crate::model::Instance> {
404 (*self.0.stub)
405 .update_instance(self.0.request, self.0.options)
406 .await
407 .map(crate::Response::into_body)
408 }
409
410 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
412 self.0.request.name = v.into();
413 self
414 }
415
416 pub fn set_display_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
420 self.0.request.display_name = v.into();
421 self
422 }
423
424 pub fn set_state<T: Into<crate::model::instance::State>>(mut self, v: T) -> Self {
426 self.0.request.state = v.into();
427 self
428 }
429
430 pub fn set_type<T: Into<crate::model::instance::Type>>(mut self, v: T) -> Self {
432 self.0.request.r#type = v.into();
433 self
434 }
435
436 pub fn set_edition<T: Into<crate::model::instance::Edition>>(mut self, v: T) -> Self {
438 self.0.request.edition = v.into();
439 self
440 }
441
442 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
444 where
445 T: std::iter::IntoIterator<Item = (K, V)>,
446 K: std::convert::Into<std::string::String>,
447 V: std::convert::Into<std::string::String>,
448 {
449 self.0.request.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
450 self
451 }
452
453 pub fn set_create_time<T>(mut self, v: T) -> Self
455 where
456 T: std::convert::Into<wkt::Timestamp>,
457 {
458 self.0.request.create_time = std::option::Option::Some(v.into());
459 self
460 }
461
462 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
464 where
465 T: std::convert::Into<wkt::Timestamp>,
466 {
467 self.0.request.create_time = v.map(|x| x.into());
468 self
469 }
470
471 pub fn set_satisfies_pzs<T>(mut self, v: T) -> Self
473 where
474 T: std::convert::Into<bool>,
475 {
476 self.0.request.satisfies_pzs = std::option::Option::Some(v.into());
477 self
478 }
479
480 pub fn set_or_clear_satisfies_pzs<T>(mut self, v: std::option::Option<T>) -> Self
482 where
483 T: std::convert::Into<bool>,
484 {
485 self.0.request.satisfies_pzs = v.map(|x| x.into());
486 self
487 }
488
489 pub fn set_satisfies_pzi<T>(mut self, v: T) -> Self
491 where
492 T: std::convert::Into<bool>,
493 {
494 self.0.request.satisfies_pzi = std::option::Option::Some(v.into());
495 self
496 }
497
498 pub fn set_or_clear_satisfies_pzi<T>(mut self, v: std::option::Option<T>) -> Self
500 where
501 T: std::convert::Into<bool>,
502 {
503 self.0.request.satisfies_pzi = v.map(|x| x.into());
504 self
505 }
506
507 pub fn set_tags<T, K, V>(mut self, v: T) -> Self
509 where
510 T: std::iter::IntoIterator<Item = (K, V)>,
511 K: std::convert::Into<std::string::String>,
512 V: std::convert::Into<std::string::String>,
513 {
514 self.0.request.tags = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
515 self
516 }
517 }
518
519 #[doc(hidden)]
520 impl crate::RequestBuilder for UpdateInstance {
521 fn request_options(&mut self) -> &mut crate::RequestOptions {
522 &mut self.0.options
523 }
524 }
525
526 #[derive(Clone, Debug)]
544 pub struct PartialUpdateInstance(RequestBuilder<crate::model::PartialUpdateInstanceRequest>);
545
546 impl PartialUpdateInstance {
547 pub(crate) fn new(
548 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
549 ) -> Self {
550 Self(RequestBuilder::new(stub))
551 }
552
553 pub fn with_request<V: Into<crate::model::PartialUpdateInstanceRequest>>(
555 mut self,
556 v: V,
557 ) -> Self {
558 self.0.request = v.into();
559 self
560 }
561
562 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
564 self.0.options = v.into();
565 self
566 }
567
568 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
575 (*self.0.stub)
576 .partial_update_instance(self.0.request, self.0.options)
577 .await
578 .map(crate::Response::into_body)
579 }
580
581 pub fn poller(
583 self,
584 ) -> impl google_cloud_lro::Poller<crate::model::Instance, crate::model::UpdateInstanceMetadata>
585 {
586 type Operation = google_cloud_lro::internal::Operation<
587 crate::model::Instance,
588 crate::model::UpdateInstanceMetadata,
589 >;
590 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
591 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
592 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
593 if let Some(ref mut details) = poller_options.tracing {
594 details.method_name = "google_cloud_bigtable_admin_v2::client::BigtableInstanceAdmin::partial_update_instance::until_done";
595 }
596
597 let stub = self.0.stub.clone();
598 let mut options = self.0.options.clone();
599 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
600 let query = move |name| {
601 let stub = stub.clone();
602 let options = options.clone();
603 async {
604 let op = GetOperation::new(stub)
605 .set_name(name)
606 .with_options(options)
607 .send()
608 .await?;
609 Ok(Operation::new(op))
610 }
611 };
612
613 let start = move || async {
614 let op = self.send().await?;
615 Ok(Operation::new(op))
616 };
617
618 use google_cloud_lro::internal::PollerExt;
619 {
620 google_cloud_lro::internal::new_poller(
621 polling_error_policy,
622 polling_backoff_policy,
623 start,
624 query,
625 )
626 }
627 .with_options(poller_options)
628 }
629
630 pub fn set_instance<T>(mut self, v: T) -> Self
634 where
635 T: std::convert::Into<crate::model::Instance>,
636 {
637 self.0.request.instance = std::option::Option::Some(v.into());
638 self
639 }
640
641 pub fn set_or_clear_instance<T>(mut self, v: std::option::Option<T>) -> Self
645 where
646 T: std::convert::Into<crate::model::Instance>,
647 {
648 self.0.request.instance = v.map(|x| x.into());
649 self
650 }
651
652 pub fn set_update_mask<T>(mut self, v: T) -> Self
656 where
657 T: std::convert::Into<wkt::FieldMask>,
658 {
659 self.0.request.update_mask = std::option::Option::Some(v.into());
660 self
661 }
662
663 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
667 where
668 T: std::convert::Into<wkt::FieldMask>,
669 {
670 self.0.request.update_mask = v.map(|x| x.into());
671 self
672 }
673 }
674
675 #[doc(hidden)]
676 impl crate::RequestBuilder for PartialUpdateInstance {
677 fn request_options(&mut self) -> &mut crate::RequestOptions {
678 &mut self.0.options
679 }
680 }
681
682 #[derive(Clone, Debug)]
699 pub struct DeleteInstance(RequestBuilder<crate::model::DeleteInstanceRequest>);
700
701 impl DeleteInstance {
702 pub(crate) fn new(
703 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
704 ) -> Self {
705 Self(RequestBuilder::new(stub))
706 }
707
708 pub fn with_request<V: Into<crate::model::DeleteInstanceRequest>>(mut self, v: V) -> Self {
710 self.0.request = v.into();
711 self
712 }
713
714 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
716 self.0.options = v.into();
717 self
718 }
719
720 pub async fn send(self) -> Result<()> {
722 (*self.0.stub)
723 .delete_instance(self.0.request, self.0.options)
724 .await
725 .map(crate::Response::into_body)
726 }
727
728 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
732 self.0.request.name = v.into();
733 self
734 }
735 }
736
737 #[doc(hidden)]
738 impl crate::RequestBuilder for DeleteInstance {
739 fn request_options(&mut self) -> &mut crate::RequestOptions {
740 &mut self.0.options
741 }
742 }
743
744 #[derive(Clone, Debug)]
762 pub struct CreateCluster(RequestBuilder<crate::model::CreateClusterRequest>);
763
764 impl CreateCluster {
765 pub(crate) fn new(
766 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
767 ) -> Self {
768 Self(RequestBuilder::new(stub))
769 }
770
771 pub fn with_request<V: Into<crate::model::CreateClusterRequest>>(mut self, v: V) -> Self {
773 self.0.request = v.into();
774 self
775 }
776
777 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
779 self.0.options = v.into();
780 self
781 }
782
783 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
790 (*self.0.stub)
791 .create_cluster(self.0.request, self.0.options)
792 .await
793 .map(crate::Response::into_body)
794 }
795
796 pub fn poller(
798 self,
799 ) -> impl google_cloud_lro::Poller<crate::model::Cluster, crate::model::CreateClusterMetadata>
800 {
801 type Operation = google_cloud_lro::internal::Operation<
802 crate::model::Cluster,
803 crate::model::CreateClusterMetadata,
804 >;
805 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
806 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
807 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
808 if let Some(ref mut details) = poller_options.tracing {
809 details.method_name = "google_cloud_bigtable_admin_v2::client::BigtableInstanceAdmin::create_cluster::until_done";
810 }
811
812 let stub = self.0.stub.clone();
813 let mut options = self.0.options.clone();
814 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
815 let query = move |name| {
816 let stub = stub.clone();
817 let options = options.clone();
818 async {
819 let op = GetOperation::new(stub)
820 .set_name(name)
821 .with_options(options)
822 .send()
823 .await?;
824 Ok(Operation::new(op))
825 }
826 };
827
828 let start = move || async {
829 let op = self.send().await?;
830 Ok(Operation::new(op))
831 };
832
833 use google_cloud_lro::internal::PollerExt;
834 {
835 google_cloud_lro::internal::new_poller(
836 polling_error_policy,
837 polling_backoff_policy,
838 start,
839 query,
840 )
841 }
842 .with_options(poller_options)
843 }
844
845 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
849 self.0.request.parent = v.into();
850 self
851 }
852
853 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
857 self.0.request.cluster_id = v.into();
858 self
859 }
860
861 pub fn set_cluster<T>(mut self, v: T) -> Self
865 where
866 T: std::convert::Into<crate::model::Cluster>,
867 {
868 self.0.request.cluster = std::option::Option::Some(v.into());
869 self
870 }
871
872 pub fn set_or_clear_cluster<T>(mut self, v: std::option::Option<T>) -> Self
876 where
877 T: std::convert::Into<crate::model::Cluster>,
878 {
879 self.0.request.cluster = v.map(|x| x.into());
880 self
881 }
882 }
883
884 #[doc(hidden)]
885 impl crate::RequestBuilder for CreateCluster {
886 fn request_options(&mut self) -> &mut crate::RequestOptions {
887 &mut self.0.options
888 }
889 }
890
891 #[derive(Clone, Debug)]
908 pub struct GetCluster(RequestBuilder<crate::model::GetClusterRequest>);
909
910 impl GetCluster {
911 pub(crate) fn new(
912 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
913 ) -> Self {
914 Self(RequestBuilder::new(stub))
915 }
916
917 pub fn with_request<V: Into<crate::model::GetClusterRequest>>(mut self, v: V) -> Self {
919 self.0.request = v.into();
920 self
921 }
922
923 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
925 self.0.options = v.into();
926 self
927 }
928
929 pub async fn send(self) -> Result<crate::model::Cluster> {
931 (*self.0.stub)
932 .get_cluster(self.0.request, self.0.options)
933 .await
934 .map(crate::Response::into_body)
935 }
936
937 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
941 self.0.request.name = v.into();
942 self
943 }
944 }
945
946 #[doc(hidden)]
947 impl crate::RequestBuilder for GetCluster {
948 fn request_options(&mut self) -> &mut crate::RequestOptions {
949 &mut self.0.options
950 }
951 }
952
953 #[derive(Clone, Debug)]
970 pub struct ListClusters(RequestBuilder<crate::model::ListClustersRequest>);
971
972 impl ListClusters {
973 pub(crate) fn new(
974 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
975 ) -> Self {
976 Self(RequestBuilder::new(stub))
977 }
978
979 pub fn with_request<V: Into<crate::model::ListClustersRequest>>(mut self, v: V) -> Self {
981 self.0.request = v.into();
982 self
983 }
984
985 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
987 self.0.options = v.into();
988 self
989 }
990
991 pub async fn send(self) -> Result<crate::model::ListClustersResponse> {
993 (*self.0.stub)
994 .list_clusters(self.0.request, self.0.options)
995 .await
996 .map(crate::Response::into_body)
997 }
998
999 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1003 self.0.request.parent = v.into();
1004 self
1005 }
1006
1007 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1009 self.0.request.page_token = v.into();
1010 self
1011 }
1012 }
1013
1014 #[doc(hidden)]
1015 impl crate::RequestBuilder for ListClusters {
1016 fn request_options(&mut self) -> &mut crate::RequestOptions {
1017 &mut self.0.options
1018 }
1019 }
1020
1021 #[derive(Clone, Debug)]
1039 pub struct UpdateCluster(RequestBuilder<crate::model::Cluster>);
1040
1041 impl UpdateCluster {
1042 pub(crate) fn new(
1043 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
1044 ) -> Self {
1045 Self(RequestBuilder::new(stub))
1046 }
1047
1048 pub fn with_request<V: Into<crate::model::Cluster>>(mut self, v: V) -> Self {
1050 self.0.request = v.into();
1051 self
1052 }
1053
1054 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1056 self.0.options = v.into();
1057 self
1058 }
1059
1060 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
1067 (*self.0.stub)
1068 .update_cluster(self.0.request, self.0.options)
1069 .await
1070 .map(crate::Response::into_body)
1071 }
1072
1073 pub fn poller(
1075 self,
1076 ) -> impl google_cloud_lro::Poller<crate::model::Cluster, crate::model::UpdateClusterMetadata>
1077 {
1078 type Operation = google_cloud_lro::internal::Operation<
1079 crate::model::Cluster,
1080 crate::model::UpdateClusterMetadata,
1081 >;
1082 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1083 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1084 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
1085 if let Some(ref mut details) = poller_options.tracing {
1086 details.method_name = "google_cloud_bigtable_admin_v2::client::BigtableInstanceAdmin::update_cluster::until_done";
1087 }
1088
1089 let stub = self.0.stub.clone();
1090 let mut options = self.0.options.clone();
1091 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
1092 let query = move |name| {
1093 let stub = stub.clone();
1094 let options = options.clone();
1095 async {
1096 let op = GetOperation::new(stub)
1097 .set_name(name)
1098 .with_options(options)
1099 .send()
1100 .await?;
1101 Ok(Operation::new(op))
1102 }
1103 };
1104
1105 let start = move || async {
1106 let op = self.send().await?;
1107 Ok(Operation::new(op))
1108 };
1109
1110 use google_cloud_lro::internal::PollerExt;
1111 {
1112 google_cloud_lro::internal::new_poller(
1113 polling_error_policy,
1114 polling_backoff_policy,
1115 start,
1116 query,
1117 )
1118 }
1119 .with_options(poller_options)
1120 }
1121
1122 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1124 self.0.request.name = v.into();
1125 self
1126 }
1127
1128 pub fn set_location<T: Into<std::string::String>>(mut self, v: T) -> Self {
1130 self.0.request.location = v.into();
1131 self
1132 }
1133
1134 pub fn set_state<T: Into<crate::model::cluster::State>>(mut self, v: T) -> Self {
1136 self.0.request.state = v.into();
1137 self
1138 }
1139
1140 pub fn set_serve_nodes<T: Into<i32>>(mut self, v: T) -> Self {
1142 self.0.request.serve_nodes = v.into();
1143 self
1144 }
1145
1146 pub fn set_node_scaling_factor<T: Into<crate::model::cluster::NodeScalingFactor>>(
1148 mut self,
1149 v: T,
1150 ) -> Self {
1151 self.0.request.node_scaling_factor = v.into();
1152 self
1153 }
1154
1155 pub fn set_default_storage_type<T: Into<crate::model::StorageType>>(
1157 mut self,
1158 v: T,
1159 ) -> Self {
1160 self.0.request.default_storage_type = v.into();
1161 self
1162 }
1163
1164 pub fn set_encryption_config<T>(mut self, v: T) -> Self
1166 where
1167 T: std::convert::Into<crate::model::cluster::EncryptionConfig>,
1168 {
1169 self.0.request.encryption_config = std::option::Option::Some(v.into());
1170 self
1171 }
1172
1173 pub fn set_or_clear_encryption_config<T>(mut self, v: std::option::Option<T>) -> Self
1175 where
1176 T: std::convert::Into<crate::model::cluster::EncryptionConfig>,
1177 {
1178 self.0.request.encryption_config = v.map(|x| x.into());
1179 self
1180 }
1181
1182 pub fn set_config<T: Into<Option<crate::model::cluster::Config>>>(mut self, v: T) -> Self {
1187 self.0.request.config = v.into();
1188 self
1189 }
1190
1191 pub fn set_cluster_config<
1197 T: std::convert::Into<std::boxed::Box<crate::model::cluster::ClusterConfig>>,
1198 >(
1199 mut self,
1200 v: T,
1201 ) -> Self {
1202 self.0.request = self.0.request.set_cluster_config(v);
1203 self
1204 }
1205 }
1206
1207 #[doc(hidden)]
1208 impl crate::RequestBuilder for UpdateCluster {
1209 fn request_options(&mut self) -> &mut crate::RequestOptions {
1210 &mut self.0.options
1211 }
1212 }
1213
1214 #[derive(Clone, Debug)]
1232 pub struct PartialUpdateCluster(RequestBuilder<crate::model::PartialUpdateClusterRequest>);
1233
1234 impl PartialUpdateCluster {
1235 pub(crate) fn new(
1236 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
1237 ) -> Self {
1238 Self(RequestBuilder::new(stub))
1239 }
1240
1241 pub fn with_request<V: Into<crate::model::PartialUpdateClusterRequest>>(
1243 mut self,
1244 v: V,
1245 ) -> Self {
1246 self.0.request = v.into();
1247 self
1248 }
1249
1250 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1252 self.0.options = v.into();
1253 self
1254 }
1255
1256 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
1263 (*self.0.stub)
1264 .partial_update_cluster(self.0.request, self.0.options)
1265 .await
1266 .map(crate::Response::into_body)
1267 }
1268
1269 pub fn poller(
1271 self,
1272 ) -> impl google_cloud_lro::Poller<
1273 crate::model::Cluster,
1274 crate::model::PartialUpdateClusterMetadata,
1275 > {
1276 type Operation = google_cloud_lro::internal::Operation<
1277 crate::model::Cluster,
1278 crate::model::PartialUpdateClusterMetadata,
1279 >;
1280 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1281 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1282 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
1283 if let Some(ref mut details) = poller_options.tracing {
1284 details.method_name = "google_cloud_bigtable_admin_v2::client::BigtableInstanceAdmin::partial_update_cluster::until_done";
1285 }
1286
1287 let stub = self.0.stub.clone();
1288 let mut options = self.0.options.clone();
1289 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
1290 let query = move |name| {
1291 let stub = stub.clone();
1292 let options = options.clone();
1293 async {
1294 let op = GetOperation::new(stub)
1295 .set_name(name)
1296 .with_options(options)
1297 .send()
1298 .await?;
1299 Ok(Operation::new(op))
1300 }
1301 };
1302
1303 let start = move || async {
1304 let op = self.send().await?;
1305 Ok(Operation::new(op))
1306 };
1307
1308 use google_cloud_lro::internal::PollerExt;
1309 {
1310 google_cloud_lro::internal::new_poller(
1311 polling_error_policy,
1312 polling_backoff_policy,
1313 start,
1314 query,
1315 )
1316 }
1317 .with_options(poller_options)
1318 }
1319
1320 pub fn set_cluster<T>(mut self, v: T) -> Self
1324 where
1325 T: std::convert::Into<crate::model::Cluster>,
1326 {
1327 self.0.request.cluster = std::option::Option::Some(v.into());
1328 self
1329 }
1330
1331 pub fn set_or_clear_cluster<T>(mut self, v: std::option::Option<T>) -> Self
1335 where
1336 T: std::convert::Into<crate::model::Cluster>,
1337 {
1338 self.0.request.cluster = v.map(|x| x.into());
1339 self
1340 }
1341
1342 pub fn set_update_mask<T>(mut self, v: T) -> Self
1346 where
1347 T: std::convert::Into<wkt::FieldMask>,
1348 {
1349 self.0.request.update_mask = std::option::Option::Some(v.into());
1350 self
1351 }
1352
1353 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
1357 where
1358 T: std::convert::Into<wkt::FieldMask>,
1359 {
1360 self.0.request.update_mask = v.map(|x| x.into());
1361 self
1362 }
1363 }
1364
1365 #[doc(hidden)]
1366 impl crate::RequestBuilder for PartialUpdateCluster {
1367 fn request_options(&mut self) -> &mut crate::RequestOptions {
1368 &mut self.0.options
1369 }
1370 }
1371
1372 #[derive(Clone, Debug)]
1389 pub struct DeleteCluster(RequestBuilder<crate::model::DeleteClusterRequest>);
1390
1391 impl DeleteCluster {
1392 pub(crate) fn new(
1393 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
1394 ) -> Self {
1395 Self(RequestBuilder::new(stub))
1396 }
1397
1398 pub fn with_request<V: Into<crate::model::DeleteClusterRequest>>(mut self, v: V) -> Self {
1400 self.0.request = v.into();
1401 self
1402 }
1403
1404 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1406 self.0.options = v.into();
1407 self
1408 }
1409
1410 pub async fn send(self) -> Result<()> {
1412 (*self.0.stub)
1413 .delete_cluster(self.0.request, self.0.options)
1414 .await
1415 .map(crate::Response::into_body)
1416 }
1417
1418 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1422 self.0.request.name = v.into();
1423 self
1424 }
1425 }
1426
1427 #[doc(hidden)]
1428 impl crate::RequestBuilder for DeleteCluster {
1429 fn request_options(&mut self) -> &mut crate::RequestOptions {
1430 &mut self.0.options
1431 }
1432 }
1433
1434 #[derive(Clone, Debug)]
1452 pub struct UpdateMemoryLayer(RequestBuilder<crate::model::UpdateMemoryLayerRequest>);
1453
1454 impl UpdateMemoryLayer {
1455 pub(crate) fn new(
1456 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
1457 ) -> Self {
1458 Self(RequestBuilder::new(stub))
1459 }
1460
1461 pub fn with_request<V: Into<crate::model::UpdateMemoryLayerRequest>>(
1463 mut self,
1464 v: V,
1465 ) -> Self {
1466 self.0.request = v.into();
1467 self
1468 }
1469
1470 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1472 self.0.options = v.into();
1473 self
1474 }
1475
1476 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
1483 (*self.0.stub)
1484 .update_memory_layer(self.0.request, self.0.options)
1485 .await
1486 .map(crate::Response::into_body)
1487 }
1488
1489 pub fn poller(
1491 self,
1492 ) -> impl google_cloud_lro::Poller<
1493 crate::model::MemoryLayer,
1494 crate::model::UpdateMemoryLayerMetadata,
1495 > {
1496 type Operation = google_cloud_lro::internal::Operation<
1497 crate::model::MemoryLayer,
1498 crate::model::UpdateMemoryLayerMetadata,
1499 >;
1500 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1501 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1502 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
1503 if let Some(ref mut details) = poller_options.tracing {
1504 details.method_name = "google_cloud_bigtable_admin_v2::client::BigtableInstanceAdmin::update_memory_layer::until_done";
1505 }
1506
1507 let stub = self.0.stub.clone();
1508 let mut options = self.0.options.clone();
1509 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
1510 let query = move |name| {
1511 let stub = stub.clone();
1512 let options = options.clone();
1513 async {
1514 let op = GetOperation::new(stub)
1515 .set_name(name)
1516 .with_options(options)
1517 .send()
1518 .await?;
1519 Ok(Operation::new(op))
1520 }
1521 };
1522
1523 let start = move || async {
1524 let op = self.send().await?;
1525 Ok(Operation::new(op))
1526 };
1527
1528 use google_cloud_lro::internal::PollerExt;
1529 {
1530 google_cloud_lro::internal::new_poller(
1531 polling_error_policy,
1532 polling_backoff_policy,
1533 start,
1534 query,
1535 )
1536 }
1537 .with_options(poller_options)
1538 }
1539
1540 pub fn set_memory_layer<T>(mut self, v: T) -> Self
1544 where
1545 T: std::convert::Into<crate::model::MemoryLayer>,
1546 {
1547 self.0.request.memory_layer = std::option::Option::Some(v.into());
1548 self
1549 }
1550
1551 pub fn set_or_clear_memory_layer<T>(mut self, v: std::option::Option<T>) -> Self
1555 where
1556 T: std::convert::Into<crate::model::MemoryLayer>,
1557 {
1558 self.0.request.memory_layer = v.map(|x| x.into());
1559 self
1560 }
1561
1562 pub fn set_update_mask<T>(mut self, v: T) -> Self
1564 where
1565 T: std::convert::Into<wkt::FieldMask>,
1566 {
1567 self.0.request.update_mask = std::option::Option::Some(v.into());
1568 self
1569 }
1570
1571 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
1573 where
1574 T: std::convert::Into<wkt::FieldMask>,
1575 {
1576 self.0.request.update_mask = v.map(|x| x.into());
1577 self
1578 }
1579 }
1580
1581 #[doc(hidden)]
1582 impl crate::RequestBuilder for UpdateMemoryLayer {
1583 fn request_options(&mut self) -> &mut crate::RequestOptions {
1584 &mut self.0.options
1585 }
1586 }
1587
1588 #[derive(Clone, Debug)]
1609 pub struct ListMemoryLayers(RequestBuilder<crate::model::ListMemoryLayersRequest>);
1610
1611 impl ListMemoryLayers {
1612 pub(crate) fn new(
1613 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
1614 ) -> Self {
1615 Self(RequestBuilder::new(stub))
1616 }
1617
1618 pub fn with_request<V: Into<crate::model::ListMemoryLayersRequest>>(
1620 mut self,
1621 v: V,
1622 ) -> Self {
1623 self.0.request = v.into();
1624 self
1625 }
1626
1627 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1629 self.0.options = v.into();
1630 self
1631 }
1632
1633 pub async fn send(self) -> Result<crate::model::ListMemoryLayersResponse> {
1635 (*self.0.stub)
1636 .list_memory_layers(self.0.request, self.0.options)
1637 .await
1638 .map(crate::Response::into_body)
1639 }
1640
1641 pub fn by_page(
1643 self,
1644 ) -> impl google_cloud_gax::paginator::Paginator<
1645 crate::model::ListMemoryLayersResponse,
1646 crate::Error,
1647 > {
1648 use std::clone::Clone;
1649 let token = self.0.request.page_token.clone();
1650 let execute = move |token: String| {
1651 let mut builder = self.clone();
1652 builder.0.request = builder.0.request.set_page_token(token);
1653 builder.send()
1654 };
1655 google_cloud_gax::paginator::internal::new_paginator(token, execute)
1656 }
1657
1658 pub fn by_item(
1660 self,
1661 ) -> impl google_cloud_gax::paginator::ItemPaginator<
1662 crate::model::ListMemoryLayersResponse,
1663 crate::Error,
1664 > {
1665 use google_cloud_gax::paginator::Paginator;
1666 self.by_page().items()
1667 }
1668
1669 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1673 self.0.request.parent = v.into();
1674 self
1675 }
1676
1677 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1679 self.0.request.page_size = v.into();
1680 self
1681 }
1682
1683 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1685 self.0.request.page_token = v.into();
1686 self
1687 }
1688 }
1689
1690 #[doc(hidden)]
1691 impl crate::RequestBuilder for ListMemoryLayers {
1692 fn request_options(&mut self) -> &mut crate::RequestOptions {
1693 &mut self.0.options
1694 }
1695 }
1696
1697 #[derive(Clone, Debug)]
1714 pub struct GetMemoryLayer(RequestBuilder<crate::model::GetMemoryLayerRequest>);
1715
1716 impl GetMemoryLayer {
1717 pub(crate) fn new(
1718 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
1719 ) -> Self {
1720 Self(RequestBuilder::new(stub))
1721 }
1722
1723 pub fn with_request<V: Into<crate::model::GetMemoryLayerRequest>>(mut self, v: V) -> Self {
1725 self.0.request = v.into();
1726 self
1727 }
1728
1729 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1731 self.0.options = v.into();
1732 self
1733 }
1734
1735 pub async fn send(self) -> Result<crate::model::MemoryLayer> {
1737 (*self.0.stub)
1738 .get_memory_layer(self.0.request, self.0.options)
1739 .await
1740 .map(crate::Response::into_body)
1741 }
1742
1743 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1747 self.0.request.name = v.into();
1748 self
1749 }
1750 }
1751
1752 #[doc(hidden)]
1753 impl crate::RequestBuilder for GetMemoryLayer {
1754 fn request_options(&mut self) -> &mut crate::RequestOptions {
1755 &mut self.0.options
1756 }
1757 }
1758
1759 #[derive(Clone, Debug)]
1776 pub struct CreateAppProfile(RequestBuilder<crate::model::CreateAppProfileRequest>);
1777
1778 impl CreateAppProfile {
1779 pub(crate) fn new(
1780 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
1781 ) -> Self {
1782 Self(RequestBuilder::new(stub))
1783 }
1784
1785 pub fn with_request<V: Into<crate::model::CreateAppProfileRequest>>(
1787 mut self,
1788 v: V,
1789 ) -> Self {
1790 self.0.request = v.into();
1791 self
1792 }
1793
1794 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1796 self.0.options = v.into();
1797 self
1798 }
1799
1800 pub async fn send(self) -> Result<crate::model::AppProfile> {
1802 (*self.0.stub)
1803 .create_app_profile(self.0.request, self.0.options)
1804 .await
1805 .map(crate::Response::into_body)
1806 }
1807
1808 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1812 self.0.request.parent = v.into();
1813 self
1814 }
1815
1816 pub fn set_app_profile_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1820 self.0.request.app_profile_id = v.into();
1821 self
1822 }
1823
1824 pub fn set_app_profile<T>(mut self, v: T) -> Self
1828 where
1829 T: std::convert::Into<crate::model::AppProfile>,
1830 {
1831 self.0.request.app_profile = std::option::Option::Some(v.into());
1832 self
1833 }
1834
1835 pub fn set_or_clear_app_profile<T>(mut self, v: std::option::Option<T>) -> Self
1839 where
1840 T: std::convert::Into<crate::model::AppProfile>,
1841 {
1842 self.0.request.app_profile = v.map(|x| x.into());
1843 self
1844 }
1845
1846 pub fn set_ignore_warnings<T: Into<bool>>(mut self, v: T) -> Self {
1848 self.0.request.ignore_warnings = v.into();
1849 self
1850 }
1851 }
1852
1853 #[doc(hidden)]
1854 impl crate::RequestBuilder for CreateAppProfile {
1855 fn request_options(&mut self) -> &mut crate::RequestOptions {
1856 &mut self.0.options
1857 }
1858 }
1859
1860 #[derive(Clone, Debug)]
1877 pub struct GetAppProfile(RequestBuilder<crate::model::GetAppProfileRequest>);
1878
1879 impl GetAppProfile {
1880 pub(crate) fn new(
1881 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
1882 ) -> Self {
1883 Self(RequestBuilder::new(stub))
1884 }
1885
1886 pub fn with_request<V: Into<crate::model::GetAppProfileRequest>>(mut self, v: V) -> Self {
1888 self.0.request = v.into();
1889 self
1890 }
1891
1892 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1894 self.0.options = v.into();
1895 self
1896 }
1897
1898 pub async fn send(self) -> Result<crate::model::AppProfile> {
1900 (*self.0.stub)
1901 .get_app_profile(self.0.request, self.0.options)
1902 .await
1903 .map(crate::Response::into_body)
1904 }
1905
1906 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1910 self.0.request.name = v.into();
1911 self
1912 }
1913 }
1914
1915 #[doc(hidden)]
1916 impl crate::RequestBuilder for GetAppProfile {
1917 fn request_options(&mut self) -> &mut crate::RequestOptions {
1918 &mut self.0.options
1919 }
1920 }
1921
1922 #[derive(Clone, Debug)]
1943 pub struct ListAppProfiles(RequestBuilder<crate::model::ListAppProfilesRequest>);
1944
1945 impl ListAppProfiles {
1946 pub(crate) fn new(
1947 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
1948 ) -> Self {
1949 Self(RequestBuilder::new(stub))
1950 }
1951
1952 pub fn with_request<V: Into<crate::model::ListAppProfilesRequest>>(mut self, v: V) -> Self {
1954 self.0.request = v.into();
1955 self
1956 }
1957
1958 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1960 self.0.options = v.into();
1961 self
1962 }
1963
1964 pub async fn send(self) -> Result<crate::model::ListAppProfilesResponse> {
1966 (*self.0.stub)
1967 .list_app_profiles(self.0.request, self.0.options)
1968 .await
1969 .map(crate::Response::into_body)
1970 }
1971
1972 pub fn by_page(
1974 self,
1975 ) -> impl google_cloud_gax::paginator::Paginator<
1976 crate::model::ListAppProfilesResponse,
1977 crate::Error,
1978 > {
1979 use std::clone::Clone;
1980 let token = self.0.request.page_token.clone();
1981 let execute = move |token: String| {
1982 let mut builder = self.clone();
1983 builder.0.request = builder.0.request.set_page_token(token);
1984 builder.send()
1985 };
1986 google_cloud_gax::paginator::internal::new_paginator(token, execute)
1987 }
1988
1989 pub fn by_item(
1991 self,
1992 ) -> impl google_cloud_gax::paginator::ItemPaginator<
1993 crate::model::ListAppProfilesResponse,
1994 crate::Error,
1995 > {
1996 use google_cloud_gax::paginator::Paginator;
1997 self.by_page().items()
1998 }
1999
2000 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2004 self.0.request.parent = v.into();
2005 self
2006 }
2007
2008 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2010 self.0.request.page_size = v.into();
2011 self
2012 }
2013
2014 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2016 self.0.request.page_token = v.into();
2017 self
2018 }
2019 }
2020
2021 #[doc(hidden)]
2022 impl crate::RequestBuilder for ListAppProfiles {
2023 fn request_options(&mut self) -> &mut crate::RequestOptions {
2024 &mut self.0.options
2025 }
2026 }
2027
2028 #[derive(Clone, Debug)]
2046 pub struct UpdateAppProfile(RequestBuilder<crate::model::UpdateAppProfileRequest>);
2047
2048 impl UpdateAppProfile {
2049 pub(crate) fn new(
2050 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
2051 ) -> Self {
2052 Self(RequestBuilder::new(stub))
2053 }
2054
2055 pub fn with_request<V: Into<crate::model::UpdateAppProfileRequest>>(
2057 mut self,
2058 v: V,
2059 ) -> Self {
2060 self.0.request = v.into();
2061 self
2062 }
2063
2064 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2066 self.0.options = v.into();
2067 self
2068 }
2069
2070 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
2077 (*self.0.stub)
2078 .update_app_profile(self.0.request, self.0.options)
2079 .await
2080 .map(crate::Response::into_body)
2081 }
2082
2083 pub fn poller(
2085 self,
2086 ) -> impl google_cloud_lro::Poller<
2087 crate::model::AppProfile,
2088 crate::model::UpdateAppProfileMetadata,
2089 > {
2090 type Operation = google_cloud_lro::internal::Operation<
2091 crate::model::AppProfile,
2092 crate::model::UpdateAppProfileMetadata,
2093 >;
2094 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2095 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2096 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
2097 if let Some(ref mut details) = poller_options.tracing {
2098 details.method_name = "google_cloud_bigtable_admin_v2::client::BigtableInstanceAdmin::update_app_profile::until_done";
2099 }
2100
2101 let stub = self.0.stub.clone();
2102 let mut options = self.0.options.clone();
2103 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
2104 let query = move |name| {
2105 let stub = stub.clone();
2106 let options = options.clone();
2107 async {
2108 let op = GetOperation::new(stub)
2109 .set_name(name)
2110 .with_options(options)
2111 .send()
2112 .await?;
2113 Ok(Operation::new(op))
2114 }
2115 };
2116
2117 let start = move || async {
2118 let op = self.send().await?;
2119 Ok(Operation::new(op))
2120 };
2121
2122 use google_cloud_lro::internal::PollerExt;
2123 {
2124 google_cloud_lro::internal::new_poller(
2125 polling_error_policy,
2126 polling_backoff_policy,
2127 start,
2128 query,
2129 )
2130 }
2131 .with_options(poller_options)
2132 }
2133
2134 pub fn set_app_profile<T>(mut self, v: T) -> Self
2138 where
2139 T: std::convert::Into<crate::model::AppProfile>,
2140 {
2141 self.0.request.app_profile = std::option::Option::Some(v.into());
2142 self
2143 }
2144
2145 pub fn set_or_clear_app_profile<T>(mut self, v: std::option::Option<T>) -> Self
2149 where
2150 T: std::convert::Into<crate::model::AppProfile>,
2151 {
2152 self.0.request.app_profile = v.map(|x| x.into());
2153 self
2154 }
2155
2156 pub fn set_update_mask<T>(mut self, v: T) -> Self
2160 where
2161 T: std::convert::Into<wkt::FieldMask>,
2162 {
2163 self.0.request.update_mask = std::option::Option::Some(v.into());
2164 self
2165 }
2166
2167 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
2171 where
2172 T: std::convert::Into<wkt::FieldMask>,
2173 {
2174 self.0.request.update_mask = v.map(|x| x.into());
2175 self
2176 }
2177
2178 pub fn set_ignore_warnings<T: Into<bool>>(mut self, v: T) -> Self {
2180 self.0.request.ignore_warnings = v.into();
2181 self
2182 }
2183 }
2184
2185 #[doc(hidden)]
2186 impl crate::RequestBuilder for UpdateAppProfile {
2187 fn request_options(&mut self) -> &mut crate::RequestOptions {
2188 &mut self.0.options
2189 }
2190 }
2191
2192 #[derive(Clone, Debug)]
2209 pub struct DeleteAppProfile(RequestBuilder<crate::model::DeleteAppProfileRequest>);
2210
2211 impl DeleteAppProfile {
2212 pub(crate) fn new(
2213 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
2214 ) -> Self {
2215 Self(RequestBuilder::new(stub))
2216 }
2217
2218 pub fn with_request<V: Into<crate::model::DeleteAppProfileRequest>>(
2220 mut self,
2221 v: V,
2222 ) -> Self {
2223 self.0.request = v.into();
2224 self
2225 }
2226
2227 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2229 self.0.options = v.into();
2230 self
2231 }
2232
2233 pub async fn send(self) -> Result<()> {
2235 (*self.0.stub)
2236 .delete_app_profile(self.0.request, self.0.options)
2237 .await
2238 .map(crate::Response::into_body)
2239 }
2240
2241 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2245 self.0.request.name = v.into();
2246 self
2247 }
2248
2249 pub fn set_ignore_warnings<T: Into<bool>>(mut self, v: T) -> Self {
2253 self.0.request.ignore_warnings = v.into();
2254 self
2255 }
2256 }
2257
2258 #[doc(hidden)]
2259 impl crate::RequestBuilder for DeleteAppProfile {
2260 fn request_options(&mut self) -> &mut crate::RequestOptions {
2261 &mut self.0.options
2262 }
2263 }
2264
2265 #[derive(Clone, Debug)]
2282 pub struct GetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::GetIamPolicyRequest>);
2283
2284 impl GetIamPolicy {
2285 pub(crate) fn new(
2286 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
2287 ) -> Self {
2288 Self(RequestBuilder::new(stub))
2289 }
2290
2291 pub fn with_request<V: Into<google_cloud_iam_v1::model::GetIamPolicyRequest>>(
2293 mut self,
2294 v: V,
2295 ) -> Self {
2296 self.0.request = v.into();
2297 self
2298 }
2299
2300 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2302 self.0.options = v.into();
2303 self
2304 }
2305
2306 pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
2308 (*self.0.stub)
2309 .get_iam_policy(self.0.request, self.0.options)
2310 .await
2311 .map(crate::Response::into_body)
2312 }
2313
2314 pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
2318 self.0.request.resource = v.into();
2319 self
2320 }
2321
2322 pub fn set_options<T>(mut self, v: T) -> Self
2324 where
2325 T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
2326 {
2327 self.0.request.options = std::option::Option::Some(v.into());
2328 self
2329 }
2330
2331 pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
2333 where
2334 T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
2335 {
2336 self.0.request.options = v.map(|x| x.into());
2337 self
2338 }
2339 }
2340
2341 #[doc(hidden)]
2342 impl crate::RequestBuilder for GetIamPolicy {
2343 fn request_options(&mut self) -> &mut crate::RequestOptions {
2344 &mut self.0.options
2345 }
2346 }
2347
2348 #[derive(Clone, Debug)]
2365 pub struct SetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::SetIamPolicyRequest>);
2366
2367 impl SetIamPolicy {
2368 pub(crate) fn new(
2369 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
2370 ) -> Self {
2371 Self(RequestBuilder::new(stub))
2372 }
2373
2374 pub fn with_request<V: Into<google_cloud_iam_v1::model::SetIamPolicyRequest>>(
2376 mut self,
2377 v: V,
2378 ) -> Self {
2379 self.0.request = v.into();
2380 self
2381 }
2382
2383 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2385 self.0.options = v.into();
2386 self
2387 }
2388
2389 pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
2391 (*self.0.stub)
2392 .set_iam_policy(self.0.request, self.0.options)
2393 .await
2394 .map(crate::Response::into_body)
2395 }
2396
2397 pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
2401 self.0.request.resource = v.into();
2402 self
2403 }
2404
2405 pub fn set_policy<T>(mut self, v: T) -> Self
2409 where
2410 T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
2411 {
2412 self.0.request.policy = std::option::Option::Some(v.into());
2413 self
2414 }
2415
2416 pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
2420 where
2421 T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
2422 {
2423 self.0.request.policy = v.map(|x| x.into());
2424 self
2425 }
2426
2427 pub fn set_update_mask<T>(mut self, v: T) -> Self
2429 where
2430 T: std::convert::Into<wkt::FieldMask>,
2431 {
2432 self.0.request.update_mask = std::option::Option::Some(v.into());
2433 self
2434 }
2435
2436 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
2438 where
2439 T: std::convert::Into<wkt::FieldMask>,
2440 {
2441 self.0.request.update_mask = v.map(|x| x.into());
2442 self
2443 }
2444 }
2445
2446 #[doc(hidden)]
2447 impl crate::RequestBuilder for SetIamPolicy {
2448 fn request_options(&mut self) -> &mut crate::RequestOptions {
2449 &mut self.0.options
2450 }
2451 }
2452
2453 #[derive(Clone, Debug)]
2470 pub struct TestIamPermissions(
2471 RequestBuilder<google_cloud_iam_v1::model::TestIamPermissionsRequest>,
2472 );
2473
2474 impl TestIamPermissions {
2475 pub(crate) fn new(
2476 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
2477 ) -> Self {
2478 Self(RequestBuilder::new(stub))
2479 }
2480
2481 pub fn with_request<V: Into<google_cloud_iam_v1::model::TestIamPermissionsRequest>>(
2483 mut self,
2484 v: V,
2485 ) -> Self {
2486 self.0.request = v.into();
2487 self
2488 }
2489
2490 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2492 self.0.options = v.into();
2493 self
2494 }
2495
2496 pub async fn send(self) -> Result<google_cloud_iam_v1::model::TestIamPermissionsResponse> {
2498 (*self.0.stub)
2499 .test_iam_permissions(self.0.request, self.0.options)
2500 .await
2501 .map(crate::Response::into_body)
2502 }
2503
2504 pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
2508 self.0.request.resource = v.into();
2509 self
2510 }
2511
2512 pub fn set_permissions<T, V>(mut self, v: T) -> Self
2516 where
2517 T: std::iter::IntoIterator<Item = V>,
2518 V: std::convert::Into<std::string::String>,
2519 {
2520 use std::iter::Iterator;
2521 self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
2522 self
2523 }
2524 }
2525
2526 #[doc(hidden)]
2527 impl crate::RequestBuilder for TestIamPermissions {
2528 fn request_options(&mut self) -> &mut crate::RequestOptions {
2529 &mut self.0.options
2530 }
2531 }
2532
2533 #[derive(Clone, Debug)]
2554 pub struct ListHotTablets(RequestBuilder<crate::model::ListHotTabletsRequest>);
2555
2556 impl ListHotTablets {
2557 pub(crate) fn new(
2558 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
2559 ) -> Self {
2560 Self(RequestBuilder::new(stub))
2561 }
2562
2563 pub fn with_request<V: Into<crate::model::ListHotTabletsRequest>>(mut self, v: V) -> Self {
2565 self.0.request = v.into();
2566 self
2567 }
2568
2569 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2571 self.0.options = v.into();
2572 self
2573 }
2574
2575 pub async fn send(self) -> Result<crate::model::ListHotTabletsResponse> {
2577 (*self.0.stub)
2578 .list_hot_tablets(self.0.request, self.0.options)
2579 .await
2580 .map(crate::Response::into_body)
2581 }
2582
2583 pub fn by_page(
2585 self,
2586 ) -> impl google_cloud_gax::paginator::Paginator<
2587 crate::model::ListHotTabletsResponse,
2588 crate::Error,
2589 > {
2590 use std::clone::Clone;
2591 let token = self.0.request.page_token.clone();
2592 let execute = move |token: String| {
2593 let mut builder = self.clone();
2594 builder.0.request = builder.0.request.set_page_token(token);
2595 builder.send()
2596 };
2597 google_cloud_gax::paginator::internal::new_paginator(token, execute)
2598 }
2599
2600 pub fn by_item(
2602 self,
2603 ) -> impl google_cloud_gax::paginator::ItemPaginator<
2604 crate::model::ListHotTabletsResponse,
2605 crate::Error,
2606 > {
2607 use google_cloud_gax::paginator::Paginator;
2608 self.by_page().items()
2609 }
2610
2611 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2615 self.0.request.parent = v.into();
2616 self
2617 }
2618
2619 pub fn set_start_time<T>(mut self, v: T) -> Self
2621 where
2622 T: std::convert::Into<wkt::Timestamp>,
2623 {
2624 self.0.request.start_time = std::option::Option::Some(v.into());
2625 self
2626 }
2627
2628 pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
2630 where
2631 T: std::convert::Into<wkt::Timestamp>,
2632 {
2633 self.0.request.start_time = v.map(|x| x.into());
2634 self
2635 }
2636
2637 pub fn set_end_time<T>(mut self, v: T) -> Self
2639 where
2640 T: std::convert::Into<wkt::Timestamp>,
2641 {
2642 self.0.request.end_time = std::option::Option::Some(v.into());
2643 self
2644 }
2645
2646 pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
2648 where
2649 T: std::convert::Into<wkt::Timestamp>,
2650 {
2651 self.0.request.end_time = v.map(|x| x.into());
2652 self
2653 }
2654
2655 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2657 self.0.request.page_size = v.into();
2658 self
2659 }
2660
2661 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2663 self.0.request.page_token = v.into();
2664 self
2665 }
2666 }
2667
2668 #[doc(hidden)]
2669 impl crate::RequestBuilder for ListHotTablets {
2670 fn request_options(&mut self) -> &mut crate::RequestOptions {
2671 &mut self.0.options
2672 }
2673 }
2674
2675 #[derive(Clone, Debug)]
2693 pub struct CreateLogicalView(RequestBuilder<crate::model::CreateLogicalViewRequest>);
2694
2695 impl CreateLogicalView {
2696 pub(crate) fn new(
2697 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
2698 ) -> Self {
2699 Self(RequestBuilder::new(stub))
2700 }
2701
2702 pub fn with_request<V: Into<crate::model::CreateLogicalViewRequest>>(
2704 mut self,
2705 v: V,
2706 ) -> Self {
2707 self.0.request = v.into();
2708 self
2709 }
2710
2711 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2713 self.0.options = v.into();
2714 self
2715 }
2716
2717 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
2724 (*self.0.stub)
2725 .create_logical_view(self.0.request, self.0.options)
2726 .await
2727 .map(crate::Response::into_body)
2728 }
2729
2730 pub fn poller(
2732 self,
2733 ) -> impl google_cloud_lro::Poller<
2734 crate::model::LogicalView,
2735 crate::model::CreateLogicalViewMetadata,
2736 > {
2737 type Operation = google_cloud_lro::internal::Operation<
2738 crate::model::LogicalView,
2739 crate::model::CreateLogicalViewMetadata,
2740 >;
2741 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2742 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2743 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
2744 if let Some(ref mut details) = poller_options.tracing {
2745 details.method_name = "google_cloud_bigtable_admin_v2::client::BigtableInstanceAdmin::create_logical_view::until_done";
2746 }
2747
2748 let stub = self.0.stub.clone();
2749 let mut options = self.0.options.clone();
2750 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
2751 let query = move |name| {
2752 let stub = stub.clone();
2753 let options = options.clone();
2754 async {
2755 let op = GetOperation::new(stub)
2756 .set_name(name)
2757 .with_options(options)
2758 .send()
2759 .await?;
2760 Ok(Operation::new(op))
2761 }
2762 };
2763
2764 let start = move || async {
2765 let op = self.send().await?;
2766 Ok(Operation::new(op))
2767 };
2768
2769 use google_cloud_lro::internal::PollerExt;
2770 {
2771 google_cloud_lro::internal::new_poller(
2772 polling_error_policy,
2773 polling_backoff_policy,
2774 start,
2775 query,
2776 )
2777 }
2778 .with_options(poller_options)
2779 }
2780
2781 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2785 self.0.request.parent = v.into();
2786 self
2787 }
2788
2789 pub fn set_logical_view_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2793 self.0.request.logical_view_id = v.into();
2794 self
2795 }
2796
2797 pub fn set_logical_view<T>(mut self, v: T) -> Self
2801 where
2802 T: std::convert::Into<crate::model::LogicalView>,
2803 {
2804 self.0.request.logical_view = std::option::Option::Some(v.into());
2805 self
2806 }
2807
2808 pub fn set_or_clear_logical_view<T>(mut self, v: std::option::Option<T>) -> Self
2812 where
2813 T: std::convert::Into<crate::model::LogicalView>,
2814 {
2815 self.0.request.logical_view = v.map(|x| x.into());
2816 self
2817 }
2818 }
2819
2820 #[doc(hidden)]
2821 impl crate::RequestBuilder for CreateLogicalView {
2822 fn request_options(&mut self) -> &mut crate::RequestOptions {
2823 &mut self.0.options
2824 }
2825 }
2826
2827 #[derive(Clone, Debug)]
2844 pub struct GetLogicalView(RequestBuilder<crate::model::GetLogicalViewRequest>);
2845
2846 impl GetLogicalView {
2847 pub(crate) fn new(
2848 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
2849 ) -> Self {
2850 Self(RequestBuilder::new(stub))
2851 }
2852
2853 pub fn with_request<V: Into<crate::model::GetLogicalViewRequest>>(mut self, v: V) -> Self {
2855 self.0.request = v.into();
2856 self
2857 }
2858
2859 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2861 self.0.options = v.into();
2862 self
2863 }
2864
2865 pub async fn send(self) -> Result<crate::model::LogicalView> {
2867 (*self.0.stub)
2868 .get_logical_view(self.0.request, self.0.options)
2869 .await
2870 .map(crate::Response::into_body)
2871 }
2872
2873 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2877 self.0.request.name = v.into();
2878 self
2879 }
2880 }
2881
2882 #[doc(hidden)]
2883 impl crate::RequestBuilder for GetLogicalView {
2884 fn request_options(&mut self) -> &mut crate::RequestOptions {
2885 &mut self.0.options
2886 }
2887 }
2888
2889 #[derive(Clone, Debug)]
2910 pub struct ListLogicalViews(RequestBuilder<crate::model::ListLogicalViewsRequest>);
2911
2912 impl ListLogicalViews {
2913 pub(crate) fn new(
2914 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
2915 ) -> Self {
2916 Self(RequestBuilder::new(stub))
2917 }
2918
2919 pub fn with_request<V: Into<crate::model::ListLogicalViewsRequest>>(
2921 mut self,
2922 v: V,
2923 ) -> Self {
2924 self.0.request = v.into();
2925 self
2926 }
2927
2928 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2930 self.0.options = v.into();
2931 self
2932 }
2933
2934 pub async fn send(self) -> Result<crate::model::ListLogicalViewsResponse> {
2936 (*self.0.stub)
2937 .list_logical_views(self.0.request, self.0.options)
2938 .await
2939 .map(crate::Response::into_body)
2940 }
2941
2942 pub fn by_page(
2944 self,
2945 ) -> impl google_cloud_gax::paginator::Paginator<
2946 crate::model::ListLogicalViewsResponse,
2947 crate::Error,
2948 > {
2949 use std::clone::Clone;
2950 let token = self.0.request.page_token.clone();
2951 let execute = move |token: String| {
2952 let mut builder = self.clone();
2953 builder.0.request = builder.0.request.set_page_token(token);
2954 builder.send()
2955 };
2956 google_cloud_gax::paginator::internal::new_paginator(token, execute)
2957 }
2958
2959 pub fn by_item(
2961 self,
2962 ) -> impl google_cloud_gax::paginator::ItemPaginator<
2963 crate::model::ListLogicalViewsResponse,
2964 crate::Error,
2965 > {
2966 use google_cloud_gax::paginator::Paginator;
2967 self.by_page().items()
2968 }
2969
2970 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2974 self.0.request.parent = v.into();
2975 self
2976 }
2977
2978 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2980 self.0.request.page_size = v.into();
2981 self
2982 }
2983
2984 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2986 self.0.request.page_token = v.into();
2987 self
2988 }
2989 }
2990
2991 #[doc(hidden)]
2992 impl crate::RequestBuilder for ListLogicalViews {
2993 fn request_options(&mut self) -> &mut crate::RequestOptions {
2994 &mut self.0.options
2995 }
2996 }
2997
2998 #[derive(Clone, Debug)]
3016 pub struct UpdateLogicalView(RequestBuilder<crate::model::UpdateLogicalViewRequest>);
3017
3018 impl UpdateLogicalView {
3019 pub(crate) fn new(
3020 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
3021 ) -> Self {
3022 Self(RequestBuilder::new(stub))
3023 }
3024
3025 pub fn with_request<V: Into<crate::model::UpdateLogicalViewRequest>>(
3027 mut self,
3028 v: V,
3029 ) -> Self {
3030 self.0.request = v.into();
3031 self
3032 }
3033
3034 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3036 self.0.options = v.into();
3037 self
3038 }
3039
3040 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
3047 (*self.0.stub)
3048 .update_logical_view(self.0.request, self.0.options)
3049 .await
3050 .map(crate::Response::into_body)
3051 }
3052
3053 pub fn poller(
3055 self,
3056 ) -> impl google_cloud_lro::Poller<
3057 crate::model::LogicalView,
3058 crate::model::UpdateLogicalViewMetadata,
3059 > {
3060 type Operation = google_cloud_lro::internal::Operation<
3061 crate::model::LogicalView,
3062 crate::model::UpdateLogicalViewMetadata,
3063 >;
3064 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3065 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3066 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
3067 if let Some(ref mut details) = poller_options.tracing {
3068 details.method_name = "google_cloud_bigtable_admin_v2::client::BigtableInstanceAdmin::update_logical_view::until_done";
3069 }
3070
3071 let stub = self.0.stub.clone();
3072 let mut options = self.0.options.clone();
3073 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
3074 let query = move |name| {
3075 let stub = stub.clone();
3076 let options = options.clone();
3077 async {
3078 let op = GetOperation::new(stub)
3079 .set_name(name)
3080 .with_options(options)
3081 .send()
3082 .await?;
3083 Ok(Operation::new(op))
3084 }
3085 };
3086
3087 let start = move || async {
3088 let op = self.send().await?;
3089 Ok(Operation::new(op))
3090 };
3091
3092 use google_cloud_lro::internal::PollerExt;
3093 {
3094 google_cloud_lro::internal::new_poller(
3095 polling_error_policy,
3096 polling_backoff_policy,
3097 start,
3098 query,
3099 )
3100 }
3101 .with_options(poller_options)
3102 }
3103
3104 pub fn set_logical_view<T>(mut self, v: T) -> Self
3108 where
3109 T: std::convert::Into<crate::model::LogicalView>,
3110 {
3111 self.0.request.logical_view = std::option::Option::Some(v.into());
3112 self
3113 }
3114
3115 pub fn set_or_clear_logical_view<T>(mut self, v: std::option::Option<T>) -> Self
3119 where
3120 T: std::convert::Into<crate::model::LogicalView>,
3121 {
3122 self.0.request.logical_view = v.map(|x| x.into());
3123 self
3124 }
3125
3126 pub fn set_update_mask<T>(mut self, v: T) -> Self
3128 where
3129 T: std::convert::Into<wkt::FieldMask>,
3130 {
3131 self.0.request.update_mask = std::option::Option::Some(v.into());
3132 self
3133 }
3134
3135 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
3137 where
3138 T: std::convert::Into<wkt::FieldMask>,
3139 {
3140 self.0.request.update_mask = v.map(|x| x.into());
3141 self
3142 }
3143 }
3144
3145 #[doc(hidden)]
3146 impl crate::RequestBuilder for UpdateLogicalView {
3147 fn request_options(&mut self) -> &mut crate::RequestOptions {
3148 &mut self.0.options
3149 }
3150 }
3151
3152 #[derive(Clone, Debug)]
3169 pub struct DeleteLogicalView(RequestBuilder<crate::model::DeleteLogicalViewRequest>);
3170
3171 impl DeleteLogicalView {
3172 pub(crate) fn new(
3173 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
3174 ) -> Self {
3175 Self(RequestBuilder::new(stub))
3176 }
3177
3178 pub fn with_request<V: Into<crate::model::DeleteLogicalViewRequest>>(
3180 mut self,
3181 v: V,
3182 ) -> Self {
3183 self.0.request = v.into();
3184 self
3185 }
3186
3187 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3189 self.0.options = v.into();
3190 self
3191 }
3192
3193 pub async fn send(self) -> Result<()> {
3195 (*self.0.stub)
3196 .delete_logical_view(self.0.request, self.0.options)
3197 .await
3198 .map(crate::Response::into_body)
3199 }
3200
3201 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3205 self.0.request.name = v.into();
3206 self
3207 }
3208
3209 pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
3211 self.0.request.etag = v.into();
3212 self
3213 }
3214 }
3215
3216 #[doc(hidden)]
3217 impl crate::RequestBuilder for DeleteLogicalView {
3218 fn request_options(&mut self) -> &mut crate::RequestOptions {
3219 &mut self.0.options
3220 }
3221 }
3222
3223 #[derive(Clone, Debug)]
3241 pub struct CreateMaterializedView(RequestBuilder<crate::model::CreateMaterializedViewRequest>);
3242
3243 impl CreateMaterializedView {
3244 pub(crate) fn new(
3245 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
3246 ) -> Self {
3247 Self(RequestBuilder::new(stub))
3248 }
3249
3250 pub fn with_request<V: Into<crate::model::CreateMaterializedViewRequest>>(
3252 mut self,
3253 v: V,
3254 ) -> Self {
3255 self.0.request = v.into();
3256 self
3257 }
3258
3259 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3261 self.0.options = v.into();
3262 self
3263 }
3264
3265 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
3272 (*self.0.stub)
3273 .create_materialized_view(self.0.request, self.0.options)
3274 .await
3275 .map(crate::Response::into_body)
3276 }
3277
3278 pub fn poller(
3280 self,
3281 ) -> impl google_cloud_lro::Poller<
3282 crate::model::MaterializedView,
3283 crate::model::CreateMaterializedViewMetadata,
3284 > {
3285 type Operation = google_cloud_lro::internal::Operation<
3286 crate::model::MaterializedView,
3287 crate::model::CreateMaterializedViewMetadata,
3288 >;
3289 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3290 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3291 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
3292 if let Some(ref mut details) = poller_options.tracing {
3293 details.method_name = "google_cloud_bigtable_admin_v2::client::BigtableInstanceAdmin::create_materialized_view::until_done";
3294 }
3295
3296 let stub = self.0.stub.clone();
3297 let mut options = self.0.options.clone();
3298 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
3299 let query = move |name| {
3300 let stub = stub.clone();
3301 let options = options.clone();
3302 async {
3303 let op = GetOperation::new(stub)
3304 .set_name(name)
3305 .with_options(options)
3306 .send()
3307 .await?;
3308 Ok(Operation::new(op))
3309 }
3310 };
3311
3312 let start = move || async {
3313 let op = self.send().await?;
3314 Ok(Operation::new(op))
3315 };
3316
3317 use google_cloud_lro::internal::PollerExt;
3318 {
3319 google_cloud_lro::internal::new_poller(
3320 polling_error_policy,
3321 polling_backoff_policy,
3322 start,
3323 query,
3324 )
3325 }
3326 .with_options(poller_options)
3327 }
3328
3329 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3333 self.0.request.parent = v.into();
3334 self
3335 }
3336
3337 pub fn set_materialized_view_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3341 self.0.request.materialized_view_id = v.into();
3342 self
3343 }
3344
3345 pub fn set_materialized_view<T>(mut self, v: T) -> Self
3349 where
3350 T: std::convert::Into<crate::model::MaterializedView>,
3351 {
3352 self.0.request.materialized_view = std::option::Option::Some(v.into());
3353 self
3354 }
3355
3356 pub fn set_or_clear_materialized_view<T>(mut self, v: std::option::Option<T>) -> Self
3360 where
3361 T: std::convert::Into<crate::model::MaterializedView>,
3362 {
3363 self.0.request.materialized_view = v.map(|x| x.into());
3364 self
3365 }
3366 }
3367
3368 #[doc(hidden)]
3369 impl crate::RequestBuilder for CreateMaterializedView {
3370 fn request_options(&mut self) -> &mut crate::RequestOptions {
3371 &mut self.0.options
3372 }
3373 }
3374
3375 #[derive(Clone, Debug)]
3392 pub struct GetMaterializedView(RequestBuilder<crate::model::GetMaterializedViewRequest>);
3393
3394 impl GetMaterializedView {
3395 pub(crate) fn new(
3396 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
3397 ) -> Self {
3398 Self(RequestBuilder::new(stub))
3399 }
3400
3401 pub fn with_request<V: Into<crate::model::GetMaterializedViewRequest>>(
3403 mut self,
3404 v: V,
3405 ) -> Self {
3406 self.0.request = v.into();
3407 self
3408 }
3409
3410 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3412 self.0.options = v.into();
3413 self
3414 }
3415
3416 pub async fn send(self) -> Result<crate::model::MaterializedView> {
3418 (*self.0.stub)
3419 .get_materialized_view(self.0.request, self.0.options)
3420 .await
3421 .map(crate::Response::into_body)
3422 }
3423
3424 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3428 self.0.request.name = v.into();
3429 self
3430 }
3431 }
3432
3433 #[doc(hidden)]
3434 impl crate::RequestBuilder for GetMaterializedView {
3435 fn request_options(&mut self) -> &mut crate::RequestOptions {
3436 &mut self.0.options
3437 }
3438 }
3439
3440 #[derive(Clone, Debug)]
3461 pub struct ListMaterializedViews(RequestBuilder<crate::model::ListMaterializedViewsRequest>);
3462
3463 impl ListMaterializedViews {
3464 pub(crate) fn new(
3465 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
3466 ) -> Self {
3467 Self(RequestBuilder::new(stub))
3468 }
3469
3470 pub fn with_request<V: Into<crate::model::ListMaterializedViewsRequest>>(
3472 mut self,
3473 v: V,
3474 ) -> Self {
3475 self.0.request = v.into();
3476 self
3477 }
3478
3479 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3481 self.0.options = v.into();
3482 self
3483 }
3484
3485 pub async fn send(self) -> Result<crate::model::ListMaterializedViewsResponse> {
3487 (*self.0.stub)
3488 .list_materialized_views(self.0.request, self.0.options)
3489 .await
3490 .map(crate::Response::into_body)
3491 }
3492
3493 pub fn by_page(
3495 self,
3496 ) -> impl google_cloud_gax::paginator::Paginator<
3497 crate::model::ListMaterializedViewsResponse,
3498 crate::Error,
3499 > {
3500 use std::clone::Clone;
3501 let token = self.0.request.page_token.clone();
3502 let execute = move |token: String| {
3503 let mut builder = self.clone();
3504 builder.0.request = builder.0.request.set_page_token(token);
3505 builder.send()
3506 };
3507 google_cloud_gax::paginator::internal::new_paginator(token, execute)
3508 }
3509
3510 pub fn by_item(
3512 self,
3513 ) -> impl google_cloud_gax::paginator::ItemPaginator<
3514 crate::model::ListMaterializedViewsResponse,
3515 crate::Error,
3516 > {
3517 use google_cloud_gax::paginator::Paginator;
3518 self.by_page().items()
3519 }
3520
3521 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3525 self.0.request.parent = v.into();
3526 self
3527 }
3528
3529 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
3531 self.0.request.page_size = v.into();
3532 self
3533 }
3534
3535 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
3537 self.0.request.page_token = v.into();
3538 self
3539 }
3540 }
3541
3542 #[doc(hidden)]
3543 impl crate::RequestBuilder for ListMaterializedViews {
3544 fn request_options(&mut self) -> &mut crate::RequestOptions {
3545 &mut self.0.options
3546 }
3547 }
3548
3549 #[derive(Clone, Debug)]
3567 pub struct UpdateMaterializedView(RequestBuilder<crate::model::UpdateMaterializedViewRequest>);
3568
3569 impl UpdateMaterializedView {
3570 pub(crate) fn new(
3571 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
3572 ) -> Self {
3573 Self(RequestBuilder::new(stub))
3574 }
3575
3576 pub fn with_request<V: Into<crate::model::UpdateMaterializedViewRequest>>(
3578 mut self,
3579 v: V,
3580 ) -> Self {
3581 self.0.request = v.into();
3582 self
3583 }
3584
3585 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3587 self.0.options = v.into();
3588 self
3589 }
3590
3591 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
3598 (*self.0.stub)
3599 .update_materialized_view(self.0.request, self.0.options)
3600 .await
3601 .map(crate::Response::into_body)
3602 }
3603
3604 pub fn poller(
3606 self,
3607 ) -> impl google_cloud_lro::Poller<
3608 crate::model::MaterializedView,
3609 crate::model::UpdateMaterializedViewMetadata,
3610 > {
3611 type Operation = google_cloud_lro::internal::Operation<
3612 crate::model::MaterializedView,
3613 crate::model::UpdateMaterializedViewMetadata,
3614 >;
3615 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3616 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3617 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
3618 if let Some(ref mut details) = poller_options.tracing {
3619 details.method_name = "google_cloud_bigtable_admin_v2::client::BigtableInstanceAdmin::update_materialized_view::until_done";
3620 }
3621
3622 let stub = self.0.stub.clone();
3623 let mut options = self.0.options.clone();
3624 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
3625 let query = move |name| {
3626 let stub = stub.clone();
3627 let options = options.clone();
3628 async {
3629 let op = GetOperation::new(stub)
3630 .set_name(name)
3631 .with_options(options)
3632 .send()
3633 .await?;
3634 Ok(Operation::new(op))
3635 }
3636 };
3637
3638 let start = move || async {
3639 let op = self.send().await?;
3640 Ok(Operation::new(op))
3641 };
3642
3643 use google_cloud_lro::internal::PollerExt;
3644 {
3645 google_cloud_lro::internal::new_poller(
3646 polling_error_policy,
3647 polling_backoff_policy,
3648 start,
3649 query,
3650 )
3651 }
3652 .with_options(poller_options)
3653 }
3654
3655 pub fn set_materialized_view<T>(mut self, v: T) -> Self
3659 where
3660 T: std::convert::Into<crate::model::MaterializedView>,
3661 {
3662 self.0.request.materialized_view = std::option::Option::Some(v.into());
3663 self
3664 }
3665
3666 pub fn set_or_clear_materialized_view<T>(mut self, v: std::option::Option<T>) -> Self
3670 where
3671 T: std::convert::Into<crate::model::MaterializedView>,
3672 {
3673 self.0.request.materialized_view = v.map(|x| x.into());
3674 self
3675 }
3676
3677 pub fn set_update_mask<T>(mut self, v: T) -> Self
3679 where
3680 T: std::convert::Into<wkt::FieldMask>,
3681 {
3682 self.0.request.update_mask = std::option::Option::Some(v.into());
3683 self
3684 }
3685
3686 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
3688 where
3689 T: std::convert::Into<wkt::FieldMask>,
3690 {
3691 self.0.request.update_mask = v.map(|x| x.into());
3692 self
3693 }
3694 }
3695
3696 #[doc(hidden)]
3697 impl crate::RequestBuilder for UpdateMaterializedView {
3698 fn request_options(&mut self) -> &mut crate::RequestOptions {
3699 &mut self.0.options
3700 }
3701 }
3702
3703 #[derive(Clone, Debug)]
3720 pub struct DeleteMaterializedView(RequestBuilder<crate::model::DeleteMaterializedViewRequest>);
3721
3722 impl DeleteMaterializedView {
3723 pub(crate) fn new(
3724 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
3725 ) -> Self {
3726 Self(RequestBuilder::new(stub))
3727 }
3728
3729 pub fn with_request<V: Into<crate::model::DeleteMaterializedViewRequest>>(
3731 mut self,
3732 v: V,
3733 ) -> Self {
3734 self.0.request = v.into();
3735 self
3736 }
3737
3738 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3740 self.0.options = v.into();
3741 self
3742 }
3743
3744 pub async fn send(self) -> Result<()> {
3746 (*self.0.stub)
3747 .delete_materialized_view(self.0.request, self.0.options)
3748 .await
3749 .map(crate::Response::into_body)
3750 }
3751
3752 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3756 self.0.request.name = v.into();
3757 self
3758 }
3759
3760 pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
3762 self.0.request.etag = v.into();
3763 self
3764 }
3765 }
3766
3767 #[doc(hidden)]
3768 impl crate::RequestBuilder for DeleteMaterializedView {
3769 fn request_options(&mut self) -> &mut crate::RequestOptions {
3770 &mut self.0.options
3771 }
3772 }
3773
3774 #[derive(Clone, Debug)]
3795 pub struct ListOperations(
3796 RequestBuilder<google_cloud_longrunning::model::ListOperationsRequest>,
3797 );
3798
3799 impl ListOperations {
3800 pub(crate) fn new(
3801 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
3802 ) -> Self {
3803 Self(RequestBuilder::new(stub))
3804 }
3805
3806 pub fn with_request<V: Into<google_cloud_longrunning::model::ListOperationsRequest>>(
3808 mut self,
3809 v: V,
3810 ) -> Self {
3811 self.0.request = v.into();
3812 self
3813 }
3814
3815 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3817 self.0.options = v.into();
3818 self
3819 }
3820
3821 pub async fn send(self) -> Result<google_cloud_longrunning::model::ListOperationsResponse> {
3823 (*self.0.stub)
3824 .list_operations(self.0.request, self.0.options)
3825 .await
3826 .map(crate::Response::into_body)
3827 }
3828
3829 pub fn by_page(
3831 self,
3832 ) -> impl google_cloud_gax::paginator::Paginator<
3833 google_cloud_longrunning::model::ListOperationsResponse,
3834 crate::Error,
3835 > {
3836 use std::clone::Clone;
3837 let token = self.0.request.page_token.clone();
3838 let execute = move |token: String| {
3839 let mut builder = self.clone();
3840 builder.0.request = builder.0.request.set_page_token(token);
3841 builder.send()
3842 };
3843 google_cloud_gax::paginator::internal::new_paginator(token, execute)
3844 }
3845
3846 pub fn by_item(
3848 self,
3849 ) -> impl google_cloud_gax::paginator::ItemPaginator<
3850 google_cloud_longrunning::model::ListOperationsResponse,
3851 crate::Error,
3852 > {
3853 use google_cloud_gax::paginator::Paginator;
3854 self.by_page().items()
3855 }
3856
3857 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3859 self.0.request.name = v.into();
3860 self
3861 }
3862
3863 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
3865 self.0.request.filter = v.into();
3866 self
3867 }
3868
3869 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
3871 self.0.request.page_size = v.into();
3872 self
3873 }
3874
3875 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
3877 self.0.request.page_token = v.into();
3878 self
3879 }
3880
3881 pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
3883 self.0.request.return_partial_success = v.into();
3884 self
3885 }
3886 }
3887
3888 #[doc(hidden)]
3889 impl crate::RequestBuilder for ListOperations {
3890 fn request_options(&mut self) -> &mut crate::RequestOptions {
3891 &mut self.0.options
3892 }
3893 }
3894
3895 #[derive(Clone, Debug)]
3912 pub struct GetOperation(RequestBuilder<google_cloud_longrunning::model::GetOperationRequest>);
3913
3914 impl GetOperation {
3915 pub(crate) fn new(
3916 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
3917 ) -> Self {
3918 Self(RequestBuilder::new(stub))
3919 }
3920
3921 pub fn with_request<V: Into<google_cloud_longrunning::model::GetOperationRequest>>(
3923 mut self,
3924 v: V,
3925 ) -> Self {
3926 self.0.request = v.into();
3927 self
3928 }
3929
3930 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3932 self.0.options = v.into();
3933 self
3934 }
3935
3936 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
3938 (*self.0.stub)
3939 .get_operation(self.0.request, self.0.options)
3940 .await
3941 .map(crate::Response::into_body)
3942 }
3943
3944 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3946 self.0.request.name = v.into();
3947 self
3948 }
3949 }
3950
3951 #[doc(hidden)]
3952 impl crate::RequestBuilder for GetOperation {
3953 fn request_options(&mut self) -> &mut crate::RequestOptions {
3954 &mut self.0.options
3955 }
3956 }
3957
3958 #[derive(Clone, Debug)]
3975 pub struct DeleteOperation(
3976 RequestBuilder<google_cloud_longrunning::model::DeleteOperationRequest>,
3977 );
3978
3979 impl DeleteOperation {
3980 pub(crate) fn new(
3981 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
3982 ) -> Self {
3983 Self(RequestBuilder::new(stub))
3984 }
3985
3986 pub fn with_request<V: Into<google_cloud_longrunning::model::DeleteOperationRequest>>(
3988 mut self,
3989 v: V,
3990 ) -> Self {
3991 self.0.request = v.into();
3992 self
3993 }
3994
3995 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3997 self.0.options = v.into();
3998 self
3999 }
4000
4001 pub async fn send(self) -> Result<()> {
4003 (*self.0.stub)
4004 .delete_operation(self.0.request, self.0.options)
4005 .await
4006 .map(crate::Response::into_body)
4007 }
4008
4009 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4011 self.0.request.name = v.into();
4012 self
4013 }
4014 }
4015
4016 #[doc(hidden)]
4017 impl crate::RequestBuilder for DeleteOperation {
4018 fn request_options(&mut self) -> &mut crate::RequestOptions {
4019 &mut self.0.options
4020 }
4021 }
4022
4023 #[derive(Clone, Debug)]
4040 pub struct CancelOperation(
4041 RequestBuilder<google_cloud_longrunning::model::CancelOperationRequest>,
4042 );
4043
4044 impl CancelOperation {
4045 pub(crate) fn new(
4046 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
4047 ) -> Self {
4048 Self(RequestBuilder::new(stub))
4049 }
4050
4051 pub fn with_request<V: Into<google_cloud_longrunning::model::CancelOperationRequest>>(
4053 mut self,
4054 v: V,
4055 ) -> Self {
4056 self.0.request = v.into();
4057 self
4058 }
4059
4060 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4062 self.0.options = v.into();
4063 self
4064 }
4065
4066 pub async fn send(self) -> Result<()> {
4068 (*self.0.stub)
4069 .cancel_operation(self.0.request, self.0.options)
4070 .await
4071 .map(crate::Response::into_body)
4072 }
4073
4074 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4076 self.0.request.name = v.into();
4077 self
4078 }
4079 }
4080
4081 #[doc(hidden)]
4082 impl crate::RequestBuilder for CancelOperation {
4083 fn request_options(&mut self) -> &mut crate::RequestOptions {
4084 &mut self.0.options
4085 }
4086 }
4087}
4088
4089pub mod bigtable_table_admin {
4091 use crate::Result;
4092
4093 pub type ClientBuilder = crate::ClientBuilder<client::Factory, gaxi::options::Credentials>;
4107
4108 pub(crate) mod client {
4109 use super::super::super::client::BigtableTableAdmin;
4110 pub struct Factory;
4111 impl crate::ClientFactory for Factory {
4112 type Client = BigtableTableAdmin;
4113 type Credentials = gaxi::options::Credentials;
4114 async fn build(
4115 self,
4116 config: gaxi::options::ClientConfig,
4117 ) -> crate::ClientBuilderResult<Self::Client> {
4118 Self::Client::new(config).await
4119 }
4120 }
4121 }
4122
4123 #[derive(Clone, Debug)]
4125 pub(crate) struct RequestBuilder<R: std::default::Default> {
4126 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
4127 request: R,
4128 options: crate::RequestOptions,
4129 }
4130
4131 impl<R> RequestBuilder<R>
4132 where
4133 R: std::default::Default,
4134 {
4135 pub(crate) fn new(
4136 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
4137 ) -> Self {
4138 Self {
4139 stub,
4140 request: R::default(),
4141 options: crate::RequestOptions::default(),
4142 }
4143 }
4144 }
4145
4146 #[derive(Clone, Debug)]
4163 pub struct CreateTable(RequestBuilder<crate::model::CreateTableRequest>);
4164
4165 impl CreateTable {
4166 pub(crate) fn new(
4167 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
4168 ) -> Self {
4169 Self(RequestBuilder::new(stub))
4170 }
4171
4172 pub fn with_request<V: Into<crate::model::CreateTableRequest>>(mut self, v: V) -> Self {
4174 self.0.request = v.into();
4175 self
4176 }
4177
4178 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4180 self.0.options = v.into();
4181 self
4182 }
4183
4184 pub async fn send(self) -> Result<crate::model::Table> {
4186 (*self.0.stub)
4187 .create_table(self.0.request, self.0.options)
4188 .await
4189 .map(crate::Response::into_body)
4190 }
4191
4192 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
4196 self.0.request.parent = v.into();
4197 self
4198 }
4199
4200 pub fn set_table_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
4204 self.0.request.table_id = v.into();
4205 self
4206 }
4207
4208 pub fn set_table<T>(mut self, v: T) -> Self
4212 where
4213 T: std::convert::Into<crate::model::Table>,
4214 {
4215 self.0.request.table = std::option::Option::Some(v.into());
4216 self
4217 }
4218
4219 pub fn set_or_clear_table<T>(mut self, v: std::option::Option<T>) -> Self
4223 where
4224 T: std::convert::Into<crate::model::Table>,
4225 {
4226 self.0.request.table = v.map(|x| x.into());
4227 self
4228 }
4229
4230 pub fn set_initial_splits<T, V>(mut self, v: T) -> Self
4232 where
4233 T: std::iter::IntoIterator<Item = V>,
4234 V: std::convert::Into<crate::model::create_table_request::Split>,
4235 {
4236 use std::iter::Iterator;
4237 self.0.request.initial_splits = v.into_iter().map(|i| i.into()).collect();
4238 self
4239 }
4240 }
4241
4242 #[doc(hidden)]
4243 impl crate::RequestBuilder for CreateTable {
4244 fn request_options(&mut self) -> &mut crate::RequestOptions {
4245 &mut self.0.options
4246 }
4247 }
4248
4249 #[derive(Clone, Debug)]
4267 pub struct CreateTableFromSnapshot(
4268 RequestBuilder<crate::model::CreateTableFromSnapshotRequest>,
4269 );
4270
4271 impl CreateTableFromSnapshot {
4272 pub(crate) fn new(
4273 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
4274 ) -> Self {
4275 Self(RequestBuilder::new(stub))
4276 }
4277
4278 pub fn with_request<V: Into<crate::model::CreateTableFromSnapshotRequest>>(
4280 mut self,
4281 v: V,
4282 ) -> Self {
4283 self.0.request = v.into();
4284 self
4285 }
4286
4287 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4289 self.0.options = v.into();
4290 self
4291 }
4292
4293 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
4300 (*self.0.stub)
4301 .create_table_from_snapshot(self.0.request, self.0.options)
4302 .await
4303 .map(crate::Response::into_body)
4304 }
4305
4306 pub fn poller(
4308 self,
4309 ) -> impl google_cloud_lro::Poller<
4310 crate::model::Table,
4311 crate::model::CreateTableFromSnapshotMetadata,
4312 > {
4313 type Operation = google_cloud_lro::internal::Operation<
4314 crate::model::Table,
4315 crate::model::CreateTableFromSnapshotMetadata,
4316 >;
4317 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4318 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4319 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
4320 if let Some(ref mut details) = poller_options.tracing {
4321 details.method_name = "google_cloud_bigtable_admin_v2::client::BigtableTableAdmin::create_table_from_snapshot::until_done";
4322 }
4323
4324 let stub = self.0.stub.clone();
4325 let mut options = self.0.options.clone();
4326 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
4327 let query = move |name| {
4328 let stub = stub.clone();
4329 let options = options.clone();
4330 async {
4331 let op = GetOperation::new(stub)
4332 .set_name(name)
4333 .with_options(options)
4334 .send()
4335 .await?;
4336 Ok(Operation::new(op))
4337 }
4338 };
4339
4340 let start = move || async {
4341 let op = self.send().await?;
4342 Ok(Operation::new(op))
4343 };
4344
4345 use google_cloud_lro::internal::PollerExt;
4346 {
4347 google_cloud_lro::internal::new_poller(
4348 polling_error_policy,
4349 polling_backoff_policy,
4350 start,
4351 query,
4352 )
4353 }
4354 .with_options(poller_options)
4355 }
4356
4357 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
4361 self.0.request.parent = v.into();
4362 self
4363 }
4364
4365 pub fn set_table_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
4369 self.0.request.table_id = v.into();
4370 self
4371 }
4372
4373 pub fn set_source_snapshot<T: Into<std::string::String>>(mut self, v: T) -> Self {
4377 self.0.request.source_snapshot = v.into();
4378 self
4379 }
4380 }
4381
4382 #[doc(hidden)]
4383 impl crate::RequestBuilder for CreateTableFromSnapshot {
4384 fn request_options(&mut self) -> &mut crate::RequestOptions {
4385 &mut self.0.options
4386 }
4387 }
4388
4389 #[derive(Clone, Debug)]
4410 pub struct ListTables(RequestBuilder<crate::model::ListTablesRequest>);
4411
4412 impl ListTables {
4413 pub(crate) fn new(
4414 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
4415 ) -> Self {
4416 Self(RequestBuilder::new(stub))
4417 }
4418
4419 pub fn with_request<V: Into<crate::model::ListTablesRequest>>(mut self, v: V) -> Self {
4421 self.0.request = v.into();
4422 self
4423 }
4424
4425 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4427 self.0.options = v.into();
4428 self
4429 }
4430
4431 pub async fn send(self) -> Result<crate::model::ListTablesResponse> {
4433 (*self.0.stub)
4434 .list_tables(self.0.request, self.0.options)
4435 .await
4436 .map(crate::Response::into_body)
4437 }
4438
4439 pub fn by_page(
4441 self,
4442 ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListTablesResponse, crate::Error>
4443 {
4444 use std::clone::Clone;
4445 let token = self.0.request.page_token.clone();
4446 let execute = move |token: String| {
4447 let mut builder = self.clone();
4448 builder.0.request = builder.0.request.set_page_token(token);
4449 builder.send()
4450 };
4451 google_cloud_gax::paginator::internal::new_paginator(token, execute)
4452 }
4453
4454 pub fn by_item(
4456 self,
4457 ) -> impl google_cloud_gax::paginator::ItemPaginator<
4458 crate::model::ListTablesResponse,
4459 crate::Error,
4460 > {
4461 use google_cloud_gax::paginator::Paginator;
4462 self.by_page().items()
4463 }
4464
4465 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
4469 self.0.request.parent = v.into();
4470 self
4471 }
4472
4473 pub fn set_view<T: Into<crate::model::table::View>>(mut self, v: T) -> Self {
4475 self.0.request.view = v.into();
4476 self
4477 }
4478
4479 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
4481 self.0.request.page_size = v.into();
4482 self
4483 }
4484
4485 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
4487 self.0.request.page_token = v.into();
4488 self
4489 }
4490 }
4491
4492 #[doc(hidden)]
4493 impl crate::RequestBuilder for ListTables {
4494 fn request_options(&mut self) -> &mut crate::RequestOptions {
4495 &mut self.0.options
4496 }
4497 }
4498
4499 #[derive(Clone, Debug)]
4516 pub struct GetTable(RequestBuilder<crate::model::GetTableRequest>);
4517
4518 impl GetTable {
4519 pub(crate) fn new(
4520 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
4521 ) -> Self {
4522 Self(RequestBuilder::new(stub))
4523 }
4524
4525 pub fn with_request<V: Into<crate::model::GetTableRequest>>(mut self, v: V) -> Self {
4527 self.0.request = v.into();
4528 self
4529 }
4530
4531 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4533 self.0.options = v.into();
4534 self
4535 }
4536
4537 pub async fn send(self) -> Result<crate::model::Table> {
4539 (*self.0.stub)
4540 .get_table(self.0.request, self.0.options)
4541 .await
4542 .map(crate::Response::into_body)
4543 }
4544
4545 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4549 self.0.request.name = v.into();
4550 self
4551 }
4552
4553 pub fn set_view<T: Into<crate::model::table::View>>(mut self, v: T) -> Self {
4555 self.0.request.view = v.into();
4556 self
4557 }
4558 }
4559
4560 #[doc(hidden)]
4561 impl crate::RequestBuilder for GetTable {
4562 fn request_options(&mut self) -> &mut crate::RequestOptions {
4563 &mut self.0.options
4564 }
4565 }
4566
4567 #[derive(Clone, Debug)]
4585 pub struct UpdateTable(RequestBuilder<crate::model::UpdateTableRequest>);
4586
4587 impl UpdateTable {
4588 pub(crate) fn new(
4589 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
4590 ) -> Self {
4591 Self(RequestBuilder::new(stub))
4592 }
4593
4594 pub fn with_request<V: Into<crate::model::UpdateTableRequest>>(mut self, v: V) -> Self {
4596 self.0.request = v.into();
4597 self
4598 }
4599
4600 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4602 self.0.options = v.into();
4603 self
4604 }
4605
4606 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
4613 (*self.0.stub)
4614 .update_table(self.0.request, self.0.options)
4615 .await
4616 .map(crate::Response::into_body)
4617 }
4618
4619 pub fn poller(
4621 self,
4622 ) -> impl google_cloud_lro::Poller<crate::model::Table, crate::model::UpdateTableMetadata>
4623 {
4624 type Operation = google_cloud_lro::internal::Operation<
4625 crate::model::Table,
4626 crate::model::UpdateTableMetadata,
4627 >;
4628 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4629 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4630 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
4631 if let Some(ref mut details) = poller_options.tracing {
4632 details.method_name = "google_cloud_bigtable_admin_v2::client::BigtableTableAdmin::update_table::until_done";
4633 }
4634
4635 let stub = self.0.stub.clone();
4636 let mut options = self.0.options.clone();
4637 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
4638 let query = move |name| {
4639 let stub = stub.clone();
4640 let options = options.clone();
4641 async {
4642 let op = GetOperation::new(stub)
4643 .set_name(name)
4644 .with_options(options)
4645 .send()
4646 .await?;
4647 Ok(Operation::new(op))
4648 }
4649 };
4650
4651 let start = move || async {
4652 let op = self.send().await?;
4653 Ok(Operation::new(op))
4654 };
4655
4656 use google_cloud_lro::internal::PollerExt;
4657 {
4658 google_cloud_lro::internal::new_poller(
4659 polling_error_policy,
4660 polling_backoff_policy,
4661 start,
4662 query,
4663 )
4664 }
4665 .with_options(poller_options)
4666 }
4667
4668 pub fn set_table<T>(mut self, v: T) -> Self
4672 where
4673 T: std::convert::Into<crate::model::Table>,
4674 {
4675 self.0.request.table = std::option::Option::Some(v.into());
4676 self
4677 }
4678
4679 pub fn set_or_clear_table<T>(mut self, v: std::option::Option<T>) -> Self
4683 where
4684 T: std::convert::Into<crate::model::Table>,
4685 {
4686 self.0.request.table = v.map(|x| x.into());
4687 self
4688 }
4689
4690 pub fn set_update_mask<T>(mut self, v: T) -> Self
4694 where
4695 T: std::convert::Into<wkt::FieldMask>,
4696 {
4697 self.0.request.update_mask = std::option::Option::Some(v.into());
4698 self
4699 }
4700
4701 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
4705 where
4706 T: std::convert::Into<wkt::FieldMask>,
4707 {
4708 self.0.request.update_mask = v.map(|x| x.into());
4709 self
4710 }
4711
4712 pub fn set_ignore_warnings<T: Into<bool>>(mut self, v: T) -> Self {
4714 self.0.request.ignore_warnings = v.into();
4715 self
4716 }
4717 }
4718
4719 #[doc(hidden)]
4720 impl crate::RequestBuilder for UpdateTable {
4721 fn request_options(&mut self) -> &mut crate::RequestOptions {
4722 &mut self.0.options
4723 }
4724 }
4725
4726 #[derive(Clone, Debug)]
4743 pub struct DeleteTable(RequestBuilder<crate::model::DeleteTableRequest>);
4744
4745 impl DeleteTable {
4746 pub(crate) fn new(
4747 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
4748 ) -> Self {
4749 Self(RequestBuilder::new(stub))
4750 }
4751
4752 pub fn with_request<V: Into<crate::model::DeleteTableRequest>>(mut self, v: V) -> Self {
4754 self.0.request = v.into();
4755 self
4756 }
4757
4758 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4760 self.0.options = v.into();
4761 self
4762 }
4763
4764 pub async fn send(self) -> Result<()> {
4766 (*self.0.stub)
4767 .delete_table(self.0.request, self.0.options)
4768 .await
4769 .map(crate::Response::into_body)
4770 }
4771
4772 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4776 self.0.request.name = v.into();
4777 self
4778 }
4779 }
4780
4781 #[doc(hidden)]
4782 impl crate::RequestBuilder for DeleteTable {
4783 fn request_options(&mut self) -> &mut crate::RequestOptions {
4784 &mut self.0.options
4785 }
4786 }
4787
4788 #[derive(Clone, Debug)]
4806 pub struct UndeleteTable(RequestBuilder<crate::model::UndeleteTableRequest>);
4807
4808 impl UndeleteTable {
4809 pub(crate) fn new(
4810 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
4811 ) -> Self {
4812 Self(RequestBuilder::new(stub))
4813 }
4814
4815 pub fn with_request<V: Into<crate::model::UndeleteTableRequest>>(mut self, v: V) -> Self {
4817 self.0.request = v.into();
4818 self
4819 }
4820
4821 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4823 self.0.options = v.into();
4824 self
4825 }
4826
4827 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
4834 (*self.0.stub)
4835 .undelete_table(self.0.request, self.0.options)
4836 .await
4837 .map(crate::Response::into_body)
4838 }
4839
4840 pub fn poller(
4842 self,
4843 ) -> impl google_cloud_lro::Poller<crate::model::Table, crate::model::UndeleteTableMetadata>
4844 {
4845 type Operation = google_cloud_lro::internal::Operation<
4846 crate::model::Table,
4847 crate::model::UndeleteTableMetadata,
4848 >;
4849 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4850 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4851 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
4852 if let Some(ref mut details) = poller_options.tracing {
4853 details.method_name = "google_cloud_bigtable_admin_v2::client::BigtableTableAdmin::undelete_table::until_done";
4854 }
4855
4856 let stub = self.0.stub.clone();
4857 let mut options = self.0.options.clone();
4858 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
4859 let query = move |name| {
4860 let stub = stub.clone();
4861 let options = options.clone();
4862 async {
4863 let op = GetOperation::new(stub)
4864 .set_name(name)
4865 .with_options(options)
4866 .send()
4867 .await?;
4868 Ok(Operation::new(op))
4869 }
4870 };
4871
4872 let start = move || async {
4873 let op = self.send().await?;
4874 Ok(Operation::new(op))
4875 };
4876
4877 use google_cloud_lro::internal::PollerExt;
4878 {
4879 google_cloud_lro::internal::new_poller(
4880 polling_error_policy,
4881 polling_backoff_policy,
4882 start,
4883 query,
4884 )
4885 }
4886 .with_options(poller_options)
4887 }
4888
4889 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4893 self.0.request.name = v.into();
4894 self
4895 }
4896 }
4897
4898 #[doc(hidden)]
4899 impl crate::RequestBuilder for UndeleteTable {
4900 fn request_options(&mut self) -> &mut crate::RequestOptions {
4901 &mut self.0.options
4902 }
4903 }
4904
4905 #[derive(Clone, Debug)]
4923 pub struct CreateAuthorizedView(RequestBuilder<crate::model::CreateAuthorizedViewRequest>);
4924
4925 impl CreateAuthorizedView {
4926 pub(crate) fn new(
4927 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
4928 ) -> Self {
4929 Self(RequestBuilder::new(stub))
4930 }
4931
4932 pub fn with_request<V: Into<crate::model::CreateAuthorizedViewRequest>>(
4934 mut self,
4935 v: V,
4936 ) -> Self {
4937 self.0.request = v.into();
4938 self
4939 }
4940
4941 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4943 self.0.options = v.into();
4944 self
4945 }
4946
4947 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
4954 (*self.0.stub)
4955 .create_authorized_view(self.0.request, self.0.options)
4956 .await
4957 .map(crate::Response::into_body)
4958 }
4959
4960 pub fn poller(
4962 self,
4963 ) -> impl google_cloud_lro::Poller<
4964 crate::model::AuthorizedView,
4965 crate::model::CreateAuthorizedViewMetadata,
4966 > {
4967 type Operation = google_cloud_lro::internal::Operation<
4968 crate::model::AuthorizedView,
4969 crate::model::CreateAuthorizedViewMetadata,
4970 >;
4971 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4972 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4973 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
4974 if let Some(ref mut details) = poller_options.tracing {
4975 details.method_name = "google_cloud_bigtable_admin_v2::client::BigtableTableAdmin::create_authorized_view::until_done";
4976 }
4977
4978 let stub = self.0.stub.clone();
4979 let mut options = self.0.options.clone();
4980 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
4981 let query = move |name| {
4982 let stub = stub.clone();
4983 let options = options.clone();
4984 async {
4985 let op = GetOperation::new(stub)
4986 .set_name(name)
4987 .with_options(options)
4988 .send()
4989 .await?;
4990 Ok(Operation::new(op))
4991 }
4992 };
4993
4994 let start = move || async {
4995 let op = self.send().await?;
4996 Ok(Operation::new(op))
4997 };
4998
4999 use google_cloud_lro::internal::PollerExt;
5000 {
5001 google_cloud_lro::internal::new_poller(
5002 polling_error_policy,
5003 polling_backoff_policy,
5004 start,
5005 query,
5006 )
5007 }
5008 .with_options(poller_options)
5009 }
5010
5011 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5015 self.0.request.parent = v.into();
5016 self
5017 }
5018
5019 pub fn set_authorized_view_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
5023 self.0.request.authorized_view_id = v.into();
5024 self
5025 }
5026
5027 pub fn set_authorized_view<T>(mut self, v: T) -> Self
5031 where
5032 T: std::convert::Into<crate::model::AuthorizedView>,
5033 {
5034 self.0.request.authorized_view = std::option::Option::Some(v.into());
5035 self
5036 }
5037
5038 pub fn set_or_clear_authorized_view<T>(mut self, v: std::option::Option<T>) -> Self
5042 where
5043 T: std::convert::Into<crate::model::AuthorizedView>,
5044 {
5045 self.0.request.authorized_view = v.map(|x| x.into());
5046 self
5047 }
5048 }
5049
5050 #[doc(hidden)]
5051 impl crate::RequestBuilder for CreateAuthorizedView {
5052 fn request_options(&mut self) -> &mut crate::RequestOptions {
5053 &mut self.0.options
5054 }
5055 }
5056
5057 #[derive(Clone, Debug)]
5078 pub struct ListAuthorizedViews(RequestBuilder<crate::model::ListAuthorizedViewsRequest>);
5079
5080 impl ListAuthorizedViews {
5081 pub(crate) fn new(
5082 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
5083 ) -> Self {
5084 Self(RequestBuilder::new(stub))
5085 }
5086
5087 pub fn with_request<V: Into<crate::model::ListAuthorizedViewsRequest>>(
5089 mut self,
5090 v: V,
5091 ) -> Self {
5092 self.0.request = v.into();
5093 self
5094 }
5095
5096 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5098 self.0.options = v.into();
5099 self
5100 }
5101
5102 pub async fn send(self) -> Result<crate::model::ListAuthorizedViewsResponse> {
5104 (*self.0.stub)
5105 .list_authorized_views(self.0.request, self.0.options)
5106 .await
5107 .map(crate::Response::into_body)
5108 }
5109
5110 pub fn by_page(
5112 self,
5113 ) -> impl google_cloud_gax::paginator::Paginator<
5114 crate::model::ListAuthorizedViewsResponse,
5115 crate::Error,
5116 > {
5117 use std::clone::Clone;
5118 let token = self.0.request.page_token.clone();
5119 let execute = move |token: String| {
5120 let mut builder = self.clone();
5121 builder.0.request = builder.0.request.set_page_token(token);
5122 builder.send()
5123 };
5124 google_cloud_gax::paginator::internal::new_paginator(token, execute)
5125 }
5126
5127 pub fn by_item(
5129 self,
5130 ) -> impl google_cloud_gax::paginator::ItemPaginator<
5131 crate::model::ListAuthorizedViewsResponse,
5132 crate::Error,
5133 > {
5134 use google_cloud_gax::paginator::Paginator;
5135 self.by_page().items()
5136 }
5137
5138 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5142 self.0.request.parent = v.into();
5143 self
5144 }
5145
5146 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
5148 self.0.request.page_size = v.into();
5149 self
5150 }
5151
5152 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
5154 self.0.request.page_token = v.into();
5155 self
5156 }
5157
5158 pub fn set_view<T: Into<crate::model::authorized_view::ResponseView>>(
5160 mut self,
5161 v: T,
5162 ) -> Self {
5163 self.0.request.view = v.into();
5164 self
5165 }
5166 }
5167
5168 #[doc(hidden)]
5169 impl crate::RequestBuilder for ListAuthorizedViews {
5170 fn request_options(&mut self) -> &mut crate::RequestOptions {
5171 &mut self.0.options
5172 }
5173 }
5174
5175 #[derive(Clone, Debug)]
5192 pub struct GetAuthorizedView(RequestBuilder<crate::model::GetAuthorizedViewRequest>);
5193
5194 impl GetAuthorizedView {
5195 pub(crate) fn new(
5196 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
5197 ) -> Self {
5198 Self(RequestBuilder::new(stub))
5199 }
5200
5201 pub fn with_request<V: Into<crate::model::GetAuthorizedViewRequest>>(
5203 mut self,
5204 v: V,
5205 ) -> Self {
5206 self.0.request = v.into();
5207 self
5208 }
5209
5210 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5212 self.0.options = v.into();
5213 self
5214 }
5215
5216 pub async fn send(self) -> Result<crate::model::AuthorizedView> {
5218 (*self.0.stub)
5219 .get_authorized_view(self.0.request, self.0.options)
5220 .await
5221 .map(crate::Response::into_body)
5222 }
5223
5224 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5228 self.0.request.name = v.into();
5229 self
5230 }
5231
5232 pub fn set_view<T: Into<crate::model::authorized_view::ResponseView>>(
5234 mut self,
5235 v: T,
5236 ) -> Self {
5237 self.0.request.view = v.into();
5238 self
5239 }
5240 }
5241
5242 #[doc(hidden)]
5243 impl crate::RequestBuilder for GetAuthorizedView {
5244 fn request_options(&mut self) -> &mut crate::RequestOptions {
5245 &mut self.0.options
5246 }
5247 }
5248
5249 #[derive(Clone, Debug)]
5267 pub struct UpdateAuthorizedView(RequestBuilder<crate::model::UpdateAuthorizedViewRequest>);
5268
5269 impl UpdateAuthorizedView {
5270 pub(crate) fn new(
5271 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
5272 ) -> Self {
5273 Self(RequestBuilder::new(stub))
5274 }
5275
5276 pub fn with_request<V: Into<crate::model::UpdateAuthorizedViewRequest>>(
5278 mut self,
5279 v: V,
5280 ) -> Self {
5281 self.0.request = v.into();
5282 self
5283 }
5284
5285 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5287 self.0.options = v.into();
5288 self
5289 }
5290
5291 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
5298 (*self.0.stub)
5299 .update_authorized_view(self.0.request, self.0.options)
5300 .await
5301 .map(crate::Response::into_body)
5302 }
5303
5304 pub fn poller(
5306 self,
5307 ) -> impl google_cloud_lro::Poller<
5308 crate::model::AuthorizedView,
5309 crate::model::UpdateAuthorizedViewMetadata,
5310 > {
5311 type Operation = google_cloud_lro::internal::Operation<
5312 crate::model::AuthorizedView,
5313 crate::model::UpdateAuthorizedViewMetadata,
5314 >;
5315 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
5316 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
5317 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
5318 if let Some(ref mut details) = poller_options.tracing {
5319 details.method_name = "google_cloud_bigtable_admin_v2::client::BigtableTableAdmin::update_authorized_view::until_done";
5320 }
5321
5322 let stub = self.0.stub.clone();
5323 let mut options = self.0.options.clone();
5324 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
5325 let query = move |name| {
5326 let stub = stub.clone();
5327 let options = options.clone();
5328 async {
5329 let op = GetOperation::new(stub)
5330 .set_name(name)
5331 .with_options(options)
5332 .send()
5333 .await?;
5334 Ok(Operation::new(op))
5335 }
5336 };
5337
5338 let start = move || async {
5339 let op = self.send().await?;
5340 Ok(Operation::new(op))
5341 };
5342
5343 use google_cloud_lro::internal::PollerExt;
5344 {
5345 google_cloud_lro::internal::new_poller(
5346 polling_error_policy,
5347 polling_backoff_policy,
5348 start,
5349 query,
5350 )
5351 }
5352 .with_options(poller_options)
5353 }
5354
5355 pub fn set_authorized_view<T>(mut self, v: T) -> Self
5359 where
5360 T: std::convert::Into<crate::model::AuthorizedView>,
5361 {
5362 self.0.request.authorized_view = std::option::Option::Some(v.into());
5363 self
5364 }
5365
5366 pub fn set_or_clear_authorized_view<T>(mut self, v: std::option::Option<T>) -> Self
5370 where
5371 T: std::convert::Into<crate::model::AuthorizedView>,
5372 {
5373 self.0.request.authorized_view = v.map(|x| x.into());
5374 self
5375 }
5376
5377 pub fn set_update_mask<T>(mut self, v: T) -> Self
5379 where
5380 T: std::convert::Into<wkt::FieldMask>,
5381 {
5382 self.0.request.update_mask = std::option::Option::Some(v.into());
5383 self
5384 }
5385
5386 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
5388 where
5389 T: std::convert::Into<wkt::FieldMask>,
5390 {
5391 self.0.request.update_mask = v.map(|x| x.into());
5392 self
5393 }
5394
5395 pub fn set_ignore_warnings<T: Into<bool>>(mut self, v: T) -> Self {
5397 self.0.request.ignore_warnings = v.into();
5398 self
5399 }
5400 }
5401
5402 #[doc(hidden)]
5403 impl crate::RequestBuilder for UpdateAuthorizedView {
5404 fn request_options(&mut self) -> &mut crate::RequestOptions {
5405 &mut self.0.options
5406 }
5407 }
5408
5409 #[derive(Clone, Debug)]
5426 pub struct DeleteAuthorizedView(RequestBuilder<crate::model::DeleteAuthorizedViewRequest>);
5427
5428 impl DeleteAuthorizedView {
5429 pub(crate) fn new(
5430 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
5431 ) -> Self {
5432 Self(RequestBuilder::new(stub))
5433 }
5434
5435 pub fn with_request<V: Into<crate::model::DeleteAuthorizedViewRequest>>(
5437 mut self,
5438 v: V,
5439 ) -> Self {
5440 self.0.request = v.into();
5441 self
5442 }
5443
5444 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5446 self.0.options = v.into();
5447 self
5448 }
5449
5450 pub async fn send(self) -> Result<()> {
5452 (*self.0.stub)
5453 .delete_authorized_view(self.0.request, self.0.options)
5454 .await
5455 .map(crate::Response::into_body)
5456 }
5457
5458 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5462 self.0.request.name = v.into();
5463 self
5464 }
5465
5466 pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
5468 self.0.request.etag = v.into();
5469 self
5470 }
5471 }
5472
5473 #[doc(hidden)]
5474 impl crate::RequestBuilder for DeleteAuthorizedView {
5475 fn request_options(&mut self) -> &mut crate::RequestOptions {
5476 &mut self.0.options
5477 }
5478 }
5479
5480 #[derive(Clone, Debug)]
5497 pub struct ModifyColumnFamilies(RequestBuilder<crate::model::ModifyColumnFamiliesRequest>);
5498
5499 impl ModifyColumnFamilies {
5500 pub(crate) fn new(
5501 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
5502 ) -> Self {
5503 Self(RequestBuilder::new(stub))
5504 }
5505
5506 pub fn with_request<V: Into<crate::model::ModifyColumnFamiliesRequest>>(
5508 mut self,
5509 v: V,
5510 ) -> Self {
5511 self.0.request = v.into();
5512 self
5513 }
5514
5515 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5517 self.0.options = v.into();
5518 self
5519 }
5520
5521 pub async fn send(self) -> Result<crate::model::Table> {
5523 (*self.0.stub)
5524 .modify_column_families(self.0.request, self.0.options)
5525 .await
5526 .map(crate::Response::into_body)
5527 }
5528
5529 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5533 self.0.request.name = v.into();
5534 self
5535 }
5536
5537 pub fn set_modifications<T, V>(mut self, v: T) -> Self
5541 where
5542 T: std::iter::IntoIterator<Item = V>,
5543 V: std::convert::Into<crate::model::modify_column_families_request::Modification>,
5544 {
5545 use std::iter::Iterator;
5546 self.0.request.modifications = v.into_iter().map(|i| i.into()).collect();
5547 self
5548 }
5549
5550 pub fn set_ignore_warnings<T: Into<bool>>(mut self, v: T) -> Self {
5552 self.0.request.ignore_warnings = v.into();
5553 self
5554 }
5555 }
5556
5557 #[doc(hidden)]
5558 impl crate::RequestBuilder for ModifyColumnFamilies {
5559 fn request_options(&mut self) -> &mut crate::RequestOptions {
5560 &mut self.0.options
5561 }
5562 }
5563
5564 #[derive(Clone, Debug)]
5581 pub struct DropRowRange(RequestBuilder<crate::model::DropRowRangeRequest>);
5582
5583 impl DropRowRange {
5584 pub(crate) fn new(
5585 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
5586 ) -> Self {
5587 Self(RequestBuilder::new(stub))
5588 }
5589
5590 pub fn with_request<V: Into<crate::model::DropRowRangeRequest>>(mut self, v: V) -> Self {
5592 self.0.request = v.into();
5593 self
5594 }
5595
5596 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5598 self.0.options = v.into();
5599 self
5600 }
5601
5602 pub async fn send(self) -> Result<()> {
5604 (*self.0.stub)
5605 .drop_row_range(self.0.request, self.0.options)
5606 .await
5607 .map(crate::Response::into_body)
5608 }
5609
5610 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5614 self.0.request.name = v.into();
5615 self
5616 }
5617
5618 pub fn set_target<T: Into<Option<crate::model::drop_row_range_request::Target>>>(
5623 mut self,
5624 v: T,
5625 ) -> Self {
5626 self.0.request.target = v.into();
5627 self
5628 }
5629
5630 pub fn set_row_key_prefix<T: std::convert::Into<::bytes::Bytes>>(mut self, v: T) -> Self {
5636 self.0.request = self.0.request.set_row_key_prefix(v);
5637 self
5638 }
5639
5640 pub fn set_delete_all_data_from_table<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5646 self.0.request = self.0.request.set_delete_all_data_from_table(v);
5647 self
5648 }
5649 }
5650
5651 #[doc(hidden)]
5652 impl crate::RequestBuilder for DropRowRange {
5653 fn request_options(&mut self) -> &mut crate::RequestOptions {
5654 &mut self.0.options
5655 }
5656 }
5657
5658 #[derive(Clone, Debug)]
5675 pub struct GenerateConsistencyToken(
5676 RequestBuilder<crate::model::GenerateConsistencyTokenRequest>,
5677 );
5678
5679 impl GenerateConsistencyToken {
5680 pub(crate) fn new(
5681 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
5682 ) -> Self {
5683 Self(RequestBuilder::new(stub))
5684 }
5685
5686 pub fn with_request<V: Into<crate::model::GenerateConsistencyTokenRequest>>(
5688 mut self,
5689 v: V,
5690 ) -> Self {
5691 self.0.request = v.into();
5692 self
5693 }
5694
5695 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5697 self.0.options = v.into();
5698 self
5699 }
5700
5701 pub async fn send(self) -> Result<crate::model::GenerateConsistencyTokenResponse> {
5703 (*self.0.stub)
5704 .generate_consistency_token(self.0.request, self.0.options)
5705 .await
5706 .map(crate::Response::into_body)
5707 }
5708
5709 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5713 self.0.request.name = v.into();
5714 self
5715 }
5716 }
5717
5718 #[doc(hidden)]
5719 impl crate::RequestBuilder for GenerateConsistencyToken {
5720 fn request_options(&mut self) -> &mut crate::RequestOptions {
5721 &mut self.0.options
5722 }
5723 }
5724
5725 #[derive(Clone, Debug)]
5742 pub struct CheckConsistency(RequestBuilder<crate::model::CheckConsistencyRequest>);
5743
5744 impl CheckConsistency {
5745 pub(crate) fn new(
5746 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
5747 ) -> Self {
5748 Self(RequestBuilder::new(stub))
5749 }
5750
5751 pub fn with_request<V: Into<crate::model::CheckConsistencyRequest>>(
5753 mut self,
5754 v: V,
5755 ) -> Self {
5756 self.0.request = v.into();
5757 self
5758 }
5759
5760 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5762 self.0.options = v.into();
5763 self
5764 }
5765
5766 pub async fn send(self) -> Result<crate::model::CheckConsistencyResponse> {
5768 (*self.0.stub)
5769 .check_consistency(self.0.request, self.0.options)
5770 .await
5771 .map(crate::Response::into_body)
5772 }
5773
5774 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5778 self.0.request.name = v.into();
5779 self
5780 }
5781
5782 pub fn set_consistency_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
5786 self.0.request.consistency_token = v.into();
5787 self
5788 }
5789
5790 pub fn set_mode<T: Into<Option<crate::model::check_consistency_request::Mode>>>(
5795 mut self,
5796 v: T,
5797 ) -> Self {
5798 self.0.request.mode = v.into();
5799 self
5800 }
5801
5802 pub fn set_standard_read_remote_writes<
5808 T: std::convert::Into<std::boxed::Box<crate::model::StandardReadRemoteWrites>>,
5809 >(
5810 mut self,
5811 v: T,
5812 ) -> Self {
5813 self.0.request = self.0.request.set_standard_read_remote_writes(v);
5814 self
5815 }
5816
5817 pub fn set_data_boost_read_local_writes<
5823 T: std::convert::Into<std::boxed::Box<crate::model::DataBoostReadLocalWrites>>,
5824 >(
5825 mut self,
5826 v: T,
5827 ) -> Self {
5828 self.0.request = self.0.request.set_data_boost_read_local_writes(v);
5829 self
5830 }
5831 }
5832
5833 #[doc(hidden)]
5834 impl crate::RequestBuilder for CheckConsistency {
5835 fn request_options(&mut self) -> &mut crate::RequestOptions {
5836 &mut self.0.options
5837 }
5838 }
5839
5840 #[derive(Clone, Debug)]
5858 pub struct SnapshotTable(RequestBuilder<crate::model::SnapshotTableRequest>);
5859
5860 impl SnapshotTable {
5861 pub(crate) fn new(
5862 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
5863 ) -> Self {
5864 Self(RequestBuilder::new(stub))
5865 }
5866
5867 pub fn with_request<V: Into<crate::model::SnapshotTableRequest>>(mut self, v: V) -> Self {
5869 self.0.request = v.into();
5870 self
5871 }
5872
5873 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5875 self.0.options = v.into();
5876 self
5877 }
5878
5879 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
5886 (*self.0.stub)
5887 .snapshot_table(self.0.request, self.0.options)
5888 .await
5889 .map(crate::Response::into_body)
5890 }
5891
5892 pub fn poller(
5894 self,
5895 ) -> impl google_cloud_lro::Poller<crate::model::Snapshot, crate::model::SnapshotTableMetadata>
5896 {
5897 type Operation = google_cloud_lro::internal::Operation<
5898 crate::model::Snapshot,
5899 crate::model::SnapshotTableMetadata,
5900 >;
5901 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
5902 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
5903 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
5904 if let Some(ref mut details) = poller_options.tracing {
5905 details.method_name = "google_cloud_bigtable_admin_v2::client::BigtableTableAdmin::snapshot_table::until_done";
5906 }
5907
5908 let stub = self.0.stub.clone();
5909 let mut options = self.0.options.clone();
5910 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
5911 let query = move |name| {
5912 let stub = stub.clone();
5913 let options = options.clone();
5914 async {
5915 let op = GetOperation::new(stub)
5916 .set_name(name)
5917 .with_options(options)
5918 .send()
5919 .await?;
5920 Ok(Operation::new(op))
5921 }
5922 };
5923
5924 let start = move || async {
5925 let op = self.send().await?;
5926 Ok(Operation::new(op))
5927 };
5928
5929 use google_cloud_lro::internal::PollerExt;
5930 {
5931 google_cloud_lro::internal::new_poller(
5932 polling_error_policy,
5933 polling_backoff_policy,
5934 start,
5935 query,
5936 )
5937 }
5938 .with_options(poller_options)
5939 }
5940
5941 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5945 self.0.request.name = v.into();
5946 self
5947 }
5948
5949 pub fn set_cluster<T: Into<std::string::String>>(mut self, v: T) -> Self {
5953 self.0.request.cluster = v.into();
5954 self
5955 }
5956
5957 pub fn set_snapshot_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
5961 self.0.request.snapshot_id = v.into();
5962 self
5963 }
5964
5965 pub fn set_ttl<T>(mut self, v: T) -> Self
5967 where
5968 T: std::convert::Into<wkt::Duration>,
5969 {
5970 self.0.request.ttl = std::option::Option::Some(v.into());
5971 self
5972 }
5973
5974 pub fn set_or_clear_ttl<T>(mut self, v: std::option::Option<T>) -> Self
5976 where
5977 T: std::convert::Into<wkt::Duration>,
5978 {
5979 self.0.request.ttl = v.map(|x| x.into());
5980 self
5981 }
5982
5983 pub fn set_description<T: Into<std::string::String>>(mut self, v: T) -> Self {
5985 self.0.request.description = v.into();
5986 self
5987 }
5988 }
5989
5990 #[doc(hidden)]
5991 impl crate::RequestBuilder for SnapshotTable {
5992 fn request_options(&mut self) -> &mut crate::RequestOptions {
5993 &mut self.0.options
5994 }
5995 }
5996
5997 #[derive(Clone, Debug)]
6014 pub struct GetSnapshot(RequestBuilder<crate::model::GetSnapshotRequest>);
6015
6016 impl GetSnapshot {
6017 pub(crate) fn new(
6018 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
6019 ) -> Self {
6020 Self(RequestBuilder::new(stub))
6021 }
6022
6023 pub fn with_request<V: Into<crate::model::GetSnapshotRequest>>(mut self, v: V) -> Self {
6025 self.0.request = v.into();
6026 self
6027 }
6028
6029 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6031 self.0.options = v.into();
6032 self
6033 }
6034
6035 pub async fn send(self) -> Result<crate::model::Snapshot> {
6037 (*self.0.stub)
6038 .get_snapshot(self.0.request, self.0.options)
6039 .await
6040 .map(crate::Response::into_body)
6041 }
6042
6043 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6047 self.0.request.name = v.into();
6048 self
6049 }
6050 }
6051
6052 #[doc(hidden)]
6053 impl crate::RequestBuilder for GetSnapshot {
6054 fn request_options(&mut self) -> &mut crate::RequestOptions {
6055 &mut self.0.options
6056 }
6057 }
6058
6059 #[derive(Clone, Debug)]
6080 pub struct ListSnapshots(RequestBuilder<crate::model::ListSnapshotsRequest>);
6081
6082 impl ListSnapshots {
6083 pub(crate) fn new(
6084 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
6085 ) -> Self {
6086 Self(RequestBuilder::new(stub))
6087 }
6088
6089 pub fn with_request<V: Into<crate::model::ListSnapshotsRequest>>(mut self, v: V) -> Self {
6091 self.0.request = v.into();
6092 self
6093 }
6094
6095 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6097 self.0.options = v.into();
6098 self
6099 }
6100
6101 pub async fn send(self) -> Result<crate::model::ListSnapshotsResponse> {
6103 (*self.0.stub)
6104 .list_snapshots(self.0.request, self.0.options)
6105 .await
6106 .map(crate::Response::into_body)
6107 }
6108
6109 pub fn by_page(
6111 self,
6112 ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListSnapshotsResponse, crate::Error>
6113 {
6114 use std::clone::Clone;
6115 let token = self.0.request.page_token.clone();
6116 let execute = move |token: String| {
6117 let mut builder = self.clone();
6118 builder.0.request = builder.0.request.set_page_token(token);
6119 builder.send()
6120 };
6121 google_cloud_gax::paginator::internal::new_paginator(token, execute)
6122 }
6123
6124 pub fn by_item(
6126 self,
6127 ) -> impl google_cloud_gax::paginator::ItemPaginator<
6128 crate::model::ListSnapshotsResponse,
6129 crate::Error,
6130 > {
6131 use google_cloud_gax::paginator::Paginator;
6132 self.by_page().items()
6133 }
6134
6135 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
6139 self.0.request.parent = v.into();
6140 self
6141 }
6142
6143 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
6145 self.0.request.page_size = v.into();
6146 self
6147 }
6148
6149 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
6151 self.0.request.page_token = v.into();
6152 self
6153 }
6154 }
6155
6156 #[doc(hidden)]
6157 impl crate::RequestBuilder for ListSnapshots {
6158 fn request_options(&mut self) -> &mut crate::RequestOptions {
6159 &mut self.0.options
6160 }
6161 }
6162
6163 #[derive(Clone, Debug)]
6180 pub struct DeleteSnapshot(RequestBuilder<crate::model::DeleteSnapshotRequest>);
6181
6182 impl DeleteSnapshot {
6183 pub(crate) fn new(
6184 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
6185 ) -> Self {
6186 Self(RequestBuilder::new(stub))
6187 }
6188
6189 pub fn with_request<V: Into<crate::model::DeleteSnapshotRequest>>(mut self, v: V) -> Self {
6191 self.0.request = v.into();
6192 self
6193 }
6194
6195 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6197 self.0.options = v.into();
6198 self
6199 }
6200
6201 pub async fn send(self) -> Result<()> {
6203 (*self.0.stub)
6204 .delete_snapshot(self.0.request, self.0.options)
6205 .await
6206 .map(crate::Response::into_body)
6207 }
6208
6209 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6213 self.0.request.name = v.into();
6214 self
6215 }
6216 }
6217
6218 #[doc(hidden)]
6219 impl crate::RequestBuilder for DeleteSnapshot {
6220 fn request_options(&mut self) -> &mut crate::RequestOptions {
6221 &mut self.0.options
6222 }
6223 }
6224
6225 #[derive(Clone, Debug)]
6243 pub struct CreateBackup(RequestBuilder<crate::model::CreateBackupRequest>);
6244
6245 impl CreateBackup {
6246 pub(crate) fn new(
6247 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
6248 ) -> Self {
6249 Self(RequestBuilder::new(stub))
6250 }
6251
6252 pub fn with_request<V: Into<crate::model::CreateBackupRequest>>(mut self, v: V) -> Self {
6254 self.0.request = v.into();
6255 self
6256 }
6257
6258 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6260 self.0.options = v.into();
6261 self
6262 }
6263
6264 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
6271 (*self.0.stub)
6272 .create_backup(self.0.request, self.0.options)
6273 .await
6274 .map(crate::Response::into_body)
6275 }
6276
6277 pub fn poller(
6279 self,
6280 ) -> impl google_cloud_lro::Poller<crate::model::Backup, crate::model::CreateBackupMetadata>
6281 {
6282 type Operation = google_cloud_lro::internal::Operation<
6283 crate::model::Backup,
6284 crate::model::CreateBackupMetadata,
6285 >;
6286 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6287 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6288 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
6289 if let Some(ref mut details) = poller_options.tracing {
6290 details.method_name = "google_cloud_bigtable_admin_v2::client::BigtableTableAdmin::create_backup::until_done";
6291 }
6292
6293 let stub = self.0.stub.clone();
6294 let mut options = self.0.options.clone();
6295 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
6296 let query = move |name| {
6297 let stub = stub.clone();
6298 let options = options.clone();
6299 async {
6300 let op = GetOperation::new(stub)
6301 .set_name(name)
6302 .with_options(options)
6303 .send()
6304 .await?;
6305 Ok(Operation::new(op))
6306 }
6307 };
6308
6309 let start = move || async {
6310 let op = self.send().await?;
6311 Ok(Operation::new(op))
6312 };
6313
6314 use google_cloud_lro::internal::PollerExt;
6315 {
6316 google_cloud_lro::internal::new_poller(
6317 polling_error_policy,
6318 polling_backoff_policy,
6319 start,
6320 query,
6321 )
6322 }
6323 .with_options(poller_options)
6324 }
6325
6326 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
6330 self.0.request.parent = v.into();
6331 self
6332 }
6333
6334 pub fn set_backup_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
6338 self.0.request.backup_id = v.into();
6339 self
6340 }
6341
6342 pub fn set_backup<T>(mut self, v: T) -> Self
6346 where
6347 T: std::convert::Into<crate::model::Backup>,
6348 {
6349 self.0.request.backup = std::option::Option::Some(v.into());
6350 self
6351 }
6352
6353 pub fn set_or_clear_backup<T>(mut self, v: std::option::Option<T>) -> Self
6357 where
6358 T: std::convert::Into<crate::model::Backup>,
6359 {
6360 self.0.request.backup = v.map(|x| x.into());
6361 self
6362 }
6363 }
6364
6365 #[doc(hidden)]
6366 impl crate::RequestBuilder for CreateBackup {
6367 fn request_options(&mut self) -> &mut crate::RequestOptions {
6368 &mut self.0.options
6369 }
6370 }
6371
6372 #[derive(Clone, Debug)]
6389 pub struct GetBackup(RequestBuilder<crate::model::GetBackupRequest>);
6390
6391 impl GetBackup {
6392 pub(crate) fn new(
6393 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
6394 ) -> Self {
6395 Self(RequestBuilder::new(stub))
6396 }
6397
6398 pub fn with_request<V: Into<crate::model::GetBackupRequest>>(mut self, v: V) -> Self {
6400 self.0.request = v.into();
6401 self
6402 }
6403
6404 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6406 self.0.options = v.into();
6407 self
6408 }
6409
6410 pub async fn send(self) -> Result<crate::model::Backup> {
6412 (*self.0.stub)
6413 .get_backup(self.0.request, self.0.options)
6414 .await
6415 .map(crate::Response::into_body)
6416 }
6417
6418 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6422 self.0.request.name = v.into();
6423 self
6424 }
6425 }
6426
6427 #[doc(hidden)]
6428 impl crate::RequestBuilder for GetBackup {
6429 fn request_options(&mut self) -> &mut crate::RequestOptions {
6430 &mut self.0.options
6431 }
6432 }
6433
6434 #[derive(Clone, Debug)]
6451 pub struct UpdateBackup(RequestBuilder<crate::model::UpdateBackupRequest>);
6452
6453 impl UpdateBackup {
6454 pub(crate) fn new(
6455 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
6456 ) -> Self {
6457 Self(RequestBuilder::new(stub))
6458 }
6459
6460 pub fn with_request<V: Into<crate::model::UpdateBackupRequest>>(mut self, v: V) -> Self {
6462 self.0.request = v.into();
6463 self
6464 }
6465
6466 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6468 self.0.options = v.into();
6469 self
6470 }
6471
6472 pub async fn send(self) -> Result<crate::model::Backup> {
6474 (*self.0.stub)
6475 .update_backup(self.0.request, self.0.options)
6476 .await
6477 .map(crate::Response::into_body)
6478 }
6479
6480 pub fn set_backup<T>(mut self, v: T) -> Self
6484 where
6485 T: std::convert::Into<crate::model::Backup>,
6486 {
6487 self.0.request.backup = std::option::Option::Some(v.into());
6488 self
6489 }
6490
6491 pub fn set_or_clear_backup<T>(mut self, v: std::option::Option<T>) -> Self
6495 where
6496 T: std::convert::Into<crate::model::Backup>,
6497 {
6498 self.0.request.backup = v.map(|x| x.into());
6499 self
6500 }
6501
6502 pub fn set_update_mask<T>(mut self, v: T) -> Self
6506 where
6507 T: std::convert::Into<wkt::FieldMask>,
6508 {
6509 self.0.request.update_mask = std::option::Option::Some(v.into());
6510 self
6511 }
6512
6513 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
6517 where
6518 T: std::convert::Into<wkt::FieldMask>,
6519 {
6520 self.0.request.update_mask = v.map(|x| x.into());
6521 self
6522 }
6523 }
6524
6525 #[doc(hidden)]
6526 impl crate::RequestBuilder for UpdateBackup {
6527 fn request_options(&mut self) -> &mut crate::RequestOptions {
6528 &mut self.0.options
6529 }
6530 }
6531
6532 #[derive(Clone, Debug)]
6549 pub struct DeleteBackup(RequestBuilder<crate::model::DeleteBackupRequest>);
6550
6551 impl DeleteBackup {
6552 pub(crate) fn new(
6553 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
6554 ) -> Self {
6555 Self(RequestBuilder::new(stub))
6556 }
6557
6558 pub fn with_request<V: Into<crate::model::DeleteBackupRequest>>(mut self, v: V) -> Self {
6560 self.0.request = v.into();
6561 self
6562 }
6563
6564 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6566 self.0.options = v.into();
6567 self
6568 }
6569
6570 pub async fn send(self) -> Result<()> {
6572 (*self.0.stub)
6573 .delete_backup(self.0.request, self.0.options)
6574 .await
6575 .map(crate::Response::into_body)
6576 }
6577
6578 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6582 self.0.request.name = v.into();
6583 self
6584 }
6585 }
6586
6587 #[doc(hidden)]
6588 impl crate::RequestBuilder for DeleteBackup {
6589 fn request_options(&mut self) -> &mut crate::RequestOptions {
6590 &mut self.0.options
6591 }
6592 }
6593
6594 #[derive(Clone, Debug)]
6615 pub struct ListBackups(RequestBuilder<crate::model::ListBackupsRequest>);
6616
6617 impl ListBackups {
6618 pub(crate) fn new(
6619 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
6620 ) -> Self {
6621 Self(RequestBuilder::new(stub))
6622 }
6623
6624 pub fn with_request<V: Into<crate::model::ListBackupsRequest>>(mut self, v: V) -> Self {
6626 self.0.request = v.into();
6627 self
6628 }
6629
6630 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6632 self.0.options = v.into();
6633 self
6634 }
6635
6636 pub async fn send(self) -> Result<crate::model::ListBackupsResponse> {
6638 (*self.0.stub)
6639 .list_backups(self.0.request, self.0.options)
6640 .await
6641 .map(crate::Response::into_body)
6642 }
6643
6644 pub fn by_page(
6646 self,
6647 ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListBackupsResponse, crate::Error>
6648 {
6649 use std::clone::Clone;
6650 let token = self.0.request.page_token.clone();
6651 let execute = move |token: String| {
6652 let mut builder = self.clone();
6653 builder.0.request = builder.0.request.set_page_token(token);
6654 builder.send()
6655 };
6656 google_cloud_gax::paginator::internal::new_paginator(token, execute)
6657 }
6658
6659 pub fn by_item(
6661 self,
6662 ) -> impl google_cloud_gax::paginator::ItemPaginator<
6663 crate::model::ListBackupsResponse,
6664 crate::Error,
6665 > {
6666 use google_cloud_gax::paginator::Paginator;
6667 self.by_page().items()
6668 }
6669
6670 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
6674 self.0.request.parent = v.into();
6675 self
6676 }
6677
6678 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
6680 self.0.request.filter = v.into();
6681 self
6682 }
6683
6684 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
6686 self.0.request.order_by = v.into();
6687 self
6688 }
6689
6690 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
6692 self.0.request.page_size = v.into();
6693 self
6694 }
6695
6696 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
6698 self.0.request.page_token = v.into();
6699 self
6700 }
6701 }
6702
6703 #[doc(hidden)]
6704 impl crate::RequestBuilder for ListBackups {
6705 fn request_options(&mut self) -> &mut crate::RequestOptions {
6706 &mut self.0.options
6707 }
6708 }
6709
6710 #[derive(Clone, Debug)]
6728 pub struct RestoreTable(RequestBuilder<crate::model::RestoreTableRequest>);
6729
6730 impl RestoreTable {
6731 pub(crate) fn new(
6732 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
6733 ) -> Self {
6734 Self(RequestBuilder::new(stub))
6735 }
6736
6737 pub fn with_request<V: Into<crate::model::RestoreTableRequest>>(mut self, v: V) -> Self {
6739 self.0.request = v.into();
6740 self
6741 }
6742
6743 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6745 self.0.options = v.into();
6746 self
6747 }
6748
6749 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
6756 (*self.0.stub)
6757 .restore_table(self.0.request, self.0.options)
6758 .await
6759 .map(crate::Response::into_body)
6760 }
6761
6762 pub fn poller(
6764 self,
6765 ) -> impl google_cloud_lro::Poller<crate::model::Table, crate::model::RestoreTableMetadata>
6766 {
6767 type Operation = google_cloud_lro::internal::Operation<
6768 crate::model::Table,
6769 crate::model::RestoreTableMetadata,
6770 >;
6771 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6772 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6773 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
6774 if let Some(ref mut details) = poller_options.tracing {
6775 details.method_name = "google_cloud_bigtable_admin_v2::client::BigtableTableAdmin::restore_table::until_done";
6776 }
6777
6778 let stub = self.0.stub.clone();
6779 let mut options = self.0.options.clone();
6780 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
6781 let query = move |name| {
6782 let stub = stub.clone();
6783 let options = options.clone();
6784 async {
6785 let op = GetOperation::new(stub)
6786 .set_name(name)
6787 .with_options(options)
6788 .send()
6789 .await?;
6790 Ok(Operation::new(op))
6791 }
6792 };
6793
6794 let start = move || async {
6795 let op = self.send().await?;
6796 Ok(Operation::new(op))
6797 };
6798
6799 use google_cloud_lro::internal::PollerExt;
6800 {
6801 google_cloud_lro::internal::new_poller(
6802 polling_error_policy,
6803 polling_backoff_policy,
6804 start,
6805 query,
6806 )
6807 }
6808 .with_options(poller_options)
6809 }
6810
6811 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
6815 self.0.request.parent = v.into();
6816 self
6817 }
6818
6819 pub fn set_table_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
6823 self.0.request.table_id = v.into();
6824 self
6825 }
6826
6827 pub fn set_source<T: Into<Option<crate::model::restore_table_request::Source>>>(
6832 mut self,
6833 v: T,
6834 ) -> Self {
6835 self.0.request.source = v.into();
6836 self
6837 }
6838
6839 pub fn set_backup<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6845 self.0.request = self.0.request.set_backup(v);
6846 self
6847 }
6848 }
6849
6850 #[doc(hidden)]
6851 impl crate::RequestBuilder for RestoreTable {
6852 fn request_options(&mut self) -> &mut crate::RequestOptions {
6853 &mut self.0.options
6854 }
6855 }
6856
6857 #[derive(Clone, Debug)]
6875 pub struct CopyBackup(RequestBuilder<crate::model::CopyBackupRequest>);
6876
6877 impl CopyBackup {
6878 pub(crate) fn new(
6879 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
6880 ) -> Self {
6881 Self(RequestBuilder::new(stub))
6882 }
6883
6884 pub fn with_request<V: Into<crate::model::CopyBackupRequest>>(mut self, v: V) -> Self {
6886 self.0.request = v.into();
6887 self
6888 }
6889
6890 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6892 self.0.options = v.into();
6893 self
6894 }
6895
6896 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
6903 (*self.0.stub)
6904 .copy_backup(self.0.request, self.0.options)
6905 .await
6906 .map(crate::Response::into_body)
6907 }
6908
6909 pub fn poller(
6911 self,
6912 ) -> impl google_cloud_lro::Poller<crate::model::Backup, crate::model::CopyBackupMetadata>
6913 {
6914 type Operation = google_cloud_lro::internal::Operation<
6915 crate::model::Backup,
6916 crate::model::CopyBackupMetadata,
6917 >;
6918 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6919 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6920 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
6921 if let Some(ref mut details) = poller_options.tracing {
6922 details.method_name = "google_cloud_bigtable_admin_v2::client::BigtableTableAdmin::copy_backup::until_done";
6923 }
6924
6925 let stub = self.0.stub.clone();
6926 let mut options = self.0.options.clone();
6927 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
6928 let query = move |name| {
6929 let stub = stub.clone();
6930 let options = options.clone();
6931 async {
6932 let op = GetOperation::new(stub)
6933 .set_name(name)
6934 .with_options(options)
6935 .send()
6936 .await?;
6937 Ok(Operation::new(op))
6938 }
6939 };
6940
6941 let start = move || async {
6942 let op = self.send().await?;
6943 Ok(Operation::new(op))
6944 };
6945
6946 use google_cloud_lro::internal::PollerExt;
6947 {
6948 google_cloud_lro::internal::new_poller(
6949 polling_error_policy,
6950 polling_backoff_policy,
6951 start,
6952 query,
6953 )
6954 }
6955 .with_options(poller_options)
6956 }
6957
6958 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
6962 self.0.request.parent = v.into();
6963 self
6964 }
6965
6966 pub fn set_backup_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
6970 self.0.request.backup_id = v.into();
6971 self
6972 }
6973
6974 pub fn set_source_backup<T: Into<std::string::String>>(mut self, v: T) -> Self {
6978 self.0.request.source_backup = v.into();
6979 self
6980 }
6981
6982 pub fn set_expire_time<T>(mut self, v: T) -> Self
6986 where
6987 T: std::convert::Into<wkt::Timestamp>,
6988 {
6989 self.0.request.expire_time = std::option::Option::Some(v.into());
6990 self
6991 }
6992
6993 pub fn set_or_clear_expire_time<T>(mut self, v: std::option::Option<T>) -> Self
6997 where
6998 T: std::convert::Into<wkt::Timestamp>,
6999 {
7000 self.0.request.expire_time = v.map(|x| x.into());
7001 self
7002 }
7003 }
7004
7005 #[doc(hidden)]
7006 impl crate::RequestBuilder for CopyBackup {
7007 fn request_options(&mut self) -> &mut crate::RequestOptions {
7008 &mut self.0.options
7009 }
7010 }
7011
7012 #[derive(Clone, Debug)]
7029 pub struct GetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::GetIamPolicyRequest>);
7030
7031 impl GetIamPolicy {
7032 pub(crate) fn new(
7033 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
7034 ) -> Self {
7035 Self(RequestBuilder::new(stub))
7036 }
7037
7038 pub fn with_request<V: Into<google_cloud_iam_v1::model::GetIamPolicyRequest>>(
7040 mut self,
7041 v: V,
7042 ) -> Self {
7043 self.0.request = v.into();
7044 self
7045 }
7046
7047 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7049 self.0.options = v.into();
7050 self
7051 }
7052
7053 pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
7055 (*self.0.stub)
7056 .get_iam_policy(self.0.request, self.0.options)
7057 .await
7058 .map(crate::Response::into_body)
7059 }
7060
7061 pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
7065 self.0.request.resource = v.into();
7066 self
7067 }
7068
7069 pub fn set_options<T>(mut self, v: T) -> Self
7071 where
7072 T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
7073 {
7074 self.0.request.options = std::option::Option::Some(v.into());
7075 self
7076 }
7077
7078 pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
7080 where
7081 T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
7082 {
7083 self.0.request.options = v.map(|x| x.into());
7084 self
7085 }
7086 }
7087
7088 #[doc(hidden)]
7089 impl crate::RequestBuilder for GetIamPolicy {
7090 fn request_options(&mut self) -> &mut crate::RequestOptions {
7091 &mut self.0.options
7092 }
7093 }
7094
7095 #[derive(Clone, Debug)]
7112 pub struct SetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::SetIamPolicyRequest>);
7113
7114 impl SetIamPolicy {
7115 pub(crate) fn new(
7116 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
7117 ) -> Self {
7118 Self(RequestBuilder::new(stub))
7119 }
7120
7121 pub fn with_request<V: Into<google_cloud_iam_v1::model::SetIamPolicyRequest>>(
7123 mut self,
7124 v: V,
7125 ) -> Self {
7126 self.0.request = v.into();
7127 self
7128 }
7129
7130 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7132 self.0.options = v.into();
7133 self
7134 }
7135
7136 pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
7138 (*self.0.stub)
7139 .set_iam_policy(self.0.request, self.0.options)
7140 .await
7141 .map(crate::Response::into_body)
7142 }
7143
7144 pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
7148 self.0.request.resource = v.into();
7149 self
7150 }
7151
7152 pub fn set_policy<T>(mut self, v: T) -> Self
7156 where
7157 T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
7158 {
7159 self.0.request.policy = std::option::Option::Some(v.into());
7160 self
7161 }
7162
7163 pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
7167 where
7168 T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
7169 {
7170 self.0.request.policy = v.map(|x| x.into());
7171 self
7172 }
7173
7174 pub fn set_update_mask<T>(mut self, v: T) -> Self
7176 where
7177 T: std::convert::Into<wkt::FieldMask>,
7178 {
7179 self.0.request.update_mask = std::option::Option::Some(v.into());
7180 self
7181 }
7182
7183 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
7185 where
7186 T: std::convert::Into<wkt::FieldMask>,
7187 {
7188 self.0.request.update_mask = v.map(|x| x.into());
7189 self
7190 }
7191 }
7192
7193 #[doc(hidden)]
7194 impl crate::RequestBuilder for SetIamPolicy {
7195 fn request_options(&mut self) -> &mut crate::RequestOptions {
7196 &mut self.0.options
7197 }
7198 }
7199
7200 #[derive(Clone, Debug)]
7217 pub struct TestIamPermissions(
7218 RequestBuilder<google_cloud_iam_v1::model::TestIamPermissionsRequest>,
7219 );
7220
7221 impl TestIamPermissions {
7222 pub(crate) fn new(
7223 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
7224 ) -> Self {
7225 Self(RequestBuilder::new(stub))
7226 }
7227
7228 pub fn with_request<V: Into<google_cloud_iam_v1::model::TestIamPermissionsRequest>>(
7230 mut self,
7231 v: V,
7232 ) -> Self {
7233 self.0.request = v.into();
7234 self
7235 }
7236
7237 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7239 self.0.options = v.into();
7240 self
7241 }
7242
7243 pub async fn send(self) -> Result<google_cloud_iam_v1::model::TestIamPermissionsResponse> {
7245 (*self.0.stub)
7246 .test_iam_permissions(self.0.request, self.0.options)
7247 .await
7248 .map(crate::Response::into_body)
7249 }
7250
7251 pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
7255 self.0.request.resource = v.into();
7256 self
7257 }
7258
7259 pub fn set_permissions<T, V>(mut self, v: T) -> Self
7263 where
7264 T: std::iter::IntoIterator<Item = V>,
7265 V: std::convert::Into<std::string::String>,
7266 {
7267 use std::iter::Iterator;
7268 self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
7269 self
7270 }
7271 }
7272
7273 #[doc(hidden)]
7274 impl crate::RequestBuilder for TestIamPermissions {
7275 fn request_options(&mut self) -> &mut crate::RequestOptions {
7276 &mut self.0.options
7277 }
7278 }
7279
7280 #[derive(Clone, Debug)]
7298 pub struct CreateSchemaBundle(RequestBuilder<crate::model::CreateSchemaBundleRequest>);
7299
7300 impl CreateSchemaBundle {
7301 pub(crate) fn new(
7302 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
7303 ) -> Self {
7304 Self(RequestBuilder::new(stub))
7305 }
7306
7307 pub fn with_request<V: Into<crate::model::CreateSchemaBundleRequest>>(
7309 mut self,
7310 v: V,
7311 ) -> Self {
7312 self.0.request = v.into();
7313 self
7314 }
7315
7316 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7318 self.0.options = v.into();
7319 self
7320 }
7321
7322 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
7329 (*self.0.stub)
7330 .create_schema_bundle(self.0.request, self.0.options)
7331 .await
7332 .map(crate::Response::into_body)
7333 }
7334
7335 pub fn poller(
7337 self,
7338 ) -> impl google_cloud_lro::Poller<
7339 crate::model::SchemaBundle,
7340 crate::model::CreateSchemaBundleMetadata,
7341 > {
7342 type Operation = google_cloud_lro::internal::Operation<
7343 crate::model::SchemaBundle,
7344 crate::model::CreateSchemaBundleMetadata,
7345 >;
7346 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
7347 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
7348 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
7349 if let Some(ref mut details) = poller_options.tracing {
7350 details.method_name = "google_cloud_bigtable_admin_v2::client::BigtableTableAdmin::create_schema_bundle::until_done";
7351 }
7352
7353 let stub = self.0.stub.clone();
7354 let mut options = self.0.options.clone();
7355 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
7356 let query = move |name| {
7357 let stub = stub.clone();
7358 let options = options.clone();
7359 async {
7360 let op = GetOperation::new(stub)
7361 .set_name(name)
7362 .with_options(options)
7363 .send()
7364 .await?;
7365 Ok(Operation::new(op))
7366 }
7367 };
7368
7369 let start = move || async {
7370 let op = self.send().await?;
7371 Ok(Operation::new(op))
7372 };
7373
7374 use google_cloud_lro::internal::PollerExt;
7375 {
7376 google_cloud_lro::internal::new_poller(
7377 polling_error_policy,
7378 polling_backoff_policy,
7379 start,
7380 query,
7381 )
7382 }
7383 .with_options(poller_options)
7384 }
7385
7386 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
7390 self.0.request.parent = v.into();
7391 self
7392 }
7393
7394 pub fn set_schema_bundle_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
7398 self.0.request.schema_bundle_id = v.into();
7399 self
7400 }
7401
7402 pub fn set_schema_bundle<T>(mut self, v: T) -> Self
7406 where
7407 T: std::convert::Into<crate::model::SchemaBundle>,
7408 {
7409 self.0.request.schema_bundle = std::option::Option::Some(v.into());
7410 self
7411 }
7412
7413 pub fn set_or_clear_schema_bundle<T>(mut self, v: std::option::Option<T>) -> Self
7417 where
7418 T: std::convert::Into<crate::model::SchemaBundle>,
7419 {
7420 self.0.request.schema_bundle = v.map(|x| x.into());
7421 self
7422 }
7423 }
7424
7425 #[doc(hidden)]
7426 impl crate::RequestBuilder for CreateSchemaBundle {
7427 fn request_options(&mut self) -> &mut crate::RequestOptions {
7428 &mut self.0.options
7429 }
7430 }
7431
7432 #[derive(Clone, Debug)]
7450 pub struct UpdateSchemaBundle(RequestBuilder<crate::model::UpdateSchemaBundleRequest>);
7451
7452 impl UpdateSchemaBundle {
7453 pub(crate) fn new(
7454 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
7455 ) -> Self {
7456 Self(RequestBuilder::new(stub))
7457 }
7458
7459 pub fn with_request<V: Into<crate::model::UpdateSchemaBundleRequest>>(
7461 mut self,
7462 v: V,
7463 ) -> Self {
7464 self.0.request = v.into();
7465 self
7466 }
7467
7468 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7470 self.0.options = v.into();
7471 self
7472 }
7473
7474 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
7481 (*self.0.stub)
7482 .update_schema_bundle(self.0.request, self.0.options)
7483 .await
7484 .map(crate::Response::into_body)
7485 }
7486
7487 pub fn poller(
7489 self,
7490 ) -> impl google_cloud_lro::Poller<
7491 crate::model::SchemaBundle,
7492 crate::model::UpdateSchemaBundleMetadata,
7493 > {
7494 type Operation = google_cloud_lro::internal::Operation<
7495 crate::model::SchemaBundle,
7496 crate::model::UpdateSchemaBundleMetadata,
7497 >;
7498 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
7499 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
7500 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
7501 if let Some(ref mut details) = poller_options.tracing {
7502 details.method_name = "google_cloud_bigtable_admin_v2::client::BigtableTableAdmin::update_schema_bundle::until_done";
7503 }
7504
7505 let stub = self.0.stub.clone();
7506 let mut options = self.0.options.clone();
7507 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
7508 let query = move |name| {
7509 let stub = stub.clone();
7510 let options = options.clone();
7511 async {
7512 let op = GetOperation::new(stub)
7513 .set_name(name)
7514 .with_options(options)
7515 .send()
7516 .await?;
7517 Ok(Operation::new(op))
7518 }
7519 };
7520
7521 let start = move || async {
7522 let op = self.send().await?;
7523 Ok(Operation::new(op))
7524 };
7525
7526 use google_cloud_lro::internal::PollerExt;
7527 {
7528 google_cloud_lro::internal::new_poller(
7529 polling_error_policy,
7530 polling_backoff_policy,
7531 start,
7532 query,
7533 )
7534 }
7535 .with_options(poller_options)
7536 }
7537
7538 pub fn set_schema_bundle<T>(mut self, v: T) -> Self
7542 where
7543 T: std::convert::Into<crate::model::SchemaBundle>,
7544 {
7545 self.0.request.schema_bundle = std::option::Option::Some(v.into());
7546 self
7547 }
7548
7549 pub fn set_or_clear_schema_bundle<T>(mut self, v: std::option::Option<T>) -> Self
7553 where
7554 T: std::convert::Into<crate::model::SchemaBundle>,
7555 {
7556 self.0.request.schema_bundle = v.map(|x| x.into());
7557 self
7558 }
7559
7560 pub fn set_update_mask<T>(mut self, v: T) -> Self
7562 where
7563 T: std::convert::Into<wkt::FieldMask>,
7564 {
7565 self.0.request.update_mask = std::option::Option::Some(v.into());
7566 self
7567 }
7568
7569 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
7571 where
7572 T: std::convert::Into<wkt::FieldMask>,
7573 {
7574 self.0.request.update_mask = v.map(|x| x.into());
7575 self
7576 }
7577
7578 pub fn set_ignore_warnings<T: Into<bool>>(mut self, v: T) -> Self {
7580 self.0.request.ignore_warnings = v.into();
7581 self
7582 }
7583 }
7584
7585 #[doc(hidden)]
7586 impl crate::RequestBuilder for UpdateSchemaBundle {
7587 fn request_options(&mut self) -> &mut crate::RequestOptions {
7588 &mut self.0.options
7589 }
7590 }
7591
7592 #[derive(Clone, Debug)]
7609 pub struct GetSchemaBundle(RequestBuilder<crate::model::GetSchemaBundleRequest>);
7610
7611 impl GetSchemaBundle {
7612 pub(crate) fn new(
7613 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
7614 ) -> Self {
7615 Self(RequestBuilder::new(stub))
7616 }
7617
7618 pub fn with_request<V: Into<crate::model::GetSchemaBundleRequest>>(mut self, v: V) -> Self {
7620 self.0.request = v.into();
7621 self
7622 }
7623
7624 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7626 self.0.options = v.into();
7627 self
7628 }
7629
7630 pub async fn send(self) -> Result<crate::model::SchemaBundle> {
7632 (*self.0.stub)
7633 .get_schema_bundle(self.0.request, self.0.options)
7634 .await
7635 .map(crate::Response::into_body)
7636 }
7637
7638 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7642 self.0.request.name = v.into();
7643 self
7644 }
7645 }
7646
7647 #[doc(hidden)]
7648 impl crate::RequestBuilder for GetSchemaBundle {
7649 fn request_options(&mut self) -> &mut crate::RequestOptions {
7650 &mut self.0.options
7651 }
7652 }
7653
7654 #[derive(Clone, Debug)]
7675 pub struct ListSchemaBundles(RequestBuilder<crate::model::ListSchemaBundlesRequest>);
7676
7677 impl ListSchemaBundles {
7678 pub(crate) fn new(
7679 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
7680 ) -> Self {
7681 Self(RequestBuilder::new(stub))
7682 }
7683
7684 pub fn with_request<V: Into<crate::model::ListSchemaBundlesRequest>>(
7686 mut self,
7687 v: V,
7688 ) -> Self {
7689 self.0.request = v.into();
7690 self
7691 }
7692
7693 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7695 self.0.options = v.into();
7696 self
7697 }
7698
7699 pub async fn send(self) -> Result<crate::model::ListSchemaBundlesResponse> {
7701 (*self.0.stub)
7702 .list_schema_bundles(self.0.request, self.0.options)
7703 .await
7704 .map(crate::Response::into_body)
7705 }
7706
7707 pub fn by_page(
7709 self,
7710 ) -> impl google_cloud_gax::paginator::Paginator<
7711 crate::model::ListSchemaBundlesResponse,
7712 crate::Error,
7713 > {
7714 use std::clone::Clone;
7715 let token = self.0.request.page_token.clone();
7716 let execute = move |token: String| {
7717 let mut builder = self.clone();
7718 builder.0.request = builder.0.request.set_page_token(token);
7719 builder.send()
7720 };
7721 google_cloud_gax::paginator::internal::new_paginator(token, execute)
7722 }
7723
7724 pub fn by_item(
7726 self,
7727 ) -> impl google_cloud_gax::paginator::ItemPaginator<
7728 crate::model::ListSchemaBundlesResponse,
7729 crate::Error,
7730 > {
7731 use google_cloud_gax::paginator::Paginator;
7732 self.by_page().items()
7733 }
7734
7735 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
7739 self.0.request.parent = v.into();
7740 self
7741 }
7742
7743 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
7745 self.0.request.page_size = v.into();
7746 self
7747 }
7748
7749 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
7751 self.0.request.page_token = v.into();
7752 self
7753 }
7754 }
7755
7756 #[doc(hidden)]
7757 impl crate::RequestBuilder for ListSchemaBundles {
7758 fn request_options(&mut self) -> &mut crate::RequestOptions {
7759 &mut self.0.options
7760 }
7761 }
7762
7763 #[derive(Clone, Debug)]
7780 pub struct DeleteSchemaBundle(RequestBuilder<crate::model::DeleteSchemaBundleRequest>);
7781
7782 impl DeleteSchemaBundle {
7783 pub(crate) fn new(
7784 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
7785 ) -> Self {
7786 Self(RequestBuilder::new(stub))
7787 }
7788
7789 pub fn with_request<V: Into<crate::model::DeleteSchemaBundleRequest>>(
7791 mut self,
7792 v: V,
7793 ) -> Self {
7794 self.0.request = v.into();
7795 self
7796 }
7797
7798 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7800 self.0.options = v.into();
7801 self
7802 }
7803
7804 pub async fn send(self) -> Result<()> {
7806 (*self.0.stub)
7807 .delete_schema_bundle(self.0.request, self.0.options)
7808 .await
7809 .map(crate::Response::into_body)
7810 }
7811
7812 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7816 self.0.request.name = v.into();
7817 self
7818 }
7819
7820 pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
7822 self.0.request.etag = v.into();
7823 self
7824 }
7825 }
7826
7827 #[doc(hidden)]
7828 impl crate::RequestBuilder for DeleteSchemaBundle {
7829 fn request_options(&mut self) -> &mut crate::RequestOptions {
7830 &mut self.0.options
7831 }
7832 }
7833
7834 #[derive(Clone, Debug)]
7855 pub struct ListOperations(
7856 RequestBuilder<google_cloud_longrunning::model::ListOperationsRequest>,
7857 );
7858
7859 impl ListOperations {
7860 pub(crate) fn new(
7861 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
7862 ) -> Self {
7863 Self(RequestBuilder::new(stub))
7864 }
7865
7866 pub fn with_request<V: Into<google_cloud_longrunning::model::ListOperationsRequest>>(
7868 mut self,
7869 v: V,
7870 ) -> Self {
7871 self.0.request = v.into();
7872 self
7873 }
7874
7875 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7877 self.0.options = v.into();
7878 self
7879 }
7880
7881 pub async fn send(self) -> Result<google_cloud_longrunning::model::ListOperationsResponse> {
7883 (*self.0.stub)
7884 .list_operations(self.0.request, self.0.options)
7885 .await
7886 .map(crate::Response::into_body)
7887 }
7888
7889 pub fn by_page(
7891 self,
7892 ) -> impl google_cloud_gax::paginator::Paginator<
7893 google_cloud_longrunning::model::ListOperationsResponse,
7894 crate::Error,
7895 > {
7896 use std::clone::Clone;
7897 let token = self.0.request.page_token.clone();
7898 let execute = move |token: String| {
7899 let mut builder = self.clone();
7900 builder.0.request = builder.0.request.set_page_token(token);
7901 builder.send()
7902 };
7903 google_cloud_gax::paginator::internal::new_paginator(token, execute)
7904 }
7905
7906 pub fn by_item(
7908 self,
7909 ) -> impl google_cloud_gax::paginator::ItemPaginator<
7910 google_cloud_longrunning::model::ListOperationsResponse,
7911 crate::Error,
7912 > {
7913 use google_cloud_gax::paginator::Paginator;
7914 self.by_page().items()
7915 }
7916
7917 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7919 self.0.request.name = v.into();
7920 self
7921 }
7922
7923 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
7925 self.0.request.filter = v.into();
7926 self
7927 }
7928
7929 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
7931 self.0.request.page_size = v.into();
7932 self
7933 }
7934
7935 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
7937 self.0.request.page_token = v.into();
7938 self
7939 }
7940
7941 pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
7943 self.0.request.return_partial_success = v.into();
7944 self
7945 }
7946 }
7947
7948 #[doc(hidden)]
7949 impl crate::RequestBuilder for ListOperations {
7950 fn request_options(&mut self) -> &mut crate::RequestOptions {
7951 &mut self.0.options
7952 }
7953 }
7954
7955 #[derive(Clone, Debug)]
7972 pub struct GetOperation(RequestBuilder<google_cloud_longrunning::model::GetOperationRequest>);
7973
7974 impl GetOperation {
7975 pub(crate) fn new(
7976 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
7977 ) -> Self {
7978 Self(RequestBuilder::new(stub))
7979 }
7980
7981 pub fn with_request<V: Into<google_cloud_longrunning::model::GetOperationRequest>>(
7983 mut self,
7984 v: V,
7985 ) -> Self {
7986 self.0.request = v.into();
7987 self
7988 }
7989
7990 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7992 self.0.options = v.into();
7993 self
7994 }
7995
7996 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
7998 (*self.0.stub)
7999 .get_operation(self.0.request, self.0.options)
8000 .await
8001 .map(crate::Response::into_body)
8002 }
8003
8004 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8006 self.0.request.name = v.into();
8007 self
8008 }
8009 }
8010
8011 #[doc(hidden)]
8012 impl crate::RequestBuilder for GetOperation {
8013 fn request_options(&mut self) -> &mut crate::RequestOptions {
8014 &mut self.0.options
8015 }
8016 }
8017
8018 #[derive(Clone, Debug)]
8035 pub struct DeleteOperation(
8036 RequestBuilder<google_cloud_longrunning::model::DeleteOperationRequest>,
8037 );
8038
8039 impl DeleteOperation {
8040 pub(crate) fn new(
8041 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
8042 ) -> Self {
8043 Self(RequestBuilder::new(stub))
8044 }
8045
8046 pub fn with_request<V: Into<google_cloud_longrunning::model::DeleteOperationRequest>>(
8048 mut self,
8049 v: V,
8050 ) -> Self {
8051 self.0.request = v.into();
8052 self
8053 }
8054
8055 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8057 self.0.options = v.into();
8058 self
8059 }
8060
8061 pub async fn send(self) -> Result<()> {
8063 (*self.0.stub)
8064 .delete_operation(self.0.request, self.0.options)
8065 .await
8066 .map(crate::Response::into_body)
8067 }
8068
8069 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8071 self.0.request.name = v.into();
8072 self
8073 }
8074 }
8075
8076 #[doc(hidden)]
8077 impl crate::RequestBuilder for DeleteOperation {
8078 fn request_options(&mut self) -> &mut crate::RequestOptions {
8079 &mut self.0.options
8080 }
8081 }
8082
8083 #[derive(Clone, Debug)]
8100 pub struct CancelOperation(
8101 RequestBuilder<google_cloud_longrunning::model::CancelOperationRequest>,
8102 );
8103
8104 impl CancelOperation {
8105 pub(crate) fn new(
8106 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
8107 ) -> Self {
8108 Self(RequestBuilder::new(stub))
8109 }
8110
8111 pub fn with_request<V: Into<google_cloud_longrunning::model::CancelOperationRequest>>(
8113 mut self,
8114 v: V,
8115 ) -> Self {
8116 self.0.request = v.into();
8117 self
8118 }
8119
8120 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8122 self.0.options = v.into();
8123 self
8124 }
8125
8126 pub async fn send(self) -> Result<()> {
8128 (*self.0.stub)
8129 .cancel_operation(self.0.request, self.0.options)
8130 .await
8131 .map(crate::Response::into_body)
8132 }
8133
8134 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8136 self.0.request.name = v.into();
8137 self
8138 }
8139 }
8140
8141 #[doc(hidden)]
8142 impl crate::RequestBuilder for CancelOperation {
8143 fn request_options(&mut self) -> &mut crate::RequestOptions {
8144 &mut self.0.options
8145 }
8146 }
8147}