1pub mod bigtable_instance_admin {
18 use crate::Result;
19
20 pub type ClientBuilder =
34 gax::client_builder::ClientBuilder<client::Factory, gaxi::options::Credentials>;
35
36 pub(crate) mod client {
37 use super::super::super::client::BigtableInstanceAdmin;
38 pub struct Factory;
39 impl gax::client_builder::internal::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 ) -> gax::client_builder::Result<Self::Client> {
46 Self::Client::new(config).await
47 }
48 }
49 }
50
51 #[derive(Clone, Debug)]
53 pub(crate) struct RequestBuilder<R: std::default::Default> {
54 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
55 request: R,
56 options: gax::options::RequestOptions,
57 }
58
59 impl<R> RequestBuilder<R>
60 where
61 R: std::default::Default,
62 {
63 pub(crate) fn new(
64 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
65 ) -> Self {
66 Self {
67 stub,
68 request: R::default(),
69 options: gax::options::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<gax::options::RequestOptions>>(mut self, v: V) -> Self {
109 self.0.options = v.into();
110 self
111 }
112
113 pub async fn send(self) -> Result<longrunning::model::Operation> {
120 (*self.0.stub)
121 .create_instance(self.0.request, self.0.options)
122 .await
123 .map(gax::response::Response::into_body)
124 }
125
126 pub fn poller(
128 self,
129 ) -> impl lro::Poller<crate::model::Instance, crate::model::CreateInstanceMetadata>
130 {
131 type Operation = 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
138 let stub = self.0.stub.clone();
139 let mut options = self.0.options.clone();
140 options.set_retry_policy(gax::retry_policy::NeverRetry);
141 let query = move |name| {
142 let stub = stub.clone();
143 let options = options.clone();
144 async {
145 let op = GetOperation::new(stub)
146 .set_name(name)
147 .with_options(options)
148 .send()
149 .await?;
150 Ok(Operation::new(op))
151 }
152 };
153
154 let start = move || async {
155 let op = self.send().await?;
156 Ok(Operation::new(op))
157 };
158
159 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
160 }
161
162 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
166 self.0.request.parent = v.into();
167 self
168 }
169
170 pub fn set_instance_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
174 self.0.request.instance_id = v.into();
175 self
176 }
177
178 pub fn set_instance<T>(mut self, v: T) -> Self
182 where
183 T: std::convert::Into<crate::model::Instance>,
184 {
185 self.0.request.instance = std::option::Option::Some(v.into());
186 self
187 }
188
189 pub fn set_or_clear_instance<T>(mut self, v: std::option::Option<T>) -> Self
193 where
194 T: std::convert::Into<crate::model::Instance>,
195 {
196 self.0.request.instance = v.map(|x| x.into());
197 self
198 }
199
200 pub fn set_clusters<T, K, V>(mut self, v: T) -> Self
204 where
205 T: std::iter::IntoIterator<Item = (K, V)>,
206 K: std::convert::Into<std::string::String>,
207 V: std::convert::Into<crate::model::Cluster>,
208 {
209 self.0.request.clusters = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
210 self
211 }
212 }
213
214 #[doc(hidden)]
215 impl gax::options::internal::RequestBuilder for CreateInstance {
216 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
217 &mut self.0.options
218 }
219 }
220
221 #[derive(Clone, Debug)]
238 pub struct GetInstance(RequestBuilder<crate::model::GetInstanceRequest>);
239
240 impl GetInstance {
241 pub(crate) fn new(
242 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
243 ) -> Self {
244 Self(RequestBuilder::new(stub))
245 }
246
247 pub fn with_request<V: Into<crate::model::GetInstanceRequest>>(mut self, v: V) -> Self {
249 self.0.request = v.into();
250 self
251 }
252
253 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
255 self.0.options = v.into();
256 self
257 }
258
259 pub async fn send(self) -> Result<crate::model::Instance> {
261 (*self.0.stub)
262 .get_instance(self.0.request, self.0.options)
263 .await
264 .map(gax::response::Response::into_body)
265 }
266
267 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
271 self.0.request.name = v.into();
272 self
273 }
274 }
275
276 #[doc(hidden)]
277 impl gax::options::internal::RequestBuilder for GetInstance {
278 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
279 &mut self.0.options
280 }
281 }
282
283 #[derive(Clone, Debug)]
300 pub struct ListInstances(RequestBuilder<crate::model::ListInstancesRequest>);
301
302 impl ListInstances {
303 pub(crate) fn new(
304 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
305 ) -> Self {
306 Self(RequestBuilder::new(stub))
307 }
308
309 pub fn with_request<V: Into<crate::model::ListInstancesRequest>>(mut self, v: V) -> Self {
311 self.0.request = v.into();
312 self
313 }
314
315 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
317 self.0.options = v.into();
318 self
319 }
320
321 pub async fn send(self) -> Result<crate::model::ListInstancesResponse> {
323 (*self.0.stub)
324 .list_instances(self.0.request, self.0.options)
325 .await
326 .map(gax::response::Response::into_body)
327 }
328
329 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
333 self.0.request.parent = v.into();
334 self
335 }
336
337 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
339 self.0.request.page_token = v.into();
340 self
341 }
342 }
343
344 #[doc(hidden)]
345 impl gax::options::internal::RequestBuilder for ListInstances {
346 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
347 &mut self.0.options
348 }
349 }
350
351 #[derive(Clone, Debug)]
368 pub struct UpdateInstance(RequestBuilder<crate::model::Instance>);
369
370 impl UpdateInstance {
371 pub(crate) fn new(
372 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
373 ) -> Self {
374 Self(RequestBuilder::new(stub))
375 }
376
377 pub fn with_request<V: Into<crate::model::Instance>>(mut self, v: V) -> Self {
379 self.0.request = v.into();
380 self
381 }
382
383 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
385 self.0.options = v.into();
386 self
387 }
388
389 pub async fn send(self) -> Result<crate::model::Instance> {
391 (*self.0.stub)
392 .update_instance(self.0.request, self.0.options)
393 .await
394 .map(gax::response::Response::into_body)
395 }
396
397 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
399 self.0.request.name = v.into();
400 self
401 }
402
403 pub fn set_display_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
407 self.0.request.display_name = v.into();
408 self
409 }
410
411 pub fn set_state<T: Into<crate::model::instance::State>>(mut self, v: T) -> Self {
413 self.0.request.state = v.into();
414 self
415 }
416
417 pub fn set_type<T: Into<crate::model::instance::Type>>(mut self, v: T) -> Self {
419 self.0.request.r#type = v.into();
420 self
421 }
422
423 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
425 where
426 T: std::iter::IntoIterator<Item = (K, V)>,
427 K: std::convert::Into<std::string::String>,
428 V: std::convert::Into<std::string::String>,
429 {
430 self.0.request.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
431 self
432 }
433
434 pub fn set_create_time<T>(mut self, v: T) -> Self
436 where
437 T: std::convert::Into<wkt::Timestamp>,
438 {
439 self.0.request.create_time = std::option::Option::Some(v.into());
440 self
441 }
442
443 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
445 where
446 T: std::convert::Into<wkt::Timestamp>,
447 {
448 self.0.request.create_time = v.map(|x| x.into());
449 self
450 }
451
452 pub fn set_satisfies_pzs<T>(mut self, v: T) -> Self
454 where
455 T: std::convert::Into<bool>,
456 {
457 self.0.request.satisfies_pzs = std::option::Option::Some(v.into());
458 self
459 }
460
461 pub fn set_or_clear_satisfies_pzs<T>(mut self, v: std::option::Option<T>) -> Self
463 where
464 T: std::convert::Into<bool>,
465 {
466 self.0.request.satisfies_pzs = v.map(|x| x.into());
467 self
468 }
469
470 pub fn set_satisfies_pzi<T>(mut self, v: T) -> Self
472 where
473 T: std::convert::Into<bool>,
474 {
475 self.0.request.satisfies_pzi = std::option::Option::Some(v.into());
476 self
477 }
478
479 pub fn set_or_clear_satisfies_pzi<T>(mut self, v: std::option::Option<T>) -> Self
481 where
482 T: std::convert::Into<bool>,
483 {
484 self.0.request.satisfies_pzi = v.map(|x| x.into());
485 self
486 }
487
488 pub fn set_tags<T, K, V>(mut self, v: T) -> Self
490 where
491 T: std::iter::IntoIterator<Item = (K, V)>,
492 K: std::convert::Into<std::string::String>,
493 V: std::convert::Into<std::string::String>,
494 {
495 self.0.request.tags = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
496 self
497 }
498 }
499
500 #[doc(hidden)]
501 impl gax::options::internal::RequestBuilder for UpdateInstance {
502 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
503 &mut self.0.options
504 }
505 }
506
507 #[derive(Clone, Debug)]
525 pub struct PartialUpdateInstance(RequestBuilder<crate::model::PartialUpdateInstanceRequest>);
526
527 impl PartialUpdateInstance {
528 pub(crate) fn new(
529 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
530 ) -> Self {
531 Self(RequestBuilder::new(stub))
532 }
533
534 pub fn with_request<V: Into<crate::model::PartialUpdateInstanceRequest>>(
536 mut self,
537 v: V,
538 ) -> Self {
539 self.0.request = v.into();
540 self
541 }
542
543 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
545 self.0.options = v.into();
546 self
547 }
548
549 pub async fn send(self) -> Result<longrunning::model::Operation> {
556 (*self.0.stub)
557 .partial_update_instance(self.0.request, self.0.options)
558 .await
559 .map(gax::response::Response::into_body)
560 }
561
562 pub fn poller(
564 self,
565 ) -> impl lro::Poller<crate::model::Instance, crate::model::UpdateInstanceMetadata>
566 {
567 type Operation = lro::internal::Operation<
568 crate::model::Instance,
569 crate::model::UpdateInstanceMetadata,
570 >;
571 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
572 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
573
574 let stub = self.0.stub.clone();
575 let mut options = self.0.options.clone();
576 options.set_retry_policy(gax::retry_policy::NeverRetry);
577 let query = move |name| {
578 let stub = stub.clone();
579 let options = options.clone();
580 async {
581 let op = GetOperation::new(stub)
582 .set_name(name)
583 .with_options(options)
584 .send()
585 .await?;
586 Ok(Operation::new(op))
587 }
588 };
589
590 let start = move || async {
591 let op = self.send().await?;
592 Ok(Operation::new(op))
593 };
594
595 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
596 }
597
598 pub fn set_instance<T>(mut self, v: T) -> Self
602 where
603 T: std::convert::Into<crate::model::Instance>,
604 {
605 self.0.request.instance = std::option::Option::Some(v.into());
606 self
607 }
608
609 pub fn set_or_clear_instance<T>(mut self, v: std::option::Option<T>) -> Self
613 where
614 T: std::convert::Into<crate::model::Instance>,
615 {
616 self.0.request.instance = v.map(|x| x.into());
617 self
618 }
619
620 pub fn set_update_mask<T>(mut self, v: T) -> Self
624 where
625 T: std::convert::Into<wkt::FieldMask>,
626 {
627 self.0.request.update_mask = std::option::Option::Some(v.into());
628 self
629 }
630
631 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
635 where
636 T: std::convert::Into<wkt::FieldMask>,
637 {
638 self.0.request.update_mask = v.map(|x| x.into());
639 self
640 }
641 }
642
643 #[doc(hidden)]
644 impl gax::options::internal::RequestBuilder for PartialUpdateInstance {
645 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
646 &mut self.0.options
647 }
648 }
649
650 #[derive(Clone, Debug)]
667 pub struct DeleteInstance(RequestBuilder<crate::model::DeleteInstanceRequest>);
668
669 impl DeleteInstance {
670 pub(crate) fn new(
671 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
672 ) -> Self {
673 Self(RequestBuilder::new(stub))
674 }
675
676 pub fn with_request<V: Into<crate::model::DeleteInstanceRequest>>(mut self, v: V) -> Self {
678 self.0.request = v.into();
679 self
680 }
681
682 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
684 self.0.options = v.into();
685 self
686 }
687
688 pub async fn send(self) -> Result<()> {
690 (*self.0.stub)
691 .delete_instance(self.0.request, self.0.options)
692 .await
693 .map(gax::response::Response::into_body)
694 }
695
696 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
700 self.0.request.name = v.into();
701 self
702 }
703 }
704
705 #[doc(hidden)]
706 impl gax::options::internal::RequestBuilder for DeleteInstance {
707 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
708 &mut self.0.options
709 }
710 }
711
712 #[derive(Clone, Debug)]
730 pub struct CreateCluster(RequestBuilder<crate::model::CreateClusterRequest>);
731
732 impl CreateCluster {
733 pub(crate) fn new(
734 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
735 ) -> Self {
736 Self(RequestBuilder::new(stub))
737 }
738
739 pub fn with_request<V: Into<crate::model::CreateClusterRequest>>(mut self, v: V) -> Self {
741 self.0.request = v.into();
742 self
743 }
744
745 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
747 self.0.options = v.into();
748 self
749 }
750
751 pub async fn send(self) -> Result<longrunning::model::Operation> {
758 (*self.0.stub)
759 .create_cluster(self.0.request, self.0.options)
760 .await
761 .map(gax::response::Response::into_body)
762 }
763
764 pub fn poller(
766 self,
767 ) -> impl lro::Poller<crate::model::Cluster, crate::model::CreateClusterMetadata> {
768 type Operation = lro::internal::Operation<
769 crate::model::Cluster,
770 crate::model::CreateClusterMetadata,
771 >;
772 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
773 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
774
775 let stub = self.0.stub.clone();
776 let mut options = self.0.options.clone();
777 options.set_retry_policy(gax::retry_policy::NeverRetry);
778 let query = move |name| {
779 let stub = stub.clone();
780 let options = options.clone();
781 async {
782 let op = GetOperation::new(stub)
783 .set_name(name)
784 .with_options(options)
785 .send()
786 .await?;
787 Ok(Operation::new(op))
788 }
789 };
790
791 let start = move || async {
792 let op = self.send().await?;
793 Ok(Operation::new(op))
794 };
795
796 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
797 }
798
799 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
803 self.0.request.parent = v.into();
804 self
805 }
806
807 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
811 self.0.request.cluster_id = v.into();
812 self
813 }
814
815 pub fn set_cluster<T>(mut self, v: T) -> Self
819 where
820 T: std::convert::Into<crate::model::Cluster>,
821 {
822 self.0.request.cluster = std::option::Option::Some(v.into());
823 self
824 }
825
826 pub fn set_or_clear_cluster<T>(mut self, v: std::option::Option<T>) -> Self
830 where
831 T: std::convert::Into<crate::model::Cluster>,
832 {
833 self.0.request.cluster = v.map(|x| x.into());
834 self
835 }
836 }
837
838 #[doc(hidden)]
839 impl gax::options::internal::RequestBuilder for CreateCluster {
840 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
841 &mut self.0.options
842 }
843 }
844
845 #[derive(Clone, Debug)]
862 pub struct GetCluster(RequestBuilder<crate::model::GetClusterRequest>);
863
864 impl GetCluster {
865 pub(crate) fn new(
866 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
867 ) -> Self {
868 Self(RequestBuilder::new(stub))
869 }
870
871 pub fn with_request<V: Into<crate::model::GetClusterRequest>>(mut self, v: V) -> Self {
873 self.0.request = v.into();
874 self
875 }
876
877 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
879 self.0.options = v.into();
880 self
881 }
882
883 pub async fn send(self) -> Result<crate::model::Cluster> {
885 (*self.0.stub)
886 .get_cluster(self.0.request, self.0.options)
887 .await
888 .map(gax::response::Response::into_body)
889 }
890
891 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
895 self.0.request.name = v.into();
896 self
897 }
898 }
899
900 #[doc(hidden)]
901 impl gax::options::internal::RequestBuilder for GetCluster {
902 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
903 &mut self.0.options
904 }
905 }
906
907 #[derive(Clone, Debug)]
924 pub struct ListClusters(RequestBuilder<crate::model::ListClustersRequest>);
925
926 impl ListClusters {
927 pub(crate) fn new(
928 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
929 ) -> Self {
930 Self(RequestBuilder::new(stub))
931 }
932
933 pub fn with_request<V: Into<crate::model::ListClustersRequest>>(mut self, v: V) -> Self {
935 self.0.request = v.into();
936 self
937 }
938
939 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
941 self.0.options = v.into();
942 self
943 }
944
945 pub async fn send(self) -> Result<crate::model::ListClustersResponse> {
947 (*self.0.stub)
948 .list_clusters(self.0.request, self.0.options)
949 .await
950 .map(gax::response::Response::into_body)
951 }
952
953 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
957 self.0.request.parent = v.into();
958 self
959 }
960
961 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
963 self.0.request.page_token = v.into();
964 self
965 }
966 }
967
968 #[doc(hidden)]
969 impl gax::options::internal::RequestBuilder for ListClusters {
970 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
971 &mut self.0.options
972 }
973 }
974
975 #[derive(Clone, Debug)]
993 pub struct UpdateCluster(RequestBuilder<crate::model::Cluster>);
994
995 impl UpdateCluster {
996 pub(crate) fn new(
997 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
998 ) -> Self {
999 Self(RequestBuilder::new(stub))
1000 }
1001
1002 pub fn with_request<V: Into<crate::model::Cluster>>(mut self, v: V) -> Self {
1004 self.0.request = v.into();
1005 self
1006 }
1007
1008 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1010 self.0.options = v.into();
1011 self
1012 }
1013
1014 pub async fn send(self) -> Result<longrunning::model::Operation> {
1021 (*self.0.stub)
1022 .update_cluster(self.0.request, self.0.options)
1023 .await
1024 .map(gax::response::Response::into_body)
1025 }
1026
1027 pub fn poller(
1029 self,
1030 ) -> impl lro::Poller<crate::model::Cluster, crate::model::UpdateClusterMetadata> {
1031 type Operation = lro::internal::Operation<
1032 crate::model::Cluster,
1033 crate::model::UpdateClusterMetadata,
1034 >;
1035 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1036 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1037
1038 let stub = self.0.stub.clone();
1039 let mut options = self.0.options.clone();
1040 options.set_retry_policy(gax::retry_policy::NeverRetry);
1041 let query = move |name| {
1042 let stub = stub.clone();
1043 let options = options.clone();
1044 async {
1045 let op = GetOperation::new(stub)
1046 .set_name(name)
1047 .with_options(options)
1048 .send()
1049 .await?;
1050 Ok(Operation::new(op))
1051 }
1052 };
1053
1054 let start = move || async {
1055 let op = self.send().await?;
1056 Ok(Operation::new(op))
1057 };
1058
1059 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
1060 }
1061
1062 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1064 self.0.request.name = v.into();
1065 self
1066 }
1067
1068 pub fn set_location<T: Into<std::string::String>>(mut self, v: T) -> Self {
1070 self.0.request.location = v.into();
1071 self
1072 }
1073
1074 pub fn set_state<T: Into<crate::model::cluster::State>>(mut self, v: T) -> Self {
1076 self.0.request.state = v.into();
1077 self
1078 }
1079
1080 pub fn set_serve_nodes<T: Into<i32>>(mut self, v: T) -> Self {
1082 self.0.request.serve_nodes = v.into();
1083 self
1084 }
1085
1086 pub fn set_node_scaling_factor<T: Into<crate::model::cluster::NodeScalingFactor>>(
1088 mut self,
1089 v: T,
1090 ) -> Self {
1091 self.0.request.node_scaling_factor = v.into();
1092 self
1093 }
1094
1095 pub fn set_default_storage_type<T: Into<crate::model::StorageType>>(
1097 mut self,
1098 v: T,
1099 ) -> Self {
1100 self.0.request.default_storage_type = v.into();
1101 self
1102 }
1103
1104 pub fn set_encryption_config<T>(mut self, v: T) -> Self
1106 where
1107 T: std::convert::Into<crate::model::cluster::EncryptionConfig>,
1108 {
1109 self.0.request.encryption_config = std::option::Option::Some(v.into());
1110 self
1111 }
1112
1113 pub fn set_or_clear_encryption_config<T>(mut self, v: std::option::Option<T>) -> Self
1115 where
1116 T: std::convert::Into<crate::model::cluster::EncryptionConfig>,
1117 {
1118 self.0.request.encryption_config = v.map(|x| x.into());
1119 self
1120 }
1121
1122 pub fn set_config<T: Into<Option<crate::model::cluster::Config>>>(mut self, v: T) -> Self {
1127 self.0.request.config = v.into();
1128 self
1129 }
1130
1131 pub fn set_cluster_config<
1137 T: std::convert::Into<std::boxed::Box<crate::model::cluster::ClusterConfig>>,
1138 >(
1139 mut self,
1140 v: T,
1141 ) -> Self {
1142 self.0.request = self.0.request.set_cluster_config(v);
1143 self
1144 }
1145 }
1146
1147 #[doc(hidden)]
1148 impl gax::options::internal::RequestBuilder for UpdateCluster {
1149 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1150 &mut self.0.options
1151 }
1152 }
1153
1154 #[derive(Clone, Debug)]
1172 pub struct PartialUpdateCluster(RequestBuilder<crate::model::PartialUpdateClusterRequest>);
1173
1174 impl PartialUpdateCluster {
1175 pub(crate) fn new(
1176 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
1177 ) -> Self {
1178 Self(RequestBuilder::new(stub))
1179 }
1180
1181 pub fn with_request<V: Into<crate::model::PartialUpdateClusterRequest>>(
1183 mut self,
1184 v: V,
1185 ) -> Self {
1186 self.0.request = v.into();
1187 self
1188 }
1189
1190 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1192 self.0.options = v.into();
1193 self
1194 }
1195
1196 pub async fn send(self) -> Result<longrunning::model::Operation> {
1203 (*self.0.stub)
1204 .partial_update_cluster(self.0.request, self.0.options)
1205 .await
1206 .map(gax::response::Response::into_body)
1207 }
1208
1209 pub fn poller(
1211 self,
1212 ) -> impl lro::Poller<crate::model::Cluster, crate::model::PartialUpdateClusterMetadata>
1213 {
1214 type Operation = lro::internal::Operation<
1215 crate::model::Cluster,
1216 crate::model::PartialUpdateClusterMetadata,
1217 >;
1218 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1219 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1220
1221 let stub = self.0.stub.clone();
1222 let mut options = self.0.options.clone();
1223 options.set_retry_policy(gax::retry_policy::NeverRetry);
1224 let query = move |name| {
1225 let stub = stub.clone();
1226 let options = options.clone();
1227 async {
1228 let op = GetOperation::new(stub)
1229 .set_name(name)
1230 .with_options(options)
1231 .send()
1232 .await?;
1233 Ok(Operation::new(op))
1234 }
1235 };
1236
1237 let start = move || async {
1238 let op = self.send().await?;
1239 Ok(Operation::new(op))
1240 };
1241
1242 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
1243 }
1244
1245 pub fn set_cluster<T>(mut self, v: T) -> Self
1249 where
1250 T: std::convert::Into<crate::model::Cluster>,
1251 {
1252 self.0.request.cluster = std::option::Option::Some(v.into());
1253 self
1254 }
1255
1256 pub fn set_or_clear_cluster<T>(mut self, v: std::option::Option<T>) -> Self
1260 where
1261 T: std::convert::Into<crate::model::Cluster>,
1262 {
1263 self.0.request.cluster = v.map(|x| x.into());
1264 self
1265 }
1266
1267 pub fn set_update_mask<T>(mut self, v: T) -> Self
1271 where
1272 T: std::convert::Into<wkt::FieldMask>,
1273 {
1274 self.0.request.update_mask = std::option::Option::Some(v.into());
1275 self
1276 }
1277
1278 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
1282 where
1283 T: std::convert::Into<wkt::FieldMask>,
1284 {
1285 self.0.request.update_mask = v.map(|x| x.into());
1286 self
1287 }
1288 }
1289
1290 #[doc(hidden)]
1291 impl gax::options::internal::RequestBuilder for PartialUpdateCluster {
1292 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1293 &mut self.0.options
1294 }
1295 }
1296
1297 #[derive(Clone, Debug)]
1314 pub struct DeleteCluster(RequestBuilder<crate::model::DeleteClusterRequest>);
1315
1316 impl DeleteCluster {
1317 pub(crate) fn new(
1318 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
1319 ) -> Self {
1320 Self(RequestBuilder::new(stub))
1321 }
1322
1323 pub fn with_request<V: Into<crate::model::DeleteClusterRequest>>(mut self, v: V) -> Self {
1325 self.0.request = v.into();
1326 self
1327 }
1328
1329 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1331 self.0.options = v.into();
1332 self
1333 }
1334
1335 pub async fn send(self) -> Result<()> {
1337 (*self.0.stub)
1338 .delete_cluster(self.0.request, self.0.options)
1339 .await
1340 .map(gax::response::Response::into_body)
1341 }
1342
1343 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1347 self.0.request.name = v.into();
1348 self
1349 }
1350 }
1351
1352 #[doc(hidden)]
1353 impl gax::options::internal::RequestBuilder for DeleteCluster {
1354 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1355 &mut self.0.options
1356 }
1357 }
1358
1359 #[derive(Clone, Debug)]
1376 pub struct CreateAppProfile(RequestBuilder<crate::model::CreateAppProfileRequest>);
1377
1378 impl CreateAppProfile {
1379 pub(crate) fn new(
1380 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
1381 ) -> Self {
1382 Self(RequestBuilder::new(stub))
1383 }
1384
1385 pub fn with_request<V: Into<crate::model::CreateAppProfileRequest>>(
1387 mut self,
1388 v: V,
1389 ) -> Self {
1390 self.0.request = v.into();
1391 self
1392 }
1393
1394 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1396 self.0.options = v.into();
1397 self
1398 }
1399
1400 pub async fn send(self) -> Result<crate::model::AppProfile> {
1402 (*self.0.stub)
1403 .create_app_profile(self.0.request, self.0.options)
1404 .await
1405 .map(gax::response::Response::into_body)
1406 }
1407
1408 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1412 self.0.request.parent = v.into();
1413 self
1414 }
1415
1416 pub fn set_app_profile_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1420 self.0.request.app_profile_id = v.into();
1421 self
1422 }
1423
1424 pub fn set_app_profile<T>(mut self, v: T) -> Self
1428 where
1429 T: std::convert::Into<crate::model::AppProfile>,
1430 {
1431 self.0.request.app_profile = std::option::Option::Some(v.into());
1432 self
1433 }
1434
1435 pub fn set_or_clear_app_profile<T>(mut self, v: std::option::Option<T>) -> Self
1439 where
1440 T: std::convert::Into<crate::model::AppProfile>,
1441 {
1442 self.0.request.app_profile = v.map(|x| x.into());
1443 self
1444 }
1445
1446 pub fn set_ignore_warnings<T: Into<bool>>(mut self, v: T) -> Self {
1448 self.0.request.ignore_warnings = v.into();
1449 self
1450 }
1451 }
1452
1453 #[doc(hidden)]
1454 impl gax::options::internal::RequestBuilder for CreateAppProfile {
1455 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1456 &mut self.0.options
1457 }
1458 }
1459
1460 #[derive(Clone, Debug)]
1477 pub struct GetAppProfile(RequestBuilder<crate::model::GetAppProfileRequest>);
1478
1479 impl GetAppProfile {
1480 pub(crate) fn new(
1481 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
1482 ) -> Self {
1483 Self(RequestBuilder::new(stub))
1484 }
1485
1486 pub fn with_request<V: Into<crate::model::GetAppProfileRequest>>(mut self, v: V) -> Self {
1488 self.0.request = v.into();
1489 self
1490 }
1491
1492 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1494 self.0.options = v.into();
1495 self
1496 }
1497
1498 pub async fn send(self) -> Result<crate::model::AppProfile> {
1500 (*self.0.stub)
1501 .get_app_profile(self.0.request, self.0.options)
1502 .await
1503 .map(gax::response::Response::into_body)
1504 }
1505
1506 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1510 self.0.request.name = v.into();
1511 self
1512 }
1513 }
1514
1515 #[doc(hidden)]
1516 impl gax::options::internal::RequestBuilder for GetAppProfile {
1517 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1518 &mut self.0.options
1519 }
1520 }
1521
1522 #[derive(Clone, Debug)]
1543 pub struct ListAppProfiles(RequestBuilder<crate::model::ListAppProfilesRequest>);
1544
1545 impl ListAppProfiles {
1546 pub(crate) fn new(
1547 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
1548 ) -> Self {
1549 Self(RequestBuilder::new(stub))
1550 }
1551
1552 pub fn with_request<V: Into<crate::model::ListAppProfilesRequest>>(mut self, v: V) -> Self {
1554 self.0.request = v.into();
1555 self
1556 }
1557
1558 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1560 self.0.options = v.into();
1561 self
1562 }
1563
1564 pub async fn send(self) -> Result<crate::model::ListAppProfilesResponse> {
1566 (*self.0.stub)
1567 .list_app_profiles(self.0.request, self.0.options)
1568 .await
1569 .map(gax::response::Response::into_body)
1570 }
1571
1572 pub fn by_page(
1574 self,
1575 ) -> impl gax::paginator::Paginator<crate::model::ListAppProfilesResponse, gax::error::Error>
1576 {
1577 use std::clone::Clone;
1578 let token = self.0.request.page_token.clone();
1579 let execute = move |token: String| {
1580 let mut builder = self.clone();
1581 builder.0.request = builder.0.request.set_page_token(token);
1582 builder.send()
1583 };
1584 gax::paginator::internal::new_paginator(token, execute)
1585 }
1586
1587 pub fn by_item(
1589 self,
1590 ) -> impl gax::paginator::ItemPaginator<crate::model::ListAppProfilesResponse, gax::error::Error>
1591 {
1592 use gax::paginator::Paginator;
1593 self.by_page().items()
1594 }
1595
1596 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1600 self.0.request.parent = v.into();
1601 self
1602 }
1603
1604 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1606 self.0.request.page_size = v.into();
1607 self
1608 }
1609
1610 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1612 self.0.request.page_token = v.into();
1613 self
1614 }
1615 }
1616
1617 #[doc(hidden)]
1618 impl gax::options::internal::RequestBuilder for ListAppProfiles {
1619 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1620 &mut self.0.options
1621 }
1622 }
1623
1624 #[derive(Clone, Debug)]
1642 pub struct UpdateAppProfile(RequestBuilder<crate::model::UpdateAppProfileRequest>);
1643
1644 impl UpdateAppProfile {
1645 pub(crate) fn new(
1646 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
1647 ) -> Self {
1648 Self(RequestBuilder::new(stub))
1649 }
1650
1651 pub fn with_request<V: Into<crate::model::UpdateAppProfileRequest>>(
1653 mut self,
1654 v: V,
1655 ) -> Self {
1656 self.0.request = v.into();
1657 self
1658 }
1659
1660 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1662 self.0.options = v.into();
1663 self
1664 }
1665
1666 pub async fn send(self) -> Result<longrunning::model::Operation> {
1673 (*self.0.stub)
1674 .update_app_profile(self.0.request, self.0.options)
1675 .await
1676 .map(gax::response::Response::into_body)
1677 }
1678
1679 pub fn poller(
1681 self,
1682 ) -> impl lro::Poller<crate::model::AppProfile, crate::model::UpdateAppProfileMetadata>
1683 {
1684 type Operation = lro::internal::Operation<
1685 crate::model::AppProfile,
1686 crate::model::UpdateAppProfileMetadata,
1687 >;
1688 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1689 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1690
1691 let stub = self.0.stub.clone();
1692 let mut options = self.0.options.clone();
1693 options.set_retry_policy(gax::retry_policy::NeverRetry);
1694 let query = move |name| {
1695 let stub = stub.clone();
1696 let options = options.clone();
1697 async {
1698 let op = GetOperation::new(stub)
1699 .set_name(name)
1700 .with_options(options)
1701 .send()
1702 .await?;
1703 Ok(Operation::new(op))
1704 }
1705 };
1706
1707 let start = move || async {
1708 let op = self.send().await?;
1709 Ok(Operation::new(op))
1710 };
1711
1712 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
1713 }
1714
1715 pub fn set_app_profile<T>(mut self, v: T) -> Self
1719 where
1720 T: std::convert::Into<crate::model::AppProfile>,
1721 {
1722 self.0.request.app_profile = std::option::Option::Some(v.into());
1723 self
1724 }
1725
1726 pub fn set_or_clear_app_profile<T>(mut self, v: std::option::Option<T>) -> Self
1730 where
1731 T: std::convert::Into<crate::model::AppProfile>,
1732 {
1733 self.0.request.app_profile = v.map(|x| x.into());
1734 self
1735 }
1736
1737 pub fn set_update_mask<T>(mut self, v: T) -> Self
1741 where
1742 T: std::convert::Into<wkt::FieldMask>,
1743 {
1744 self.0.request.update_mask = std::option::Option::Some(v.into());
1745 self
1746 }
1747
1748 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
1752 where
1753 T: std::convert::Into<wkt::FieldMask>,
1754 {
1755 self.0.request.update_mask = v.map(|x| x.into());
1756 self
1757 }
1758
1759 pub fn set_ignore_warnings<T: Into<bool>>(mut self, v: T) -> Self {
1761 self.0.request.ignore_warnings = v.into();
1762 self
1763 }
1764 }
1765
1766 #[doc(hidden)]
1767 impl gax::options::internal::RequestBuilder for UpdateAppProfile {
1768 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1769 &mut self.0.options
1770 }
1771 }
1772
1773 #[derive(Clone, Debug)]
1790 pub struct DeleteAppProfile(RequestBuilder<crate::model::DeleteAppProfileRequest>);
1791
1792 impl DeleteAppProfile {
1793 pub(crate) fn new(
1794 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
1795 ) -> Self {
1796 Self(RequestBuilder::new(stub))
1797 }
1798
1799 pub fn with_request<V: Into<crate::model::DeleteAppProfileRequest>>(
1801 mut self,
1802 v: V,
1803 ) -> Self {
1804 self.0.request = v.into();
1805 self
1806 }
1807
1808 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1810 self.0.options = v.into();
1811 self
1812 }
1813
1814 pub async fn send(self) -> Result<()> {
1816 (*self.0.stub)
1817 .delete_app_profile(self.0.request, self.0.options)
1818 .await
1819 .map(gax::response::Response::into_body)
1820 }
1821
1822 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1826 self.0.request.name = v.into();
1827 self
1828 }
1829
1830 pub fn set_ignore_warnings<T: Into<bool>>(mut self, v: T) -> Self {
1834 self.0.request.ignore_warnings = v.into();
1835 self
1836 }
1837 }
1838
1839 #[doc(hidden)]
1840 impl gax::options::internal::RequestBuilder for DeleteAppProfile {
1841 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1842 &mut self.0.options
1843 }
1844 }
1845
1846 #[derive(Clone, Debug)]
1863 pub struct GetIamPolicy(RequestBuilder<iam_v1::model::GetIamPolicyRequest>);
1864
1865 impl GetIamPolicy {
1866 pub(crate) fn new(
1867 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
1868 ) -> Self {
1869 Self(RequestBuilder::new(stub))
1870 }
1871
1872 pub fn with_request<V: Into<iam_v1::model::GetIamPolicyRequest>>(mut self, v: V) -> Self {
1874 self.0.request = v.into();
1875 self
1876 }
1877
1878 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1880 self.0.options = v.into();
1881 self
1882 }
1883
1884 pub async fn send(self) -> Result<iam_v1::model::Policy> {
1886 (*self.0.stub)
1887 .get_iam_policy(self.0.request, self.0.options)
1888 .await
1889 .map(gax::response::Response::into_body)
1890 }
1891
1892 pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
1896 self.0.request.resource = v.into();
1897 self
1898 }
1899
1900 pub fn set_options<T>(mut self, v: T) -> Self
1902 where
1903 T: std::convert::Into<iam_v1::model::GetPolicyOptions>,
1904 {
1905 self.0.request.options = std::option::Option::Some(v.into());
1906 self
1907 }
1908
1909 pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
1911 where
1912 T: std::convert::Into<iam_v1::model::GetPolicyOptions>,
1913 {
1914 self.0.request.options = v.map(|x| x.into());
1915 self
1916 }
1917 }
1918
1919 #[doc(hidden)]
1920 impl gax::options::internal::RequestBuilder for GetIamPolicy {
1921 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1922 &mut self.0.options
1923 }
1924 }
1925
1926 #[derive(Clone, Debug)]
1943 pub struct SetIamPolicy(RequestBuilder<iam_v1::model::SetIamPolicyRequest>);
1944
1945 impl SetIamPolicy {
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<iam_v1::model::SetIamPolicyRequest>>(mut self, v: V) -> Self {
1954 self.0.request = v.into();
1955 self
1956 }
1957
1958 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1960 self.0.options = v.into();
1961 self
1962 }
1963
1964 pub async fn send(self) -> Result<iam_v1::model::Policy> {
1966 (*self.0.stub)
1967 .set_iam_policy(self.0.request, self.0.options)
1968 .await
1969 .map(gax::response::Response::into_body)
1970 }
1971
1972 pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
1976 self.0.request.resource = v.into();
1977 self
1978 }
1979
1980 pub fn set_policy<T>(mut self, v: T) -> Self
1984 where
1985 T: std::convert::Into<iam_v1::model::Policy>,
1986 {
1987 self.0.request.policy = std::option::Option::Some(v.into());
1988 self
1989 }
1990
1991 pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
1995 where
1996 T: std::convert::Into<iam_v1::model::Policy>,
1997 {
1998 self.0.request.policy = v.map(|x| x.into());
1999 self
2000 }
2001
2002 pub fn set_update_mask<T>(mut self, v: T) -> Self
2004 where
2005 T: std::convert::Into<wkt::FieldMask>,
2006 {
2007 self.0.request.update_mask = std::option::Option::Some(v.into());
2008 self
2009 }
2010
2011 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
2013 where
2014 T: std::convert::Into<wkt::FieldMask>,
2015 {
2016 self.0.request.update_mask = v.map(|x| x.into());
2017 self
2018 }
2019 }
2020
2021 #[doc(hidden)]
2022 impl gax::options::internal::RequestBuilder for SetIamPolicy {
2023 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2024 &mut self.0.options
2025 }
2026 }
2027
2028 #[derive(Clone, Debug)]
2045 pub struct TestIamPermissions(RequestBuilder<iam_v1::model::TestIamPermissionsRequest>);
2046
2047 impl TestIamPermissions {
2048 pub(crate) fn new(
2049 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
2050 ) -> Self {
2051 Self(RequestBuilder::new(stub))
2052 }
2053
2054 pub fn with_request<V: Into<iam_v1::model::TestIamPermissionsRequest>>(
2056 mut self,
2057 v: V,
2058 ) -> Self {
2059 self.0.request = v.into();
2060 self
2061 }
2062
2063 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2065 self.0.options = v.into();
2066 self
2067 }
2068
2069 pub async fn send(self) -> Result<iam_v1::model::TestIamPermissionsResponse> {
2071 (*self.0.stub)
2072 .test_iam_permissions(self.0.request, self.0.options)
2073 .await
2074 .map(gax::response::Response::into_body)
2075 }
2076
2077 pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
2081 self.0.request.resource = v.into();
2082 self
2083 }
2084
2085 pub fn set_permissions<T, V>(mut self, v: T) -> Self
2089 where
2090 T: std::iter::IntoIterator<Item = V>,
2091 V: std::convert::Into<std::string::String>,
2092 {
2093 use std::iter::Iterator;
2094 self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
2095 self
2096 }
2097 }
2098
2099 #[doc(hidden)]
2100 impl gax::options::internal::RequestBuilder for TestIamPermissions {
2101 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2102 &mut self.0.options
2103 }
2104 }
2105
2106 #[derive(Clone, Debug)]
2127 pub struct ListHotTablets(RequestBuilder<crate::model::ListHotTabletsRequest>);
2128
2129 impl ListHotTablets {
2130 pub(crate) fn new(
2131 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
2132 ) -> Self {
2133 Self(RequestBuilder::new(stub))
2134 }
2135
2136 pub fn with_request<V: Into<crate::model::ListHotTabletsRequest>>(mut self, v: V) -> Self {
2138 self.0.request = v.into();
2139 self
2140 }
2141
2142 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2144 self.0.options = v.into();
2145 self
2146 }
2147
2148 pub async fn send(self) -> Result<crate::model::ListHotTabletsResponse> {
2150 (*self.0.stub)
2151 .list_hot_tablets(self.0.request, self.0.options)
2152 .await
2153 .map(gax::response::Response::into_body)
2154 }
2155
2156 pub fn by_page(
2158 self,
2159 ) -> impl gax::paginator::Paginator<crate::model::ListHotTabletsResponse, gax::error::Error>
2160 {
2161 use std::clone::Clone;
2162 let token = self.0.request.page_token.clone();
2163 let execute = move |token: String| {
2164 let mut builder = self.clone();
2165 builder.0.request = builder.0.request.set_page_token(token);
2166 builder.send()
2167 };
2168 gax::paginator::internal::new_paginator(token, execute)
2169 }
2170
2171 pub fn by_item(
2173 self,
2174 ) -> impl gax::paginator::ItemPaginator<crate::model::ListHotTabletsResponse, gax::error::Error>
2175 {
2176 use gax::paginator::Paginator;
2177 self.by_page().items()
2178 }
2179
2180 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2184 self.0.request.parent = v.into();
2185 self
2186 }
2187
2188 pub fn set_start_time<T>(mut self, v: T) -> Self
2190 where
2191 T: std::convert::Into<wkt::Timestamp>,
2192 {
2193 self.0.request.start_time = std::option::Option::Some(v.into());
2194 self
2195 }
2196
2197 pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
2199 where
2200 T: std::convert::Into<wkt::Timestamp>,
2201 {
2202 self.0.request.start_time = v.map(|x| x.into());
2203 self
2204 }
2205
2206 pub fn set_end_time<T>(mut self, v: T) -> Self
2208 where
2209 T: std::convert::Into<wkt::Timestamp>,
2210 {
2211 self.0.request.end_time = std::option::Option::Some(v.into());
2212 self
2213 }
2214
2215 pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
2217 where
2218 T: std::convert::Into<wkt::Timestamp>,
2219 {
2220 self.0.request.end_time = v.map(|x| x.into());
2221 self
2222 }
2223
2224 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2226 self.0.request.page_size = v.into();
2227 self
2228 }
2229
2230 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2232 self.0.request.page_token = v.into();
2233 self
2234 }
2235 }
2236
2237 #[doc(hidden)]
2238 impl gax::options::internal::RequestBuilder for ListHotTablets {
2239 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2240 &mut self.0.options
2241 }
2242 }
2243
2244 #[derive(Clone, Debug)]
2262 pub struct CreateLogicalView(RequestBuilder<crate::model::CreateLogicalViewRequest>);
2263
2264 impl CreateLogicalView {
2265 pub(crate) fn new(
2266 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
2267 ) -> Self {
2268 Self(RequestBuilder::new(stub))
2269 }
2270
2271 pub fn with_request<V: Into<crate::model::CreateLogicalViewRequest>>(
2273 mut self,
2274 v: V,
2275 ) -> Self {
2276 self.0.request = v.into();
2277 self
2278 }
2279
2280 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2282 self.0.options = v.into();
2283 self
2284 }
2285
2286 pub async fn send(self) -> Result<longrunning::model::Operation> {
2293 (*self.0.stub)
2294 .create_logical_view(self.0.request, self.0.options)
2295 .await
2296 .map(gax::response::Response::into_body)
2297 }
2298
2299 pub fn poller(
2301 self,
2302 ) -> impl lro::Poller<crate::model::LogicalView, crate::model::CreateLogicalViewMetadata>
2303 {
2304 type Operation = lro::internal::Operation<
2305 crate::model::LogicalView,
2306 crate::model::CreateLogicalViewMetadata,
2307 >;
2308 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2309 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2310
2311 let stub = self.0.stub.clone();
2312 let mut options = self.0.options.clone();
2313 options.set_retry_policy(gax::retry_policy::NeverRetry);
2314 let query = move |name| {
2315 let stub = stub.clone();
2316 let options = options.clone();
2317 async {
2318 let op = GetOperation::new(stub)
2319 .set_name(name)
2320 .with_options(options)
2321 .send()
2322 .await?;
2323 Ok(Operation::new(op))
2324 }
2325 };
2326
2327 let start = move || async {
2328 let op = self.send().await?;
2329 Ok(Operation::new(op))
2330 };
2331
2332 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
2333 }
2334
2335 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2339 self.0.request.parent = v.into();
2340 self
2341 }
2342
2343 pub fn set_logical_view_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2347 self.0.request.logical_view_id = v.into();
2348 self
2349 }
2350
2351 pub fn set_logical_view<T>(mut self, v: T) -> Self
2355 where
2356 T: std::convert::Into<crate::model::LogicalView>,
2357 {
2358 self.0.request.logical_view = std::option::Option::Some(v.into());
2359 self
2360 }
2361
2362 pub fn set_or_clear_logical_view<T>(mut self, v: std::option::Option<T>) -> Self
2366 where
2367 T: std::convert::Into<crate::model::LogicalView>,
2368 {
2369 self.0.request.logical_view = v.map(|x| x.into());
2370 self
2371 }
2372 }
2373
2374 #[doc(hidden)]
2375 impl gax::options::internal::RequestBuilder for CreateLogicalView {
2376 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2377 &mut self.0.options
2378 }
2379 }
2380
2381 #[derive(Clone, Debug)]
2398 pub struct GetLogicalView(RequestBuilder<crate::model::GetLogicalViewRequest>);
2399
2400 impl GetLogicalView {
2401 pub(crate) fn new(
2402 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
2403 ) -> Self {
2404 Self(RequestBuilder::new(stub))
2405 }
2406
2407 pub fn with_request<V: Into<crate::model::GetLogicalViewRequest>>(mut self, v: V) -> Self {
2409 self.0.request = v.into();
2410 self
2411 }
2412
2413 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2415 self.0.options = v.into();
2416 self
2417 }
2418
2419 pub async fn send(self) -> Result<crate::model::LogicalView> {
2421 (*self.0.stub)
2422 .get_logical_view(self.0.request, self.0.options)
2423 .await
2424 .map(gax::response::Response::into_body)
2425 }
2426
2427 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2431 self.0.request.name = v.into();
2432 self
2433 }
2434 }
2435
2436 #[doc(hidden)]
2437 impl gax::options::internal::RequestBuilder for GetLogicalView {
2438 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2439 &mut self.0.options
2440 }
2441 }
2442
2443 #[derive(Clone, Debug)]
2464 pub struct ListLogicalViews(RequestBuilder<crate::model::ListLogicalViewsRequest>);
2465
2466 impl ListLogicalViews {
2467 pub(crate) fn new(
2468 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
2469 ) -> Self {
2470 Self(RequestBuilder::new(stub))
2471 }
2472
2473 pub fn with_request<V: Into<crate::model::ListLogicalViewsRequest>>(
2475 mut self,
2476 v: V,
2477 ) -> Self {
2478 self.0.request = v.into();
2479 self
2480 }
2481
2482 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2484 self.0.options = v.into();
2485 self
2486 }
2487
2488 pub async fn send(self) -> Result<crate::model::ListLogicalViewsResponse> {
2490 (*self.0.stub)
2491 .list_logical_views(self.0.request, self.0.options)
2492 .await
2493 .map(gax::response::Response::into_body)
2494 }
2495
2496 pub fn by_page(
2498 self,
2499 ) -> impl gax::paginator::Paginator<crate::model::ListLogicalViewsResponse, gax::error::Error>
2500 {
2501 use std::clone::Clone;
2502 let token = self.0.request.page_token.clone();
2503 let execute = move |token: String| {
2504 let mut builder = self.clone();
2505 builder.0.request = builder.0.request.set_page_token(token);
2506 builder.send()
2507 };
2508 gax::paginator::internal::new_paginator(token, execute)
2509 }
2510
2511 pub fn by_item(
2513 self,
2514 ) -> impl gax::paginator::ItemPaginator<crate::model::ListLogicalViewsResponse, gax::error::Error>
2515 {
2516 use gax::paginator::Paginator;
2517 self.by_page().items()
2518 }
2519
2520 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2524 self.0.request.parent = v.into();
2525 self
2526 }
2527
2528 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2530 self.0.request.page_size = v.into();
2531 self
2532 }
2533
2534 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2536 self.0.request.page_token = v.into();
2537 self
2538 }
2539 }
2540
2541 #[doc(hidden)]
2542 impl gax::options::internal::RequestBuilder for ListLogicalViews {
2543 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2544 &mut self.0.options
2545 }
2546 }
2547
2548 #[derive(Clone, Debug)]
2566 pub struct UpdateLogicalView(RequestBuilder<crate::model::UpdateLogicalViewRequest>);
2567
2568 impl UpdateLogicalView {
2569 pub(crate) fn new(
2570 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
2571 ) -> Self {
2572 Self(RequestBuilder::new(stub))
2573 }
2574
2575 pub fn with_request<V: Into<crate::model::UpdateLogicalViewRequest>>(
2577 mut self,
2578 v: V,
2579 ) -> Self {
2580 self.0.request = v.into();
2581 self
2582 }
2583
2584 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2586 self.0.options = v.into();
2587 self
2588 }
2589
2590 pub async fn send(self) -> Result<longrunning::model::Operation> {
2597 (*self.0.stub)
2598 .update_logical_view(self.0.request, self.0.options)
2599 .await
2600 .map(gax::response::Response::into_body)
2601 }
2602
2603 pub fn poller(
2605 self,
2606 ) -> impl lro::Poller<crate::model::LogicalView, crate::model::UpdateLogicalViewMetadata>
2607 {
2608 type Operation = lro::internal::Operation<
2609 crate::model::LogicalView,
2610 crate::model::UpdateLogicalViewMetadata,
2611 >;
2612 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2613 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2614
2615 let stub = self.0.stub.clone();
2616 let mut options = self.0.options.clone();
2617 options.set_retry_policy(gax::retry_policy::NeverRetry);
2618 let query = move |name| {
2619 let stub = stub.clone();
2620 let options = options.clone();
2621 async {
2622 let op = GetOperation::new(stub)
2623 .set_name(name)
2624 .with_options(options)
2625 .send()
2626 .await?;
2627 Ok(Operation::new(op))
2628 }
2629 };
2630
2631 let start = move || async {
2632 let op = self.send().await?;
2633 Ok(Operation::new(op))
2634 };
2635
2636 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
2637 }
2638
2639 pub fn set_logical_view<T>(mut self, v: T) -> Self
2643 where
2644 T: std::convert::Into<crate::model::LogicalView>,
2645 {
2646 self.0.request.logical_view = std::option::Option::Some(v.into());
2647 self
2648 }
2649
2650 pub fn set_or_clear_logical_view<T>(mut self, v: std::option::Option<T>) -> Self
2654 where
2655 T: std::convert::Into<crate::model::LogicalView>,
2656 {
2657 self.0.request.logical_view = v.map(|x| x.into());
2658 self
2659 }
2660
2661 pub fn set_update_mask<T>(mut self, v: T) -> Self
2663 where
2664 T: std::convert::Into<wkt::FieldMask>,
2665 {
2666 self.0.request.update_mask = std::option::Option::Some(v.into());
2667 self
2668 }
2669
2670 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
2672 where
2673 T: std::convert::Into<wkt::FieldMask>,
2674 {
2675 self.0.request.update_mask = v.map(|x| x.into());
2676 self
2677 }
2678 }
2679
2680 #[doc(hidden)]
2681 impl gax::options::internal::RequestBuilder for UpdateLogicalView {
2682 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2683 &mut self.0.options
2684 }
2685 }
2686
2687 #[derive(Clone, Debug)]
2704 pub struct DeleteLogicalView(RequestBuilder<crate::model::DeleteLogicalViewRequest>);
2705
2706 impl DeleteLogicalView {
2707 pub(crate) fn new(
2708 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
2709 ) -> Self {
2710 Self(RequestBuilder::new(stub))
2711 }
2712
2713 pub fn with_request<V: Into<crate::model::DeleteLogicalViewRequest>>(
2715 mut self,
2716 v: V,
2717 ) -> Self {
2718 self.0.request = v.into();
2719 self
2720 }
2721
2722 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2724 self.0.options = v.into();
2725 self
2726 }
2727
2728 pub async fn send(self) -> Result<()> {
2730 (*self.0.stub)
2731 .delete_logical_view(self.0.request, self.0.options)
2732 .await
2733 .map(gax::response::Response::into_body)
2734 }
2735
2736 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2740 self.0.request.name = v.into();
2741 self
2742 }
2743
2744 pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
2746 self.0.request.etag = v.into();
2747 self
2748 }
2749 }
2750
2751 #[doc(hidden)]
2752 impl gax::options::internal::RequestBuilder for DeleteLogicalView {
2753 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2754 &mut self.0.options
2755 }
2756 }
2757
2758 #[derive(Clone, Debug)]
2776 pub struct CreateMaterializedView(RequestBuilder<crate::model::CreateMaterializedViewRequest>);
2777
2778 impl CreateMaterializedView {
2779 pub(crate) fn new(
2780 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
2781 ) -> Self {
2782 Self(RequestBuilder::new(stub))
2783 }
2784
2785 pub fn with_request<V: Into<crate::model::CreateMaterializedViewRequest>>(
2787 mut self,
2788 v: V,
2789 ) -> Self {
2790 self.0.request = v.into();
2791 self
2792 }
2793
2794 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2796 self.0.options = v.into();
2797 self
2798 }
2799
2800 pub async fn send(self) -> Result<longrunning::model::Operation> {
2807 (*self.0.stub)
2808 .create_materialized_view(self.0.request, self.0.options)
2809 .await
2810 .map(gax::response::Response::into_body)
2811 }
2812
2813 pub fn poller(
2815 self,
2816 ) -> impl lro::Poller<crate::model::MaterializedView, crate::model::CreateMaterializedViewMetadata>
2817 {
2818 type Operation = lro::internal::Operation<
2819 crate::model::MaterializedView,
2820 crate::model::CreateMaterializedViewMetadata,
2821 >;
2822 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2823 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2824
2825 let stub = self.0.stub.clone();
2826 let mut options = self.0.options.clone();
2827 options.set_retry_policy(gax::retry_policy::NeverRetry);
2828 let query = move |name| {
2829 let stub = stub.clone();
2830 let options = options.clone();
2831 async {
2832 let op = GetOperation::new(stub)
2833 .set_name(name)
2834 .with_options(options)
2835 .send()
2836 .await?;
2837 Ok(Operation::new(op))
2838 }
2839 };
2840
2841 let start = move || async {
2842 let op = self.send().await?;
2843 Ok(Operation::new(op))
2844 };
2845
2846 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
2847 }
2848
2849 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2853 self.0.request.parent = v.into();
2854 self
2855 }
2856
2857 pub fn set_materialized_view_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2861 self.0.request.materialized_view_id = v.into();
2862 self
2863 }
2864
2865 pub fn set_materialized_view<T>(mut self, v: T) -> Self
2869 where
2870 T: std::convert::Into<crate::model::MaterializedView>,
2871 {
2872 self.0.request.materialized_view = std::option::Option::Some(v.into());
2873 self
2874 }
2875
2876 pub fn set_or_clear_materialized_view<T>(mut self, v: std::option::Option<T>) -> Self
2880 where
2881 T: std::convert::Into<crate::model::MaterializedView>,
2882 {
2883 self.0.request.materialized_view = v.map(|x| x.into());
2884 self
2885 }
2886 }
2887
2888 #[doc(hidden)]
2889 impl gax::options::internal::RequestBuilder for CreateMaterializedView {
2890 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2891 &mut self.0.options
2892 }
2893 }
2894
2895 #[derive(Clone, Debug)]
2912 pub struct GetMaterializedView(RequestBuilder<crate::model::GetMaterializedViewRequest>);
2913
2914 impl GetMaterializedView {
2915 pub(crate) fn new(
2916 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
2917 ) -> Self {
2918 Self(RequestBuilder::new(stub))
2919 }
2920
2921 pub fn with_request<V: Into<crate::model::GetMaterializedViewRequest>>(
2923 mut self,
2924 v: V,
2925 ) -> Self {
2926 self.0.request = v.into();
2927 self
2928 }
2929
2930 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2932 self.0.options = v.into();
2933 self
2934 }
2935
2936 pub async fn send(self) -> Result<crate::model::MaterializedView> {
2938 (*self.0.stub)
2939 .get_materialized_view(self.0.request, self.0.options)
2940 .await
2941 .map(gax::response::Response::into_body)
2942 }
2943
2944 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2948 self.0.request.name = v.into();
2949 self
2950 }
2951 }
2952
2953 #[doc(hidden)]
2954 impl gax::options::internal::RequestBuilder for GetMaterializedView {
2955 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2956 &mut self.0.options
2957 }
2958 }
2959
2960 #[derive(Clone, Debug)]
2981 pub struct ListMaterializedViews(RequestBuilder<crate::model::ListMaterializedViewsRequest>);
2982
2983 impl ListMaterializedViews {
2984 pub(crate) fn new(
2985 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
2986 ) -> Self {
2987 Self(RequestBuilder::new(stub))
2988 }
2989
2990 pub fn with_request<V: Into<crate::model::ListMaterializedViewsRequest>>(
2992 mut self,
2993 v: V,
2994 ) -> Self {
2995 self.0.request = v.into();
2996 self
2997 }
2998
2999 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3001 self.0.options = v.into();
3002 self
3003 }
3004
3005 pub async fn send(self) -> Result<crate::model::ListMaterializedViewsResponse> {
3007 (*self.0.stub)
3008 .list_materialized_views(self.0.request, self.0.options)
3009 .await
3010 .map(gax::response::Response::into_body)
3011 }
3012
3013 pub fn by_page(
3015 self,
3016 ) -> impl gax::paginator::Paginator<crate::model::ListMaterializedViewsResponse, gax::error::Error>
3017 {
3018 use std::clone::Clone;
3019 let token = self.0.request.page_token.clone();
3020 let execute = move |token: String| {
3021 let mut builder = self.clone();
3022 builder.0.request = builder.0.request.set_page_token(token);
3023 builder.send()
3024 };
3025 gax::paginator::internal::new_paginator(token, execute)
3026 }
3027
3028 pub fn by_item(
3030 self,
3031 ) -> impl gax::paginator::ItemPaginator<
3032 crate::model::ListMaterializedViewsResponse,
3033 gax::error::Error,
3034 > {
3035 use gax::paginator::Paginator;
3036 self.by_page().items()
3037 }
3038
3039 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3043 self.0.request.parent = v.into();
3044 self
3045 }
3046
3047 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
3049 self.0.request.page_size = v.into();
3050 self
3051 }
3052
3053 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
3055 self.0.request.page_token = v.into();
3056 self
3057 }
3058 }
3059
3060 #[doc(hidden)]
3061 impl gax::options::internal::RequestBuilder for ListMaterializedViews {
3062 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3063 &mut self.0.options
3064 }
3065 }
3066
3067 #[derive(Clone, Debug)]
3085 pub struct UpdateMaterializedView(RequestBuilder<crate::model::UpdateMaterializedViewRequest>);
3086
3087 impl UpdateMaterializedView {
3088 pub(crate) fn new(
3089 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
3090 ) -> Self {
3091 Self(RequestBuilder::new(stub))
3092 }
3093
3094 pub fn with_request<V: Into<crate::model::UpdateMaterializedViewRequest>>(
3096 mut self,
3097 v: V,
3098 ) -> Self {
3099 self.0.request = v.into();
3100 self
3101 }
3102
3103 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3105 self.0.options = v.into();
3106 self
3107 }
3108
3109 pub async fn send(self) -> Result<longrunning::model::Operation> {
3116 (*self.0.stub)
3117 .update_materialized_view(self.0.request, self.0.options)
3118 .await
3119 .map(gax::response::Response::into_body)
3120 }
3121
3122 pub fn poller(
3124 self,
3125 ) -> impl lro::Poller<crate::model::MaterializedView, crate::model::UpdateMaterializedViewMetadata>
3126 {
3127 type Operation = lro::internal::Operation<
3128 crate::model::MaterializedView,
3129 crate::model::UpdateMaterializedViewMetadata,
3130 >;
3131 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3132 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3133
3134 let stub = self.0.stub.clone();
3135 let mut options = self.0.options.clone();
3136 options.set_retry_policy(gax::retry_policy::NeverRetry);
3137 let query = move |name| {
3138 let stub = stub.clone();
3139 let options = options.clone();
3140 async {
3141 let op = GetOperation::new(stub)
3142 .set_name(name)
3143 .with_options(options)
3144 .send()
3145 .await?;
3146 Ok(Operation::new(op))
3147 }
3148 };
3149
3150 let start = move || async {
3151 let op = self.send().await?;
3152 Ok(Operation::new(op))
3153 };
3154
3155 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
3156 }
3157
3158 pub fn set_materialized_view<T>(mut self, v: T) -> Self
3162 where
3163 T: std::convert::Into<crate::model::MaterializedView>,
3164 {
3165 self.0.request.materialized_view = std::option::Option::Some(v.into());
3166 self
3167 }
3168
3169 pub fn set_or_clear_materialized_view<T>(mut self, v: std::option::Option<T>) -> Self
3173 where
3174 T: std::convert::Into<crate::model::MaterializedView>,
3175 {
3176 self.0.request.materialized_view = v.map(|x| x.into());
3177 self
3178 }
3179
3180 pub fn set_update_mask<T>(mut self, v: T) -> Self
3182 where
3183 T: std::convert::Into<wkt::FieldMask>,
3184 {
3185 self.0.request.update_mask = std::option::Option::Some(v.into());
3186 self
3187 }
3188
3189 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
3191 where
3192 T: std::convert::Into<wkt::FieldMask>,
3193 {
3194 self.0.request.update_mask = v.map(|x| x.into());
3195 self
3196 }
3197 }
3198
3199 #[doc(hidden)]
3200 impl gax::options::internal::RequestBuilder for UpdateMaterializedView {
3201 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3202 &mut self.0.options
3203 }
3204 }
3205
3206 #[derive(Clone, Debug)]
3223 pub struct DeleteMaterializedView(RequestBuilder<crate::model::DeleteMaterializedViewRequest>);
3224
3225 impl DeleteMaterializedView {
3226 pub(crate) fn new(
3227 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
3228 ) -> Self {
3229 Self(RequestBuilder::new(stub))
3230 }
3231
3232 pub fn with_request<V: Into<crate::model::DeleteMaterializedViewRequest>>(
3234 mut self,
3235 v: V,
3236 ) -> Self {
3237 self.0.request = v.into();
3238 self
3239 }
3240
3241 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3243 self.0.options = v.into();
3244 self
3245 }
3246
3247 pub async fn send(self) -> Result<()> {
3249 (*self.0.stub)
3250 .delete_materialized_view(self.0.request, self.0.options)
3251 .await
3252 .map(gax::response::Response::into_body)
3253 }
3254
3255 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3259 self.0.request.name = v.into();
3260 self
3261 }
3262
3263 pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
3265 self.0.request.etag = v.into();
3266 self
3267 }
3268 }
3269
3270 #[doc(hidden)]
3271 impl gax::options::internal::RequestBuilder for DeleteMaterializedView {
3272 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3273 &mut self.0.options
3274 }
3275 }
3276
3277 #[derive(Clone, Debug)]
3298 pub struct ListOperations(RequestBuilder<longrunning::model::ListOperationsRequest>);
3299
3300 impl ListOperations {
3301 pub(crate) fn new(
3302 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
3303 ) -> Self {
3304 Self(RequestBuilder::new(stub))
3305 }
3306
3307 pub fn with_request<V: Into<longrunning::model::ListOperationsRequest>>(
3309 mut self,
3310 v: V,
3311 ) -> Self {
3312 self.0.request = v.into();
3313 self
3314 }
3315
3316 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3318 self.0.options = v.into();
3319 self
3320 }
3321
3322 pub async fn send(self) -> Result<longrunning::model::ListOperationsResponse> {
3324 (*self.0.stub)
3325 .list_operations(self.0.request, self.0.options)
3326 .await
3327 .map(gax::response::Response::into_body)
3328 }
3329
3330 pub fn by_page(
3332 self,
3333 ) -> impl gax::paginator::Paginator<longrunning::model::ListOperationsResponse, gax::error::Error>
3334 {
3335 use std::clone::Clone;
3336 let token = self.0.request.page_token.clone();
3337 let execute = move |token: String| {
3338 let mut builder = self.clone();
3339 builder.0.request = builder.0.request.set_page_token(token);
3340 builder.send()
3341 };
3342 gax::paginator::internal::new_paginator(token, execute)
3343 }
3344
3345 pub fn by_item(
3347 self,
3348 ) -> impl gax::paginator::ItemPaginator<
3349 longrunning::model::ListOperationsResponse,
3350 gax::error::Error,
3351 > {
3352 use gax::paginator::Paginator;
3353 self.by_page().items()
3354 }
3355
3356 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3358 self.0.request.name = v.into();
3359 self
3360 }
3361
3362 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
3364 self.0.request.filter = v.into();
3365 self
3366 }
3367
3368 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
3370 self.0.request.page_size = v.into();
3371 self
3372 }
3373
3374 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
3376 self.0.request.page_token = v.into();
3377 self
3378 }
3379
3380 pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
3382 self.0.request.return_partial_success = v.into();
3383 self
3384 }
3385 }
3386
3387 #[doc(hidden)]
3388 impl gax::options::internal::RequestBuilder for ListOperations {
3389 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3390 &mut self.0.options
3391 }
3392 }
3393
3394 #[derive(Clone, Debug)]
3411 pub struct GetOperation(RequestBuilder<longrunning::model::GetOperationRequest>);
3412
3413 impl GetOperation {
3414 pub(crate) fn new(
3415 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
3416 ) -> Self {
3417 Self(RequestBuilder::new(stub))
3418 }
3419
3420 pub fn with_request<V: Into<longrunning::model::GetOperationRequest>>(
3422 mut self,
3423 v: V,
3424 ) -> Self {
3425 self.0.request = v.into();
3426 self
3427 }
3428
3429 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3431 self.0.options = v.into();
3432 self
3433 }
3434
3435 pub async fn send(self) -> Result<longrunning::model::Operation> {
3437 (*self.0.stub)
3438 .get_operation(self.0.request, self.0.options)
3439 .await
3440 .map(gax::response::Response::into_body)
3441 }
3442
3443 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3445 self.0.request.name = v.into();
3446 self
3447 }
3448 }
3449
3450 #[doc(hidden)]
3451 impl gax::options::internal::RequestBuilder for GetOperation {
3452 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3453 &mut self.0.options
3454 }
3455 }
3456
3457 #[derive(Clone, Debug)]
3474 pub struct DeleteOperation(RequestBuilder<longrunning::model::DeleteOperationRequest>);
3475
3476 impl DeleteOperation {
3477 pub(crate) fn new(
3478 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
3479 ) -> Self {
3480 Self(RequestBuilder::new(stub))
3481 }
3482
3483 pub fn with_request<V: Into<longrunning::model::DeleteOperationRequest>>(
3485 mut self,
3486 v: V,
3487 ) -> Self {
3488 self.0.request = v.into();
3489 self
3490 }
3491
3492 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3494 self.0.options = v.into();
3495 self
3496 }
3497
3498 pub async fn send(self) -> Result<()> {
3500 (*self.0.stub)
3501 .delete_operation(self.0.request, self.0.options)
3502 .await
3503 .map(gax::response::Response::into_body)
3504 }
3505
3506 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3508 self.0.request.name = v.into();
3509 self
3510 }
3511 }
3512
3513 #[doc(hidden)]
3514 impl gax::options::internal::RequestBuilder for DeleteOperation {
3515 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3516 &mut self.0.options
3517 }
3518 }
3519
3520 #[derive(Clone, Debug)]
3537 pub struct CancelOperation(RequestBuilder<longrunning::model::CancelOperationRequest>);
3538
3539 impl CancelOperation {
3540 pub(crate) fn new(
3541 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
3542 ) -> Self {
3543 Self(RequestBuilder::new(stub))
3544 }
3545
3546 pub fn with_request<V: Into<longrunning::model::CancelOperationRequest>>(
3548 mut self,
3549 v: V,
3550 ) -> Self {
3551 self.0.request = v.into();
3552 self
3553 }
3554
3555 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3557 self.0.options = v.into();
3558 self
3559 }
3560
3561 pub async fn send(self) -> Result<()> {
3563 (*self.0.stub)
3564 .cancel_operation(self.0.request, self.0.options)
3565 .await
3566 .map(gax::response::Response::into_body)
3567 }
3568
3569 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3571 self.0.request.name = v.into();
3572 self
3573 }
3574 }
3575
3576 #[doc(hidden)]
3577 impl gax::options::internal::RequestBuilder for CancelOperation {
3578 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3579 &mut self.0.options
3580 }
3581 }
3582}
3583
3584pub mod bigtable_table_admin {
3585 use crate::Result;
3586
3587 pub type ClientBuilder =
3601 gax::client_builder::ClientBuilder<client::Factory, gaxi::options::Credentials>;
3602
3603 pub(crate) mod client {
3604 use super::super::super::client::BigtableTableAdmin;
3605 pub struct Factory;
3606 impl gax::client_builder::internal::ClientFactory for Factory {
3607 type Client = BigtableTableAdmin;
3608 type Credentials = gaxi::options::Credentials;
3609 async fn build(
3610 self,
3611 config: gaxi::options::ClientConfig,
3612 ) -> gax::client_builder::Result<Self::Client> {
3613 Self::Client::new(config).await
3614 }
3615 }
3616 }
3617
3618 #[derive(Clone, Debug)]
3620 pub(crate) struct RequestBuilder<R: std::default::Default> {
3621 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
3622 request: R,
3623 options: gax::options::RequestOptions,
3624 }
3625
3626 impl<R> RequestBuilder<R>
3627 where
3628 R: std::default::Default,
3629 {
3630 pub(crate) fn new(
3631 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
3632 ) -> Self {
3633 Self {
3634 stub,
3635 request: R::default(),
3636 options: gax::options::RequestOptions::default(),
3637 }
3638 }
3639 }
3640
3641 #[derive(Clone, Debug)]
3658 pub struct CreateTable(RequestBuilder<crate::model::CreateTableRequest>);
3659
3660 impl CreateTable {
3661 pub(crate) fn new(
3662 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
3663 ) -> Self {
3664 Self(RequestBuilder::new(stub))
3665 }
3666
3667 pub fn with_request<V: Into<crate::model::CreateTableRequest>>(mut self, v: V) -> Self {
3669 self.0.request = v.into();
3670 self
3671 }
3672
3673 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3675 self.0.options = v.into();
3676 self
3677 }
3678
3679 pub async fn send(self) -> Result<crate::model::Table> {
3681 (*self.0.stub)
3682 .create_table(self.0.request, self.0.options)
3683 .await
3684 .map(gax::response::Response::into_body)
3685 }
3686
3687 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3691 self.0.request.parent = v.into();
3692 self
3693 }
3694
3695 pub fn set_table_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3699 self.0.request.table_id = v.into();
3700 self
3701 }
3702
3703 pub fn set_table<T>(mut self, v: T) -> Self
3707 where
3708 T: std::convert::Into<crate::model::Table>,
3709 {
3710 self.0.request.table = std::option::Option::Some(v.into());
3711 self
3712 }
3713
3714 pub fn set_or_clear_table<T>(mut self, v: std::option::Option<T>) -> Self
3718 where
3719 T: std::convert::Into<crate::model::Table>,
3720 {
3721 self.0.request.table = v.map(|x| x.into());
3722 self
3723 }
3724
3725 pub fn set_initial_splits<T, V>(mut self, v: T) -> Self
3727 where
3728 T: std::iter::IntoIterator<Item = V>,
3729 V: std::convert::Into<crate::model::create_table_request::Split>,
3730 {
3731 use std::iter::Iterator;
3732 self.0.request.initial_splits = v.into_iter().map(|i| i.into()).collect();
3733 self
3734 }
3735 }
3736
3737 #[doc(hidden)]
3738 impl gax::options::internal::RequestBuilder for CreateTable {
3739 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3740 &mut self.0.options
3741 }
3742 }
3743
3744 #[derive(Clone, Debug)]
3762 pub struct CreateTableFromSnapshot(
3763 RequestBuilder<crate::model::CreateTableFromSnapshotRequest>,
3764 );
3765
3766 impl CreateTableFromSnapshot {
3767 pub(crate) fn new(
3768 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
3769 ) -> Self {
3770 Self(RequestBuilder::new(stub))
3771 }
3772
3773 pub fn with_request<V: Into<crate::model::CreateTableFromSnapshotRequest>>(
3775 mut self,
3776 v: V,
3777 ) -> Self {
3778 self.0.request = v.into();
3779 self
3780 }
3781
3782 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3784 self.0.options = v.into();
3785 self
3786 }
3787
3788 pub async fn send(self) -> Result<longrunning::model::Operation> {
3795 (*self.0.stub)
3796 .create_table_from_snapshot(self.0.request, self.0.options)
3797 .await
3798 .map(gax::response::Response::into_body)
3799 }
3800
3801 pub fn poller(
3803 self,
3804 ) -> impl lro::Poller<crate::model::Table, crate::model::CreateTableFromSnapshotMetadata>
3805 {
3806 type Operation = lro::internal::Operation<
3807 crate::model::Table,
3808 crate::model::CreateTableFromSnapshotMetadata,
3809 >;
3810 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3811 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3812
3813 let stub = self.0.stub.clone();
3814 let mut options = self.0.options.clone();
3815 options.set_retry_policy(gax::retry_policy::NeverRetry);
3816 let query = move |name| {
3817 let stub = stub.clone();
3818 let options = options.clone();
3819 async {
3820 let op = GetOperation::new(stub)
3821 .set_name(name)
3822 .with_options(options)
3823 .send()
3824 .await?;
3825 Ok(Operation::new(op))
3826 }
3827 };
3828
3829 let start = move || async {
3830 let op = self.send().await?;
3831 Ok(Operation::new(op))
3832 };
3833
3834 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
3835 }
3836
3837 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3841 self.0.request.parent = v.into();
3842 self
3843 }
3844
3845 pub fn set_table_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3849 self.0.request.table_id = v.into();
3850 self
3851 }
3852
3853 pub fn set_source_snapshot<T: Into<std::string::String>>(mut self, v: T) -> Self {
3857 self.0.request.source_snapshot = v.into();
3858 self
3859 }
3860 }
3861
3862 #[doc(hidden)]
3863 impl gax::options::internal::RequestBuilder for CreateTableFromSnapshot {
3864 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3865 &mut self.0.options
3866 }
3867 }
3868
3869 #[derive(Clone, Debug)]
3890 pub struct ListTables(RequestBuilder<crate::model::ListTablesRequest>);
3891
3892 impl ListTables {
3893 pub(crate) fn new(
3894 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
3895 ) -> Self {
3896 Self(RequestBuilder::new(stub))
3897 }
3898
3899 pub fn with_request<V: Into<crate::model::ListTablesRequest>>(mut self, v: V) -> Self {
3901 self.0.request = v.into();
3902 self
3903 }
3904
3905 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3907 self.0.options = v.into();
3908 self
3909 }
3910
3911 pub async fn send(self) -> Result<crate::model::ListTablesResponse> {
3913 (*self.0.stub)
3914 .list_tables(self.0.request, self.0.options)
3915 .await
3916 .map(gax::response::Response::into_body)
3917 }
3918
3919 pub fn by_page(
3921 self,
3922 ) -> impl gax::paginator::Paginator<crate::model::ListTablesResponse, gax::error::Error>
3923 {
3924 use std::clone::Clone;
3925 let token = self.0.request.page_token.clone();
3926 let execute = move |token: String| {
3927 let mut builder = self.clone();
3928 builder.0.request = builder.0.request.set_page_token(token);
3929 builder.send()
3930 };
3931 gax::paginator::internal::new_paginator(token, execute)
3932 }
3933
3934 pub fn by_item(
3936 self,
3937 ) -> impl gax::paginator::ItemPaginator<crate::model::ListTablesResponse, gax::error::Error>
3938 {
3939 use gax::paginator::Paginator;
3940 self.by_page().items()
3941 }
3942
3943 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3947 self.0.request.parent = v.into();
3948 self
3949 }
3950
3951 pub fn set_view<T: Into<crate::model::table::View>>(mut self, v: T) -> Self {
3953 self.0.request.view = v.into();
3954 self
3955 }
3956
3957 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
3959 self.0.request.page_size = v.into();
3960 self
3961 }
3962
3963 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
3965 self.0.request.page_token = v.into();
3966 self
3967 }
3968 }
3969
3970 #[doc(hidden)]
3971 impl gax::options::internal::RequestBuilder for ListTables {
3972 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3973 &mut self.0.options
3974 }
3975 }
3976
3977 #[derive(Clone, Debug)]
3994 pub struct GetTable(RequestBuilder<crate::model::GetTableRequest>);
3995
3996 impl GetTable {
3997 pub(crate) fn new(
3998 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
3999 ) -> Self {
4000 Self(RequestBuilder::new(stub))
4001 }
4002
4003 pub fn with_request<V: Into<crate::model::GetTableRequest>>(mut self, v: V) -> Self {
4005 self.0.request = v.into();
4006 self
4007 }
4008
4009 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4011 self.0.options = v.into();
4012 self
4013 }
4014
4015 pub async fn send(self) -> Result<crate::model::Table> {
4017 (*self.0.stub)
4018 .get_table(self.0.request, self.0.options)
4019 .await
4020 .map(gax::response::Response::into_body)
4021 }
4022
4023 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4027 self.0.request.name = v.into();
4028 self
4029 }
4030
4031 pub fn set_view<T: Into<crate::model::table::View>>(mut self, v: T) -> Self {
4033 self.0.request.view = v.into();
4034 self
4035 }
4036 }
4037
4038 #[doc(hidden)]
4039 impl gax::options::internal::RequestBuilder for GetTable {
4040 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4041 &mut self.0.options
4042 }
4043 }
4044
4045 #[derive(Clone, Debug)]
4063 pub struct UpdateTable(RequestBuilder<crate::model::UpdateTableRequest>);
4064
4065 impl UpdateTable {
4066 pub(crate) fn new(
4067 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
4068 ) -> Self {
4069 Self(RequestBuilder::new(stub))
4070 }
4071
4072 pub fn with_request<V: Into<crate::model::UpdateTableRequest>>(mut self, v: V) -> Self {
4074 self.0.request = v.into();
4075 self
4076 }
4077
4078 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4080 self.0.options = v.into();
4081 self
4082 }
4083
4084 pub async fn send(self) -> Result<longrunning::model::Operation> {
4091 (*self.0.stub)
4092 .update_table(self.0.request, self.0.options)
4093 .await
4094 .map(gax::response::Response::into_body)
4095 }
4096
4097 pub fn poller(
4099 self,
4100 ) -> impl lro::Poller<crate::model::Table, crate::model::UpdateTableMetadata> {
4101 type Operation =
4102 lro::internal::Operation<crate::model::Table, crate::model::UpdateTableMetadata>;
4103 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4104 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4105
4106 let stub = self.0.stub.clone();
4107 let mut options = self.0.options.clone();
4108 options.set_retry_policy(gax::retry_policy::NeverRetry);
4109 let query = move |name| {
4110 let stub = stub.clone();
4111 let options = options.clone();
4112 async {
4113 let op = GetOperation::new(stub)
4114 .set_name(name)
4115 .with_options(options)
4116 .send()
4117 .await?;
4118 Ok(Operation::new(op))
4119 }
4120 };
4121
4122 let start = move || async {
4123 let op = self.send().await?;
4124 Ok(Operation::new(op))
4125 };
4126
4127 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
4128 }
4129
4130 pub fn set_table<T>(mut self, v: T) -> Self
4134 where
4135 T: std::convert::Into<crate::model::Table>,
4136 {
4137 self.0.request.table = std::option::Option::Some(v.into());
4138 self
4139 }
4140
4141 pub fn set_or_clear_table<T>(mut self, v: std::option::Option<T>) -> Self
4145 where
4146 T: std::convert::Into<crate::model::Table>,
4147 {
4148 self.0.request.table = v.map(|x| x.into());
4149 self
4150 }
4151
4152 pub fn set_update_mask<T>(mut self, v: T) -> Self
4156 where
4157 T: std::convert::Into<wkt::FieldMask>,
4158 {
4159 self.0.request.update_mask = std::option::Option::Some(v.into());
4160 self
4161 }
4162
4163 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
4167 where
4168 T: std::convert::Into<wkt::FieldMask>,
4169 {
4170 self.0.request.update_mask = v.map(|x| x.into());
4171 self
4172 }
4173
4174 pub fn set_ignore_warnings<T: Into<bool>>(mut self, v: T) -> Self {
4176 self.0.request.ignore_warnings = v.into();
4177 self
4178 }
4179 }
4180
4181 #[doc(hidden)]
4182 impl gax::options::internal::RequestBuilder for UpdateTable {
4183 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4184 &mut self.0.options
4185 }
4186 }
4187
4188 #[derive(Clone, Debug)]
4205 pub struct DeleteTable(RequestBuilder<crate::model::DeleteTableRequest>);
4206
4207 impl DeleteTable {
4208 pub(crate) fn new(
4209 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
4210 ) -> Self {
4211 Self(RequestBuilder::new(stub))
4212 }
4213
4214 pub fn with_request<V: Into<crate::model::DeleteTableRequest>>(mut self, v: V) -> Self {
4216 self.0.request = v.into();
4217 self
4218 }
4219
4220 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4222 self.0.options = v.into();
4223 self
4224 }
4225
4226 pub async fn send(self) -> Result<()> {
4228 (*self.0.stub)
4229 .delete_table(self.0.request, self.0.options)
4230 .await
4231 .map(gax::response::Response::into_body)
4232 }
4233
4234 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4238 self.0.request.name = v.into();
4239 self
4240 }
4241 }
4242
4243 #[doc(hidden)]
4244 impl gax::options::internal::RequestBuilder for DeleteTable {
4245 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4246 &mut self.0.options
4247 }
4248 }
4249
4250 #[derive(Clone, Debug)]
4268 pub struct UndeleteTable(RequestBuilder<crate::model::UndeleteTableRequest>);
4269
4270 impl UndeleteTable {
4271 pub(crate) fn new(
4272 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
4273 ) -> Self {
4274 Self(RequestBuilder::new(stub))
4275 }
4276
4277 pub fn with_request<V: Into<crate::model::UndeleteTableRequest>>(mut self, v: V) -> Self {
4279 self.0.request = v.into();
4280 self
4281 }
4282
4283 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4285 self.0.options = v.into();
4286 self
4287 }
4288
4289 pub async fn send(self) -> Result<longrunning::model::Operation> {
4296 (*self.0.stub)
4297 .undelete_table(self.0.request, self.0.options)
4298 .await
4299 .map(gax::response::Response::into_body)
4300 }
4301
4302 pub fn poller(
4304 self,
4305 ) -> impl lro::Poller<crate::model::Table, crate::model::UndeleteTableMetadata> {
4306 type Operation =
4307 lro::internal::Operation<crate::model::Table, crate::model::UndeleteTableMetadata>;
4308 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4309 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4310
4311 let stub = self.0.stub.clone();
4312 let mut options = self.0.options.clone();
4313 options.set_retry_policy(gax::retry_policy::NeverRetry);
4314 let query = move |name| {
4315 let stub = stub.clone();
4316 let options = options.clone();
4317 async {
4318 let op = GetOperation::new(stub)
4319 .set_name(name)
4320 .with_options(options)
4321 .send()
4322 .await?;
4323 Ok(Operation::new(op))
4324 }
4325 };
4326
4327 let start = move || async {
4328 let op = self.send().await?;
4329 Ok(Operation::new(op))
4330 };
4331
4332 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
4333 }
4334
4335 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4339 self.0.request.name = v.into();
4340 self
4341 }
4342 }
4343
4344 #[doc(hidden)]
4345 impl gax::options::internal::RequestBuilder for UndeleteTable {
4346 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4347 &mut self.0.options
4348 }
4349 }
4350
4351 #[derive(Clone, Debug)]
4369 pub struct CreateAuthorizedView(RequestBuilder<crate::model::CreateAuthorizedViewRequest>);
4370
4371 impl CreateAuthorizedView {
4372 pub(crate) fn new(
4373 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
4374 ) -> Self {
4375 Self(RequestBuilder::new(stub))
4376 }
4377
4378 pub fn with_request<V: Into<crate::model::CreateAuthorizedViewRequest>>(
4380 mut self,
4381 v: V,
4382 ) -> Self {
4383 self.0.request = v.into();
4384 self
4385 }
4386
4387 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4389 self.0.options = v.into();
4390 self
4391 }
4392
4393 pub async fn send(self) -> Result<longrunning::model::Operation> {
4400 (*self.0.stub)
4401 .create_authorized_view(self.0.request, self.0.options)
4402 .await
4403 .map(gax::response::Response::into_body)
4404 }
4405
4406 pub fn poller(
4408 self,
4409 ) -> impl lro::Poller<crate::model::AuthorizedView, crate::model::CreateAuthorizedViewMetadata>
4410 {
4411 type Operation = lro::internal::Operation<
4412 crate::model::AuthorizedView,
4413 crate::model::CreateAuthorizedViewMetadata,
4414 >;
4415 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4416 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4417
4418 let stub = self.0.stub.clone();
4419 let mut options = self.0.options.clone();
4420 options.set_retry_policy(gax::retry_policy::NeverRetry);
4421 let query = move |name| {
4422 let stub = stub.clone();
4423 let options = options.clone();
4424 async {
4425 let op = GetOperation::new(stub)
4426 .set_name(name)
4427 .with_options(options)
4428 .send()
4429 .await?;
4430 Ok(Operation::new(op))
4431 }
4432 };
4433
4434 let start = move || async {
4435 let op = self.send().await?;
4436 Ok(Operation::new(op))
4437 };
4438
4439 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
4440 }
4441
4442 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
4446 self.0.request.parent = v.into();
4447 self
4448 }
4449
4450 pub fn set_authorized_view_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
4454 self.0.request.authorized_view_id = v.into();
4455 self
4456 }
4457
4458 pub fn set_authorized_view<T>(mut self, v: T) -> Self
4462 where
4463 T: std::convert::Into<crate::model::AuthorizedView>,
4464 {
4465 self.0.request.authorized_view = std::option::Option::Some(v.into());
4466 self
4467 }
4468
4469 pub fn set_or_clear_authorized_view<T>(mut self, v: std::option::Option<T>) -> Self
4473 where
4474 T: std::convert::Into<crate::model::AuthorizedView>,
4475 {
4476 self.0.request.authorized_view = v.map(|x| x.into());
4477 self
4478 }
4479 }
4480
4481 #[doc(hidden)]
4482 impl gax::options::internal::RequestBuilder for CreateAuthorizedView {
4483 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4484 &mut self.0.options
4485 }
4486 }
4487
4488 #[derive(Clone, Debug)]
4509 pub struct ListAuthorizedViews(RequestBuilder<crate::model::ListAuthorizedViewsRequest>);
4510
4511 impl ListAuthorizedViews {
4512 pub(crate) fn new(
4513 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
4514 ) -> Self {
4515 Self(RequestBuilder::new(stub))
4516 }
4517
4518 pub fn with_request<V: Into<crate::model::ListAuthorizedViewsRequest>>(
4520 mut self,
4521 v: V,
4522 ) -> Self {
4523 self.0.request = v.into();
4524 self
4525 }
4526
4527 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4529 self.0.options = v.into();
4530 self
4531 }
4532
4533 pub async fn send(self) -> Result<crate::model::ListAuthorizedViewsResponse> {
4535 (*self.0.stub)
4536 .list_authorized_views(self.0.request, self.0.options)
4537 .await
4538 .map(gax::response::Response::into_body)
4539 }
4540
4541 pub fn by_page(
4543 self,
4544 ) -> impl gax::paginator::Paginator<crate::model::ListAuthorizedViewsResponse, gax::error::Error>
4545 {
4546 use std::clone::Clone;
4547 let token = self.0.request.page_token.clone();
4548 let execute = move |token: String| {
4549 let mut builder = self.clone();
4550 builder.0.request = builder.0.request.set_page_token(token);
4551 builder.send()
4552 };
4553 gax::paginator::internal::new_paginator(token, execute)
4554 }
4555
4556 pub fn by_item(
4558 self,
4559 ) -> impl gax::paginator::ItemPaginator<
4560 crate::model::ListAuthorizedViewsResponse,
4561 gax::error::Error,
4562 > {
4563 use gax::paginator::Paginator;
4564 self.by_page().items()
4565 }
4566
4567 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
4571 self.0.request.parent = v.into();
4572 self
4573 }
4574
4575 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
4577 self.0.request.page_size = v.into();
4578 self
4579 }
4580
4581 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
4583 self.0.request.page_token = v.into();
4584 self
4585 }
4586
4587 pub fn set_view<T: Into<crate::model::authorized_view::ResponseView>>(
4589 mut self,
4590 v: T,
4591 ) -> Self {
4592 self.0.request.view = v.into();
4593 self
4594 }
4595 }
4596
4597 #[doc(hidden)]
4598 impl gax::options::internal::RequestBuilder for ListAuthorizedViews {
4599 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4600 &mut self.0.options
4601 }
4602 }
4603
4604 #[derive(Clone, Debug)]
4621 pub struct GetAuthorizedView(RequestBuilder<crate::model::GetAuthorizedViewRequest>);
4622
4623 impl GetAuthorizedView {
4624 pub(crate) fn new(
4625 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
4626 ) -> Self {
4627 Self(RequestBuilder::new(stub))
4628 }
4629
4630 pub fn with_request<V: Into<crate::model::GetAuthorizedViewRequest>>(
4632 mut self,
4633 v: V,
4634 ) -> Self {
4635 self.0.request = v.into();
4636 self
4637 }
4638
4639 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4641 self.0.options = v.into();
4642 self
4643 }
4644
4645 pub async fn send(self) -> Result<crate::model::AuthorizedView> {
4647 (*self.0.stub)
4648 .get_authorized_view(self.0.request, self.0.options)
4649 .await
4650 .map(gax::response::Response::into_body)
4651 }
4652
4653 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4657 self.0.request.name = v.into();
4658 self
4659 }
4660
4661 pub fn set_view<T: Into<crate::model::authorized_view::ResponseView>>(
4663 mut self,
4664 v: T,
4665 ) -> Self {
4666 self.0.request.view = v.into();
4667 self
4668 }
4669 }
4670
4671 #[doc(hidden)]
4672 impl gax::options::internal::RequestBuilder for GetAuthorizedView {
4673 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4674 &mut self.0.options
4675 }
4676 }
4677
4678 #[derive(Clone, Debug)]
4696 pub struct UpdateAuthorizedView(RequestBuilder<crate::model::UpdateAuthorizedViewRequest>);
4697
4698 impl UpdateAuthorizedView {
4699 pub(crate) fn new(
4700 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
4701 ) -> Self {
4702 Self(RequestBuilder::new(stub))
4703 }
4704
4705 pub fn with_request<V: Into<crate::model::UpdateAuthorizedViewRequest>>(
4707 mut self,
4708 v: V,
4709 ) -> Self {
4710 self.0.request = v.into();
4711 self
4712 }
4713
4714 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4716 self.0.options = v.into();
4717 self
4718 }
4719
4720 pub async fn send(self) -> Result<longrunning::model::Operation> {
4727 (*self.0.stub)
4728 .update_authorized_view(self.0.request, self.0.options)
4729 .await
4730 .map(gax::response::Response::into_body)
4731 }
4732
4733 pub fn poller(
4735 self,
4736 ) -> impl lro::Poller<crate::model::AuthorizedView, crate::model::UpdateAuthorizedViewMetadata>
4737 {
4738 type Operation = lro::internal::Operation<
4739 crate::model::AuthorizedView,
4740 crate::model::UpdateAuthorizedViewMetadata,
4741 >;
4742 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4743 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4744
4745 let stub = self.0.stub.clone();
4746 let mut options = self.0.options.clone();
4747 options.set_retry_policy(gax::retry_policy::NeverRetry);
4748 let query = move |name| {
4749 let stub = stub.clone();
4750 let options = options.clone();
4751 async {
4752 let op = GetOperation::new(stub)
4753 .set_name(name)
4754 .with_options(options)
4755 .send()
4756 .await?;
4757 Ok(Operation::new(op))
4758 }
4759 };
4760
4761 let start = move || async {
4762 let op = self.send().await?;
4763 Ok(Operation::new(op))
4764 };
4765
4766 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
4767 }
4768
4769 pub fn set_authorized_view<T>(mut self, v: T) -> Self
4773 where
4774 T: std::convert::Into<crate::model::AuthorizedView>,
4775 {
4776 self.0.request.authorized_view = std::option::Option::Some(v.into());
4777 self
4778 }
4779
4780 pub fn set_or_clear_authorized_view<T>(mut self, v: std::option::Option<T>) -> Self
4784 where
4785 T: std::convert::Into<crate::model::AuthorizedView>,
4786 {
4787 self.0.request.authorized_view = v.map(|x| x.into());
4788 self
4789 }
4790
4791 pub fn set_update_mask<T>(mut self, v: T) -> Self
4793 where
4794 T: std::convert::Into<wkt::FieldMask>,
4795 {
4796 self.0.request.update_mask = std::option::Option::Some(v.into());
4797 self
4798 }
4799
4800 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
4802 where
4803 T: std::convert::Into<wkt::FieldMask>,
4804 {
4805 self.0.request.update_mask = v.map(|x| x.into());
4806 self
4807 }
4808
4809 pub fn set_ignore_warnings<T: Into<bool>>(mut self, v: T) -> Self {
4811 self.0.request.ignore_warnings = v.into();
4812 self
4813 }
4814 }
4815
4816 #[doc(hidden)]
4817 impl gax::options::internal::RequestBuilder for UpdateAuthorizedView {
4818 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4819 &mut self.0.options
4820 }
4821 }
4822
4823 #[derive(Clone, Debug)]
4840 pub struct DeleteAuthorizedView(RequestBuilder<crate::model::DeleteAuthorizedViewRequest>);
4841
4842 impl DeleteAuthorizedView {
4843 pub(crate) fn new(
4844 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
4845 ) -> Self {
4846 Self(RequestBuilder::new(stub))
4847 }
4848
4849 pub fn with_request<V: Into<crate::model::DeleteAuthorizedViewRequest>>(
4851 mut self,
4852 v: V,
4853 ) -> Self {
4854 self.0.request = v.into();
4855 self
4856 }
4857
4858 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4860 self.0.options = v.into();
4861 self
4862 }
4863
4864 pub async fn send(self) -> Result<()> {
4866 (*self.0.stub)
4867 .delete_authorized_view(self.0.request, self.0.options)
4868 .await
4869 .map(gax::response::Response::into_body)
4870 }
4871
4872 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4876 self.0.request.name = v.into();
4877 self
4878 }
4879
4880 pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
4882 self.0.request.etag = v.into();
4883 self
4884 }
4885 }
4886
4887 #[doc(hidden)]
4888 impl gax::options::internal::RequestBuilder for DeleteAuthorizedView {
4889 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4890 &mut self.0.options
4891 }
4892 }
4893
4894 #[derive(Clone, Debug)]
4911 pub struct ModifyColumnFamilies(RequestBuilder<crate::model::ModifyColumnFamiliesRequest>);
4912
4913 impl ModifyColumnFamilies {
4914 pub(crate) fn new(
4915 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
4916 ) -> Self {
4917 Self(RequestBuilder::new(stub))
4918 }
4919
4920 pub fn with_request<V: Into<crate::model::ModifyColumnFamiliesRequest>>(
4922 mut self,
4923 v: V,
4924 ) -> Self {
4925 self.0.request = v.into();
4926 self
4927 }
4928
4929 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4931 self.0.options = v.into();
4932 self
4933 }
4934
4935 pub async fn send(self) -> Result<crate::model::Table> {
4937 (*self.0.stub)
4938 .modify_column_families(self.0.request, self.0.options)
4939 .await
4940 .map(gax::response::Response::into_body)
4941 }
4942
4943 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4947 self.0.request.name = v.into();
4948 self
4949 }
4950
4951 pub fn set_modifications<T, V>(mut self, v: T) -> Self
4955 where
4956 T: std::iter::IntoIterator<Item = V>,
4957 V: std::convert::Into<crate::model::modify_column_families_request::Modification>,
4958 {
4959 use std::iter::Iterator;
4960 self.0.request.modifications = v.into_iter().map(|i| i.into()).collect();
4961 self
4962 }
4963
4964 pub fn set_ignore_warnings<T: Into<bool>>(mut self, v: T) -> Self {
4966 self.0.request.ignore_warnings = v.into();
4967 self
4968 }
4969 }
4970
4971 #[doc(hidden)]
4972 impl gax::options::internal::RequestBuilder for ModifyColumnFamilies {
4973 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4974 &mut self.0.options
4975 }
4976 }
4977
4978 #[derive(Clone, Debug)]
4995 pub struct DropRowRange(RequestBuilder<crate::model::DropRowRangeRequest>);
4996
4997 impl DropRowRange {
4998 pub(crate) fn new(
4999 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
5000 ) -> Self {
5001 Self(RequestBuilder::new(stub))
5002 }
5003
5004 pub fn with_request<V: Into<crate::model::DropRowRangeRequest>>(mut self, v: V) -> Self {
5006 self.0.request = v.into();
5007 self
5008 }
5009
5010 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5012 self.0.options = v.into();
5013 self
5014 }
5015
5016 pub async fn send(self) -> Result<()> {
5018 (*self.0.stub)
5019 .drop_row_range(self.0.request, self.0.options)
5020 .await
5021 .map(gax::response::Response::into_body)
5022 }
5023
5024 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5028 self.0.request.name = v.into();
5029 self
5030 }
5031
5032 pub fn set_target<T: Into<Option<crate::model::drop_row_range_request::Target>>>(
5037 mut self,
5038 v: T,
5039 ) -> Self {
5040 self.0.request.target = v.into();
5041 self
5042 }
5043
5044 pub fn set_row_key_prefix<T: std::convert::Into<::bytes::Bytes>>(mut self, v: T) -> Self {
5050 self.0.request = self.0.request.set_row_key_prefix(v);
5051 self
5052 }
5053
5054 pub fn set_delete_all_data_from_table<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5060 self.0.request = self.0.request.set_delete_all_data_from_table(v);
5061 self
5062 }
5063 }
5064
5065 #[doc(hidden)]
5066 impl gax::options::internal::RequestBuilder for DropRowRange {
5067 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5068 &mut self.0.options
5069 }
5070 }
5071
5072 #[derive(Clone, Debug)]
5089 pub struct GenerateConsistencyToken(
5090 RequestBuilder<crate::model::GenerateConsistencyTokenRequest>,
5091 );
5092
5093 impl GenerateConsistencyToken {
5094 pub(crate) fn new(
5095 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
5096 ) -> Self {
5097 Self(RequestBuilder::new(stub))
5098 }
5099
5100 pub fn with_request<V: Into<crate::model::GenerateConsistencyTokenRequest>>(
5102 mut self,
5103 v: V,
5104 ) -> Self {
5105 self.0.request = v.into();
5106 self
5107 }
5108
5109 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5111 self.0.options = v.into();
5112 self
5113 }
5114
5115 pub async fn send(self) -> Result<crate::model::GenerateConsistencyTokenResponse> {
5117 (*self.0.stub)
5118 .generate_consistency_token(self.0.request, self.0.options)
5119 .await
5120 .map(gax::response::Response::into_body)
5121 }
5122
5123 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5127 self.0.request.name = v.into();
5128 self
5129 }
5130 }
5131
5132 #[doc(hidden)]
5133 impl gax::options::internal::RequestBuilder for GenerateConsistencyToken {
5134 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5135 &mut self.0.options
5136 }
5137 }
5138
5139 #[derive(Clone, Debug)]
5156 pub struct CheckConsistency(RequestBuilder<crate::model::CheckConsistencyRequest>);
5157
5158 impl CheckConsistency {
5159 pub(crate) fn new(
5160 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
5161 ) -> Self {
5162 Self(RequestBuilder::new(stub))
5163 }
5164
5165 pub fn with_request<V: Into<crate::model::CheckConsistencyRequest>>(
5167 mut self,
5168 v: V,
5169 ) -> Self {
5170 self.0.request = v.into();
5171 self
5172 }
5173
5174 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5176 self.0.options = v.into();
5177 self
5178 }
5179
5180 pub async fn send(self) -> Result<crate::model::CheckConsistencyResponse> {
5182 (*self.0.stub)
5183 .check_consistency(self.0.request, self.0.options)
5184 .await
5185 .map(gax::response::Response::into_body)
5186 }
5187
5188 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5192 self.0.request.name = v.into();
5193 self
5194 }
5195
5196 pub fn set_consistency_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
5200 self.0.request.consistency_token = v.into();
5201 self
5202 }
5203
5204 pub fn set_mode<T: Into<Option<crate::model::check_consistency_request::Mode>>>(
5209 mut self,
5210 v: T,
5211 ) -> Self {
5212 self.0.request.mode = v.into();
5213 self
5214 }
5215
5216 pub fn set_standard_read_remote_writes<
5222 T: std::convert::Into<std::boxed::Box<crate::model::StandardReadRemoteWrites>>,
5223 >(
5224 mut self,
5225 v: T,
5226 ) -> Self {
5227 self.0.request = self.0.request.set_standard_read_remote_writes(v);
5228 self
5229 }
5230
5231 pub fn set_data_boost_read_local_writes<
5237 T: std::convert::Into<std::boxed::Box<crate::model::DataBoostReadLocalWrites>>,
5238 >(
5239 mut self,
5240 v: T,
5241 ) -> Self {
5242 self.0.request = self.0.request.set_data_boost_read_local_writes(v);
5243 self
5244 }
5245 }
5246
5247 #[doc(hidden)]
5248 impl gax::options::internal::RequestBuilder for CheckConsistency {
5249 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5250 &mut self.0.options
5251 }
5252 }
5253
5254 #[derive(Clone, Debug)]
5272 pub struct SnapshotTable(RequestBuilder<crate::model::SnapshotTableRequest>);
5273
5274 impl SnapshotTable {
5275 pub(crate) fn new(
5276 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
5277 ) -> Self {
5278 Self(RequestBuilder::new(stub))
5279 }
5280
5281 pub fn with_request<V: Into<crate::model::SnapshotTableRequest>>(mut self, v: V) -> Self {
5283 self.0.request = v.into();
5284 self
5285 }
5286
5287 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5289 self.0.options = v.into();
5290 self
5291 }
5292
5293 pub async fn send(self) -> Result<longrunning::model::Operation> {
5300 (*self.0.stub)
5301 .snapshot_table(self.0.request, self.0.options)
5302 .await
5303 .map(gax::response::Response::into_body)
5304 }
5305
5306 pub fn poller(
5308 self,
5309 ) -> impl lro::Poller<crate::model::Snapshot, crate::model::SnapshotTableMetadata> {
5310 type Operation = lro::internal::Operation<
5311 crate::model::Snapshot,
5312 crate::model::SnapshotTableMetadata,
5313 >;
5314 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
5315 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
5316
5317 let stub = self.0.stub.clone();
5318 let mut options = self.0.options.clone();
5319 options.set_retry_policy(gax::retry_policy::NeverRetry);
5320 let query = move |name| {
5321 let stub = stub.clone();
5322 let options = options.clone();
5323 async {
5324 let op = GetOperation::new(stub)
5325 .set_name(name)
5326 .with_options(options)
5327 .send()
5328 .await?;
5329 Ok(Operation::new(op))
5330 }
5331 };
5332
5333 let start = move || async {
5334 let op = self.send().await?;
5335 Ok(Operation::new(op))
5336 };
5337
5338 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
5339 }
5340
5341 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5345 self.0.request.name = v.into();
5346 self
5347 }
5348
5349 pub fn set_cluster<T: Into<std::string::String>>(mut self, v: T) -> Self {
5353 self.0.request.cluster = v.into();
5354 self
5355 }
5356
5357 pub fn set_snapshot_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
5361 self.0.request.snapshot_id = v.into();
5362 self
5363 }
5364
5365 pub fn set_ttl<T>(mut self, v: T) -> Self
5367 where
5368 T: std::convert::Into<wkt::Duration>,
5369 {
5370 self.0.request.ttl = std::option::Option::Some(v.into());
5371 self
5372 }
5373
5374 pub fn set_or_clear_ttl<T>(mut self, v: std::option::Option<T>) -> Self
5376 where
5377 T: std::convert::Into<wkt::Duration>,
5378 {
5379 self.0.request.ttl = v.map(|x| x.into());
5380 self
5381 }
5382
5383 pub fn set_description<T: Into<std::string::String>>(mut self, v: T) -> Self {
5385 self.0.request.description = v.into();
5386 self
5387 }
5388 }
5389
5390 #[doc(hidden)]
5391 impl gax::options::internal::RequestBuilder for SnapshotTable {
5392 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5393 &mut self.0.options
5394 }
5395 }
5396
5397 #[derive(Clone, Debug)]
5414 pub struct GetSnapshot(RequestBuilder<crate::model::GetSnapshotRequest>);
5415
5416 impl GetSnapshot {
5417 pub(crate) fn new(
5418 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
5419 ) -> Self {
5420 Self(RequestBuilder::new(stub))
5421 }
5422
5423 pub fn with_request<V: Into<crate::model::GetSnapshotRequest>>(mut self, v: V) -> Self {
5425 self.0.request = v.into();
5426 self
5427 }
5428
5429 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5431 self.0.options = v.into();
5432 self
5433 }
5434
5435 pub async fn send(self) -> Result<crate::model::Snapshot> {
5437 (*self.0.stub)
5438 .get_snapshot(self.0.request, self.0.options)
5439 .await
5440 .map(gax::response::Response::into_body)
5441 }
5442
5443 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5447 self.0.request.name = v.into();
5448 self
5449 }
5450 }
5451
5452 #[doc(hidden)]
5453 impl gax::options::internal::RequestBuilder for GetSnapshot {
5454 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5455 &mut self.0.options
5456 }
5457 }
5458
5459 #[derive(Clone, Debug)]
5480 pub struct ListSnapshots(RequestBuilder<crate::model::ListSnapshotsRequest>);
5481
5482 impl ListSnapshots {
5483 pub(crate) fn new(
5484 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
5485 ) -> Self {
5486 Self(RequestBuilder::new(stub))
5487 }
5488
5489 pub fn with_request<V: Into<crate::model::ListSnapshotsRequest>>(mut self, v: V) -> Self {
5491 self.0.request = v.into();
5492 self
5493 }
5494
5495 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5497 self.0.options = v.into();
5498 self
5499 }
5500
5501 pub async fn send(self) -> Result<crate::model::ListSnapshotsResponse> {
5503 (*self.0.stub)
5504 .list_snapshots(self.0.request, self.0.options)
5505 .await
5506 .map(gax::response::Response::into_body)
5507 }
5508
5509 pub fn by_page(
5511 self,
5512 ) -> impl gax::paginator::Paginator<crate::model::ListSnapshotsResponse, gax::error::Error>
5513 {
5514 use std::clone::Clone;
5515 let token = self.0.request.page_token.clone();
5516 let execute = move |token: String| {
5517 let mut builder = self.clone();
5518 builder.0.request = builder.0.request.set_page_token(token);
5519 builder.send()
5520 };
5521 gax::paginator::internal::new_paginator(token, execute)
5522 }
5523
5524 pub fn by_item(
5526 self,
5527 ) -> impl gax::paginator::ItemPaginator<crate::model::ListSnapshotsResponse, gax::error::Error>
5528 {
5529 use gax::paginator::Paginator;
5530 self.by_page().items()
5531 }
5532
5533 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5537 self.0.request.parent = v.into();
5538 self
5539 }
5540
5541 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
5543 self.0.request.page_size = v.into();
5544 self
5545 }
5546
5547 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
5549 self.0.request.page_token = v.into();
5550 self
5551 }
5552 }
5553
5554 #[doc(hidden)]
5555 impl gax::options::internal::RequestBuilder for ListSnapshots {
5556 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5557 &mut self.0.options
5558 }
5559 }
5560
5561 #[derive(Clone, Debug)]
5578 pub struct DeleteSnapshot(RequestBuilder<crate::model::DeleteSnapshotRequest>);
5579
5580 impl DeleteSnapshot {
5581 pub(crate) fn new(
5582 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
5583 ) -> Self {
5584 Self(RequestBuilder::new(stub))
5585 }
5586
5587 pub fn with_request<V: Into<crate::model::DeleteSnapshotRequest>>(mut self, v: V) -> Self {
5589 self.0.request = v.into();
5590 self
5591 }
5592
5593 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5595 self.0.options = v.into();
5596 self
5597 }
5598
5599 pub async fn send(self) -> Result<()> {
5601 (*self.0.stub)
5602 .delete_snapshot(self.0.request, self.0.options)
5603 .await
5604 .map(gax::response::Response::into_body)
5605 }
5606
5607 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5611 self.0.request.name = v.into();
5612 self
5613 }
5614 }
5615
5616 #[doc(hidden)]
5617 impl gax::options::internal::RequestBuilder for DeleteSnapshot {
5618 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5619 &mut self.0.options
5620 }
5621 }
5622
5623 #[derive(Clone, Debug)]
5641 pub struct CreateBackup(RequestBuilder<crate::model::CreateBackupRequest>);
5642
5643 impl CreateBackup {
5644 pub(crate) fn new(
5645 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
5646 ) -> Self {
5647 Self(RequestBuilder::new(stub))
5648 }
5649
5650 pub fn with_request<V: Into<crate::model::CreateBackupRequest>>(mut self, v: V) -> Self {
5652 self.0.request = v.into();
5653 self
5654 }
5655
5656 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5658 self.0.options = v.into();
5659 self
5660 }
5661
5662 pub async fn send(self) -> Result<longrunning::model::Operation> {
5669 (*self.0.stub)
5670 .create_backup(self.0.request, self.0.options)
5671 .await
5672 .map(gax::response::Response::into_body)
5673 }
5674
5675 pub fn poller(
5677 self,
5678 ) -> impl lro::Poller<crate::model::Backup, crate::model::CreateBackupMetadata> {
5679 type Operation =
5680 lro::internal::Operation<crate::model::Backup, crate::model::CreateBackupMetadata>;
5681 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
5682 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
5683
5684 let stub = self.0.stub.clone();
5685 let mut options = self.0.options.clone();
5686 options.set_retry_policy(gax::retry_policy::NeverRetry);
5687 let query = move |name| {
5688 let stub = stub.clone();
5689 let options = options.clone();
5690 async {
5691 let op = GetOperation::new(stub)
5692 .set_name(name)
5693 .with_options(options)
5694 .send()
5695 .await?;
5696 Ok(Operation::new(op))
5697 }
5698 };
5699
5700 let start = move || async {
5701 let op = self.send().await?;
5702 Ok(Operation::new(op))
5703 };
5704
5705 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
5706 }
5707
5708 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5712 self.0.request.parent = v.into();
5713 self
5714 }
5715
5716 pub fn set_backup_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
5720 self.0.request.backup_id = v.into();
5721 self
5722 }
5723
5724 pub fn set_backup<T>(mut self, v: T) -> Self
5728 where
5729 T: std::convert::Into<crate::model::Backup>,
5730 {
5731 self.0.request.backup = std::option::Option::Some(v.into());
5732 self
5733 }
5734
5735 pub fn set_or_clear_backup<T>(mut self, v: std::option::Option<T>) -> Self
5739 where
5740 T: std::convert::Into<crate::model::Backup>,
5741 {
5742 self.0.request.backup = v.map(|x| x.into());
5743 self
5744 }
5745 }
5746
5747 #[doc(hidden)]
5748 impl gax::options::internal::RequestBuilder for CreateBackup {
5749 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5750 &mut self.0.options
5751 }
5752 }
5753
5754 #[derive(Clone, Debug)]
5771 pub struct GetBackup(RequestBuilder<crate::model::GetBackupRequest>);
5772
5773 impl GetBackup {
5774 pub(crate) fn new(
5775 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
5776 ) -> Self {
5777 Self(RequestBuilder::new(stub))
5778 }
5779
5780 pub fn with_request<V: Into<crate::model::GetBackupRequest>>(mut self, v: V) -> Self {
5782 self.0.request = v.into();
5783 self
5784 }
5785
5786 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5788 self.0.options = v.into();
5789 self
5790 }
5791
5792 pub async fn send(self) -> Result<crate::model::Backup> {
5794 (*self.0.stub)
5795 .get_backup(self.0.request, self.0.options)
5796 .await
5797 .map(gax::response::Response::into_body)
5798 }
5799
5800 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5804 self.0.request.name = v.into();
5805 self
5806 }
5807 }
5808
5809 #[doc(hidden)]
5810 impl gax::options::internal::RequestBuilder for GetBackup {
5811 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5812 &mut self.0.options
5813 }
5814 }
5815
5816 #[derive(Clone, Debug)]
5833 pub struct UpdateBackup(RequestBuilder<crate::model::UpdateBackupRequest>);
5834
5835 impl UpdateBackup {
5836 pub(crate) fn new(
5837 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
5838 ) -> Self {
5839 Self(RequestBuilder::new(stub))
5840 }
5841
5842 pub fn with_request<V: Into<crate::model::UpdateBackupRequest>>(mut self, v: V) -> Self {
5844 self.0.request = v.into();
5845 self
5846 }
5847
5848 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5850 self.0.options = v.into();
5851 self
5852 }
5853
5854 pub async fn send(self) -> Result<crate::model::Backup> {
5856 (*self.0.stub)
5857 .update_backup(self.0.request, self.0.options)
5858 .await
5859 .map(gax::response::Response::into_body)
5860 }
5861
5862 pub fn set_backup<T>(mut self, v: T) -> Self
5866 where
5867 T: std::convert::Into<crate::model::Backup>,
5868 {
5869 self.0.request.backup = std::option::Option::Some(v.into());
5870 self
5871 }
5872
5873 pub fn set_or_clear_backup<T>(mut self, v: std::option::Option<T>) -> Self
5877 where
5878 T: std::convert::Into<crate::model::Backup>,
5879 {
5880 self.0.request.backup = v.map(|x| x.into());
5881 self
5882 }
5883
5884 pub fn set_update_mask<T>(mut self, v: T) -> Self
5888 where
5889 T: std::convert::Into<wkt::FieldMask>,
5890 {
5891 self.0.request.update_mask = std::option::Option::Some(v.into());
5892 self
5893 }
5894
5895 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
5899 where
5900 T: std::convert::Into<wkt::FieldMask>,
5901 {
5902 self.0.request.update_mask = v.map(|x| x.into());
5903 self
5904 }
5905 }
5906
5907 #[doc(hidden)]
5908 impl gax::options::internal::RequestBuilder for UpdateBackup {
5909 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5910 &mut self.0.options
5911 }
5912 }
5913
5914 #[derive(Clone, Debug)]
5931 pub struct DeleteBackup(RequestBuilder<crate::model::DeleteBackupRequest>);
5932
5933 impl DeleteBackup {
5934 pub(crate) fn new(
5935 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
5936 ) -> Self {
5937 Self(RequestBuilder::new(stub))
5938 }
5939
5940 pub fn with_request<V: Into<crate::model::DeleteBackupRequest>>(mut self, v: V) -> Self {
5942 self.0.request = v.into();
5943 self
5944 }
5945
5946 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5948 self.0.options = v.into();
5949 self
5950 }
5951
5952 pub async fn send(self) -> Result<()> {
5954 (*self.0.stub)
5955 .delete_backup(self.0.request, self.0.options)
5956 .await
5957 .map(gax::response::Response::into_body)
5958 }
5959
5960 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5964 self.0.request.name = v.into();
5965 self
5966 }
5967 }
5968
5969 #[doc(hidden)]
5970 impl gax::options::internal::RequestBuilder for DeleteBackup {
5971 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5972 &mut self.0.options
5973 }
5974 }
5975
5976 #[derive(Clone, Debug)]
5997 pub struct ListBackups(RequestBuilder<crate::model::ListBackupsRequest>);
5998
5999 impl ListBackups {
6000 pub(crate) fn new(
6001 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
6002 ) -> Self {
6003 Self(RequestBuilder::new(stub))
6004 }
6005
6006 pub fn with_request<V: Into<crate::model::ListBackupsRequest>>(mut self, v: V) -> Self {
6008 self.0.request = v.into();
6009 self
6010 }
6011
6012 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
6014 self.0.options = v.into();
6015 self
6016 }
6017
6018 pub async fn send(self) -> Result<crate::model::ListBackupsResponse> {
6020 (*self.0.stub)
6021 .list_backups(self.0.request, self.0.options)
6022 .await
6023 .map(gax::response::Response::into_body)
6024 }
6025
6026 pub fn by_page(
6028 self,
6029 ) -> impl gax::paginator::Paginator<crate::model::ListBackupsResponse, gax::error::Error>
6030 {
6031 use std::clone::Clone;
6032 let token = self.0.request.page_token.clone();
6033 let execute = move |token: String| {
6034 let mut builder = self.clone();
6035 builder.0.request = builder.0.request.set_page_token(token);
6036 builder.send()
6037 };
6038 gax::paginator::internal::new_paginator(token, execute)
6039 }
6040
6041 pub fn by_item(
6043 self,
6044 ) -> impl gax::paginator::ItemPaginator<crate::model::ListBackupsResponse, gax::error::Error>
6045 {
6046 use gax::paginator::Paginator;
6047 self.by_page().items()
6048 }
6049
6050 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
6054 self.0.request.parent = v.into();
6055 self
6056 }
6057
6058 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
6060 self.0.request.filter = v.into();
6061 self
6062 }
6063
6064 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
6066 self.0.request.order_by = v.into();
6067 self
6068 }
6069
6070 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
6072 self.0.request.page_size = v.into();
6073 self
6074 }
6075
6076 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
6078 self.0.request.page_token = v.into();
6079 self
6080 }
6081 }
6082
6083 #[doc(hidden)]
6084 impl gax::options::internal::RequestBuilder for ListBackups {
6085 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
6086 &mut self.0.options
6087 }
6088 }
6089
6090 #[derive(Clone, Debug)]
6108 pub struct RestoreTable(RequestBuilder<crate::model::RestoreTableRequest>);
6109
6110 impl RestoreTable {
6111 pub(crate) fn new(
6112 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
6113 ) -> Self {
6114 Self(RequestBuilder::new(stub))
6115 }
6116
6117 pub fn with_request<V: Into<crate::model::RestoreTableRequest>>(mut self, v: V) -> Self {
6119 self.0.request = v.into();
6120 self
6121 }
6122
6123 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
6125 self.0.options = v.into();
6126 self
6127 }
6128
6129 pub async fn send(self) -> Result<longrunning::model::Operation> {
6136 (*self.0.stub)
6137 .restore_table(self.0.request, self.0.options)
6138 .await
6139 .map(gax::response::Response::into_body)
6140 }
6141
6142 pub fn poller(
6144 self,
6145 ) -> impl lro::Poller<crate::model::Table, crate::model::RestoreTableMetadata> {
6146 type Operation =
6147 lro::internal::Operation<crate::model::Table, crate::model::RestoreTableMetadata>;
6148 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6149 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6150
6151 let stub = self.0.stub.clone();
6152 let mut options = self.0.options.clone();
6153 options.set_retry_policy(gax::retry_policy::NeverRetry);
6154 let query = move |name| {
6155 let stub = stub.clone();
6156 let options = options.clone();
6157 async {
6158 let op = GetOperation::new(stub)
6159 .set_name(name)
6160 .with_options(options)
6161 .send()
6162 .await?;
6163 Ok(Operation::new(op))
6164 }
6165 };
6166
6167 let start = move || async {
6168 let op = self.send().await?;
6169 Ok(Operation::new(op))
6170 };
6171
6172 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
6173 }
6174
6175 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
6179 self.0.request.parent = v.into();
6180 self
6181 }
6182
6183 pub fn set_table_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
6187 self.0.request.table_id = v.into();
6188 self
6189 }
6190
6191 pub fn set_source<T: Into<Option<crate::model::restore_table_request::Source>>>(
6196 mut self,
6197 v: T,
6198 ) -> Self {
6199 self.0.request.source = v.into();
6200 self
6201 }
6202
6203 pub fn set_backup<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6209 self.0.request = self.0.request.set_backup(v);
6210 self
6211 }
6212 }
6213
6214 #[doc(hidden)]
6215 impl gax::options::internal::RequestBuilder for RestoreTable {
6216 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
6217 &mut self.0.options
6218 }
6219 }
6220
6221 #[derive(Clone, Debug)]
6239 pub struct CopyBackup(RequestBuilder<crate::model::CopyBackupRequest>);
6240
6241 impl CopyBackup {
6242 pub(crate) fn new(
6243 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
6244 ) -> Self {
6245 Self(RequestBuilder::new(stub))
6246 }
6247
6248 pub fn with_request<V: Into<crate::model::CopyBackupRequest>>(mut self, v: V) -> Self {
6250 self.0.request = v.into();
6251 self
6252 }
6253
6254 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
6256 self.0.options = v.into();
6257 self
6258 }
6259
6260 pub async fn send(self) -> Result<longrunning::model::Operation> {
6267 (*self.0.stub)
6268 .copy_backup(self.0.request, self.0.options)
6269 .await
6270 .map(gax::response::Response::into_body)
6271 }
6272
6273 pub fn poller(
6275 self,
6276 ) -> impl lro::Poller<crate::model::Backup, crate::model::CopyBackupMetadata> {
6277 type Operation =
6278 lro::internal::Operation<crate::model::Backup, crate::model::CopyBackupMetadata>;
6279 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6280 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6281
6282 let stub = self.0.stub.clone();
6283 let mut options = self.0.options.clone();
6284 options.set_retry_policy(gax::retry_policy::NeverRetry);
6285 let query = move |name| {
6286 let stub = stub.clone();
6287 let options = options.clone();
6288 async {
6289 let op = GetOperation::new(stub)
6290 .set_name(name)
6291 .with_options(options)
6292 .send()
6293 .await?;
6294 Ok(Operation::new(op))
6295 }
6296 };
6297
6298 let start = move || async {
6299 let op = self.send().await?;
6300 Ok(Operation::new(op))
6301 };
6302
6303 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
6304 }
6305
6306 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
6310 self.0.request.parent = v.into();
6311 self
6312 }
6313
6314 pub fn set_backup_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
6318 self.0.request.backup_id = v.into();
6319 self
6320 }
6321
6322 pub fn set_source_backup<T: Into<std::string::String>>(mut self, v: T) -> Self {
6326 self.0.request.source_backup = v.into();
6327 self
6328 }
6329
6330 pub fn set_expire_time<T>(mut self, v: T) -> Self
6334 where
6335 T: std::convert::Into<wkt::Timestamp>,
6336 {
6337 self.0.request.expire_time = std::option::Option::Some(v.into());
6338 self
6339 }
6340
6341 pub fn set_or_clear_expire_time<T>(mut self, v: std::option::Option<T>) -> Self
6345 where
6346 T: std::convert::Into<wkt::Timestamp>,
6347 {
6348 self.0.request.expire_time = v.map(|x| x.into());
6349 self
6350 }
6351 }
6352
6353 #[doc(hidden)]
6354 impl gax::options::internal::RequestBuilder for CopyBackup {
6355 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
6356 &mut self.0.options
6357 }
6358 }
6359
6360 #[derive(Clone, Debug)]
6377 pub struct GetIamPolicy(RequestBuilder<iam_v1::model::GetIamPolicyRequest>);
6378
6379 impl GetIamPolicy {
6380 pub(crate) fn new(
6381 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
6382 ) -> Self {
6383 Self(RequestBuilder::new(stub))
6384 }
6385
6386 pub fn with_request<V: Into<iam_v1::model::GetIamPolicyRequest>>(mut self, v: V) -> Self {
6388 self.0.request = v.into();
6389 self
6390 }
6391
6392 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
6394 self.0.options = v.into();
6395 self
6396 }
6397
6398 pub async fn send(self) -> Result<iam_v1::model::Policy> {
6400 (*self.0.stub)
6401 .get_iam_policy(self.0.request, self.0.options)
6402 .await
6403 .map(gax::response::Response::into_body)
6404 }
6405
6406 pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
6410 self.0.request.resource = v.into();
6411 self
6412 }
6413
6414 pub fn set_options<T>(mut self, v: T) -> Self
6416 where
6417 T: std::convert::Into<iam_v1::model::GetPolicyOptions>,
6418 {
6419 self.0.request.options = std::option::Option::Some(v.into());
6420 self
6421 }
6422
6423 pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
6425 where
6426 T: std::convert::Into<iam_v1::model::GetPolicyOptions>,
6427 {
6428 self.0.request.options = v.map(|x| x.into());
6429 self
6430 }
6431 }
6432
6433 #[doc(hidden)]
6434 impl gax::options::internal::RequestBuilder for GetIamPolicy {
6435 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
6436 &mut self.0.options
6437 }
6438 }
6439
6440 #[derive(Clone, Debug)]
6457 pub struct SetIamPolicy(RequestBuilder<iam_v1::model::SetIamPolicyRequest>);
6458
6459 impl SetIamPolicy {
6460 pub(crate) fn new(
6461 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
6462 ) -> Self {
6463 Self(RequestBuilder::new(stub))
6464 }
6465
6466 pub fn with_request<V: Into<iam_v1::model::SetIamPolicyRequest>>(mut self, v: V) -> Self {
6468 self.0.request = v.into();
6469 self
6470 }
6471
6472 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
6474 self.0.options = v.into();
6475 self
6476 }
6477
6478 pub async fn send(self) -> Result<iam_v1::model::Policy> {
6480 (*self.0.stub)
6481 .set_iam_policy(self.0.request, self.0.options)
6482 .await
6483 .map(gax::response::Response::into_body)
6484 }
6485
6486 pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
6490 self.0.request.resource = v.into();
6491 self
6492 }
6493
6494 pub fn set_policy<T>(mut self, v: T) -> Self
6498 where
6499 T: std::convert::Into<iam_v1::model::Policy>,
6500 {
6501 self.0.request.policy = std::option::Option::Some(v.into());
6502 self
6503 }
6504
6505 pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
6509 where
6510 T: std::convert::Into<iam_v1::model::Policy>,
6511 {
6512 self.0.request.policy = v.map(|x| x.into());
6513 self
6514 }
6515
6516 pub fn set_update_mask<T>(mut self, v: T) -> Self
6518 where
6519 T: std::convert::Into<wkt::FieldMask>,
6520 {
6521 self.0.request.update_mask = std::option::Option::Some(v.into());
6522 self
6523 }
6524
6525 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
6527 where
6528 T: std::convert::Into<wkt::FieldMask>,
6529 {
6530 self.0.request.update_mask = v.map(|x| x.into());
6531 self
6532 }
6533 }
6534
6535 #[doc(hidden)]
6536 impl gax::options::internal::RequestBuilder for SetIamPolicy {
6537 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
6538 &mut self.0.options
6539 }
6540 }
6541
6542 #[derive(Clone, Debug)]
6559 pub struct TestIamPermissions(RequestBuilder<iam_v1::model::TestIamPermissionsRequest>);
6560
6561 impl TestIamPermissions {
6562 pub(crate) fn new(
6563 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
6564 ) -> Self {
6565 Self(RequestBuilder::new(stub))
6566 }
6567
6568 pub fn with_request<V: Into<iam_v1::model::TestIamPermissionsRequest>>(
6570 mut self,
6571 v: V,
6572 ) -> Self {
6573 self.0.request = v.into();
6574 self
6575 }
6576
6577 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
6579 self.0.options = v.into();
6580 self
6581 }
6582
6583 pub async fn send(self) -> Result<iam_v1::model::TestIamPermissionsResponse> {
6585 (*self.0.stub)
6586 .test_iam_permissions(self.0.request, self.0.options)
6587 .await
6588 .map(gax::response::Response::into_body)
6589 }
6590
6591 pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
6595 self.0.request.resource = v.into();
6596 self
6597 }
6598
6599 pub fn set_permissions<T, V>(mut self, v: T) -> Self
6603 where
6604 T: std::iter::IntoIterator<Item = V>,
6605 V: std::convert::Into<std::string::String>,
6606 {
6607 use std::iter::Iterator;
6608 self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
6609 self
6610 }
6611 }
6612
6613 #[doc(hidden)]
6614 impl gax::options::internal::RequestBuilder for TestIamPermissions {
6615 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
6616 &mut self.0.options
6617 }
6618 }
6619
6620 #[derive(Clone, Debug)]
6638 pub struct CreateSchemaBundle(RequestBuilder<crate::model::CreateSchemaBundleRequest>);
6639
6640 impl CreateSchemaBundle {
6641 pub(crate) fn new(
6642 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
6643 ) -> Self {
6644 Self(RequestBuilder::new(stub))
6645 }
6646
6647 pub fn with_request<V: Into<crate::model::CreateSchemaBundleRequest>>(
6649 mut self,
6650 v: V,
6651 ) -> Self {
6652 self.0.request = v.into();
6653 self
6654 }
6655
6656 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
6658 self.0.options = v.into();
6659 self
6660 }
6661
6662 pub async fn send(self) -> Result<longrunning::model::Operation> {
6669 (*self.0.stub)
6670 .create_schema_bundle(self.0.request, self.0.options)
6671 .await
6672 .map(gax::response::Response::into_body)
6673 }
6674
6675 pub fn poller(
6677 self,
6678 ) -> impl lro::Poller<crate::model::SchemaBundle, crate::model::CreateSchemaBundleMetadata>
6679 {
6680 type Operation = lro::internal::Operation<
6681 crate::model::SchemaBundle,
6682 crate::model::CreateSchemaBundleMetadata,
6683 >;
6684 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6685 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6686
6687 let stub = self.0.stub.clone();
6688 let mut options = self.0.options.clone();
6689 options.set_retry_policy(gax::retry_policy::NeverRetry);
6690 let query = move |name| {
6691 let stub = stub.clone();
6692 let options = options.clone();
6693 async {
6694 let op = GetOperation::new(stub)
6695 .set_name(name)
6696 .with_options(options)
6697 .send()
6698 .await?;
6699 Ok(Operation::new(op))
6700 }
6701 };
6702
6703 let start = move || async {
6704 let op = self.send().await?;
6705 Ok(Operation::new(op))
6706 };
6707
6708 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
6709 }
6710
6711 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
6715 self.0.request.parent = v.into();
6716 self
6717 }
6718
6719 pub fn set_schema_bundle_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
6723 self.0.request.schema_bundle_id = v.into();
6724 self
6725 }
6726
6727 pub fn set_schema_bundle<T>(mut self, v: T) -> Self
6731 where
6732 T: std::convert::Into<crate::model::SchemaBundle>,
6733 {
6734 self.0.request.schema_bundle = std::option::Option::Some(v.into());
6735 self
6736 }
6737
6738 pub fn set_or_clear_schema_bundle<T>(mut self, v: std::option::Option<T>) -> Self
6742 where
6743 T: std::convert::Into<crate::model::SchemaBundle>,
6744 {
6745 self.0.request.schema_bundle = v.map(|x| x.into());
6746 self
6747 }
6748 }
6749
6750 #[doc(hidden)]
6751 impl gax::options::internal::RequestBuilder for CreateSchemaBundle {
6752 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
6753 &mut self.0.options
6754 }
6755 }
6756
6757 #[derive(Clone, Debug)]
6775 pub struct UpdateSchemaBundle(RequestBuilder<crate::model::UpdateSchemaBundleRequest>);
6776
6777 impl UpdateSchemaBundle {
6778 pub(crate) fn new(
6779 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
6780 ) -> Self {
6781 Self(RequestBuilder::new(stub))
6782 }
6783
6784 pub fn with_request<V: Into<crate::model::UpdateSchemaBundleRequest>>(
6786 mut self,
6787 v: V,
6788 ) -> Self {
6789 self.0.request = v.into();
6790 self
6791 }
6792
6793 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
6795 self.0.options = v.into();
6796 self
6797 }
6798
6799 pub async fn send(self) -> Result<longrunning::model::Operation> {
6806 (*self.0.stub)
6807 .update_schema_bundle(self.0.request, self.0.options)
6808 .await
6809 .map(gax::response::Response::into_body)
6810 }
6811
6812 pub fn poller(
6814 self,
6815 ) -> impl lro::Poller<crate::model::SchemaBundle, crate::model::UpdateSchemaBundleMetadata>
6816 {
6817 type Operation = lro::internal::Operation<
6818 crate::model::SchemaBundle,
6819 crate::model::UpdateSchemaBundleMetadata,
6820 >;
6821 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6822 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6823
6824 let stub = self.0.stub.clone();
6825 let mut options = self.0.options.clone();
6826 options.set_retry_policy(gax::retry_policy::NeverRetry);
6827 let query = move |name| {
6828 let stub = stub.clone();
6829 let options = options.clone();
6830 async {
6831 let op = GetOperation::new(stub)
6832 .set_name(name)
6833 .with_options(options)
6834 .send()
6835 .await?;
6836 Ok(Operation::new(op))
6837 }
6838 };
6839
6840 let start = move || async {
6841 let op = self.send().await?;
6842 Ok(Operation::new(op))
6843 };
6844
6845 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
6846 }
6847
6848 pub fn set_schema_bundle<T>(mut self, v: T) -> Self
6852 where
6853 T: std::convert::Into<crate::model::SchemaBundle>,
6854 {
6855 self.0.request.schema_bundle = std::option::Option::Some(v.into());
6856 self
6857 }
6858
6859 pub fn set_or_clear_schema_bundle<T>(mut self, v: std::option::Option<T>) -> Self
6863 where
6864 T: std::convert::Into<crate::model::SchemaBundle>,
6865 {
6866 self.0.request.schema_bundle = v.map(|x| x.into());
6867 self
6868 }
6869
6870 pub fn set_update_mask<T>(mut self, v: T) -> Self
6872 where
6873 T: std::convert::Into<wkt::FieldMask>,
6874 {
6875 self.0.request.update_mask = std::option::Option::Some(v.into());
6876 self
6877 }
6878
6879 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
6881 where
6882 T: std::convert::Into<wkt::FieldMask>,
6883 {
6884 self.0.request.update_mask = v.map(|x| x.into());
6885 self
6886 }
6887
6888 pub fn set_ignore_warnings<T: Into<bool>>(mut self, v: T) -> Self {
6890 self.0.request.ignore_warnings = v.into();
6891 self
6892 }
6893 }
6894
6895 #[doc(hidden)]
6896 impl gax::options::internal::RequestBuilder for UpdateSchemaBundle {
6897 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
6898 &mut self.0.options
6899 }
6900 }
6901
6902 #[derive(Clone, Debug)]
6919 pub struct GetSchemaBundle(RequestBuilder<crate::model::GetSchemaBundleRequest>);
6920
6921 impl GetSchemaBundle {
6922 pub(crate) fn new(
6923 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
6924 ) -> Self {
6925 Self(RequestBuilder::new(stub))
6926 }
6927
6928 pub fn with_request<V: Into<crate::model::GetSchemaBundleRequest>>(mut self, v: V) -> Self {
6930 self.0.request = v.into();
6931 self
6932 }
6933
6934 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
6936 self.0.options = v.into();
6937 self
6938 }
6939
6940 pub async fn send(self) -> Result<crate::model::SchemaBundle> {
6942 (*self.0.stub)
6943 .get_schema_bundle(self.0.request, self.0.options)
6944 .await
6945 .map(gax::response::Response::into_body)
6946 }
6947
6948 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6952 self.0.request.name = v.into();
6953 self
6954 }
6955 }
6956
6957 #[doc(hidden)]
6958 impl gax::options::internal::RequestBuilder for GetSchemaBundle {
6959 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
6960 &mut self.0.options
6961 }
6962 }
6963
6964 #[derive(Clone, Debug)]
6985 pub struct ListSchemaBundles(RequestBuilder<crate::model::ListSchemaBundlesRequest>);
6986
6987 impl ListSchemaBundles {
6988 pub(crate) fn new(
6989 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
6990 ) -> Self {
6991 Self(RequestBuilder::new(stub))
6992 }
6993
6994 pub fn with_request<V: Into<crate::model::ListSchemaBundlesRequest>>(
6996 mut self,
6997 v: V,
6998 ) -> Self {
6999 self.0.request = v.into();
7000 self
7001 }
7002
7003 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
7005 self.0.options = v.into();
7006 self
7007 }
7008
7009 pub async fn send(self) -> Result<crate::model::ListSchemaBundlesResponse> {
7011 (*self.0.stub)
7012 .list_schema_bundles(self.0.request, self.0.options)
7013 .await
7014 .map(gax::response::Response::into_body)
7015 }
7016
7017 pub fn by_page(
7019 self,
7020 ) -> impl gax::paginator::Paginator<crate::model::ListSchemaBundlesResponse, gax::error::Error>
7021 {
7022 use std::clone::Clone;
7023 let token = self.0.request.page_token.clone();
7024 let execute = move |token: String| {
7025 let mut builder = self.clone();
7026 builder.0.request = builder.0.request.set_page_token(token);
7027 builder.send()
7028 };
7029 gax::paginator::internal::new_paginator(token, execute)
7030 }
7031
7032 pub fn by_item(
7034 self,
7035 ) -> impl gax::paginator::ItemPaginator<crate::model::ListSchemaBundlesResponse, gax::error::Error>
7036 {
7037 use gax::paginator::Paginator;
7038 self.by_page().items()
7039 }
7040
7041 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
7045 self.0.request.parent = v.into();
7046 self
7047 }
7048
7049 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
7051 self.0.request.page_size = v.into();
7052 self
7053 }
7054
7055 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
7057 self.0.request.page_token = v.into();
7058 self
7059 }
7060 }
7061
7062 #[doc(hidden)]
7063 impl gax::options::internal::RequestBuilder for ListSchemaBundles {
7064 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
7065 &mut self.0.options
7066 }
7067 }
7068
7069 #[derive(Clone, Debug)]
7086 pub struct DeleteSchemaBundle(RequestBuilder<crate::model::DeleteSchemaBundleRequest>);
7087
7088 impl DeleteSchemaBundle {
7089 pub(crate) fn new(
7090 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
7091 ) -> Self {
7092 Self(RequestBuilder::new(stub))
7093 }
7094
7095 pub fn with_request<V: Into<crate::model::DeleteSchemaBundleRequest>>(
7097 mut self,
7098 v: V,
7099 ) -> Self {
7100 self.0.request = v.into();
7101 self
7102 }
7103
7104 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
7106 self.0.options = v.into();
7107 self
7108 }
7109
7110 pub async fn send(self) -> Result<()> {
7112 (*self.0.stub)
7113 .delete_schema_bundle(self.0.request, self.0.options)
7114 .await
7115 .map(gax::response::Response::into_body)
7116 }
7117
7118 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7122 self.0.request.name = v.into();
7123 self
7124 }
7125
7126 pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
7128 self.0.request.etag = v.into();
7129 self
7130 }
7131 }
7132
7133 #[doc(hidden)]
7134 impl gax::options::internal::RequestBuilder for DeleteSchemaBundle {
7135 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
7136 &mut self.0.options
7137 }
7138 }
7139
7140 #[derive(Clone, Debug)]
7161 pub struct ListOperations(RequestBuilder<longrunning::model::ListOperationsRequest>);
7162
7163 impl ListOperations {
7164 pub(crate) fn new(
7165 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
7166 ) -> Self {
7167 Self(RequestBuilder::new(stub))
7168 }
7169
7170 pub fn with_request<V: Into<longrunning::model::ListOperationsRequest>>(
7172 mut self,
7173 v: V,
7174 ) -> Self {
7175 self.0.request = v.into();
7176 self
7177 }
7178
7179 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
7181 self.0.options = v.into();
7182 self
7183 }
7184
7185 pub async fn send(self) -> Result<longrunning::model::ListOperationsResponse> {
7187 (*self.0.stub)
7188 .list_operations(self.0.request, self.0.options)
7189 .await
7190 .map(gax::response::Response::into_body)
7191 }
7192
7193 pub fn by_page(
7195 self,
7196 ) -> impl gax::paginator::Paginator<longrunning::model::ListOperationsResponse, gax::error::Error>
7197 {
7198 use std::clone::Clone;
7199 let token = self.0.request.page_token.clone();
7200 let execute = move |token: String| {
7201 let mut builder = self.clone();
7202 builder.0.request = builder.0.request.set_page_token(token);
7203 builder.send()
7204 };
7205 gax::paginator::internal::new_paginator(token, execute)
7206 }
7207
7208 pub fn by_item(
7210 self,
7211 ) -> impl gax::paginator::ItemPaginator<
7212 longrunning::model::ListOperationsResponse,
7213 gax::error::Error,
7214 > {
7215 use gax::paginator::Paginator;
7216 self.by_page().items()
7217 }
7218
7219 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7221 self.0.request.name = v.into();
7222 self
7223 }
7224
7225 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
7227 self.0.request.filter = v.into();
7228 self
7229 }
7230
7231 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
7233 self.0.request.page_size = v.into();
7234 self
7235 }
7236
7237 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
7239 self.0.request.page_token = v.into();
7240 self
7241 }
7242
7243 pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
7245 self.0.request.return_partial_success = v.into();
7246 self
7247 }
7248 }
7249
7250 #[doc(hidden)]
7251 impl gax::options::internal::RequestBuilder for ListOperations {
7252 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
7253 &mut self.0.options
7254 }
7255 }
7256
7257 #[derive(Clone, Debug)]
7274 pub struct GetOperation(RequestBuilder<longrunning::model::GetOperationRequest>);
7275
7276 impl GetOperation {
7277 pub(crate) fn new(
7278 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
7279 ) -> Self {
7280 Self(RequestBuilder::new(stub))
7281 }
7282
7283 pub fn with_request<V: Into<longrunning::model::GetOperationRequest>>(
7285 mut self,
7286 v: V,
7287 ) -> Self {
7288 self.0.request = v.into();
7289 self
7290 }
7291
7292 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
7294 self.0.options = v.into();
7295 self
7296 }
7297
7298 pub async fn send(self) -> Result<longrunning::model::Operation> {
7300 (*self.0.stub)
7301 .get_operation(self.0.request, self.0.options)
7302 .await
7303 .map(gax::response::Response::into_body)
7304 }
7305
7306 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7308 self.0.request.name = v.into();
7309 self
7310 }
7311 }
7312
7313 #[doc(hidden)]
7314 impl gax::options::internal::RequestBuilder for GetOperation {
7315 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
7316 &mut self.0.options
7317 }
7318 }
7319
7320 #[derive(Clone, Debug)]
7337 pub struct DeleteOperation(RequestBuilder<longrunning::model::DeleteOperationRequest>);
7338
7339 impl DeleteOperation {
7340 pub(crate) fn new(
7341 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
7342 ) -> Self {
7343 Self(RequestBuilder::new(stub))
7344 }
7345
7346 pub fn with_request<V: Into<longrunning::model::DeleteOperationRequest>>(
7348 mut self,
7349 v: V,
7350 ) -> Self {
7351 self.0.request = v.into();
7352 self
7353 }
7354
7355 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
7357 self.0.options = v.into();
7358 self
7359 }
7360
7361 pub async fn send(self) -> Result<()> {
7363 (*self.0.stub)
7364 .delete_operation(self.0.request, self.0.options)
7365 .await
7366 .map(gax::response::Response::into_body)
7367 }
7368
7369 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7371 self.0.request.name = v.into();
7372 self
7373 }
7374 }
7375
7376 #[doc(hidden)]
7377 impl gax::options::internal::RequestBuilder for DeleteOperation {
7378 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
7379 &mut self.0.options
7380 }
7381 }
7382
7383 #[derive(Clone, Debug)]
7400 pub struct CancelOperation(RequestBuilder<longrunning::model::CancelOperationRequest>);
7401
7402 impl CancelOperation {
7403 pub(crate) fn new(
7404 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
7405 ) -> Self {
7406 Self(RequestBuilder::new(stub))
7407 }
7408
7409 pub fn with_request<V: Into<longrunning::model::CancelOperationRequest>>(
7411 mut self,
7412 v: V,
7413 ) -> Self {
7414 self.0.request = v.into();
7415 self
7416 }
7417
7418 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
7420 self.0.options = v.into();
7421 self
7422 }
7423
7424 pub async fn send(self) -> Result<()> {
7426 (*self.0.stub)
7427 .cancel_operation(self.0.request, self.0.options)
7428 .await
7429 .map(gax::response::Response::into_body)
7430 }
7431
7432 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7434 self.0.request.name = v.into();
7435 self
7436 }
7437 }
7438
7439 #[doc(hidden)]
7440 impl gax::options::internal::RequestBuilder for CancelOperation {
7441 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
7442 &mut self.0.options
7443 }
7444 }
7445}