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)]
93 pub struct CreateInstance(RequestBuilder<crate::model::CreateInstanceRequest>);
94
95 impl CreateInstance {
96 pub(crate) fn new(
97 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
98 ) -> Self {
99 Self(RequestBuilder::new(stub))
100 }
101
102 pub fn with_request<V: Into<crate::model::CreateInstanceRequest>>(mut self, v: V) -> Self {
104 self.0.request = v.into();
105 self
106 }
107
108 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
110 self.0.options = v.into();
111 self
112 }
113
114 pub async fn send(self) -> Result<longrunning::model::Operation> {
121 (*self.0.stub)
122 .create_instance(self.0.request, self.0.options)
123 .await
124 .map(gax::response::Response::into_body)
125 }
126
127 pub fn poller(
129 self,
130 ) -> impl lro::Poller<crate::model::Instance, crate::model::CreateInstanceMetadata>
131 {
132 type Operation = lro::internal::Operation<
133 crate::model::Instance,
134 crate::model::CreateInstanceMetadata,
135 >;
136 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
137 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
138
139 let stub = self.0.stub.clone();
140 let mut options = self.0.options.clone();
141 options.set_retry_policy(gax::retry_policy::NeverRetry);
142 let query = move |name| {
143 let stub = stub.clone();
144 let options = options.clone();
145 async {
146 let op = GetOperation::new(stub)
147 .set_name(name)
148 .with_options(options)
149 .send()
150 .await?;
151 Ok(Operation::new(op))
152 }
153 };
154
155 let start = move || async {
156 let op = self.send().await?;
157 Ok(Operation::new(op))
158 };
159
160 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
161 }
162
163 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
167 self.0.request.parent = v.into();
168 self
169 }
170
171 pub fn set_instance_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
175 self.0.request.instance_id = v.into();
176 self
177 }
178
179 pub fn set_instance<T>(mut self, v: T) -> Self
183 where
184 T: std::convert::Into<crate::model::Instance>,
185 {
186 self.0.request.instance = std::option::Option::Some(v.into());
187 self
188 }
189
190 pub fn set_or_clear_instance<T>(mut self, v: std::option::Option<T>) -> Self
194 where
195 T: std::convert::Into<crate::model::Instance>,
196 {
197 self.0.request.instance = v.map(|x| x.into());
198 self
199 }
200
201 pub fn set_clusters<T, K, V>(mut self, v: T) -> Self
205 where
206 T: std::iter::IntoIterator<Item = (K, V)>,
207 K: std::convert::Into<std::string::String>,
208 V: std::convert::Into<crate::model::Cluster>,
209 {
210 self.0.request.clusters = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
211 self
212 }
213 }
214
215 #[doc(hidden)]
216 impl gax::options::internal::RequestBuilder for CreateInstance {
217 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
218 &mut self.0.options
219 }
220 }
221
222 #[derive(Clone, Debug)]
240 pub struct GetInstance(RequestBuilder<crate::model::GetInstanceRequest>);
241
242 impl GetInstance {
243 pub(crate) fn new(
244 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
245 ) -> Self {
246 Self(RequestBuilder::new(stub))
247 }
248
249 pub fn with_request<V: Into<crate::model::GetInstanceRequest>>(mut self, v: V) -> Self {
251 self.0.request = v.into();
252 self
253 }
254
255 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
257 self.0.options = v.into();
258 self
259 }
260
261 pub async fn send(self) -> Result<crate::model::Instance> {
263 (*self.0.stub)
264 .get_instance(self.0.request, self.0.options)
265 .await
266 .map(gax::response::Response::into_body)
267 }
268
269 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
273 self.0.request.name = v.into();
274 self
275 }
276 }
277
278 #[doc(hidden)]
279 impl gax::options::internal::RequestBuilder for GetInstance {
280 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
281 &mut self.0.options
282 }
283 }
284
285 #[derive(Clone, Debug)]
303 pub struct ListInstances(RequestBuilder<crate::model::ListInstancesRequest>);
304
305 impl ListInstances {
306 pub(crate) fn new(
307 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
308 ) -> Self {
309 Self(RequestBuilder::new(stub))
310 }
311
312 pub fn with_request<V: Into<crate::model::ListInstancesRequest>>(mut self, v: V) -> Self {
314 self.0.request = v.into();
315 self
316 }
317
318 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
320 self.0.options = v.into();
321 self
322 }
323
324 pub async fn send(self) -> Result<crate::model::ListInstancesResponse> {
326 (*self.0.stub)
327 .list_instances(self.0.request, self.0.options)
328 .await
329 .map(gax::response::Response::into_body)
330 }
331
332 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
336 self.0.request.parent = v.into();
337 self
338 }
339
340 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
342 self.0.request.page_token = v.into();
343 self
344 }
345 }
346
347 #[doc(hidden)]
348 impl gax::options::internal::RequestBuilder for ListInstances {
349 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
350 &mut self.0.options
351 }
352 }
353
354 #[derive(Clone, Debug)]
372 pub struct UpdateInstance(RequestBuilder<crate::model::Instance>);
373
374 impl UpdateInstance {
375 pub(crate) fn new(
376 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
377 ) -> Self {
378 Self(RequestBuilder::new(stub))
379 }
380
381 pub fn with_request<V: Into<crate::model::Instance>>(mut self, v: V) -> Self {
383 self.0.request = v.into();
384 self
385 }
386
387 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
389 self.0.options = v.into();
390 self
391 }
392
393 pub async fn send(self) -> Result<crate::model::Instance> {
395 (*self.0.stub)
396 .update_instance(self.0.request, self.0.options)
397 .await
398 .map(gax::response::Response::into_body)
399 }
400
401 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
403 self.0.request.name = v.into();
404 self
405 }
406
407 pub fn set_display_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
411 self.0.request.display_name = v.into();
412 self
413 }
414
415 pub fn set_state<T: Into<crate::model::instance::State>>(mut self, v: T) -> Self {
417 self.0.request.state = v.into();
418 self
419 }
420
421 pub fn set_type<T: Into<crate::model::instance::Type>>(mut self, v: T) -> Self {
423 self.0.request.r#type = v.into();
424 self
425 }
426
427 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
429 where
430 T: std::iter::IntoIterator<Item = (K, V)>,
431 K: std::convert::Into<std::string::String>,
432 V: std::convert::Into<std::string::String>,
433 {
434 self.0.request.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
435 self
436 }
437
438 pub fn set_create_time<T>(mut self, v: T) -> Self
440 where
441 T: std::convert::Into<wkt::Timestamp>,
442 {
443 self.0.request.create_time = std::option::Option::Some(v.into());
444 self
445 }
446
447 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
449 where
450 T: std::convert::Into<wkt::Timestamp>,
451 {
452 self.0.request.create_time = v.map(|x| x.into());
453 self
454 }
455
456 pub fn set_satisfies_pzs<T>(mut self, v: T) -> Self
458 where
459 T: std::convert::Into<bool>,
460 {
461 self.0.request.satisfies_pzs = std::option::Option::Some(v.into());
462 self
463 }
464
465 pub fn set_or_clear_satisfies_pzs<T>(mut self, v: std::option::Option<T>) -> Self
467 where
468 T: std::convert::Into<bool>,
469 {
470 self.0.request.satisfies_pzs = v.map(|x| x.into());
471 self
472 }
473
474 pub fn set_satisfies_pzi<T>(mut self, v: T) -> Self
476 where
477 T: std::convert::Into<bool>,
478 {
479 self.0.request.satisfies_pzi = std::option::Option::Some(v.into());
480 self
481 }
482
483 pub fn set_or_clear_satisfies_pzi<T>(mut self, v: std::option::Option<T>) -> Self
485 where
486 T: std::convert::Into<bool>,
487 {
488 self.0.request.satisfies_pzi = v.map(|x| x.into());
489 self
490 }
491
492 pub fn set_tags<T, K, V>(mut self, v: T) -> Self
494 where
495 T: std::iter::IntoIterator<Item = (K, V)>,
496 K: std::convert::Into<std::string::String>,
497 V: std::convert::Into<std::string::String>,
498 {
499 self.0.request.tags = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
500 self
501 }
502 }
503
504 #[doc(hidden)]
505 impl gax::options::internal::RequestBuilder for UpdateInstance {
506 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
507 &mut self.0.options
508 }
509 }
510
511 #[derive(Clone, Debug)]
530 pub struct PartialUpdateInstance(RequestBuilder<crate::model::PartialUpdateInstanceRequest>);
531
532 impl PartialUpdateInstance {
533 pub(crate) fn new(
534 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
535 ) -> Self {
536 Self(RequestBuilder::new(stub))
537 }
538
539 pub fn with_request<V: Into<crate::model::PartialUpdateInstanceRequest>>(
541 mut self,
542 v: V,
543 ) -> Self {
544 self.0.request = v.into();
545 self
546 }
547
548 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
550 self.0.options = v.into();
551 self
552 }
553
554 pub async fn send(self) -> Result<longrunning::model::Operation> {
561 (*self.0.stub)
562 .partial_update_instance(self.0.request, self.0.options)
563 .await
564 .map(gax::response::Response::into_body)
565 }
566
567 pub fn poller(
569 self,
570 ) -> impl lro::Poller<crate::model::Instance, crate::model::UpdateInstanceMetadata>
571 {
572 type Operation = lro::internal::Operation<
573 crate::model::Instance,
574 crate::model::UpdateInstanceMetadata,
575 >;
576 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
577 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
578
579 let stub = self.0.stub.clone();
580 let mut options = self.0.options.clone();
581 options.set_retry_policy(gax::retry_policy::NeverRetry);
582 let query = move |name| {
583 let stub = stub.clone();
584 let options = options.clone();
585 async {
586 let op = GetOperation::new(stub)
587 .set_name(name)
588 .with_options(options)
589 .send()
590 .await?;
591 Ok(Operation::new(op))
592 }
593 };
594
595 let start = move || async {
596 let op = self.send().await?;
597 Ok(Operation::new(op))
598 };
599
600 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
601 }
602
603 pub fn set_instance<T>(mut self, v: T) -> Self
607 where
608 T: std::convert::Into<crate::model::Instance>,
609 {
610 self.0.request.instance = std::option::Option::Some(v.into());
611 self
612 }
613
614 pub fn set_or_clear_instance<T>(mut self, v: std::option::Option<T>) -> Self
618 where
619 T: std::convert::Into<crate::model::Instance>,
620 {
621 self.0.request.instance = v.map(|x| x.into());
622 self
623 }
624
625 pub fn set_update_mask<T>(mut self, v: T) -> Self
629 where
630 T: std::convert::Into<wkt::FieldMask>,
631 {
632 self.0.request.update_mask = std::option::Option::Some(v.into());
633 self
634 }
635
636 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
640 where
641 T: std::convert::Into<wkt::FieldMask>,
642 {
643 self.0.request.update_mask = v.map(|x| x.into());
644 self
645 }
646 }
647
648 #[doc(hidden)]
649 impl gax::options::internal::RequestBuilder for PartialUpdateInstance {
650 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
651 &mut self.0.options
652 }
653 }
654
655 #[derive(Clone, Debug)]
673 pub struct DeleteInstance(RequestBuilder<crate::model::DeleteInstanceRequest>);
674
675 impl DeleteInstance {
676 pub(crate) fn new(
677 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
678 ) -> Self {
679 Self(RequestBuilder::new(stub))
680 }
681
682 pub fn with_request<V: Into<crate::model::DeleteInstanceRequest>>(mut self, v: V) -> Self {
684 self.0.request = v.into();
685 self
686 }
687
688 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
690 self.0.options = v.into();
691 self
692 }
693
694 pub async fn send(self) -> Result<()> {
696 (*self.0.stub)
697 .delete_instance(self.0.request, self.0.options)
698 .await
699 .map(gax::response::Response::into_body)
700 }
701
702 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
706 self.0.request.name = v.into();
707 self
708 }
709 }
710
711 #[doc(hidden)]
712 impl gax::options::internal::RequestBuilder for DeleteInstance {
713 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
714 &mut self.0.options
715 }
716 }
717
718 #[derive(Clone, Debug)]
737 pub struct CreateCluster(RequestBuilder<crate::model::CreateClusterRequest>);
738
739 impl CreateCluster {
740 pub(crate) fn new(
741 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
742 ) -> Self {
743 Self(RequestBuilder::new(stub))
744 }
745
746 pub fn with_request<V: Into<crate::model::CreateClusterRequest>>(mut self, v: V) -> Self {
748 self.0.request = v.into();
749 self
750 }
751
752 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
754 self.0.options = v.into();
755 self
756 }
757
758 pub async fn send(self) -> Result<longrunning::model::Operation> {
765 (*self.0.stub)
766 .create_cluster(self.0.request, self.0.options)
767 .await
768 .map(gax::response::Response::into_body)
769 }
770
771 pub fn poller(
773 self,
774 ) -> impl lro::Poller<crate::model::Cluster, crate::model::CreateClusterMetadata> {
775 type Operation = lro::internal::Operation<
776 crate::model::Cluster,
777 crate::model::CreateClusterMetadata,
778 >;
779 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
780 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
781
782 let stub = self.0.stub.clone();
783 let mut options = self.0.options.clone();
784 options.set_retry_policy(gax::retry_policy::NeverRetry);
785 let query = move |name| {
786 let stub = stub.clone();
787 let options = options.clone();
788 async {
789 let op = GetOperation::new(stub)
790 .set_name(name)
791 .with_options(options)
792 .send()
793 .await?;
794 Ok(Operation::new(op))
795 }
796 };
797
798 let start = move || async {
799 let op = self.send().await?;
800 Ok(Operation::new(op))
801 };
802
803 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
804 }
805
806 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
810 self.0.request.parent = v.into();
811 self
812 }
813
814 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
818 self.0.request.cluster_id = v.into();
819 self
820 }
821
822 pub fn set_cluster<T>(mut self, v: T) -> Self
826 where
827 T: std::convert::Into<crate::model::Cluster>,
828 {
829 self.0.request.cluster = std::option::Option::Some(v.into());
830 self
831 }
832
833 pub fn set_or_clear_cluster<T>(mut self, v: std::option::Option<T>) -> Self
837 where
838 T: std::convert::Into<crate::model::Cluster>,
839 {
840 self.0.request.cluster = v.map(|x| x.into());
841 self
842 }
843 }
844
845 #[doc(hidden)]
846 impl gax::options::internal::RequestBuilder for CreateCluster {
847 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
848 &mut self.0.options
849 }
850 }
851
852 #[derive(Clone, Debug)]
870 pub struct GetCluster(RequestBuilder<crate::model::GetClusterRequest>);
871
872 impl GetCluster {
873 pub(crate) fn new(
874 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
875 ) -> Self {
876 Self(RequestBuilder::new(stub))
877 }
878
879 pub fn with_request<V: Into<crate::model::GetClusterRequest>>(mut self, v: V) -> Self {
881 self.0.request = v.into();
882 self
883 }
884
885 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
887 self.0.options = v.into();
888 self
889 }
890
891 pub async fn send(self) -> Result<crate::model::Cluster> {
893 (*self.0.stub)
894 .get_cluster(self.0.request, self.0.options)
895 .await
896 .map(gax::response::Response::into_body)
897 }
898
899 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
903 self.0.request.name = v.into();
904 self
905 }
906 }
907
908 #[doc(hidden)]
909 impl gax::options::internal::RequestBuilder for GetCluster {
910 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
911 &mut self.0.options
912 }
913 }
914
915 #[derive(Clone, Debug)]
933 pub struct ListClusters(RequestBuilder<crate::model::ListClustersRequest>);
934
935 impl ListClusters {
936 pub(crate) fn new(
937 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
938 ) -> Self {
939 Self(RequestBuilder::new(stub))
940 }
941
942 pub fn with_request<V: Into<crate::model::ListClustersRequest>>(mut self, v: V) -> Self {
944 self.0.request = v.into();
945 self
946 }
947
948 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
950 self.0.options = v.into();
951 self
952 }
953
954 pub async fn send(self) -> Result<crate::model::ListClustersResponse> {
956 (*self.0.stub)
957 .list_clusters(self.0.request, self.0.options)
958 .await
959 .map(gax::response::Response::into_body)
960 }
961
962 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
966 self.0.request.parent = v.into();
967 self
968 }
969
970 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
972 self.0.request.page_token = v.into();
973 self
974 }
975 }
976
977 #[doc(hidden)]
978 impl gax::options::internal::RequestBuilder for ListClusters {
979 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
980 &mut self.0.options
981 }
982 }
983
984 #[derive(Clone, Debug)]
1003 pub struct UpdateCluster(RequestBuilder<crate::model::Cluster>);
1004
1005 impl UpdateCluster {
1006 pub(crate) fn new(
1007 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
1008 ) -> Self {
1009 Self(RequestBuilder::new(stub))
1010 }
1011
1012 pub fn with_request<V: Into<crate::model::Cluster>>(mut self, v: V) -> Self {
1014 self.0.request = v.into();
1015 self
1016 }
1017
1018 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1020 self.0.options = v.into();
1021 self
1022 }
1023
1024 pub async fn send(self) -> Result<longrunning::model::Operation> {
1031 (*self.0.stub)
1032 .update_cluster(self.0.request, self.0.options)
1033 .await
1034 .map(gax::response::Response::into_body)
1035 }
1036
1037 pub fn poller(
1039 self,
1040 ) -> impl lro::Poller<crate::model::Cluster, crate::model::UpdateClusterMetadata> {
1041 type Operation = lro::internal::Operation<
1042 crate::model::Cluster,
1043 crate::model::UpdateClusterMetadata,
1044 >;
1045 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1046 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1047
1048 let stub = self.0.stub.clone();
1049 let mut options = self.0.options.clone();
1050 options.set_retry_policy(gax::retry_policy::NeverRetry);
1051 let query = move |name| {
1052 let stub = stub.clone();
1053 let options = options.clone();
1054 async {
1055 let op = GetOperation::new(stub)
1056 .set_name(name)
1057 .with_options(options)
1058 .send()
1059 .await?;
1060 Ok(Operation::new(op))
1061 }
1062 };
1063
1064 let start = move || async {
1065 let op = self.send().await?;
1066 Ok(Operation::new(op))
1067 };
1068
1069 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
1070 }
1071
1072 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1074 self.0.request.name = v.into();
1075 self
1076 }
1077
1078 pub fn set_location<T: Into<std::string::String>>(mut self, v: T) -> Self {
1080 self.0.request.location = v.into();
1081 self
1082 }
1083
1084 pub fn set_state<T: Into<crate::model::cluster::State>>(mut self, v: T) -> Self {
1086 self.0.request.state = v.into();
1087 self
1088 }
1089
1090 pub fn set_serve_nodes<T: Into<i32>>(mut self, v: T) -> Self {
1092 self.0.request.serve_nodes = v.into();
1093 self
1094 }
1095
1096 pub fn set_node_scaling_factor<T: Into<crate::model::cluster::NodeScalingFactor>>(
1098 mut self,
1099 v: T,
1100 ) -> Self {
1101 self.0.request.node_scaling_factor = v.into();
1102 self
1103 }
1104
1105 pub fn set_default_storage_type<T: Into<crate::model::StorageType>>(
1107 mut self,
1108 v: T,
1109 ) -> Self {
1110 self.0.request.default_storage_type = v.into();
1111 self
1112 }
1113
1114 pub fn set_encryption_config<T>(mut self, v: T) -> Self
1116 where
1117 T: std::convert::Into<crate::model::cluster::EncryptionConfig>,
1118 {
1119 self.0.request.encryption_config = std::option::Option::Some(v.into());
1120 self
1121 }
1122
1123 pub fn set_or_clear_encryption_config<T>(mut self, v: std::option::Option<T>) -> Self
1125 where
1126 T: std::convert::Into<crate::model::cluster::EncryptionConfig>,
1127 {
1128 self.0.request.encryption_config = v.map(|x| x.into());
1129 self
1130 }
1131
1132 pub fn set_config<T: Into<Option<crate::model::cluster::Config>>>(mut self, v: T) -> Self {
1137 self.0.request.config = v.into();
1138 self
1139 }
1140
1141 pub fn set_cluster_config<
1147 T: std::convert::Into<std::boxed::Box<crate::model::cluster::ClusterConfig>>,
1148 >(
1149 mut self,
1150 v: T,
1151 ) -> Self {
1152 self.0.request = self.0.request.set_cluster_config(v);
1153 self
1154 }
1155 }
1156
1157 #[doc(hidden)]
1158 impl gax::options::internal::RequestBuilder for UpdateCluster {
1159 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1160 &mut self.0.options
1161 }
1162 }
1163
1164 #[derive(Clone, Debug)]
1183 pub struct PartialUpdateCluster(RequestBuilder<crate::model::PartialUpdateClusterRequest>);
1184
1185 impl PartialUpdateCluster {
1186 pub(crate) fn new(
1187 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
1188 ) -> Self {
1189 Self(RequestBuilder::new(stub))
1190 }
1191
1192 pub fn with_request<V: Into<crate::model::PartialUpdateClusterRequest>>(
1194 mut self,
1195 v: V,
1196 ) -> Self {
1197 self.0.request = v.into();
1198 self
1199 }
1200
1201 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1203 self.0.options = v.into();
1204 self
1205 }
1206
1207 pub async fn send(self) -> Result<longrunning::model::Operation> {
1214 (*self.0.stub)
1215 .partial_update_cluster(self.0.request, self.0.options)
1216 .await
1217 .map(gax::response::Response::into_body)
1218 }
1219
1220 pub fn poller(
1222 self,
1223 ) -> impl lro::Poller<crate::model::Cluster, crate::model::PartialUpdateClusterMetadata>
1224 {
1225 type Operation = lro::internal::Operation<
1226 crate::model::Cluster,
1227 crate::model::PartialUpdateClusterMetadata,
1228 >;
1229 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1230 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1231
1232 let stub = self.0.stub.clone();
1233 let mut options = self.0.options.clone();
1234 options.set_retry_policy(gax::retry_policy::NeverRetry);
1235 let query = move |name| {
1236 let stub = stub.clone();
1237 let options = options.clone();
1238 async {
1239 let op = GetOperation::new(stub)
1240 .set_name(name)
1241 .with_options(options)
1242 .send()
1243 .await?;
1244 Ok(Operation::new(op))
1245 }
1246 };
1247
1248 let start = move || async {
1249 let op = self.send().await?;
1250 Ok(Operation::new(op))
1251 };
1252
1253 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
1254 }
1255
1256 pub fn set_cluster<T>(mut self, v: T) -> Self
1260 where
1261 T: std::convert::Into<crate::model::Cluster>,
1262 {
1263 self.0.request.cluster = std::option::Option::Some(v.into());
1264 self
1265 }
1266
1267 pub fn set_or_clear_cluster<T>(mut self, v: std::option::Option<T>) -> Self
1271 where
1272 T: std::convert::Into<crate::model::Cluster>,
1273 {
1274 self.0.request.cluster = v.map(|x| x.into());
1275 self
1276 }
1277
1278 pub fn set_update_mask<T>(mut self, v: T) -> Self
1282 where
1283 T: std::convert::Into<wkt::FieldMask>,
1284 {
1285 self.0.request.update_mask = std::option::Option::Some(v.into());
1286 self
1287 }
1288
1289 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
1293 where
1294 T: std::convert::Into<wkt::FieldMask>,
1295 {
1296 self.0.request.update_mask = v.map(|x| x.into());
1297 self
1298 }
1299 }
1300
1301 #[doc(hidden)]
1302 impl gax::options::internal::RequestBuilder for PartialUpdateCluster {
1303 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1304 &mut self.0.options
1305 }
1306 }
1307
1308 #[derive(Clone, Debug)]
1326 pub struct DeleteCluster(RequestBuilder<crate::model::DeleteClusterRequest>);
1327
1328 impl DeleteCluster {
1329 pub(crate) fn new(
1330 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
1331 ) -> Self {
1332 Self(RequestBuilder::new(stub))
1333 }
1334
1335 pub fn with_request<V: Into<crate::model::DeleteClusterRequest>>(mut self, v: V) -> Self {
1337 self.0.request = v.into();
1338 self
1339 }
1340
1341 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1343 self.0.options = v.into();
1344 self
1345 }
1346
1347 pub async fn send(self) -> Result<()> {
1349 (*self.0.stub)
1350 .delete_cluster(self.0.request, self.0.options)
1351 .await
1352 .map(gax::response::Response::into_body)
1353 }
1354
1355 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1359 self.0.request.name = v.into();
1360 self
1361 }
1362 }
1363
1364 #[doc(hidden)]
1365 impl gax::options::internal::RequestBuilder for DeleteCluster {
1366 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1367 &mut self.0.options
1368 }
1369 }
1370
1371 #[derive(Clone, Debug)]
1389 pub struct CreateAppProfile(RequestBuilder<crate::model::CreateAppProfileRequest>);
1390
1391 impl CreateAppProfile {
1392 pub(crate) fn new(
1393 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
1394 ) -> Self {
1395 Self(RequestBuilder::new(stub))
1396 }
1397
1398 pub fn with_request<V: Into<crate::model::CreateAppProfileRequest>>(
1400 mut self,
1401 v: V,
1402 ) -> Self {
1403 self.0.request = v.into();
1404 self
1405 }
1406
1407 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1409 self.0.options = v.into();
1410 self
1411 }
1412
1413 pub async fn send(self) -> Result<crate::model::AppProfile> {
1415 (*self.0.stub)
1416 .create_app_profile(self.0.request, self.0.options)
1417 .await
1418 .map(gax::response::Response::into_body)
1419 }
1420
1421 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1425 self.0.request.parent = v.into();
1426 self
1427 }
1428
1429 pub fn set_app_profile_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1433 self.0.request.app_profile_id = v.into();
1434 self
1435 }
1436
1437 pub fn set_app_profile<T>(mut self, v: T) -> Self
1441 where
1442 T: std::convert::Into<crate::model::AppProfile>,
1443 {
1444 self.0.request.app_profile = std::option::Option::Some(v.into());
1445 self
1446 }
1447
1448 pub fn set_or_clear_app_profile<T>(mut self, v: std::option::Option<T>) -> Self
1452 where
1453 T: std::convert::Into<crate::model::AppProfile>,
1454 {
1455 self.0.request.app_profile = v.map(|x| x.into());
1456 self
1457 }
1458
1459 pub fn set_ignore_warnings<T: Into<bool>>(mut self, v: T) -> Self {
1461 self.0.request.ignore_warnings = v.into();
1462 self
1463 }
1464 }
1465
1466 #[doc(hidden)]
1467 impl gax::options::internal::RequestBuilder for CreateAppProfile {
1468 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1469 &mut self.0.options
1470 }
1471 }
1472
1473 #[derive(Clone, Debug)]
1491 pub struct GetAppProfile(RequestBuilder<crate::model::GetAppProfileRequest>);
1492
1493 impl GetAppProfile {
1494 pub(crate) fn new(
1495 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
1496 ) -> Self {
1497 Self(RequestBuilder::new(stub))
1498 }
1499
1500 pub fn with_request<V: Into<crate::model::GetAppProfileRequest>>(mut self, v: V) -> Self {
1502 self.0.request = v.into();
1503 self
1504 }
1505
1506 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1508 self.0.options = v.into();
1509 self
1510 }
1511
1512 pub async fn send(self) -> Result<crate::model::AppProfile> {
1514 (*self.0.stub)
1515 .get_app_profile(self.0.request, self.0.options)
1516 .await
1517 .map(gax::response::Response::into_body)
1518 }
1519
1520 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1524 self.0.request.name = v.into();
1525 self
1526 }
1527 }
1528
1529 #[doc(hidden)]
1530 impl gax::options::internal::RequestBuilder for GetAppProfile {
1531 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1532 &mut self.0.options
1533 }
1534 }
1535
1536 #[derive(Clone, Debug)]
1558 pub struct ListAppProfiles(RequestBuilder<crate::model::ListAppProfilesRequest>);
1559
1560 impl ListAppProfiles {
1561 pub(crate) fn new(
1562 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
1563 ) -> Self {
1564 Self(RequestBuilder::new(stub))
1565 }
1566
1567 pub fn with_request<V: Into<crate::model::ListAppProfilesRequest>>(mut self, v: V) -> Self {
1569 self.0.request = v.into();
1570 self
1571 }
1572
1573 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1575 self.0.options = v.into();
1576 self
1577 }
1578
1579 pub async fn send(self) -> Result<crate::model::ListAppProfilesResponse> {
1581 (*self.0.stub)
1582 .list_app_profiles(self.0.request, self.0.options)
1583 .await
1584 .map(gax::response::Response::into_body)
1585 }
1586
1587 pub fn by_page(
1589 self,
1590 ) -> impl gax::paginator::Paginator<crate::model::ListAppProfilesResponse, gax::error::Error>
1591 {
1592 use std::clone::Clone;
1593 let token = self.0.request.page_token.clone();
1594 let execute = move |token: String| {
1595 let mut builder = self.clone();
1596 builder.0.request = builder.0.request.set_page_token(token);
1597 builder.send()
1598 };
1599 gax::paginator::internal::new_paginator(token, execute)
1600 }
1601
1602 pub fn by_item(
1604 self,
1605 ) -> impl gax::paginator::ItemPaginator<crate::model::ListAppProfilesResponse, gax::error::Error>
1606 {
1607 use gax::paginator::Paginator;
1608 self.by_page().items()
1609 }
1610
1611 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1615 self.0.request.parent = v.into();
1616 self
1617 }
1618
1619 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1621 self.0.request.page_size = v.into();
1622 self
1623 }
1624
1625 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1627 self.0.request.page_token = v.into();
1628 self
1629 }
1630 }
1631
1632 #[doc(hidden)]
1633 impl gax::options::internal::RequestBuilder for ListAppProfiles {
1634 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1635 &mut self.0.options
1636 }
1637 }
1638
1639 #[derive(Clone, Debug)]
1658 pub struct UpdateAppProfile(RequestBuilder<crate::model::UpdateAppProfileRequest>);
1659
1660 impl UpdateAppProfile {
1661 pub(crate) fn new(
1662 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
1663 ) -> Self {
1664 Self(RequestBuilder::new(stub))
1665 }
1666
1667 pub fn with_request<V: Into<crate::model::UpdateAppProfileRequest>>(
1669 mut self,
1670 v: V,
1671 ) -> Self {
1672 self.0.request = v.into();
1673 self
1674 }
1675
1676 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1678 self.0.options = v.into();
1679 self
1680 }
1681
1682 pub async fn send(self) -> Result<longrunning::model::Operation> {
1689 (*self.0.stub)
1690 .update_app_profile(self.0.request, self.0.options)
1691 .await
1692 .map(gax::response::Response::into_body)
1693 }
1694
1695 pub fn poller(
1697 self,
1698 ) -> impl lro::Poller<crate::model::AppProfile, crate::model::UpdateAppProfileMetadata>
1699 {
1700 type Operation = lro::internal::Operation<
1701 crate::model::AppProfile,
1702 crate::model::UpdateAppProfileMetadata,
1703 >;
1704 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1705 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1706
1707 let stub = self.0.stub.clone();
1708 let mut options = self.0.options.clone();
1709 options.set_retry_policy(gax::retry_policy::NeverRetry);
1710 let query = move |name| {
1711 let stub = stub.clone();
1712 let options = options.clone();
1713 async {
1714 let op = GetOperation::new(stub)
1715 .set_name(name)
1716 .with_options(options)
1717 .send()
1718 .await?;
1719 Ok(Operation::new(op))
1720 }
1721 };
1722
1723 let start = move || async {
1724 let op = self.send().await?;
1725 Ok(Operation::new(op))
1726 };
1727
1728 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
1729 }
1730
1731 pub fn set_app_profile<T>(mut self, v: T) -> Self
1735 where
1736 T: std::convert::Into<crate::model::AppProfile>,
1737 {
1738 self.0.request.app_profile = std::option::Option::Some(v.into());
1739 self
1740 }
1741
1742 pub fn set_or_clear_app_profile<T>(mut self, v: std::option::Option<T>) -> Self
1746 where
1747 T: std::convert::Into<crate::model::AppProfile>,
1748 {
1749 self.0.request.app_profile = v.map(|x| x.into());
1750 self
1751 }
1752
1753 pub fn set_update_mask<T>(mut self, v: T) -> Self
1757 where
1758 T: std::convert::Into<wkt::FieldMask>,
1759 {
1760 self.0.request.update_mask = std::option::Option::Some(v.into());
1761 self
1762 }
1763
1764 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
1768 where
1769 T: std::convert::Into<wkt::FieldMask>,
1770 {
1771 self.0.request.update_mask = v.map(|x| x.into());
1772 self
1773 }
1774
1775 pub fn set_ignore_warnings<T: Into<bool>>(mut self, v: T) -> Self {
1777 self.0.request.ignore_warnings = v.into();
1778 self
1779 }
1780 }
1781
1782 #[doc(hidden)]
1783 impl gax::options::internal::RequestBuilder for UpdateAppProfile {
1784 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1785 &mut self.0.options
1786 }
1787 }
1788
1789 #[derive(Clone, Debug)]
1807 pub struct DeleteAppProfile(RequestBuilder<crate::model::DeleteAppProfileRequest>);
1808
1809 impl DeleteAppProfile {
1810 pub(crate) fn new(
1811 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
1812 ) -> Self {
1813 Self(RequestBuilder::new(stub))
1814 }
1815
1816 pub fn with_request<V: Into<crate::model::DeleteAppProfileRequest>>(
1818 mut self,
1819 v: V,
1820 ) -> Self {
1821 self.0.request = v.into();
1822 self
1823 }
1824
1825 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1827 self.0.options = v.into();
1828 self
1829 }
1830
1831 pub async fn send(self) -> Result<()> {
1833 (*self.0.stub)
1834 .delete_app_profile(self.0.request, self.0.options)
1835 .await
1836 .map(gax::response::Response::into_body)
1837 }
1838
1839 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1843 self.0.request.name = v.into();
1844 self
1845 }
1846
1847 pub fn set_ignore_warnings<T: Into<bool>>(mut self, v: T) -> Self {
1851 self.0.request.ignore_warnings = v.into();
1852 self
1853 }
1854 }
1855
1856 #[doc(hidden)]
1857 impl gax::options::internal::RequestBuilder for DeleteAppProfile {
1858 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1859 &mut self.0.options
1860 }
1861 }
1862
1863 #[derive(Clone, Debug)]
1881 pub struct GetIamPolicy(RequestBuilder<iam_v1::model::GetIamPolicyRequest>);
1882
1883 impl GetIamPolicy {
1884 pub(crate) fn new(
1885 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
1886 ) -> Self {
1887 Self(RequestBuilder::new(stub))
1888 }
1889
1890 pub fn with_request<V: Into<iam_v1::model::GetIamPolicyRequest>>(mut self, v: V) -> Self {
1892 self.0.request = v.into();
1893 self
1894 }
1895
1896 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1898 self.0.options = v.into();
1899 self
1900 }
1901
1902 pub async fn send(self) -> Result<iam_v1::model::Policy> {
1904 (*self.0.stub)
1905 .get_iam_policy(self.0.request, self.0.options)
1906 .await
1907 .map(gax::response::Response::into_body)
1908 }
1909
1910 pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
1914 self.0.request.resource = v.into();
1915 self
1916 }
1917
1918 pub fn set_options<T>(mut self, v: T) -> Self
1920 where
1921 T: std::convert::Into<iam_v1::model::GetPolicyOptions>,
1922 {
1923 self.0.request.options = std::option::Option::Some(v.into());
1924 self
1925 }
1926
1927 pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
1929 where
1930 T: std::convert::Into<iam_v1::model::GetPolicyOptions>,
1931 {
1932 self.0.request.options = v.map(|x| x.into());
1933 self
1934 }
1935 }
1936
1937 #[doc(hidden)]
1938 impl gax::options::internal::RequestBuilder for GetIamPolicy {
1939 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1940 &mut self.0.options
1941 }
1942 }
1943
1944 #[derive(Clone, Debug)]
1962 pub struct SetIamPolicy(RequestBuilder<iam_v1::model::SetIamPolicyRequest>);
1963
1964 impl SetIamPolicy {
1965 pub(crate) fn new(
1966 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
1967 ) -> Self {
1968 Self(RequestBuilder::new(stub))
1969 }
1970
1971 pub fn with_request<V: Into<iam_v1::model::SetIamPolicyRequest>>(mut self, v: V) -> Self {
1973 self.0.request = v.into();
1974 self
1975 }
1976
1977 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1979 self.0.options = v.into();
1980 self
1981 }
1982
1983 pub async fn send(self) -> Result<iam_v1::model::Policy> {
1985 (*self.0.stub)
1986 .set_iam_policy(self.0.request, self.0.options)
1987 .await
1988 .map(gax::response::Response::into_body)
1989 }
1990
1991 pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
1995 self.0.request.resource = v.into();
1996 self
1997 }
1998
1999 pub fn set_policy<T>(mut self, v: T) -> Self
2003 where
2004 T: std::convert::Into<iam_v1::model::Policy>,
2005 {
2006 self.0.request.policy = std::option::Option::Some(v.into());
2007 self
2008 }
2009
2010 pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
2014 where
2015 T: std::convert::Into<iam_v1::model::Policy>,
2016 {
2017 self.0.request.policy = v.map(|x| x.into());
2018 self
2019 }
2020
2021 pub fn set_update_mask<T>(mut self, v: T) -> Self
2023 where
2024 T: std::convert::Into<wkt::FieldMask>,
2025 {
2026 self.0.request.update_mask = std::option::Option::Some(v.into());
2027 self
2028 }
2029
2030 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
2032 where
2033 T: std::convert::Into<wkt::FieldMask>,
2034 {
2035 self.0.request.update_mask = v.map(|x| x.into());
2036 self
2037 }
2038 }
2039
2040 #[doc(hidden)]
2041 impl gax::options::internal::RequestBuilder for SetIamPolicy {
2042 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2043 &mut self.0.options
2044 }
2045 }
2046
2047 #[derive(Clone, Debug)]
2065 pub struct TestIamPermissions(RequestBuilder<iam_v1::model::TestIamPermissionsRequest>);
2066
2067 impl TestIamPermissions {
2068 pub(crate) fn new(
2069 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
2070 ) -> Self {
2071 Self(RequestBuilder::new(stub))
2072 }
2073
2074 pub fn with_request<V: Into<iam_v1::model::TestIamPermissionsRequest>>(
2076 mut self,
2077 v: V,
2078 ) -> Self {
2079 self.0.request = v.into();
2080 self
2081 }
2082
2083 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2085 self.0.options = v.into();
2086 self
2087 }
2088
2089 pub async fn send(self) -> Result<iam_v1::model::TestIamPermissionsResponse> {
2091 (*self.0.stub)
2092 .test_iam_permissions(self.0.request, self.0.options)
2093 .await
2094 .map(gax::response::Response::into_body)
2095 }
2096
2097 pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
2101 self.0.request.resource = v.into();
2102 self
2103 }
2104
2105 pub fn set_permissions<T, V>(mut self, v: T) -> Self
2109 where
2110 T: std::iter::IntoIterator<Item = V>,
2111 V: std::convert::Into<std::string::String>,
2112 {
2113 use std::iter::Iterator;
2114 self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
2115 self
2116 }
2117 }
2118
2119 #[doc(hidden)]
2120 impl gax::options::internal::RequestBuilder for TestIamPermissions {
2121 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2122 &mut self.0.options
2123 }
2124 }
2125
2126 #[derive(Clone, Debug)]
2148 pub struct ListHotTablets(RequestBuilder<crate::model::ListHotTabletsRequest>);
2149
2150 impl ListHotTablets {
2151 pub(crate) fn new(
2152 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
2153 ) -> Self {
2154 Self(RequestBuilder::new(stub))
2155 }
2156
2157 pub fn with_request<V: Into<crate::model::ListHotTabletsRequest>>(mut self, v: V) -> Self {
2159 self.0.request = v.into();
2160 self
2161 }
2162
2163 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2165 self.0.options = v.into();
2166 self
2167 }
2168
2169 pub async fn send(self) -> Result<crate::model::ListHotTabletsResponse> {
2171 (*self.0.stub)
2172 .list_hot_tablets(self.0.request, self.0.options)
2173 .await
2174 .map(gax::response::Response::into_body)
2175 }
2176
2177 pub fn by_page(
2179 self,
2180 ) -> impl gax::paginator::Paginator<crate::model::ListHotTabletsResponse, gax::error::Error>
2181 {
2182 use std::clone::Clone;
2183 let token = self.0.request.page_token.clone();
2184 let execute = move |token: String| {
2185 let mut builder = self.clone();
2186 builder.0.request = builder.0.request.set_page_token(token);
2187 builder.send()
2188 };
2189 gax::paginator::internal::new_paginator(token, execute)
2190 }
2191
2192 pub fn by_item(
2194 self,
2195 ) -> impl gax::paginator::ItemPaginator<crate::model::ListHotTabletsResponse, gax::error::Error>
2196 {
2197 use gax::paginator::Paginator;
2198 self.by_page().items()
2199 }
2200
2201 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2205 self.0.request.parent = v.into();
2206 self
2207 }
2208
2209 pub fn set_start_time<T>(mut self, v: T) -> Self
2211 where
2212 T: std::convert::Into<wkt::Timestamp>,
2213 {
2214 self.0.request.start_time = std::option::Option::Some(v.into());
2215 self
2216 }
2217
2218 pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
2220 where
2221 T: std::convert::Into<wkt::Timestamp>,
2222 {
2223 self.0.request.start_time = v.map(|x| x.into());
2224 self
2225 }
2226
2227 pub fn set_end_time<T>(mut self, v: T) -> Self
2229 where
2230 T: std::convert::Into<wkt::Timestamp>,
2231 {
2232 self.0.request.end_time = std::option::Option::Some(v.into());
2233 self
2234 }
2235
2236 pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
2238 where
2239 T: std::convert::Into<wkt::Timestamp>,
2240 {
2241 self.0.request.end_time = v.map(|x| x.into());
2242 self
2243 }
2244
2245 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2247 self.0.request.page_size = v.into();
2248 self
2249 }
2250
2251 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2253 self.0.request.page_token = v.into();
2254 self
2255 }
2256 }
2257
2258 #[doc(hidden)]
2259 impl gax::options::internal::RequestBuilder for ListHotTablets {
2260 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2261 &mut self.0.options
2262 }
2263 }
2264
2265 #[derive(Clone, Debug)]
2284 pub struct CreateLogicalView(RequestBuilder<crate::model::CreateLogicalViewRequest>);
2285
2286 impl CreateLogicalView {
2287 pub(crate) fn new(
2288 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
2289 ) -> Self {
2290 Self(RequestBuilder::new(stub))
2291 }
2292
2293 pub fn with_request<V: Into<crate::model::CreateLogicalViewRequest>>(
2295 mut self,
2296 v: V,
2297 ) -> Self {
2298 self.0.request = v.into();
2299 self
2300 }
2301
2302 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2304 self.0.options = v.into();
2305 self
2306 }
2307
2308 pub async fn send(self) -> Result<longrunning::model::Operation> {
2315 (*self.0.stub)
2316 .create_logical_view(self.0.request, self.0.options)
2317 .await
2318 .map(gax::response::Response::into_body)
2319 }
2320
2321 pub fn poller(
2323 self,
2324 ) -> impl lro::Poller<crate::model::LogicalView, crate::model::CreateLogicalViewMetadata>
2325 {
2326 type Operation = lro::internal::Operation<
2327 crate::model::LogicalView,
2328 crate::model::CreateLogicalViewMetadata,
2329 >;
2330 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2331 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2332
2333 let stub = self.0.stub.clone();
2334 let mut options = self.0.options.clone();
2335 options.set_retry_policy(gax::retry_policy::NeverRetry);
2336 let query = move |name| {
2337 let stub = stub.clone();
2338 let options = options.clone();
2339 async {
2340 let op = GetOperation::new(stub)
2341 .set_name(name)
2342 .with_options(options)
2343 .send()
2344 .await?;
2345 Ok(Operation::new(op))
2346 }
2347 };
2348
2349 let start = move || async {
2350 let op = self.send().await?;
2351 Ok(Operation::new(op))
2352 };
2353
2354 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
2355 }
2356
2357 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2361 self.0.request.parent = v.into();
2362 self
2363 }
2364
2365 pub fn set_logical_view_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2369 self.0.request.logical_view_id = v.into();
2370 self
2371 }
2372
2373 pub fn set_logical_view<T>(mut self, v: T) -> Self
2377 where
2378 T: std::convert::Into<crate::model::LogicalView>,
2379 {
2380 self.0.request.logical_view = std::option::Option::Some(v.into());
2381 self
2382 }
2383
2384 pub fn set_or_clear_logical_view<T>(mut self, v: std::option::Option<T>) -> Self
2388 where
2389 T: std::convert::Into<crate::model::LogicalView>,
2390 {
2391 self.0.request.logical_view = v.map(|x| x.into());
2392 self
2393 }
2394 }
2395
2396 #[doc(hidden)]
2397 impl gax::options::internal::RequestBuilder for CreateLogicalView {
2398 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2399 &mut self.0.options
2400 }
2401 }
2402
2403 #[derive(Clone, Debug)]
2421 pub struct GetLogicalView(RequestBuilder<crate::model::GetLogicalViewRequest>);
2422
2423 impl GetLogicalView {
2424 pub(crate) fn new(
2425 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
2426 ) -> Self {
2427 Self(RequestBuilder::new(stub))
2428 }
2429
2430 pub fn with_request<V: Into<crate::model::GetLogicalViewRequest>>(mut self, v: V) -> Self {
2432 self.0.request = v.into();
2433 self
2434 }
2435
2436 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2438 self.0.options = v.into();
2439 self
2440 }
2441
2442 pub async fn send(self) -> Result<crate::model::LogicalView> {
2444 (*self.0.stub)
2445 .get_logical_view(self.0.request, self.0.options)
2446 .await
2447 .map(gax::response::Response::into_body)
2448 }
2449
2450 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2454 self.0.request.name = v.into();
2455 self
2456 }
2457 }
2458
2459 #[doc(hidden)]
2460 impl gax::options::internal::RequestBuilder for GetLogicalView {
2461 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2462 &mut self.0.options
2463 }
2464 }
2465
2466 #[derive(Clone, Debug)]
2488 pub struct ListLogicalViews(RequestBuilder<crate::model::ListLogicalViewsRequest>);
2489
2490 impl ListLogicalViews {
2491 pub(crate) fn new(
2492 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
2493 ) -> Self {
2494 Self(RequestBuilder::new(stub))
2495 }
2496
2497 pub fn with_request<V: Into<crate::model::ListLogicalViewsRequest>>(
2499 mut self,
2500 v: V,
2501 ) -> Self {
2502 self.0.request = v.into();
2503 self
2504 }
2505
2506 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2508 self.0.options = v.into();
2509 self
2510 }
2511
2512 pub async fn send(self) -> Result<crate::model::ListLogicalViewsResponse> {
2514 (*self.0.stub)
2515 .list_logical_views(self.0.request, self.0.options)
2516 .await
2517 .map(gax::response::Response::into_body)
2518 }
2519
2520 pub fn by_page(
2522 self,
2523 ) -> impl gax::paginator::Paginator<crate::model::ListLogicalViewsResponse, gax::error::Error>
2524 {
2525 use std::clone::Clone;
2526 let token = self.0.request.page_token.clone();
2527 let execute = move |token: String| {
2528 let mut builder = self.clone();
2529 builder.0.request = builder.0.request.set_page_token(token);
2530 builder.send()
2531 };
2532 gax::paginator::internal::new_paginator(token, execute)
2533 }
2534
2535 pub fn by_item(
2537 self,
2538 ) -> impl gax::paginator::ItemPaginator<crate::model::ListLogicalViewsResponse, gax::error::Error>
2539 {
2540 use gax::paginator::Paginator;
2541 self.by_page().items()
2542 }
2543
2544 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2548 self.0.request.parent = v.into();
2549 self
2550 }
2551
2552 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2554 self.0.request.page_size = v.into();
2555 self
2556 }
2557
2558 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2560 self.0.request.page_token = v.into();
2561 self
2562 }
2563 }
2564
2565 #[doc(hidden)]
2566 impl gax::options::internal::RequestBuilder for ListLogicalViews {
2567 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2568 &mut self.0.options
2569 }
2570 }
2571
2572 #[derive(Clone, Debug)]
2591 pub struct UpdateLogicalView(RequestBuilder<crate::model::UpdateLogicalViewRequest>);
2592
2593 impl UpdateLogicalView {
2594 pub(crate) fn new(
2595 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
2596 ) -> Self {
2597 Self(RequestBuilder::new(stub))
2598 }
2599
2600 pub fn with_request<V: Into<crate::model::UpdateLogicalViewRequest>>(
2602 mut self,
2603 v: V,
2604 ) -> Self {
2605 self.0.request = v.into();
2606 self
2607 }
2608
2609 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2611 self.0.options = v.into();
2612 self
2613 }
2614
2615 pub async fn send(self) -> Result<longrunning::model::Operation> {
2622 (*self.0.stub)
2623 .update_logical_view(self.0.request, self.0.options)
2624 .await
2625 .map(gax::response::Response::into_body)
2626 }
2627
2628 pub fn poller(
2630 self,
2631 ) -> impl lro::Poller<crate::model::LogicalView, crate::model::UpdateLogicalViewMetadata>
2632 {
2633 type Operation = lro::internal::Operation<
2634 crate::model::LogicalView,
2635 crate::model::UpdateLogicalViewMetadata,
2636 >;
2637 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2638 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2639
2640 let stub = self.0.stub.clone();
2641 let mut options = self.0.options.clone();
2642 options.set_retry_policy(gax::retry_policy::NeverRetry);
2643 let query = move |name| {
2644 let stub = stub.clone();
2645 let options = options.clone();
2646 async {
2647 let op = GetOperation::new(stub)
2648 .set_name(name)
2649 .with_options(options)
2650 .send()
2651 .await?;
2652 Ok(Operation::new(op))
2653 }
2654 };
2655
2656 let start = move || async {
2657 let op = self.send().await?;
2658 Ok(Operation::new(op))
2659 };
2660
2661 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
2662 }
2663
2664 pub fn set_logical_view<T>(mut self, v: T) -> Self
2668 where
2669 T: std::convert::Into<crate::model::LogicalView>,
2670 {
2671 self.0.request.logical_view = std::option::Option::Some(v.into());
2672 self
2673 }
2674
2675 pub fn set_or_clear_logical_view<T>(mut self, v: std::option::Option<T>) -> Self
2679 where
2680 T: std::convert::Into<crate::model::LogicalView>,
2681 {
2682 self.0.request.logical_view = v.map(|x| x.into());
2683 self
2684 }
2685
2686 pub fn set_update_mask<T>(mut self, v: T) -> Self
2688 where
2689 T: std::convert::Into<wkt::FieldMask>,
2690 {
2691 self.0.request.update_mask = std::option::Option::Some(v.into());
2692 self
2693 }
2694
2695 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
2697 where
2698 T: std::convert::Into<wkt::FieldMask>,
2699 {
2700 self.0.request.update_mask = v.map(|x| x.into());
2701 self
2702 }
2703 }
2704
2705 #[doc(hidden)]
2706 impl gax::options::internal::RequestBuilder for UpdateLogicalView {
2707 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2708 &mut self.0.options
2709 }
2710 }
2711
2712 #[derive(Clone, Debug)]
2730 pub struct DeleteLogicalView(RequestBuilder<crate::model::DeleteLogicalViewRequest>);
2731
2732 impl DeleteLogicalView {
2733 pub(crate) fn new(
2734 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
2735 ) -> Self {
2736 Self(RequestBuilder::new(stub))
2737 }
2738
2739 pub fn with_request<V: Into<crate::model::DeleteLogicalViewRequest>>(
2741 mut self,
2742 v: V,
2743 ) -> Self {
2744 self.0.request = v.into();
2745 self
2746 }
2747
2748 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2750 self.0.options = v.into();
2751 self
2752 }
2753
2754 pub async fn send(self) -> Result<()> {
2756 (*self.0.stub)
2757 .delete_logical_view(self.0.request, self.0.options)
2758 .await
2759 .map(gax::response::Response::into_body)
2760 }
2761
2762 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2766 self.0.request.name = v.into();
2767 self
2768 }
2769
2770 pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
2772 self.0.request.etag = v.into();
2773 self
2774 }
2775 }
2776
2777 #[doc(hidden)]
2778 impl gax::options::internal::RequestBuilder for DeleteLogicalView {
2779 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2780 &mut self.0.options
2781 }
2782 }
2783
2784 #[derive(Clone, Debug)]
2803 pub struct CreateMaterializedView(RequestBuilder<crate::model::CreateMaterializedViewRequest>);
2804
2805 impl CreateMaterializedView {
2806 pub(crate) fn new(
2807 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
2808 ) -> Self {
2809 Self(RequestBuilder::new(stub))
2810 }
2811
2812 pub fn with_request<V: Into<crate::model::CreateMaterializedViewRequest>>(
2814 mut self,
2815 v: V,
2816 ) -> Self {
2817 self.0.request = v.into();
2818 self
2819 }
2820
2821 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2823 self.0.options = v.into();
2824 self
2825 }
2826
2827 pub async fn send(self) -> Result<longrunning::model::Operation> {
2834 (*self.0.stub)
2835 .create_materialized_view(self.0.request, self.0.options)
2836 .await
2837 .map(gax::response::Response::into_body)
2838 }
2839
2840 pub fn poller(
2842 self,
2843 ) -> impl lro::Poller<crate::model::MaterializedView, crate::model::CreateMaterializedViewMetadata>
2844 {
2845 type Operation = lro::internal::Operation<
2846 crate::model::MaterializedView,
2847 crate::model::CreateMaterializedViewMetadata,
2848 >;
2849 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2850 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2851
2852 let stub = self.0.stub.clone();
2853 let mut options = self.0.options.clone();
2854 options.set_retry_policy(gax::retry_policy::NeverRetry);
2855 let query = move |name| {
2856 let stub = stub.clone();
2857 let options = options.clone();
2858 async {
2859 let op = GetOperation::new(stub)
2860 .set_name(name)
2861 .with_options(options)
2862 .send()
2863 .await?;
2864 Ok(Operation::new(op))
2865 }
2866 };
2867
2868 let start = move || async {
2869 let op = self.send().await?;
2870 Ok(Operation::new(op))
2871 };
2872
2873 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
2874 }
2875
2876 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2880 self.0.request.parent = v.into();
2881 self
2882 }
2883
2884 pub fn set_materialized_view_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2888 self.0.request.materialized_view_id = v.into();
2889 self
2890 }
2891
2892 pub fn set_materialized_view<T>(mut self, v: T) -> Self
2896 where
2897 T: std::convert::Into<crate::model::MaterializedView>,
2898 {
2899 self.0.request.materialized_view = std::option::Option::Some(v.into());
2900 self
2901 }
2902
2903 pub fn set_or_clear_materialized_view<T>(mut self, v: std::option::Option<T>) -> Self
2907 where
2908 T: std::convert::Into<crate::model::MaterializedView>,
2909 {
2910 self.0.request.materialized_view = v.map(|x| x.into());
2911 self
2912 }
2913 }
2914
2915 #[doc(hidden)]
2916 impl gax::options::internal::RequestBuilder for CreateMaterializedView {
2917 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2918 &mut self.0.options
2919 }
2920 }
2921
2922 #[derive(Clone, Debug)]
2940 pub struct GetMaterializedView(RequestBuilder<crate::model::GetMaterializedViewRequest>);
2941
2942 impl GetMaterializedView {
2943 pub(crate) fn new(
2944 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
2945 ) -> Self {
2946 Self(RequestBuilder::new(stub))
2947 }
2948
2949 pub fn with_request<V: Into<crate::model::GetMaterializedViewRequest>>(
2951 mut self,
2952 v: V,
2953 ) -> Self {
2954 self.0.request = v.into();
2955 self
2956 }
2957
2958 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2960 self.0.options = v.into();
2961 self
2962 }
2963
2964 pub async fn send(self) -> Result<crate::model::MaterializedView> {
2966 (*self.0.stub)
2967 .get_materialized_view(self.0.request, self.0.options)
2968 .await
2969 .map(gax::response::Response::into_body)
2970 }
2971
2972 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2976 self.0.request.name = v.into();
2977 self
2978 }
2979 }
2980
2981 #[doc(hidden)]
2982 impl gax::options::internal::RequestBuilder for GetMaterializedView {
2983 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2984 &mut self.0.options
2985 }
2986 }
2987
2988 #[derive(Clone, Debug)]
3010 pub struct ListMaterializedViews(RequestBuilder<crate::model::ListMaterializedViewsRequest>);
3011
3012 impl ListMaterializedViews {
3013 pub(crate) fn new(
3014 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
3015 ) -> Self {
3016 Self(RequestBuilder::new(stub))
3017 }
3018
3019 pub fn with_request<V: Into<crate::model::ListMaterializedViewsRequest>>(
3021 mut self,
3022 v: V,
3023 ) -> Self {
3024 self.0.request = v.into();
3025 self
3026 }
3027
3028 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3030 self.0.options = v.into();
3031 self
3032 }
3033
3034 pub async fn send(self) -> Result<crate::model::ListMaterializedViewsResponse> {
3036 (*self.0.stub)
3037 .list_materialized_views(self.0.request, self.0.options)
3038 .await
3039 .map(gax::response::Response::into_body)
3040 }
3041
3042 pub fn by_page(
3044 self,
3045 ) -> impl gax::paginator::Paginator<crate::model::ListMaterializedViewsResponse, gax::error::Error>
3046 {
3047 use std::clone::Clone;
3048 let token = self.0.request.page_token.clone();
3049 let execute = move |token: String| {
3050 let mut builder = self.clone();
3051 builder.0.request = builder.0.request.set_page_token(token);
3052 builder.send()
3053 };
3054 gax::paginator::internal::new_paginator(token, execute)
3055 }
3056
3057 pub fn by_item(
3059 self,
3060 ) -> impl gax::paginator::ItemPaginator<
3061 crate::model::ListMaterializedViewsResponse,
3062 gax::error::Error,
3063 > {
3064 use gax::paginator::Paginator;
3065 self.by_page().items()
3066 }
3067
3068 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3072 self.0.request.parent = v.into();
3073 self
3074 }
3075
3076 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
3078 self.0.request.page_size = v.into();
3079 self
3080 }
3081
3082 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
3084 self.0.request.page_token = v.into();
3085 self
3086 }
3087 }
3088
3089 #[doc(hidden)]
3090 impl gax::options::internal::RequestBuilder for ListMaterializedViews {
3091 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3092 &mut self.0.options
3093 }
3094 }
3095
3096 #[derive(Clone, Debug)]
3115 pub struct UpdateMaterializedView(RequestBuilder<crate::model::UpdateMaterializedViewRequest>);
3116
3117 impl UpdateMaterializedView {
3118 pub(crate) fn new(
3119 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
3120 ) -> Self {
3121 Self(RequestBuilder::new(stub))
3122 }
3123
3124 pub fn with_request<V: Into<crate::model::UpdateMaterializedViewRequest>>(
3126 mut self,
3127 v: V,
3128 ) -> Self {
3129 self.0.request = v.into();
3130 self
3131 }
3132
3133 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3135 self.0.options = v.into();
3136 self
3137 }
3138
3139 pub async fn send(self) -> Result<longrunning::model::Operation> {
3146 (*self.0.stub)
3147 .update_materialized_view(self.0.request, self.0.options)
3148 .await
3149 .map(gax::response::Response::into_body)
3150 }
3151
3152 pub fn poller(
3154 self,
3155 ) -> impl lro::Poller<crate::model::MaterializedView, crate::model::UpdateMaterializedViewMetadata>
3156 {
3157 type Operation = lro::internal::Operation<
3158 crate::model::MaterializedView,
3159 crate::model::UpdateMaterializedViewMetadata,
3160 >;
3161 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3162 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3163
3164 let stub = self.0.stub.clone();
3165 let mut options = self.0.options.clone();
3166 options.set_retry_policy(gax::retry_policy::NeverRetry);
3167 let query = move |name| {
3168 let stub = stub.clone();
3169 let options = options.clone();
3170 async {
3171 let op = GetOperation::new(stub)
3172 .set_name(name)
3173 .with_options(options)
3174 .send()
3175 .await?;
3176 Ok(Operation::new(op))
3177 }
3178 };
3179
3180 let start = move || async {
3181 let op = self.send().await?;
3182 Ok(Operation::new(op))
3183 };
3184
3185 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
3186 }
3187
3188 pub fn set_materialized_view<T>(mut self, v: T) -> Self
3192 where
3193 T: std::convert::Into<crate::model::MaterializedView>,
3194 {
3195 self.0.request.materialized_view = std::option::Option::Some(v.into());
3196 self
3197 }
3198
3199 pub fn set_or_clear_materialized_view<T>(mut self, v: std::option::Option<T>) -> Self
3203 where
3204 T: std::convert::Into<crate::model::MaterializedView>,
3205 {
3206 self.0.request.materialized_view = v.map(|x| x.into());
3207 self
3208 }
3209
3210 pub fn set_update_mask<T>(mut self, v: T) -> Self
3212 where
3213 T: std::convert::Into<wkt::FieldMask>,
3214 {
3215 self.0.request.update_mask = std::option::Option::Some(v.into());
3216 self
3217 }
3218
3219 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
3221 where
3222 T: std::convert::Into<wkt::FieldMask>,
3223 {
3224 self.0.request.update_mask = v.map(|x| x.into());
3225 self
3226 }
3227 }
3228
3229 #[doc(hidden)]
3230 impl gax::options::internal::RequestBuilder for UpdateMaterializedView {
3231 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3232 &mut self.0.options
3233 }
3234 }
3235
3236 #[derive(Clone, Debug)]
3254 pub struct DeleteMaterializedView(RequestBuilder<crate::model::DeleteMaterializedViewRequest>);
3255
3256 impl DeleteMaterializedView {
3257 pub(crate) fn new(
3258 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
3259 ) -> Self {
3260 Self(RequestBuilder::new(stub))
3261 }
3262
3263 pub fn with_request<V: Into<crate::model::DeleteMaterializedViewRequest>>(
3265 mut self,
3266 v: V,
3267 ) -> Self {
3268 self.0.request = v.into();
3269 self
3270 }
3271
3272 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3274 self.0.options = v.into();
3275 self
3276 }
3277
3278 pub async fn send(self) -> Result<()> {
3280 (*self.0.stub)
3281 .delete_materialized_view(self.0.request, self.0.options)
3282 .await
3283 .map(gax::response::Response::into_body)
3284 }
3285
3286 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3290 self.0.request.name = v.into();
3291 self
3292 }
3293
3294 pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
3296 self.0.request.etag = v.into();
3297 self
3298 }
3299 }
3300
3301 #[doc(hidden)]
3302 impl gax::options::internal::RequestBuilder for DeleteMaterializedView {
3303 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3304 &mut self.0.options
3305 }
3306 }
3307
3308 #[derive(Clone, Debug)]
3330 pub struct ListOperations(RequestBuilder<longrunning::model::ListOperationsRequest>);
3331
3332 impl ListOperations {
3333 pub(crate) fn new(
3334 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
3335 ) -> Self {
3336 Self(RequestBuilder::new(stub))
3337 }
3338
3339 pub fn with_request<V: Into<longrunning::model::ListOperationsRequest>>(
3341 mut self,
3342 v: V,
3343 ) -> Self {
3344 self.0.request = v.into();
3345 self
3346 }
3347
3348 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3350 self.0.options = v.into();
3351 self
3352 }
3353
3354 pub async fn send(self) -> Result<longrunning::model::ListOperationsResponse> {
3356 (*self.0.stub)
3357 .list_operations(self.0.request, self.0.options)
3358 .await
3359 .map(gax::response::Response::into_body)
3360 }
3361
3362 pub fn by_page(
3364 self,
3365 ) -> impl gax::paginator::Paginator<longrunning::model::ListOperationsResponse, gax::error::Error>
3366 {
3367 use std::clone::Clone;
3368 let token = self.0.request.page_token.clone();
3369 let execute = move |token: String| {
3370 let mut builder = self.clone();
3371 builder.0.request = builder.0.request.set_page_token(token);
3372 builder.send()
3373 };
3374 gax::paginator::internal::new_paginator(token, execute)
3375 }
3376
3377 pub fn by_item(
3379 self,
3380 ) -> impl gax::paginator::ItemPaginator<
3381 longrunning::model::ListOperationsResponse,
3382 gax::error::Error,
3383 > {
3384 use gax::paginator::Paginator;
3385 self.by_page().items()
3386 }
3387
3388 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3390 self.0.request.name = v.into();
3391 self
3392 }
3393
3394 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
3396 self.0.request.filter = v.into();
3397 self
3398 }
3399
3400 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
3402 self.0.request.page_size = v.into();
3403 self
3404 }
3405
3406 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
3408 self.0.request.page_token = v.into();
3409 self
3410 }
3411
3412 pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
3414 self.0.request.return_partial_success = v.into();
3415 self
3416 }
3417 }
3418
3419 #[doc(hidden)]
3420 impl gax::options::internal::RequestBuilder for ListOperations {
3421 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3422 &mut self.0.options
3423 }
3424 }
3425
3426 #[derive(Clone, Debug)]
3444 pub struct GetOperation(RequestBuilder<longrunning::model::GetOperationRequest>);
3445
3446 impl GetOperation {
3447 pub(crate) fn new(
3448 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
3449 ) -> Self {
3450 Self(RequestBuilder::new(stub))
3451 }
3452
3453 pub fn with_request<V: Into<longrunning::model::GetOperationRequest>>(
3455 mut self,
3456 v: V,
3457 ) -> Self {
3458 self.0.request = v.into();
3459 self
3460 }
3461
3462 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3464 self.0.options = v.into();
3465 self
3466 }
3467
3468 pub async fn send(self) -> Result<longrunning::model::Operation> {
3470 (*self.0.stub)
3471 .get_operation(self.0.request, self.0.options)
3472 .await
3473 .map(gax::response::Response::into_body)
3474 }
3475
3476 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3478 self.0.request.name = v.into();
3479 self
3480 }
3481 }
3482
3483 #[doc(hidden)]
3484 impl gax::options::internal::RequestBuilder for GetOperation {
3485 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3486 &mut self.0.options
3487 }
3488 }
3489
3490 #[derive(Clone, Debug)]
3508 pub struct DeleteOperation(RequestBuilder<longrunning::model::DeleteOperationRequest>);
3509
3510 impl DeleteOperation {
3511 pub(crate) fn new(
3512 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
3513 ) -> Self {
3514 Self(RequestBuilder::new(stub))
3515 }
3516
3517 pub fn with_request<V: Into<longrunning::model::DeleteOperationRequest>>(
3519 mut self,
3520 v: V,
3521 ) -> Self {
3522 self.0.request = v.into();
3523 self
3524 }
3525
3526 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3528 self.0.options = v.into();
3529 self
3530 }
3531
3532 pub async fn send(self) -> Result<()> {
3534 (*self.0.stub)
3535 .delete_operation(self.0.request, self.0.options)
3536 .await
3537 .map(gax::response::Response::into_body)
3538 }
3539
3540 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3542 self.0.request.name = v.into();
3543 self
3544 }
3545 }
3546
3547 #[doc(hidden)]
3548 impl gax::options::internal::RequestBuilder for DeleteOperation {
3549 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3550 &mut self.0.options
3551 }
3552 }
3553
3554 #[derive(Clone, Debug)]
3572 pub struct CancelOperation(RequestBuilder<longrunning::model::CancelOperationRequest>);
3573
3574 impl CancelOperation {
3575 pub(crate) fn new(
3576 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
3577 ) -> Self {
3578 Self(RequestBuilder::new(stub))
3579 }
3580
3581 pub fn with_request<V: Into<longrunning::model::CancelOperationRequest>>(
3583 mut self,
3584 v: V,
3585 ) -> Self {
3586 self.0.request = v.into();
3587 self
3588 }
3589
3590 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3592 self.0.options = v.into();
3593 self
3594 }
3595
3596 pub async fn send(self) -> Result<()> {
3598 (*self.0.stub)
3599 .cancel_operation(self.0.request, self.0.options)
3600 .await
3601 .map(gax::response::Response::into_body)
3602 }
3603
3604 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3606 self.0.request.name = v.into();
3607 self
3608 }
3609 }
3610
3611 #[doc(hidden)]
3612 impl gax::options::internal::RequestBuilder for CancelOperation {
3613 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3614 &mut self.0.options
3615 }
3616 }
3617}
3618
3619pub mod bigtable_table_admin {
3620 use crate::Result;
3621
3622 pub type ClientBuilder =
3636 gax::client_builder::ClientBuilder<client::Factory, gaxi::options::Credentials>;
3637
3638 pub(crate) mod client {
3639 use super::super::super::client::BigtableTableAdmin;
3640 pub struct Factory;
3641 impl gax::client_builder::internal::ClientFactory for Factory {
3642 type Client = BigtableTableAdmin;
3643 type Credentials = gaxi::options::Credentials;
3644 async fn build(
3645 self,
3646 config: gaxi::options::ClientConfig,
3647 ) -> gax::client_builder::Result<Self::Client> {
3648 Self::Client::new(config).await
3649 }
3650 }
3651 }
3652
3653 #[derive(Clone, Debug)]
3655 pub(crate) struct RequestBuilder<R: std::default::Default> {
3656 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
3657 request: R,
3658 options: gax::options::RequestOptions,
3659 }
3660
3661 impl<R> RequestBuilder<R>
3662 where
3663 R: std::default::Default,
3664 {
3665 pub(crate) fn new(
3666 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
3667 ) -> Self {
3668 Self {
3669 stub,
3670 request: R::default(),
3671 options: gax::options::RequestOptions::default(),
3672 }
3673 }
3674 }
3675
3676 #[derive(Clone, Debug)]
3694 pub struct CreateTable(RequestBuilder<crate::model::CreateTableRequest>);
3695
3696 impl CreateTable {
3697 pub(crate) fn new(
3698 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
3699 ) -> Self {
3700 Self(RequestBuilder::new(stub))
3701 }
3702
3703 pub fn with_request<V: Into<crate::model::CreateTableRequest>>(mut self, v: V) -> Self {
3705 self.0.request = v.into();
3706 self
3707 }
3708
3709 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3711 self.0.options = v.into();
3712 self
3713 }
3714
3715 pub async fn send(self) -> Result<crate::model::Table> {
3717 (*self.0.stub)
3718 .create_table(self.0.request, self.0.options)
3719 .await
3720 .map(gax::response::Response::into_body)
3721 }
3722
3723 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3727 self.0.request.parent = v.into();
3728 self
3729 }
3730
3731 pub fn set_table_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3735 self.0.request.table_id = v.into();
3736 self
3737 }
3738
3739 pub fn set_table<T>(mut self, v: T) -> Self
3743 where
3744 T: std::convert::Into<crate::model::Table>,
3745 {
3746 self.0.request.table = std::option::Option::Some(v.into());
3747 self
3748 }
3749
3750 pub fn set_or_clear_table<T>(mut self, v: std::option::Option<T>) -> Self
3754 where
3755 T: std::convert::Into<crate::model::Table>,
3756 {
3757 self.0.request.table = v.map(|x| x.into());
3758 self
3759 }
3760
3761 pub fn set_initial_splits<T, V>(mut self, v: T) -> Self
3763 where
3764 T: std::iter::IntoIterator<Item = V>,
3765 V: std::convert::Into<crate::model::create_table_request::Split>,
3766 {
3767 use std::iter::Iterator;
3768 self.0.request.initial_splits = v.into_iter().map(|i| i.into()).collect();
3769 self
3770 }
3771 }
3772
3773 #[doc(hidden)]
3774 impl gax::options::internal::RequestBuilder for CreateTable {
3775 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3776 &mut self.0.options
3777 }
3778 }
3779
3780 #[derive(Clone, Debug)]
3799 pub struct CreateTableFromSnapshot(
3800 RequestBuilder<crate::model::CreateTableFromSnapshotRequest>,
3801 );
3802
3803 impl CreateTableFromSnapshot {
3804 pub(crate) fn new(
3805 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
3806 ) -> Self {
3807 Self(RequestBuilder::new(stub))
3808 }
3809
3810 pub fn with_request<V: Into<crate::model::CreateTableFromSnapshotRequest>>(
3812 mut self,
3813 v: V,
3814 ) -> Self {
3815 self.0.request = v.into();
3816 self
3817 }
3818
3819 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3821 self.0.options = v.into();
3822 self
3823 }
3824
3825 pub async fn send(self) -> Result<longrunning::model::Operation> {
3832 (*self.0.stub)
3833 .create_table_from_snapshot(self.0.request, self.0.options)
3834 .await
3835 .map(gax::response::Response::into_body)
3836 }
3837
3838 pub fn poller(
3840 self,
3841 ) -> impl lro::Poller<crate::model::Table, crate::model::CreateTableFromSnapshotMetadata>
3842 {
3843 type Operation = lro::internal::Operation<
3844 crate::model::Table,
3845 crate::model::CreateTableFromSnapshotMetadata,
3846 >;
3847 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3848 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3849
3850 let stub = self.0.stub.clone();
3851 let mut options = self.0.options.clone();
3852 options.set_retry_policy(gax::retry_policy::NeverRetry);
3853 let query = move |name| {
3854 let stub = stub.clone();
3855 let options = options.clone();
3856 async {
3857 let op = GetOperation::new(stub)
3858 .set_name(name)
3859 .with_options(options)
3860 .send()
3861 .await?;
3862 Ok(Operation::new(op))
3863 }
3864 };
3865
3866 let start = move || async {
3867 let op = self.send().await?;
3868 Ok(Operation::new(op))
3869 };
3870
3871 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
3872 }
3873
3874 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3878 self.0.request.parent = v.into();
3879 self
3880 }
3881
3882 pub fn set_table_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3886 self.0.request.table_id = v.into();
3887 self
3888 }
3889
3890 pub fn set_source_snapshot<T: Into<std::string::String>>(mut self, v: T) -> Self {
3894 self.0.request.source_snapshot = v.into();
3895 self
3896 }
3897 }
3898
3899 #[doc(hidden)]
3900 impl gax::options::internal::RequestBuilder for CreateTableFromSnapshot {
3901 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3902 &mut self.0.options
3903 }
3904 }
3905
3906 #[derive(Clone, Debug)]
3928 pub struct ListTables(RequestBuilder<crate::model::ListTablesRequest>);
3929
3930 impl ListTables {
3931 pub(crate) fn new(
3932 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
3933 ) -> Self {
3934 Self(RequestBuilder::new(stub))
3935 }
3936
3937 pub fn with_request<V: Into<crate::model::ListTablesRequest>>(mut self, v: V) -> Self {
3939 self.0.request = v.into();
3940 self
3941 }
3942
3943 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3945 self.0.options = v.into();
3946 self
3947 }
3948
3949 pub async fn send(self) -> Result<crate::model::ListTablesResponse> {
3951 (*self.0.stub)
3952 .list_tables(self.0.request, self.0.options)
3953 .await
3954 .map(gax::response::Response::into_body)
3955 }
3956
3957 pub fn by_page(
3959 self,
3960 ) -> impl gax::paginator::Paginator<crate::model::ListTablesResponse, gax::error::Error>
3961 {
3962 use std::clone::Clone;
3963 let token = self.0.request.page_token.clone();
3964 let execute = move |token: String| {
3965 let mut builder = self.clone();
3966 builder.0.request = builder.0.request.set_page_token(token);
3967 builder.send()
3968 };
3969 gax::paginator::internal::new_paginator(token, execute)
3970 }
3971
3972 pub fn by_item(
3974 self,
3975 ) -> impl gax::paginator::ItemPaginator<crate::model::ListTablesResponse, gax::error::Error>
3976 {
3977 use gax::paginator::Paginator;
3978 self.by_page().items()
3979 }
3980
3981 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3985 self.0.request.parent = v.into();
3986 self
3987 }
3988
3989 pub fn set_view<T: Into<crate::model::table::View>>(mut self, v: T) -> Self {
3991 self.0.request.view = v.into();
3992 self
3993 }
3994
3995 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
3997 self.0.request.page_size = v.into();
3998 self
3999 }
4000
4001 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
4003 self.0.request.page_token = v.into();
4004 self
4005 }
4006 }
4007
4008 #[doc(hidden)]
4009 impl gax::options::internal::RequestBuilder for ListTables {
4010 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4011 &mut self.0.options
4012 }
4013 }
4014
4015 #[derive(Clone, Debug)]
4033 pub struct GetTable(RequestBuilder<crate::model::GetTableRequest>);
4034
4035 impl GetTable {
4036 pub(crate) fn new(
4037 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
4038 ) -> Self {
4039 Self(RequestBuilder::new(stub))
4040 }
4041
4042 pub fn with_request<V: Into<crate::model::GetTableRequest>>(mut self, v: V) -> Self {
4044 self.0.request = v.into();
4045 self
4046 }
4047
4048 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4050 self.0.options = v.into();
4051 self
4052 }
4053
4054 pub async fn send(self) -> Result<crate::model::Table> {
4056 (*self.0.stub)
4057 .get_table(self.0.request, self.0.options)
4058 .await
4059 .map(gax::response::Response::into_body)
4060 }
4061
4062 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4066 self.0.request.name = v.into();
4067 self
4068 }
4069
4070 pub fn set_view<T: Into<crate::model::table::View>>(mut self, v: T) -> Self {
4072 self.0.request.view = v.into();
4073 self
4074 }
4075 }
4076
4077 #[doc(hidden)]
4078 impl gax::options::internal::RequestBuilder for GetTable {
4079 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4080 &mut self.0.options
4081 }
4082 }
4083
4084 #[derive(Clone, Debug)]
4103 pub struct UpdateTable(RequestBuilder<crate::model::UpdateTableRequest>);
4104
4105 impl UpdateTable {
4106 pub(crate) fn new(
4107 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
4108 ) -> Self {
4109 Self(RequestBuilder::new(stub))
4110 }
4111
4112 pub fn with_request<V: Into<crate::model::UpdateTableRequest>>(mut self, v: V) -> Self {
4114 self.0.request = v.into();
4115 self
4116 }
4117
4118 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4120 self.0.options = v.into();
4121 self
4122 }
4123
4124 pub async fn send(self) -> Result<longrunning::model::Operation> {
4131 (*self.0.stub)
4132 .update_table(self.0.request, self.0.options)
4133 .await
4134 .map(gax::response::Response::into_body)
4135 }
4136
4137 pub fn poller(
4139 self,
4140 ) -> impl lro::Poller<crate::model::Table, crate::model::UpdateTableMetadata> {
4141 type Operation =
4142 lro::internal::Operation<crate::model::Table, crate::model::UpdateTableMetadata>;
4143 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4144 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4145
4146 let stub = self.0.stub.clone();
4147 let mut options = self.0.options.clone();
4148 options.set_retry_policy(gax::retry_policy::NeverRetry);
4149 let query = move |name| {
4150 let stub = stub.clone();
4151 let options = options.clone();
4152 async {
4153 let op = GetOperation::new(stub)
4154 .set_name(name)
4155 .with_options(options)
4156 .send()
4157 .await?;
4158 Ok(Operation::new(op))
4159 }
4160 };
4161
4162 let start = move || async {
4163 let op = self.send().await?;
4164 Ok(Operation::new(op))
4165 };
4166
4167 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
4168 }
4169
4170 pub fn set_table<T>(mut self, v: T) -> Self
4174 where
4175 T: std::convert::Into<crate::model::Table>,
4176 {
4177 self.0.request.table = std::option::Option::Some(v.into());
4178 self
4179 }
4180
4181 pub fn set_or_clear_table<T>(mut self, v: std::option::Option<T>) -> Self
4185 where
4186 T: std::convert::Into<crate::model::Table>,
4187 {
4188 self.0.request.table = v.map(|x| x.into());
4189 self
4190 }
4191
4192 pub fn set_update_mask<T>(mut self, v: T) -> Self
4196 where
4197 T: std::convert::Into<wkt::FieldMask>,
4198 {
4199 self.0.request.update_mask = std::option::Option::Some(v.into());
4200 self
4201 }
4202
4203 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
4207 where
4208 T: std::convert::Into<wkt::FieldMask>,
4209 {
4210 self.0.request.update_mask = v.map(|x| x.into());
4211 self
4212 }
4213
4214 pub fn set_ignore_warnings<T: Into<bool>>(mut self, v: T) -> Self {
4216 self.0.request.ignore_warnings = v.into();
4217 self
4218 }
4219 }
4220
4221 #[doc(hidden)]
4222 impl gax::options::internal::RequestBuilder for UpdateTable {
4223 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4224 &mut self.0.options
4225 }
4226 }
4227
4228 #[derive(Clone, Debug)]
4246 pub struct DeleteTable(RequestBuilder<crate::model::DeleteTableRequest>);
4247
4248 impl DeleteTable {
4249 pub(crate) fn new(
4250 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
4251 ) -> Self {
4252 Self(RequestBuilder::new(stub))
4253 }
4254
4255 pub fn with_request<V: Into<crate::model::DeleteTableRequest>>(mut self, v: V) -> Self {
4257 self.0.request = v.into();
4258 self
4259 }
4260
4261 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4263 self.0.options = v.into();
4264 self
4265 }
4266
4267 pub async fn send(self) -> Result<()> {
4269 (*self.0.stub)
4270 .delete_table(self.0.request, self.0.options)
4271 .await
4272 .map(gax::response::Response::into_body)
4273 }
4274
4275 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4279 self.0.request.name = v.into();
4280 self
4281 }
4282 }
4283
4284 #[doc(hidden)]
4285 impl gax::options::internal::RequestBuilder for DeleteTable {
4286 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4287 &mut self.0.options
4288 }
4289 }
4290
4291 #[derive(Clone, Debug)]
4310 pub struct UndeleteTable(RequestBuilder<crate::model::UndeleteTableRequest>);
4311
4312 impl UndeleteTable {
4313 pub(crate) fn new(
4314 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
4315 ) -> Self {
4316 Self(RequestBuilder::new(stub))
4317 }
4318
4319 pub fn with_request<V: Into<crate::model::UndeleteTableRequest>>(mut self, v: V) -> Self {
4321 self.0.request = v.into();
4322 self
4323 }
4324
4325 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4327 self.0.options = v.into();
4328 self
4329 }
4330
4331 pub async fn send(self) -> Result<longrunning::model::Operation> {
4338 (*self.0.stub)
4339 .undelete_table(self.0.request, self.0.options)
4340 .await
4341 .map(gax::response::Response::into_body)
4342 }
4343
4344 pub fn poller(
4346 self,
4347 ) -> impl lro::Poller<crate::model::Table, crate::model::UndeleteTableMetadata> {
4348 type Operation =
4349 lro::internal::Operation<crate::model::Table, crate::model::UndeleteTableMetadata>;
4350 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4351 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4352
4353 let stub = self.0.stub.clone();
4354 let mut options = self.0.options.clone();
4355 options.set_retry_policy(gax::retry_policy::NeverRetry);
4356 let query = move |name| {
4357 let stub = stub.clone();
4358 let options = options.clone();
4359 async {
4360 let op = GetOperation::new(stub)
4361 .set_name(name)
4362 .with_options(options)
4363 .send()
4364 .await?;
4365 Ok(Operation::new(op))
4366 }
4367 };
4368
4369 let start = move || async {
4370 let op = self.send().await?;
4371 Ok(Operation::new(op))
4372 };
4373
4374 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
4375 }
4376
4377 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4381 self.0.request.name = v.into();
4382 self
4383 }
4384 }
4385
4386 #[doc(hidden)]
4387 impl gax::options::internal::RequestBuilder for UndeleteTable {
4388 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4389 &mut self.0.options
4390 }
4391 }
4392
4393 #[derive(Clone, Debug)]
4412 pub struct CreateAuthorizedView(RequestBuilder<crate::model::CreateAuthorizedViewRequest>);
4413
4414 impl CreateAuthorizedView {
4415 pub(crate) fn new(
4416 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
4417 ) -> Self {
4418 Self(RequestBuilder::new(stub))
4419 }
4420
4421 pub fn with_request<V: Into<crate::model::CreateAuthorizedViewRequest>>(
4423 mut self,
4424 v: V,
4425 ) -> Self {
4426 self.0.request = v.into();
4427 self
4428 }
4429
4430 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4432 self.0.options = v.into();
4433 self
4434 }
4435
4436 pub async fn send(self) -> Result<longrunning::model::Operation> {
4443 (*self.0.stub)
4444 .create_authorized_view(self.0.request, self.0.options)
4445 .await
4446 .map(gax::response::Response::into_body)
4447 }
4448
4449 pub fn poller(
4451 self,
4452 ) -> impl lro::Poller<crate::model::AuthorizedView, crate::model::CreateAuthorizedViewMetadata>
4453 {
4454 type Operation = lro::internal::Operation<
4455 crate::model::AuthorizedView,
4456 crate::model::CreateAuthorizedViewMetadata,
4457 >;
4458 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4459 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4460
4461 let stub = self.0.stub.clone();
4462 let mut options = self.0.options.clone();
4463 options.set_retry_policy(gax::retry_policy::NeverRetry);
4464 let query = move |name| {
4465 let stub = stub.clone();
4466 let options = options.clone();
4467 async {
4468 let op = GetOperation::new(stub)
4469 .set_name(name)
4470 .with_options(options)
4471 .send()
4472 .await?;
4473 Ok(Operation::new(op))
4474 }
4475 };
4476
4477 let start = move || async {
4478 let op = self.send().await?;
4479 Ok(Operation::new(op))
4480 };
4481
4482 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
4483 }
4484
4485 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
4489 self.0.request.parent = v.into();
4490 self
4491 }
4492
4493 pub fn set_authorized_view_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
4497 self.0.request.authorized_view_id = v.into();
4498 self
4499 }
4500
4501 pub fn set_authorized_view<T>(mut self, v: T) -> Self
4505 where
4506 T: std::convert::Into<crate::model::AuthorizedView>,
4507 {
4508 self.0.request.authorized_view = std::option::Option::Some(v.into());
4509 self
4510 }
4511
4512 pub fn set_or_clear_authorized_view<T>(mut self, v: std::option::Option<T>) -> Self
4516 where
4517 T: std::convert::Into<crate::model::AuthorizedView>,
4518 {
4519 self.0.request.authorized_view = v.map(|x| x.into());
4520 self
4521 }
4522 }
4523
4524 #[doc(hidden)]
4525 impl gax::options::internal::RequestBuilder for CreateAuthorizedView {
4526 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4527 &mut self.0.options
4528 }
4529 }
4530
4531 #[derive(Clone, Debug)]
4553 pub struct ListAuthorizedViews(RequestBuilder<crate::model::ListAuthorizedViewsRequest>);
4554
4555 impl ListAuthorizedViews {
4556 pub(crate) fn new(
4557 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
4558 ) -> Self {
4559 Self(RequestBuilder::new(stub))
4560 }
4561
4562 pub fn with_request<V: Into<crate::model::ListAuthorizedViewsRequest>>(
4564 mut self,
4565 v: V,
4566 ) -> Self {
4567 self.0.request = v.into();
4568 self
4569 }
4570
4571 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4573 self.0.options = v.into();
4574 self
4575 }
4576
4577 pub async fn send(self) -> Result<crate::model::ListAuthorizedViewsResponse> {
4579 (*self.0.stub)
4580 .list_authorized_views(self.0.request, self.0.options)
4581 .await
4582 .map(gax::response::Response::into_body)
4583 }
4584
4585 pub fn by_page(
4587 self,
4588 ) -> impl gax::paginator::Paginator<crate::model::ListAuthorizedViewsResponse, gax::error::Error>
4589 {
4590 use std::clone::Clone;
4591 let token = self.0.request.page_token.clone();
4592 let execute = move |token: String| {
4593 let mut builder = self.clone();
4594 builder.0.request = builder.0.request.set_page_token(token);
4595 builder.send()
4596 };
4597 gax::paginator::internal::new_paginator(token, execute)
4598 }
4599
4600 pub fn by_item(
4602 self,
4603 ) -> impl gax::paginator::ItemPaginator<
4604 crate::model::ListAuthorizedViewsResponse,
4605 gax::error::Error,
4606 > {
4607 use gax::paginator::Paginator;
4608 self.by_page().items()
4609 }
4610
4611 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
4615 self.0.request.parent = v.into();
4616 self
4617 }
4618
4619 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
4621 self.0.request.page_size = v.into();
4622 self
4623 }
4624
4625 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
4627 self.0.request.page_token = v.into();
4628 self
4629 }
4630
4631 pub fn set_view<T: Into<crate::model::authorized_view::ResponseView>>(
4633 mut self,
4634 v: T,
4635 ) -> Self {
4636 self.0.request.view = v.into();
4637 self
4638 }
4639 }
4640
4641 #[doc(hidden)]
4642 impl gax::options::internal::RequestBuilder for ListAuthorizedViews {
4643 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4644 &mut self.0.options
4645 }
4646 }
4647
4648 #[derive(Clone, Debug)]
4666 pub struct GetAuthorizedView(RequestBuilder<crate::model::GetAuthorizedViewRequest>);
4667
4668 impl GetAuthorizedView {
4669 pub(crate) fn new(
4670 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
4671 ) -> Self {
4672 Self(RequestBuilder::new(stub))
4673 }
4674
4675 pub fn with_request<V: Into<crate::model::GetAuthorizedViewRequest>>(
4677 mut self,
4678 v: V,
4679 ) -> Self {
4680 self.0.request = v.into();
4681 self
4682 }
4683
4684 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4686 self.0.options = v.into();
4687 self
4688 }
4689
4690 pub async fn send(self) -> Result<crate::model::AuthorizedView> {
4692 (*self.0.stub)
4693 .get_authorized_view(self.0.request, self.0.options)
4694 .await
4695 .map(gax::response::Response::into_body)
4696 }
4697
4698 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4702 self.0.request.name = v.into();
4703 self
4704 }
4705
4706 pub fn set_view<T: Into<crate::model::authorized_view::ResponseView>>(
4708 mut self,
4709 v: T,
4710 ) -> Self {
4711 self.0.request.view = v.into();
4712 self
4713 }
4714 }
4715
4716 #[doc(hidden)]
4717 impl gax::options::internal::RequestBuilder for GetAuthorizedView {
4718 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4719 &mut self.0.options
4720 }
4721 }
4722
4723 #[derive(Clone, Debug)]
4742 pub struct UpdateAuthorizedView(RequestBuilder<crate::model::UpdateAuthorizedViewRequest>);
4743
4744 impl UpdateAuthorizedView {
4745 pub(crate) fn new(
4746 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
4747 ) -> Self {
4748 Self(RequestBuilder::new(stub))
4749 }
4750
4751 pub fn with_request<V: Into<crate::model::UpdateAuthorizedViewRequest>>(
4753 mut self,
4754 v: V,
4755 ) -> Self {
4756 self.0.request = v.into();
4757 self
4758 }
4759
4760 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4762 self.0.options = v.into();
4763 self
4764 }
4765
4766 pub async fn send(self) -> Result<longrunning::model::Operation> {
4773 (*self.0.stub)
4774 .update_authorized_view(self.0.request, self.0.options)
4775 .await
4776 .map(gax::response::Response::into_body)
4777 }
4778
4779 pub fn poller(
4781 self,
4782 ) -> impl lro::Poller<crate::model::AuthorizedView, crate::model::UpdateAuthorizedViewMetadata>
4783 {
4784 type Operation = lro::internal::Operation<
4785 crate::model::AuthorizedView,
4786 crate::model::UpdateAuthorizedViewMetadata,
4787 >;
4788 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4789 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4790
4791 let stub = self.0.stub.clone();
4792 let mut options = self.0.options.clone();
4793 options.set_retry_policy(gax::retry_policy::NeverRetry);
4794 let query = move |name| {
4795 let stub = stub.clone();
4796 let options = options.clone();
4797 async {
4798 let op = GetOperation::new(stub)
4799 .set_name(name)
4800 .with_options(options)
4801 .send()
4802 .await?;
4803 Ok(Operation::new(op))
4804 }
4805 };
4806
4807 let start = move || async {
4808 let op = self.send().await?;
4809 Ok(Operation::new(op))
4810 };
4811
4812 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
4813 }
4814
4815 pub fn set_authorized_view<T>(mut self, v: T) -> Self
4819 where
4820 T: std::convert::Into<crate::model::AuthorizedView>,
4821 {
4822 self.0.request.authorized_view = std::option::Option::Some(v.into());
4823 self
4824 }
4825
4826 pub fn set_or_clear_authorized_view<T>(mut self, v: std::option::Option<T>) -> Self
4830 where
4831 T: std::convert::Into<crate::model::AuthorizedView>,
4832 {
4833 self.0.request.authorized_view = v.map(|x| x.into());
4834 self
4835 }
4836
4837 pub fn set_update_mask<T>(mut self, v: T) -> Self
4839 where
4840 T: std::convert::Into<wkt::FieldMask>,
4841 {
4842 self.0.request.update_mask = std::option::Option::Some(v.into());
4843 self
4844 }
4845
4846 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
4848 where
4849 T: std::convert::Into<wkt::FieldMask>,
4850 {
4851 self.0.request.update_mask = v.map(|x| x.into());
4852 self
4853 }
4854
4855 pub fn set_ignore_warnings<T: Into<bool>>(mut self, v: T) -> Self {
4857 self.0.request.ignore_warnings = v.into();
4858 self
4859 }
4860 }
4861
4862 #[doc(hidden)]
4863 impl gax::options::internal::RequestBuilder for UpdateAuthorizedView {
4864 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4865 &mut self.0.options
4866 }
4867 }
4868
4869 #[derive(Clone, Debug)]
4887 pub struct DeleteAuthorizedView(RequestBuilder<crate::model::DeleteAuthorizedViewRequest>);
4888
4889 impl DeleteAuthorizedView {
4890 pub(crate) fn new(
4891 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
4892 ) -> Self {
4893 Self(RequestBuilder::new(stub))
4894 }
4895
4896 pub fn with_request<V: Into<crate::model::DeleteAuthorizedViewRequest>>(
4898 mut self,
4899 v: V,
4900 ) -> Self {
4901 self.0.request = v.into();
4902 self
4903 }
4904
4905 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4907 self.0.options = v.into();
4908 self
4909 }
4910
4911 pub async fn send(self) -> Result<()> {
4913 (*self.0.stub)
4914 .delete_authorized_view(self.0.request, self.0.options)
4915 .await
4916 .map(gax::response::Response::into_body)
4917 }
4918
4919 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4923 self.0.request.name = v.into();
4924 self
4925 }
4926
4927 pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
4929 self.0.request.etag = v.into();
4930 self
4931 }
4932 }
4933
4934 #[doc(hidden)]
4935 impl gax::options::internal::RequestBuilder for DeleteAuthorizedView {
4936 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4937 &mut self.0.options
4938 }
4939 }
4940
4941 #[derive(Clone, Debug)]
4959 pub struct ModifyColumnFamilies(RequestBuilder<crate::model::ModifyColumnFamiliesRequest>);
4960
4961 impl ModifyColumnFamilies {
4962 pub(crate) fn new(
4963 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
4964 ) -> Self {
4965 Self(RequestBuilder::new(stub))
4966 }
4967
4968 pub fn with_request<V: Into<crate::model::ModifyColumnFamiliesRequest>>(
4970 mut self,
4971 v: V,
4972 ) -> Self {
4973 self.0.request = v.into();
4974 self
4975 }
4976
4977 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4979 self.0.options = v.into();
4980 self
4981 }
4982
4983 pub async fn send(self) -> Result<crate::model::Table> {
4985 (*self.0.stub)
4986 .modify_column_families(self.0.request, self.0.options)
4987 .await
4988 .map(gax::response::Response::into_body)
4989 }
4990
4991 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4995 self.0.request.name = v.into();
4996 self
4997 }
4998
4999 pub fn set_modifications<T, V>(mut self, v: T) -> Self
5003 where
5004 T: std::iter::IntoIterator<Item = V>,
5005 V: std::convert::Into<crate::model::modify_column_families_request::Modification>,
5006 {
5007 use std::iter::Iterator;
5008 self.0.request.modifications = v.into_iter().map(|i| i.into()).collect();
5009 self
5010 }
5011
5012 pub fn set_ignore_warnings<T: Into<bool>>(mut self, v: T) -> Self {
5014 self.0.request.ignore_warnings = v.into();
5015 self
5016 }
5017 }
5018
5019 #[doc(hidden)]
5020 impl gax::options::internal::RequestBuilder for ModifyColumnFamilies {
5021 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5022 &mut self.0.options
5023 }
5024 }
5025
5026 #[derive(Clone, Debug)]
5044 pub struct DropRowRange(RequestBuilder<crate::model::DropRowRangeRequest>);
5045
5046 impl DropRowRange {
5047 pub(crate) fn new(
5048 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
5049 ) -> Self {
5050 Self(RequestBuilder::new(stub))
5051 }
5052
5053 pub fn with_request<V: Into<crate::model::DropRowRangeRequest>>(mut self, v: V) -> Self {
5055 self.0.request = v.into();
5056 self
5057 }
5058
5059 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5061 self.0.options = v.into();
5062 self
5063 }
5064
5065 pub async fn send(self) -> Result<()> {
5067 (*self.0.stub)
5068 .drop_row_range(self.0.request, self.0.options)
5069 .await
5070 .map(gax::response::Response::into_body)
5071 }
5072
5073 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5077 self.0.request.name = v.into();
5078 self
5079 }
5080
5081 pub fn set_target<T: Into<Option<crate::model::drop_row_range_request::Target>>>(
5086 mut self,
5087 v: T,
5088 ) -> Self {
5089 self.0.request.target = v.into();
5090 self
5091 }
5092
5093 pub fn set_row_key_prefix<T: std::convert::Into<::bytes::Bytes>>(mut self, v: T) -> Self {
5099 self.0.request = self.0.request.set_row_key_prefix(v);
5100 self
5101 }
5102
5103 pub fn set_delete_all_data_from_table<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5109 self.0.request = self.0.request.set_delete_all_data_from_table(v);
5110 self
5111 }
5112 }
5113
5114 #[doc(hidden)]
5115 impl gax::options::internal::RequestBuilder for DropRowRange {
5116 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5117 &mut self.0.options
5118 }
5119 }
5120
5121 #[derive(Clone, Debug)]
5139 pub struct GenerateConsistencyToken(
5140 RequestBuilder<crate::model::GenerateConsistencyTokenRequest>,
5141 );
5142
5143 impl GenerateConsistencyToken {
5144 pub(crate) fn new(
5145 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
5146 ) -> Self {
5147 Self(RequestBuilder::new(stub))
5148 }
5149
5150 pub fn with_request<V: Into<crate::model::GenerateConsistencyTokenRequest>>(
5152 mut self,
5153 v: V,
5154 ) -> Self {
5155 self.0.request = v.into();
5156 self
5157 }
5158
5159 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5161 self.0.options = v.into();
5162 self
5163 }
5164
5165 pub async fn send(self) -> Result<crate::model::GenerateConsistencyTokenResponse> {
5167 (*self.0.stub)
5168 .generate_consistency_token(self.0.request, self.0.options)
5169 .await
5170 .map(gax::response::Response::into_body)
5171 }
5172
5173 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5177 self.0.request.name = v.into();
5178 self
5179 }
5180 }
5181
5182 #[doc(hidden)]
5183 impl gax::options::internal::RequestBuilder for GenerateConsistencyToken {
5184 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5185 &mut self.0.options
5186 }
5187 }
5188
5189 #[derive(Clone, Debug)]
5207 pub struct CheckConsistency(RequestBuilder<crate::model::CheckConsistencyRequest>);
5208
5209 impl CheckConsistency {
5210 pub(crate) fn new(
5211 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
5212 ) -> Self {
5213 Self(RequestBuilder::new(stub))
5214 }
5215
5216 pub fn with_request<V: Into<crate::model::CheckConsistencyRequest>>(
5218 mut self,
5219 v: V,
5220 ) -> Self {
5221 self.0.request = v.into();
5222 self
5223 }
5224
5225 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5227 self.0.options = v.into();
5228 self
5229 }
5230
5231 pub async fn send(self) -> Result<crate::model::CheckConsistencyResponse> {
5233 (*self.0.stub)
5234 .check_consistency(self.0.request, self.0.options)
5235 .await
5236 .map(gax::response::Response::into_body)
5237 }
5238
5239 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5243 self.0.request.name = v.into();
5244 self
5245 }
5246
5247 pub fn set_consistency_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
5251 self.0.request.consistency_token = v.into();
5252 self
5253 }
5254
5255 pub fn set_mode<T: Into<Option<crate::model::check_consistency_request::Mode>>>(
5260 mut self,
5261 v: T,
5262 ) -> Self {
5263 self.0.request.mode = v.into();
5264 self
5265 }
5266
5267 pub fn set_standard_read_remote_writes<
5273 T: std::convert::Into<std::boxed::Box<crate::model::StandardReadRemoteWrites>>,
5274 >(
5275 mut self,
5276 v: T,
5277 ) -> Self {
5278 self.0.request = self.0.request.set_standard_read_remote_writes(v);
5279 self
5280 }
5281
5282 pub fn set_data_boost_read_local_writes<
5288 T: std::convert::Into<std::boxed::Box<crate::model::DataBoostReadLocalWrites>>,
5289 >(
5290 mut self,
5291 v: T,
5292 ) -> Self {
5293 self.0.request = self.0.request.set_data_boost_read_local_writes(v);
5294 self
5295 }
5296 }
5297
5298 #[doc(hidden)]
5299 impl gax::options::internal::RequestBuilder for CheckConsistency {
5300 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5301 &mut self.0.options
5302 }
5303 }
5304
5305 #[derive(Clone, Debug)]
5324 pub struct SnapshotTable(RequestBuilder<crate::model::SnapshotTableRequest>);
5325
5326 impl SnapshotTable {
5327 pub(crate) fn new(
5328 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
5329 ) -> Self {
5330 Self(RequestBuilder::new(stub))
5331 }
5332
5333 pub fn with_request<V: Into<crate::model::SnapshotTableRequest>>(mut self, v: V) -> Self {
5335 self.0.request = v.into();
5336 self
5337 }
5338
5339 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5341 self.0.options = v.into();
5342 self
5343 }
5344
5345 pub async fn send(self) -> Result<longrunning::model::Operation> {
5352 (*self.0.stub)
5353 .snapshot_table(self.0.request, self.0.options)
5354 .await
5355 .map(gax::response::Response::into_body)
5356 }
5357
5358 pub fn poller(
5360 self,
5361 ) -> impl lro::Poller<crate::model::Snapshot, crate::model::SnapshotTableMetadata> {
5362 type Operation = lro::internal::Operation<
5363 crate::model::Snapshot,
5364 crate::model::SnapshotTableMetadata,
5365 >;
5366 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
5367 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
5368
5369 let stub = self.0.stub.clone();
5370 let mut options = self.0.options.clone();
5371 options.set_retry_policy(gax::retry_policy::NeverRetry);
5372 let query = move |name| {
5373 let stub = stub.clone();
5374 let options = options.clone();
5375 async {
5376 let op = GetOperation::new(stub)
5377 .set_name(name)
5378 .with_options(options)
5379 .send()
5380 .await?;
5381 Ok(Operation::new(op))
5382 }
5383 };
5384
5385 let start = move || async {
5386 let op = self.send().await?;
5387 Ok(Operation::new(op))
5388 };
5389
5390 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
5391 }
5392
5393 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5397 self.0.request.name = v.into();
5398 self
5399 }
5400
5401 pub fn set_cluster<T: Into<std::string::String>>(mut self, v: T) -> Self {
5405 self.0.request.cluster = v.into();
5406 self
5407 }
5408
5409 pub fn set_snapshot_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
5413 self.0.request.snapshot_id = v.into();
5414 self
5415 }
5416
5417 pub fn set_ttl<T>(mut self, v: T) -> Self
5419 where
5420 T: std::convert::Into<wkt::Duration>,
5421 {
5422 self.0.request.ttl = std::option::Option::Some(v.into());
5423 self
5424 }
5425
5426 pub fn set_or_clear_ttl<T>(mut self, v: std::option::Option<T>) -> Self
5428 where
5429 T: std::convert::Into<wkt::Duration>,
5430 {
5431 self.0.request.ttl = v.map(|x| x.into());
5432 self
5433 }
5434
5435 pub fn set_description<T: Into<std::string::String>>(mut self, v: T) -> Self {
5437 self.0.request.description = v.into();
5438 self
5439 }
5440 }
5441
5442 #[doc(hidden)]
5443 impl gax::options::internal::RequestBuilder for SnapshotTable {
5444 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5445 &mut self.0.options
5446 }
5447 }
5448
5449 #[derive(Clone, Debug)]
5467 pub struct GetSnapshot(RequestBuilder<crate::model::GetSnapshotRequest>);
5468
5469 impl GetSnapshot {
5470 pub(crate) fn new(
5471 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
5472 ) -> Self {
5473 Self(RequestBuilder::new(stub))
5474 }
5475
5476 pub fn with_request<V: Into<crate::model::GetSnapshotRequest>>(mut self, v: V) -> Self {
5478 self.0.request = v.into();
5479 self
5480 }
5481
5482 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5484 self.0.options = v.into();
5485 self
5486 }
5487
5488 pub async fn send(self) -> Result<crate::model::Snapshot> {
5490 (*self.0.stub)
5491 .get_snapshot(self.0.request, self.0.options)
5492 .await
5493 .map(gax::response::Response::into_body)
5494 }
5495
5496 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5500 self.0.request.name = v.into();
5501 self
5502 }
5503 }
5504
5505 #[doc(hidden)]
5506 impl gax::options::internal::RequestBuilder for GetSnapshot {
5507 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5508 &mut self.0.options
5509 }
5510 }
5511
5512 #[derive(Clone, Debug)]
5534 pub struct ListSnapshots(RequestBuilder<crate::model::ListSnapshotsRequest>);
5535
5536 impl ListSnapshots {
5537 pub(crate) fn new(
5538 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
5539 ) -> Self {
5540 Self(RequestBuilder::new(stub))
5541 }
5542
5543 pub fn with_request<V: Into<crate::model::ListSnapshotsRequest>>(mut self, v: V) -> Self {
5545 self.0.request = v.into();
5546 self
5547 }
5548
5549 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5551 self.0.options = v.into();
5552 self
5553 }
5554
5555 pub async fn send(self) -> Result<crate::model::ListSnapshotsResponse> {
5557 (*self.0.stub)
5558 .list_snapshots(self.0.request, self.0.options)
5559 .await
5560 .map(gax::response::Response::into_body)
5561 }
5562
5563 pub fn by_page(
5565 self,
5566 ) -> impl gax::paginator::Paginator<crate::model::ListSnapshotsResponse, gax::error::Error>
5567 {
5568 use std::clone::Clone;
5569 let token = self.0.request.page_token.clone();
5570 let execute = move |token: String| {
5571 let mut builder = self.clone();
5572 builder.0.request = builder.0.request.set_page_token(token);
5573 builder.send()
5574 };
5575 gax::paginator::internal::new_paginator(token, execute)
5576 }
5577
5578 pub fn by_item(
5580 self,
5581 ) -> impl gax::paginator::ItemPaginator<crate::model::ListSnapshotsResponse, gax::error::Error>
5582 {
5583 use gax::paginator::Paginator;
5584 self.by_page().items()
5585 }
5586
5587 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5591 self.0.request.parent = v.into();
5592 self
5593 }
5594
5595 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
5597 self.0.request.page_size = v.into();
5598 self
5599 }
5600
5601 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
5603 self.0.request.page_token = v.into();
5604 self
5605 }
5606 }
5607
5608 #[doc(hidden)]
5609 impl gax::options::internal::RequestBuilder for ListSnapshots {
5610 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5611 &mut self.0.options
5612 }
5613 }
5614
5615 #[derive(Clone, Debug)]
5633 pub struct DeleteSnapshot(RequestBuilder<crate::model::DeleteSnapshotRequest>);
5634
5635 impl DeleteSnapshot {
5636 pub(crate) fn new(
5637 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
5638 ) -> Self {
5639 Self(RequestBuilder::new(stub))
5640 }
5641
5642 pub fn with_request<V: Into<crate::model::DeleteSnapshotRequest>>(mut self, v: V) -> Self {
5644 self.0.request = v.into();
5645 self
5646 }
5647
5648 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5650 self.0.options = v.into();
5651 self
5652 }
5653
5654 pub async fn send(self) -> Result<()> {
5656 (*self.0.stub)
5657 .delete_snapshot(self.0.request, self.0.options)
5658 .await
5659 .map(gax::response::Response::into_body)
5660 }
5661
5662 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5666 self.0.request.name = v.into();
5667 self
5668 }
5669 }
5670
5671 #[doc(hidden)]
5672 impl gax::options::internal::RequestBuilder for DeleteSnapshot {
5673 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5674 &mut self.0.options
5675 }
5676 }
5677
5678 #[derive(Clone, Debug)]
5697 pub struct CreateBackup(RequestBuilder<crate::model::CreateBackupRequest>);
5698
5699 impl CreateBackup {
5700 pub(crate) fn new(
5701 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
5702 ) -> Self {
5703 Self(RequestBuilder::new(stub))
5704 }
5705
5706 pub fn with_request<V: Into<crate::model::CreateBackupRequest>>(mut self, v: V) -> Self {
5708 self.0.request = v.into();
5709 self
5710 }
5711
5712 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5714 self.0.options = v.into();
5715 self
5716 }
5717
5718 pub async fn send(self) -> Result<longrunning::model::Operation> {
5725 (*self.0.stub)
5726 .create_backup(self.0.request, self.0.options)
5727 .await
5728 .map(gax::response::Response::into_body)
5729 }
5730
5731 pub fn poller(
5733 self,
5734 ) -> impl lro::Poller<crate::model::Backup, crate::model::CreateBackupMetadata> {
5735 type Operation =
5736 lro::internal::Operation<crate::model::Backup, crate::model::CreateBackupMetadata>;
5737 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
5738 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
5739
5740 let stub = self.0.stub.clone();
5741 let mut options = self.0.options.clone();
5742 options.set_retry_policy(gax::retry_policy::NeverRetry);
5743 let query = move |name| {
5744 let stub = stub.clone();
5745 let options = options.clone();
5746 async {
5747 let op = GetOperation::new(stub)
5748 .set_name(name)
5749 .with_options(options)
5750 .send()
5751 .await?;
5752 Ok(Operation::new(op))
5753 }
5754 };
5755
5756 let start = move || async {
5757 let op = self.send().await?;
5758 Ok(Operation::new(op))
5759 };
5760
5761 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
5762 }
5763
5764 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5768 self.0.request.parent = v.into();
5769 self
5770 }
5771
5772 pub fn set_backup_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
5776 self.0.request.backup_id = v.into();
5777 self
5778 }
5779
5780 pub fn set_backup<T>(mut self, v: T) -> Self
5784 where
5785 T: std::convert::Into<crate::model::Backup>,
5786 {
5787 self.0.request.backup = std::option::Option::Some(v.into());
5788 self
5789 }
5790
5791 pub fn set_or_clear_backup<T>(mut self, v: std::option::Option<T>) -> Self
5795 where
5796 T: std::convert::Into<crate::model::Backup>,
5797 {
5798 self.0.request.backup = v.map(|x| x.into());
5799 self
5800 }
5801 }
5802
5803 #[doc(hidden)]
5804 impl gax::options::internal::RequestBuilder for CreateBackup {
5805 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5806 &mut self.0.options
5807 }
5808 }
5809
5810 #[derive(Clone, Debug)]
5828 pub struct GetBackup(RequestBuilder<crate::model::GetBackupRequest>);
5829
5830 impl GetBackup {
5831 pub(crate) fn new(
5832 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
5833 ) -> Self {
5834 Self(RequestBuilder::new(stub))
5835 }
5836
5837 pub fn with_request<V: Into<crate::model::GetBackupRequest>>(mut self, v: V) -> Self {
5839 self.0.request = v.into();
5840 self
5841 }
5842
5843 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5845 self.0.options = v.into();
5846 self
5847 }
5848
5849 pub async fn send(self) -> Result<crate::model::Backup> {
5851 (*self.0.stub)
5852 .get_backup(self.0.request, self.0.options)
5853 .await
5854 .map(gax::response::Response::into_body)
5855 }
5856
5857 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5861 self.0.request.name = v.into();
5862 self
5863 }
5864 }
5865
5866 #[doc(hidden)]
5867 impl gax::options::internal::RequestBuilder for GetBackup {
5868 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5869 &mut self.0.options
5870 }
5871 }
5872
5873 #[derive(Clone, Debug)]
5891 pub struct UpdateBackup(RequestBuilder<crate::model::UpdateBackupRequest>);
5892
5893 impl UpdateBackup {
5894 pub(crate) fn new(
5895 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
5896 ) -> Self {
5897 Self(RequestBuilder::new(stub))
5898 }
5899
5900 pub fn with_request<V: Into<crate::model::UpdateBackupRequest>>(mut self, v: V) -> Self {
5902 self.0.request = v.into();
5903 self
5904 }
5905
5906 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5908 self.0.options = v.into();
5909 self
5910 }
5911
5912 pub async fn send(self) -> Result<crate::model::Backup> {
5914 (*self.0.stub)
5915 .update_backup(self.0.request, self.0.options)
5916 .await
5917 .map(gax::response::Response::into_body)
5918 }
5919
5920 pub fn set_backup<T>(mut self, v: T) -> Self
5924 where
5925 T: std::convert::Into<crate::model::Backup>,
5926 {
5927 self.0.request.backup = std::option::Option::Some(v.into());
5928 self
5929 }
5930
5931 pub fn set_or_clear_backup<T>(mut self, v: std::option::Option<T>) -> Self
5935 where
5936 T: std::convert::Into<crate::model::Backup>,
5937 {
5938 self.0.request.backup = v.map(|x| x.into());
5939 self
5940 }
5941
5942 pub fn set_update_mask<T>(mut self, v: T) -> Self
5946 where
5947 T: std::convert::Into<wkt::FieldMask>,
5948 {
5949 self.0.request.update_mask = std::option::Option::Some(v.into());
5950 self
5951 }
5952
5953 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
5957 where
5958 T: std::convert::Into<wkt::FieldMask>,
5959 {
5960 self.0.request.update_mask = v.map(|x| x.into());
5961 self
5962 }
5963 }
5964
5965 #[doc(hidden)]
5966 impl gax::options::internal::RequestBuilder for UpdateBackup {
5967 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5968 &mut self.0.options
5969 }
5970 }
5971
5972 #[derive(Clone, Debug)]
5990 pub struct DeleteBackup(RequestBuilder<crate::model::DeleteBackupRequest>);
5991
5992 impl DeleteBackup {
5993 pub(crate) fn new(
5994 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
5995 ) -> Self {
5996 Self(RequestBuilder::new(stub))
5997 }
5998
5999 pub fn with_request<V: Into<crate::model::DeleteBackupRequest>>(mut self, v: V) -> Self {
6001 self.0.request = v.into();
6002 self
6003 }
6004
6005 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
6007 self.0.options = v.into();
6008 self
6009 }
6010
6011 pub async fn send(self) -> Result<()> {
6013 (*self.0.stub)
6014 .delete_backup(self.0.request, self.0.options)
6015 .await
6016 .map(gax::response::Response::into_body)
6017 }
6018
6019 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6023 self.0.request.name = v.into();
6024 self
6025 }
6026 }
6027
6028 #[doc(hidden)]
6029 impl gax::options::internal::RequestBuilder for DeleteBackup {
6030 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
6031 &mut self.0.options
6032 }
6033 }
6034
6035 #[derive(Clone, Debug)]
6057 pub struct ListBackups(RequestBuilder<crate::model::ListBackupsRequest>);
6058
6059 impl ListBackups {
6060 pub(crate) fn new(
6061 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
6062 ) -> Self {
6063 Self(RequestBuilder::new(stub))
6064 }
6065
6066 pub fn with_request<V: Into<crate::model::ListBackupsRequest>>(mut self, v: V) -> Self {
6068 self.0.request = v.into();
6069 self
6070 }
6071
6072 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
6074 self.0.options = v.into();
6075 self
6076 }
6077
6078 pub async fn send(self) -> Result<crate::model::ListBackupsResponse> {
6080 (*self.0.stub)
6081 .list_backups(self.0.request, self.0.options)
6082 .await
6083 .map(gax::response::Response::into_body)
6084 }
6085
6086 pub fn by_page(
6088 self,
6089 ) -> impl gax::paginator::Paginator<crate::model::ListBackupsResponse, gax::error::Error>
6090 {
6091 use std::clone::Clone;
6092 let token = self.0.request.page_token.clone();
6093 let execute = move |token: String| {
6094 let mut builder = self.clone();
6095 builder.0.request = builder.0.request.set_page_token(token);
6096 builder.send()
6097 };
6098 gax::paginator::internal::new_paginator(token, execute)
6099 }
6100
6101 pub fn by_item(
6103 self,
6104 ) -> impl gax::paginator::ItemPaginator<crate::model::ListBackupsResponse, gax::error::Error>
6105 {
6106 use gax::paginator::Paginator;
6107 self.by_page().items()
6108 }
6109
6110 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
6114 self.0.request.parent = v.into();
6115 self
6116 }
6117
6118 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
6120 self.0.request.filter = v.into();
6121 self
6122 }
6123
6124 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
6126 self.0.request.order_by = v.into();
6127 self
6128 }
6129
6130 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
6132 self.0.request.page_size = v.into();
6133 self
6134 }
6135
6136 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
6138 self.0.request.page_token = v.into();
6139 self
6140 }
6141 }
6142
6143 #[doc(hidden)]
6144 impl gax::options::internal::RequestBuilder for ListBackups {
6145 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
6146 &mut self.0.options
6147 }
6148 }
6149
6150 #[derive(Clone, Debug)]
6169 pub struct RestoreTable(RequestBuilder<crate::model::RestoreTableRequest>);
6170
6171 impl RestoreTable {
6172 pub(crate) fn new(
6173 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
6174 ) -> Self {
6175 Self(RequestBuilder::new(stub))
6176 }
6177
6178 pub fn with_request<V: Into<crate::model::RestoreTableRequest>>(mut self, v: V) -> Self {
6180 self.0.request = v.into();
6181 self
6182 }
6183
6184 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
6186 self.0.options = v.into();
6187 self
6188 }
6189
6190 pub async fn send(self) -> Result<longrunning::model::Operation> {
6197 (*self.0.stub)
6198 .restore_table(self.0.request, self.0.options)
6199 .await
6200 .map(gax::response::Response::into_body)
6201 }
6202
6203 pub fn poller(
6205 self,
6206 ) -> impl lro::Poller<crate::model::Table, crate::model::RestoreTableMetadata> {
6207 type Operation =
6208 lro::internal::Operation<crate::model::Table, crate::model::RestoreTableMetadata>;
6209 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6210 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6211
6212 let stub = self.0.stub.clone();
6213 let mut options = self.0.options.clone();
6214 options.set_retry_policy(gax::retry_policy::NeverRetry);
6215 let query = move |name| {
6216 let stub = stub.clone();
6217 let options = options.clone();
6218 async {
6219 let op = GetOperation::new(stub)
6220 .set_name(name)
6221 .with_options(options)
6222 .send()
6223 .await?;
6224 Ok(Operation::new(op))
6225 }
6226 };
6227
6228 let start = move || async {
6229 let op = self.send().await?;
6230 Ok(Operation::new(op))
6231 };
6232
6233 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
6234 }
6235
6236 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
6240 self.0.request.parent = v.into();
6241 self
6242 }
6243
6244 pub fn set_table_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
6248 self.0.request.table_id = v.into();
6249 self
6250 }
6251
6252 pub fn set_source<T: Into<Option<crate::model::restore_table_request::Source>>>(
6257 mut self,
6258 v: T,
6259 ) -> Self {
6260 self.0.request.source = v.into();
6261 self
6262 }
6263
6264 pub fn set_backup<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6270 self.0.request = self.0.request.set_backup(v);
6271 self
6272 }
6273 }
6274
6275 #[doc(hidden)]
6276 impl gax::options::internal::RequestBuilder for RestoreTable {
6277 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
6278 &mut self.0.options
6279 }
6280 }
6281
6282 #[derive(Clone, Debug)]
6301 pub struct CopyBackup(RequestBuilder<crate::model::CopyBackupRequest>);
6302
6303 impl CopyBackup {
6304 pub(crate) fn new(
6305 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
6306 ) -> Self {
6307 Self(RequestBuilder::new(stub))
6308 }
6309
6310 pub fn with_request<V: Into<crate::model::CopyBackupRequest>>(mut self, v: V) -> Self {
6312 self.0.request = v.into();
6313 self
6314 }
6315
6316 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
6318 self.0.options = v.into();
6319 self
6320 }
6321
6322 pub async fn send(self) -> Result<longrunning::model::Operation> {
6329 (*self.0.stub)
6330 .copy_backup(self.0.request, self.0.options)
6331 .await
6332 .map(gax::response::Response::into_body)
6333 }
6334
6335 pub fn poller(
6337 self,
6338 ) -> impl lro::Poller<crate::model::Backup, crate::model::CopyBackupMetadata> {
6339 type Operation =
6340 lro::internal::Operation<crate::model::Backup, crate::model::CopyBackupMetadata>;
6341 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6342 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6343
6344 let stub = self.0.stub.clone();
6345 let mut options = self.0.options.clone();
6346 options.set_retry_policy(gax::retry_policy::NeverRetry);
6347 let query = move |name| {
6348 let stub = stub.clone();
6349 let options = options.clone();
6350 async {
6351 let op = GetOperation::new(stub)
6352 .set_name(name)
6353 .with_options(options)
6354 .send()
6355 .await?;
6356 Ok(Operation::new(op))
6357 }
6358 };
6359
6360 let start = move || async {
6361 let op = self.send().await?;
6362 Ok(Operation::new(op))
6363 };
6364
6365 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
6366 }
6367
6368 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
6372 self.0.request.parent = v.into();
6373 self
6374 }
6375
6376 pub fn set_backup_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
6380 self.0.request.backup_id = v.into();
6381 self
6382 }
6383
6384 pub fn set_source_backup<T: Into<std::string::String>>(mut self, v: T) -> Self {
6388 self.0.request.source_backup = v.into();
6389 self
6390 }
6391
6392 pub fn set_expire_time<T>(mut self, v: T) -> Self
6396 where
6397 T: std::convert::Into<wkt::Timestamp>,
6398 {
6399 self.0.request.expire_time = std::option::Option::Some(v.into());
6400 self
6401 }
6402
6403 pub fn set_or_clear_expire_time<T>(mut self, v: std::option::Option<T>) -> Self
6407 where
6408 T: std::convert::Into<wkt::Timestamp>,
6409 {
6410 self.0.request.expire_time = v.map(|x| x.into());
6411 self
6412 }
6413 }
6414
6415 #[doc(hidden)]
6416 impl gax::options::internal::RequestBuilder for CopyBackup {
6417 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
6418 &mut self.0.options
6419 }
6420 }
6421
6422 #[derive(Clone, Debug)]
6440 pub struct GetIamPolicy(RequestBuilder<iam_v1::model::GetIamPolicyRequest>);
6441
6442 impl GetIamPolicy {
6443 pub(crate) fn new(
6444 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
6445 ) -> Self {
6446 Self(RequestBuilder::new(stub))
6447 }
6448
6449 pub fn with_request<V: Into<iam_v1::model::GetIamPolicyRequest>>(mut self, v: V) -> Self {
6451 self.0.request = v.into();
6452 self
6453 }
6454
6455 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
6457 self.0.options = v.into();
6458 self
6459 }
6460
6461 pub async fn send(self) -> Result<iam_v1::model::Policy> {
6463 (*self.0.stub)
6464 .get_iam_policy(self.0.request, self.0.options)
6465 .await
6466 .map(gax::response::Response::into_body)
6467 }
6468
6469 pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
6473 self.0.request.resource = v.into();
6474 self
6475 }
6476
6477 pub fn set_options<T>(mut self, v: T) -> Self
6479 where
6480 T: std::convert::Into<iam_v1::model::GetPolicyOptions>,
6481 {
6482 self.0.request.options = std::option::Option::Some(v.into());
6483 self
6484 }
6485
6486 pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
6488 where
6489 T: std::convert::Into<iam_v1::model::GetPolicyOptions>,
6490 {
6491 self.0.request.options = v.map(|x| x.into());
6492 self
6493 }
6494 }
6495
6496 #[doc(hidden)]
6497 impl gax::options::internal::RequestBuilder for GetIamPolicy {
6498 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
6499 &mut self.0.options
6500 }
6501 }
6502
6503 #[derive(Clone, Debug)]
6521 pub struct SetIamPolicy(RequestBuilder<iam_v1::model::SetIamPolicyRequest>);
6522
6523 impl SetIamPolicy {
6524 pub(crate) fn new(
6525 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
6526 ) -> Self {
6527 Self(RequestBuilder::new(stub))
6528 }
6529
6530 pub fn with_request<V: Into<iam_v1::model::SetIamPolicyRequest>>(mut self, v: V) -> Self {
6532 self.0.request = v.into();
6533 self
6534 }
6535
6536 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
6538 self.0.options = v.into();
6539 self
6540 }
6541
6542 pub async fn send(self) -> Result<iam_v1::model::Policy> {
6544 (*self.0.stub)
6545 .set_iam_policy(self.0.request, self.0.options)
6546 .await
6547 .map(gax::response::Response::into_body)
6548 }
6549
6550 pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
6554 self.0.request.resource = v.into();
6555 self
6556 }
6557
6558 pub fn set_policy<T>(mut self, v: T) -> Self
6562 where
6563 T: std::convert::Into<iam_v1::model::Policy>,
6564 {
6565 self.0.request.policy = std::option::Option::Some(v.into());
6566 self
6567 }
6568
6569 pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
6573 where
6574 T: std::convert::Into<iam_v1::model::Policy>,
6575 {
6576 self.0.request.policy = v.map(|x| x.into());
6577 self
6578 }
6579
6580 pub fn set_update_mask<T>(mut self, v: T) -> Self
6582 where
6583 T: std::convert::Into<wkt::FieldMask>,
6584 {
6585 self.0.request.update_mask = std::option::Option::Some(v.into());
6586 self
6587 }
6588
6589 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
6591 where
6592 T: std::convert::Into<wkt::FieldMask>,
6593 {
6594 self.0.request.update_mask = v.map(|x| x.into());
6595 self
6596 }
6597 }
6598
6599 #[doc(hidden)]
6600 impl gax::options::internal::RequestBuilder for SetIamPolicy {
6601 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
6602 &mut self.0.options
6603 }
6604 }
6605
6606 #[derive(Clone, Debug)]
6624 pub struct TestIamPermissions(RequestBuilder<iam_v1::model::TestIamPermissionsRequest>);
6625
6626 impl TestIamPermissions {
6627 pub(crate) fn new(
6628 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
6629 ) -> Self {
6630 Self(RequestBuilder::new(stub))
6631 }
6632
6633 pub fn with_request<V: Into<iam_v1::model::TestIamPermissionsRequest>>(
6635 mut self,
6636 v: V,
6637 ) -> Self {
6638 self.0.request = v.into();
6639 self
6640 }
6641
6642 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
6644 self.0.options = v.into();
6645 self
6646 }
6647
6648 pub async fn send(self) -> Result<iam_v1::model::TestIamPermissionsResponse> {
6650 (*self.0.stub)
6651 .test_iam_permissions(self.0.request, self.0.options)
6652 .await
6653 .map(gax::response::Response::into_body)
6654 }
6655
6656 pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
6660 self.0.request.resource = v.into();
6661 self
6662 }
6663
6664 pub fn set_permissions<T, V>(mut self, v: T) -> Self
6668 where
6669 T: std::iter::IntoIterator<Item = V>,
6670 V: std::convert::Into<std::string::String>,
6671 {
6672 use std::iter::Iterator;
6673 self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
6674 self
6675 }
6676 }
6677
6678 #[doc(hidden)]
6679 impl gax::options::internal::RequestBuilder for TestIamPermissions {
6680 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
6681 &mut self.0.options
6682 }
6683 }
6684
6685 #[derive(Clone, Debug)]
6704 pub struct CreateSchemaBundle(RequestBuilder<crate::model::CreateSchemaBundleRequest>);
6705
6706 impl CreateSchemaBundle {
6707 pub(crate) fn new(
6708 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
6709 ) -> Self {
6710 Self(RequestBuilder::new(stub))
6711 }
6712
6713 pub fn with_request<V: Into<crate::model::CreateSchemaBundleRequest>>(
6715 mut self,
6716 v: V,
6717 ) -> Self {
6718 self.0.request = v.into();
6719 self
6720 }
6721
6722 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
6724 self.0.options = v.into();
6725 self
6726 }
6727
6728 pub async fn send(self) -> Result<longrunning::model::Operation> {
6735 (*self.0.stub)
6736 .create_schema_bundle(self.0.request, self.0.options)
6737 .await
6738 .map(gax::response::Response::into_body)
6739 }
6740
6741 pub fn poller(
6743 self,
6744 ) -> impl lro::Poller<crate::model::SchemaBundle, crate::model::CreateSchemaBundleMetadata>
6745 {
6746 type Operation = lro::internal::Operation<
6747 crate::model::SchemaBundle,
6748 crate::model::CreateSchemaBundleMetadata,
6749 >;
6750 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6751 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6752
6753 let stub = self.0.stub.clone();
6754 let mut options = self.0.options.clone();
6755 options.set_retry_policy(gax::retry_policy::NeverRetry);
6756 let query = move |name| {
6757 let stub = stub.clone();
6758 let options = options.clone();
6759 async {
6760 let op = GetOperation::new(stub)
6761 .set_name(name)
6762 .with_options(options)
6763 .send()
6764 .await?;
6765 Ok(Operation::new(op))
6766 }
6767 };
6768
6769 let start = move || async {
6770 let op = self.send().await?;
6771 Ok(Operation::new(op))
6772 };
6773
6774 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
6775 }
6776
6777 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
6781 self.0.request.parent = v.into();
6782 self
6783 }
6784
6785 pub fn set_schema_bundle_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
6789 self.0.request.schema_bundle_id = v.into();
6790 self
6791 }
6792
6793 pub fn set_schema_bundle<T>(mut self, v: T) -> Self
6797 where
6798 T: std::convert::Into<crate::model::SchemaBundle>,
6799 {
6800 self.0.request.schema_bundle = std::option::Option::Some(v.into());
6801 self
6802 }
6803
6804 pub fn set_or_clear_schema_bundle<T>(mut self, v: std::option::Option<T>) -> Self
6808 where
6809 T: std::convert::Into<crate::model::SchemaBundle>,
6810 {
6811 self.0.request.schema_bundle = v.map(|x| x.into());
6812 self
6813 }
6814 }
6815
6816 #[doc(hidden)]
6817 impl gax::options::internal::RequestBuilder for CreateSchemaBundle {
6818 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
6819 &mut self.0.options
6820 }
6821 }
6822
6823 #[derive(Clone, Debug)]
6842 pub struct UpdateSchemaBundle(RequestBuilder<crate::model::UpdateSchemaBundleRequest>);
6843
6844 impl UpdateSchemaBundle {
6845 pub(crate) fn new(
6846 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
6847 ) -> Self {
6848 Self(RequestBuilder::new(stub))
6849 }
6850
6851 pub fn with_request<V: Into<crate::model::UpdateSchemaBundleRequest>>(
6853 mut self,
6854 v: V,
6855 ) -> Self {
6856 self.0.request = v.into();
6857 self
6858 }
6859
6860 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
6862 self.0.options = v.into();
6863 self
6864 }
6865
6866 pub async fn send(self) -> Result<longrunning::model::Operation> {
6873 (*self.0.stub)
6874 .update_schema_bundle(self.0.request, self.0.options)
6875 .await
6876 .map(gax::response::Response::into_body)
6877 }
6878
6879 pub fn poller(
6881 self,
6882 ) -> impl lro::Poller<crate::model::SchemaBundle, crate::model::UpdateSchemaBundleMetadata>
6883 {
6884 type Operation = lro::internal::Operation<
6885 crate::model::SchemaBundle,
6886 crate::model::UpdateSchemaBundleMetadata,
6887 >;
6888 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6889 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6890
6891 let stub = self.0.stub.clone();
6892 let mut options = self.0.options.clone();
6893 options.set_retry_policy(gax::retry_policy::NeverRetry);
6894 let query = move |name| {
6895 let stub = stub.clone();
6896 let options = options.clone();
6897 async {
6898 let op = GetOperation::new(stub)
6899 .set_name(name)
6900 .with_options(options)
6901 .send()
6902 .await?;
6903 Ok(Operation::new(op))
6904 }
6905 };
6906
6907 let start = move || async {
6908 let op = self.send().await?;
6909 Ok(Operation::new(op))
6910 };
6911
6912 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
6913 }
6914
6915 pub fn set_schema_bundle<T>(mut self, v: T) -> Self
6919 where
6920 T: std::convert::Into<crate::model::SchemaBundle>,
6921 {
6922 self.0.request.schema_bundle = std::option::Option::Some(v.into());
6923 self
6924 }
6925
6926 pub fn set_or_clear_schema_bundle<T>(mut self, v: std::option::Option<T>) -> Self
6930 where
6931 T: std::convert::Into<crate::model::SchemaBundle>,
6932 {
6933 self.0.request.schema_bundle = v.map(|x| x.into());
6934 self
6935 }
6936
6937 pub fn set_update_mask<T>(mut self, v: T) -> Self
6939 where
6940 T: std::convert::Into<wkt::FieldMask>,
6941 {
6942 self.0.request.update_mask = std::option::Option::Some(v.into());
6943 self
6944 }
6945
6946 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
6948 where
6949 T: std::convert::Into<wkt::FieldMask>,
6950 {
6951 self.0.request.update_mask = v.map(|x| x.into());
6952 self
6953 }
6954
6955 pub fn set_ignore_warnings<T: Into<bool>>(mut self, v: T) -> Self {
6957 self.0.request.ignore_warnings = v.into();
6958 self
6959 }
6960 }
6961
6962 #[doc(hidden)]
6963 impl gax::options::internal::RequestBuilder for UpdateSchemaBundle {
6964 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
6965 &mut self.0.options
6966 }
6967 }
6968
6969 #[derive(Clone, Debug)]
6987 pub struct GetSchemaBundle(RequestBuilder<crate::model::GetSchemaBundleRequest>);
6988
6989 impl GetSchemaBundle {
6990 pub(crate) fn new(
6991 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
6992 ) -> Self {
6993 Self(RequestBuilder::new(stub))
6994 }
6995
6996 pub fn with_request<V: Into<crate::model::GetSchemaBundleRequest>>(mut self, v: V) -> Self {
6998 self.0.request = v.into();
6999 self
7000 }
7001
7002 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
7004 self.0.options = v.into();
7005 self
7006 }
7007
7008 pub async fn send(self) -> Result<crate::model::SchemaBundle> {
7010 (*self.0.stub)
7011 .get_schema_bundle(self.0.request, self.0.options)
7012 .await
7013 .map(gax::response::Response::into_body)
7014 }
7015
7016 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7020 self.0.request.name = v.into();
7021 self
7022 }
7023 }
7024
7025 #[doc(hidden)]
7026 impl gax::options::internal::RequestBuilder for GetSchemaBundle {
7027 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
7028 &mut self.0.options
7029 }
7030 }
7031
7032 #[derive(Clone, Debug)]
7054 pub struct ListSchemaBundles(RequestBuilder<crate::model::ListSchemaBundlesRequest>);
7055
7056 impl ListSchemaBundles {
7057 pub(crate) fn new(
7058 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
7059 ) -> Self {
7060 Self(RequestBuilder::new(stub))
7061 }
7062
7063 pub fn with_request<V: Into<crate::model::ListSchemaBundlesRequest>>(
7065 mut self,
7066 v: V,
7067 ) -> Self {
7068 self.0.request = v.into();
7069 self
7070 }
7071
7072 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
7074 self.0.options = v.into();
7075 self
7076 }
7077
7078 pub async fn send(self) -> Result<crate::model::ListSchemaBundlesResponse> {
7080 (*self.0.stub)
7081 .list_schema_bundles(self.0.request, self.0.options)
7082 .await
7083 .map(gax::response::Response::into_body)
7084 }
7085
7086 pub fn by_page(
7088 self,
7089 ) -> impl gax::paginator::Paginator<crate::model::ListSchemaBundlesResponse, gax::error::Error>
7090 {
7091 use std::clone::Clone;
7092 let token = self.0.request.page_token.clone();
7093 let execute = move |token: String| {
7094 let mut builder = self.clone();
7095 builder.0.request = builder.0.request.set_page_token(token);
7096 builder.send()
7097 };
7098 gax::paginator::internal::new_paginator(token, execute)
7099 }
7100
7101 pub fn by_item(
7103 self,
7104 ) -> impl gax::paginator::ItemPaginator<crate::model::ListSchemaBundlesResponse, gax::error::Error>
7105 {
7106 use gax::paginator::Paginator;
7107 self.by_page().items()
7108 }
7109
7110 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
7114 self.0.request.parent = v.into();
7115 self
7116 }
7117
7118 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
7120 self.0.request.page_size = v.into();
7121 self
7122 }
7123
7124 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
7126 self.0.request.page_token = v.into();
7127 self
7128 }
7129 }
7130
7131 #[doc(hidden)]
7132 impl gax::options::internal::RequestBuilder for ListSchemaBundles {
7133 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
7134 &mut self.0.options
7135 }
7136 }
7137
7138 #[derive(Clone, Debug)]
7156 pub struct DeleteSchemaBundle(RequestBuilder<crate::model::DeleteSchemaBundleRequest>);
7157
7158 impl DeleteSchemaBundle {
7159 pub(crate) fn new(
7160 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
7161 ) -> Self {
7162 Self(RequestBuilder::new(stub))
7163 }
7164
7165 pub fn with_request<V: Into<crate::model::DeleteSchemaBundleRequest>>(
7167 mut self,
7168 v: V,
7169 ) -> Self {
7170 self.0.request = v.into();
7171 self
7172 }
7173
7174 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
7176 self.0.options = v.into();
7177 self
7178 }
7179
7180 pub async fn send(self) -> Result<()> {
7182 (*self.0.stub)
7183 .delete_schema_bundle(self.0.request, self.0.options)
7184 .await
7185 .map(gax::response::Response::into_body)
7186 }
7187
7188 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7192 self.0.request.name = v.into();
7193 self
7194 }
7195
7196 pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
7198 self.0.request.etag = v.into();
7199 self
7200 }
7201 }
7202
7203 #[doc(hidden)]
7204 impl gax::options::internal::RequestBuilder for DeleteSchemaBundle {
7205 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
7206 &mut self.0.options
7207 }
7208 }
7209
7210 #[derive(Clone, Debug)]
7232 pub struct ListOperations(RequestBuilder<longrunning::model::ListOperationsRequest>);
7233
7234 impl ListOperations {
7235 pub(crate) fn new(
7236 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
7237 ) -> Self {
7238 Self(RequestBuilder::new(stub))
7239 }
7240
7241 pub fn with_request<V: Into<longrunning::model::ListOperationsRequest>>(
7243 mut self,
7244 v: V,
7245 ) -> Self {
7246 self.0.request = v.into();
7247 self
7248 }
7249
7250 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
7252 self.0.options = v.into();
7253 self
7254 }
7255
7256 pub async fn send(self) -> Result<longrunning::model::ListOperationsResponse> {
7258 (*self.0.stub)
7259 .list_operations(self.0.request, self.0.options)
7260 .await
7261 .map(gax::response::Response::into_body)
7262 }
7263
7264 pub fn by_page(
7266 self,
7267 ) -> impl gax::paginator::Paginator<longrunning::model::ListOperationsResponse, gax::error::Error>
7268 {
7269 use std::clone::Clone;
7270 let token = self.0.request.page_token.clone();
7271 let execute = move |token: String| {
7272 let mut builder = self.clone();
7273 builder.0.request = builder.0.request.set_page_token(token);
7274 builder.send()
7275 };
7276 gax::paginator::internal::new_paginator(token, execute)
7277 }
7278
7279 pub fn by_item(
7281 self,
7282 ) -> impl gax::paginator::ItemPaginator<
7283 longrunning::model::ListOperationsResponse,
7284 gax::error::Error,
7285 > {
7286 use gax::paginator::Paginator;
7287 self.by_page().items()
7288 }
7289
7290 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7292 self.0.request.name = v.into();
7293 self
7294 }
7295
7296 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
7298 self.0.request.filter = v.into();
7299 self
7300 }
7301
7302 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
7304 self.0.request.page_size = v.into();
7305 self
7306 }
7307
7308 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
7310 self.0.request.page_token = v.into();
7311 self
7312 }
7313
7314 pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
7316 self.0.request.return_partial_success = v.into();
7317 self
7318 }
7319 }
7320
7321 #[doc(hidden)]
7322 impl gax::options::internal::RequestBuilder for ListOperations {
7323 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
7324 &mut self.0.options
7325 }
7326 }
7327
7328 #[derive(Clone, Debug)]
7346 pub struct GetOperation(RequestBuilder<longrunning::model::GetOperationRequest>);
7347
7348 impl GetOperation {
7349 pub(crate) fn new(
7350 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
7351 ) -> Self {
7352 Self(RequestBuilder::new(stub))
7353 }
7354
7355 pub fn with_request<V: Into<longrunning::model::GetOperationRequest>>(
7357 mut self,
7358 v: V,
7359 ) -> Self {
7360 self.0.request = v.into();
7361 self
7362 }
7363
7364 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
7366 self.0.options = v.into();
7367 self
7368 }
7369
7370 pub async fn send(self) -> Result<longrunning::model::Operation> {
7372 (*self.0.stub)
7373 .get_operation(self.0.request, self.0.options)
7374 .await
7375 .map(gax::response::Response::into_body)
7376 }
7377
7378 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7380 self.0.request.name = v.into();
7381 self
7382 }
7383 }
7384
7385 #[doc(hidden)]
7386 impl gax::options::internal::RequestBuilder for GetOperation {
7387 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
7388 &mut self.0.options
7389 }
7390 }
7391
7392 #[derive(Clone, Debug)]
7410 pub struct DeleteOperation(RequestBuilder<longrunning::model::DeleteOperationRequest>);
7411
7412 impl DeleteOperation {
7413 pub(crate) fn new(
7414 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
7415 ) -> Self {
7416 Self(RequestBuilder::new(stub))
7417 }
7418
7419 pub fn with_request<V: Into<longrunning::model::DeleteOperationRequest>>(
7421 mut self,
7422 v: V,
7423 ) -> Self {
7424 self.0.request = v.into();
7425 self
7426 }
7427
7428 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
7430 self.0.options = v.into();
7431 self
7432 }
7433
7434 pub async fn send(self) -> Result<()> {
7436 (*self.0.stub)
7437 .delete_operation(self.0.request, self.0.options)
7438 .await
7439 .map(gax::response::Response::into_body)
7440 }
7441
7442 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7444 self.0.request.name = v.into();
7445 self
7446 }
7447 }
7448
7449 #[doc(hidden)]
7450 impl gax::options::internal::RequestBuilder for DeleteOperation {
7451 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
7452 &mut self.0.options
7453 }
7454 }
7455
7456 #[derive(Clone, Debug)]
7474 pub struct CancelOperation(RequestBuilder<longrunning::model::CancelOperationRequest>);
7475
7476 impl CancelOperation {
7477 pub(crate) fn new(
7478 stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
7479 ) -> Self {
7480 Self(RequestBuilder::new(stub))
7481 }
7482
7483 pub fn with_request<V: Into<longrunning::model::CancelOperationRequest>>(
7485 mut self,
7486 v: V,
7487 ) -> Self {
7488 self.0.request = v.into();
7489 self
7490 }
7491
7492 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
7494 self.0.options = v.into();
7495 self
7496 }
7497
7498 pub async fn send(self) -> Result<()> {
7500 (*self.0.stub)
7501 .cancel_operation(self.0.request, self.0.options)
7502 .await
7503 .map(gax::response::Response::into_body)
7504 }
7505
7506 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7508 self.0.request.name = v.into();
7509 self
7510 }
7511 }
7512
7513 #[doc(hidden)]
7514 impl gax::options::internal::RequestBuilder for CancelOperation {
7515 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
7516 &mut self.0.options
7517 }
7518 }
7519}