1pub mod datastore_admin {
19 use crate::Result;
20
21 pub type ClientBuilder = crate::ClientBuilder<client::Factory, gaxi::options::Credentials>;
35
36 pub(crate) mod client {
37 use super::super::super::client::DatastoreAdmin;
38 pub struct Factory;
39 impl crate::ClientFactory for Factory {
40 type Client = DatastoreAdmin;
41 type Credentials = gaxi::options::Credentials;
42 async fn build(
43 self,
44 config: gaxi::options::ClientConfig,
45 ) -> crate::ClientBuilderResult<Self::Client> {
46 Self::Client::new(config).await
47 }
48 }
49 }
50
51 #[derive(Clone, Debug)]
53 pub(crate) struct RequestBuilder<R: std::default::Default> {
54 stub: std::sync::Arc<dyn super::super::stub::dynamic::DatastoreAdmin>,
55 request: R,
56 options: crate::RequestOptions,
57 }
58
59 impl<R> RequestBuilder<R>
60 where
61 R: std::default::Default,
62 {
63 pub(crate) fn new(
64 stub: std::sync::Arc<dyn super::super::stub::dynamic::DatastoreAdmin>,
65 ) -> Self {
66 Self {
67 stub,
68 request: R::default(),
69 options: crate::RequestOptions::default(),
70 }
71 }
72 }
73
74 #[derive(Clone, Debug)]
92 pub struct ExportEntities(RequestBuilder<crate::model::ExportEntitiesRequest>);
93
94 impl ExportEntities {
95 pub(crate) fn new(
96 stub: std::sync::Arc<dyn super::super::stub::dynamic::DatastoreAdmin>,
97 ) -> Self {
98 Self(RequestBuilder::new(stub))
99 }
100
101 pub fn with_request<V: Into<crate::model::ExportEntitiesRequest>>(mut self, v: V) -> Self {
103 self.0.request = v.into();
104 self
105 }
106
107 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
109 self.0.options = v.into();
110 self
111 }
112
113 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
120 (*self.0.stub)
121 .export_entities(self.0.request, self.0.options)
122 .await
123 .map(crate::Response::into_body)
124 }
125
126 pub fn poller(
128 self,
129 ) -> impl google_cloud_lro::Poller<
130 crate::model::ExportEntitiesResponse,
131 crate::model::ExportEntitiesMetadata,
132 > {
133 type Operation = google_cloud_lro::internal::Operation<
134 crate::model::ExportEntitiesResponse,
135 crate::model::ExportEntitiesMetadata,
136 >;
137 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
138 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
139
140 let stub = self.0.stub.clone();
141 let mut options = self.0.options.clone();
142 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
143 let query = move |name| {
144 let stub = stub.clone();
145 let options = options.clone();
146 async {
147 let op = GetOperation::new(stub)
148 .set_name(name)
149 .with_options(options)
150 .send()
151 .await?;
152 Ok(Operation::new(op))
153 }
154 };
155
156 let start = move || async {
157 let op = self.send().await?;
158 Ok(Operation::new(op))
159 };
160
161 google_cloud_lro::internal::new_poller(
162 polling_error_policy,
163 polling_backoff_policy,
164 start,
165 query,
166 )
167 }
168
169 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
173 self.0.request.project_id = v.into();
174 self
175 }
176
177 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
179 where
180 T: std::iter::IntoIterator<Item = (K, V)>,
181 K: std::convert::Into<std::string::String>,
182 V: std::convert::Into<std::string::String>,
183 {
184 self.0.request.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
185 self
186 }
187
188 pub fn set_entity_filter<T>(mut self, v: T) -> Self
190 where
191 T: std::convert::Into<crate::model::EntityFilter>,
192 {
193 self.0.request.entity_filter = std::option::Option::Some(v.into());
194 self
195 }
196
197 pub fn set_or_clear_entity_filter<T>(mut self, v: std::option::Option<T>) -> Self
199 where
200 T: std::convert::Into<crate::model::EntityFilter>,
201 {
202 self.0.request.entity_filter = v.map(|x| x.into());
203 self
204 }
205
206 pub fn set_output_url_prefix<T: Into<std::string::String>>(mut self, v: T) -> Self {
210 self.0.request.output_url_prefix = v.into();
211 self
212 }
213 }
214
215 #[doc(hidden)]
216 impl crate::RequestBuilder for ExportEntities {
217 fn request_options(&mut self) -> &mut crate::RequestOptions {
218 &mut self.0.options
219 }
220 }
221
222 #[derive(Clone, Debug)]
240 pub struct ImportEntities(RequestBuilder<crate::model::ImportEntitiesRequest>);
241
242 impl ImportEntities {
243 pub(crate) fn new(
244 stub: std::sync::Arc<dyn super::super::stub::dynamic::DatastoreAdmin>,
245 ) -> Self {
246 Self(RequestBuilder::new(stub))
247 }
248
249 pub fn with_request<V: Into<crate::model::ImportEntitiesRequest>>(mut self, v: V) -> Self {
251 self.0.request = v.into();
252 self
253 }
254
255 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
257 self.0.options = v.into();
258 self
259 }
260
261 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
268 (*self.0.stub)
269 .import_entities(self.0.request, self.0.options)
270 .await
271 .map(crate::Response::into_body)
272 }
273
274 pub fn poller(
276 self,
277 ) -> impl google_cloud_lro::Poller<(), crate::model::ImportEntitiesMetadata> {
278 type Operation = google_cloud_lro::internal::Operation<
279 wkt::Empty,
280 crate::model::ImportEntitiesMetadata,
281 >;
282 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
283 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
284
285 let stub = self.0.stub.clone();
286 let mut options = self.0.options.clone();
287 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
288 let query = move |name| {
289 let stub = stub.clone();
290 let options = options.clone();
291 async {
292 let op = GetOperation::new(stub)
293 .set_name(name)
294 .with_options(options)
295 .send()
296 .await?;
297 Ok(Operation::new(op))
298 }
299 };
300
301 let start = move || async {
302 let op = self.send().await?;
303 Ok(Operation::new(op))
304 };
305
306 google_cloud_lro::internal::new_unit_response_poller(
307 polling_error_policy,
308 polling_backoff_policy,
309 start,
310 query,
311 )
312 }
313
314 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
318 self.0.request.project_id = v.into();
319 self
320 }
321
322 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
324 where
325 T: std::iter::IntoIterator<Item = (K, V)>,
326 K: std::convert::Into<std::string::String>,
327 V: std::convert::Into<std::string::String>,
328 {
329 self.0.request.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
330 self
331 }
332
333 pub fn set_input_url<T: Into<std::string::String>>(mut self, v: T) -> Self {
337 self.0.request.input_url = v.into();
338 self
339 }
340
341 pub fn set_entity_filter<T>(mut self, v: T) -> Self
343 where
344 T: std::convert::Into<crate::model::EntityFilter>,
345 {
346 self.0.request.entity_filter = std::option::Option::Some(v.into());
347 self
348 }
349
350 pub fn set_or_clear_entity_filter<T>(mut self, v: std::option::Option<T>) -> Self
352 where
353 T: std::convert::Into<crate::model::EntityFilter>,
354 {
355 self.0.request.entity_filter = v.map(|x| x.into());
356 self
357 }
358 }
359
360 #[doc(hidden)]
361 impl crate::RequestBuilder for ImportEntities {
362 fn request_options(&mut self) -> &mut crate::RequestOptions {
363 &mut self.0.options
364 }
365 }
366
367 #[derive(Clone, Debug)]
385 pub struct CreateIndex(RequestBuilder<crate::model::CreateIndexRequest>);
386
387 impl CreateIndex {
388 pub(crate) fn new(
389 stub: std::sync::Arc<dyn super::super::stub::dynamic::DatastoreAdmin>,
390 ) -> Self {
391 Self(RequestBuilder::new(stub))
392 }
393
394 pub fn with_request<V: Into<crate::model::CreateIndexRequest>>(mut self, v: V) -> Self {
396 self.0.request = v.into();
397 self
398 }
399
400 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
402 self.0.options = v.into();
403 self
404 }
405
406 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
413 (*self.0.stub)
414 .create_index(self.0.request, self.0.options)
415 .await
416 .map(crate::Response::into_body)
417 }
418
419 pub fn poller(
421 self,
422 ) -> impl google_cloud_lro::Poller<crate::model::Index, crate::model::IndexOperationMetadata>
423 {
424 type Operation = google_cloud_lro::internal::Operation<
425 crate::model::Index,
426 crate::model::IndexOperationMetadata,
427 >;
428 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
429 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
430
431 let stub = self.0.stub.clone();
432 let mut options = self.0.options.clone();
433 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
434 let query = move |name| {
435 let stub = stub.clone();
436 let options = options.clone();
437 async {
438 let op = GetOperation::new(stub)
439 .set_name(name)
440 .with_options(options)
441 .send()
442 .await?;
443 Ok(Operation::new(op))
444 }
445 };
446
447 let start = move || async {
448 let op = self.send().await?;
449 Ok(Operation::new(op))
450 };
451
452 google_cloud_lro::internal::new_poller(
453 polling_error_policy,
454 polling_backoff_policy,
455 start,
456 query,
457 )
458 }
459
460 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
462 self.0.request.project_id = v.into();
463 self
464 }
465
466 pub fn set_index<T>(mut self, v: T) -> Self
468 where
469 T: std::convert::Into<crate::model::Index>,
470 {
471 self.0.request.index = std::option::Option::Some(v.into());
472 self
473 }
474
475 pub fn set_or_clear_index<T>(mut self, v: std::option::Option<T>) -> Self
477 where
478 T: std::convert::Into<crate::model::Index>,
479 {
480 self.0.request.index = v.map(|x| x.into());
481 self
482 }
483 }
484
485 #[doc(hidden)]
486 impl crate::RequestBuilder for CreateIndex {
487 fn request_options(&mut self) -> &mut crate::RequestOptions {
488 &mut self.0.options
489 }
490 }
491
492 #[derive(Clone, Debug)]
510 pub struct DeleteIndex(RequestBuilder<crate::model::DeleteIndexRequest>);
511
512 impl DeleteIndex {
513 pub(crate) fn new(
514 stub: std::sync::Arc<dyn super::super::stub::dynamic::DatastoreAdmin>,
515 ) -> Self {
516 Self(RequestBuilder::new(stub))
517 }
518
519 pub fn with_request<V: Into<crate::model::DeleteIndexRequest>>(mut self, v: V) -> Self {
521 self.0.request = v.into();
522 self
523 }
524
525 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
527 self.0.options = v.into();
528 self
529 }
530
531 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
538 (*self.0.stub)
539 .delete_index(self.0.request, self.0.options)
540 .await
541 .map(crate::Response::into_body)
542 }
543
544 pub fn poller(
546 self,
547 ) -> impl google_cloud_lro::Poller<crate::model::Index, crate::model::IndexOperationMetadata>
548 {
549 type Operation = google_cloud_lro::internal::Operation<
550 crate::model::Index,
551 crate::model::IndexOperationMetadata,
552 >;
553 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
554 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
555
556 let stub = self.0.stub.clone();
557 let mut options = self.0.options.clone();
558 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
559 let query = move |name| {
560 let stub = stub.clone();
561 let options = options.clone();
562 async {
563 let op = GetOperation::new(stub)
564 .set_name(name)
565 .with_options(options)
566 .send()
567 .await?;
568 Ok(Operation::new(op))
569 }
570 };
571
572 let start = move || async {
573 let op = self.send().await?;
574 Ok(Operation::new(op))
575 };
576
577 google_cloud_lro::internal::new_poller(
578 polling_error_policy,
579 polling_backoff_policy,
580 start,
581 query,
582 )
583 }
584
585 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
587 self.0.request.project_id = v.into();
588 self
589 }
590
591 pub fn set_index_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
593 self.0.request.index_id = v.into();
594 self
595 }
596 }
597
598 #[doc(hidden)]
599 impl crate::RequestBuilder for DeleteIndex {
600 fn request_options(&mut self) -> &mut crate::RequestOptions {
601 &mut self.0.options
602 }
603 }
604
605 #[derive(Clone, Debug)]
622 pub struct GetIndex(RequestBuilder<crate::model::GetIndexRequest>);
623
624 impl GetIndex {
625 pub(crate) fn new(
626 stub: std::sync::Arc<dyn super::super::stub::dynamic::DatastoreAdmin>,
627 ) -> Self {
628 Self(RequestBuilder::new(stub))
629 }
630
631 pub fn with_request<V: Into<crate::model::GetIndexRequest>>(mut self, v: V) -> Self {
633 self.0.request = v.into();
634 self
635 }
636
637 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
639 self.0.options = v.into();
640 self
641 }
642
643 pub async fn send(self) -> Result<crate::model::Index> {
645 (*self.0.stub)
646 .get_index(self.0.request, self.0.options)
647 .await
648 .map(crate::Response::into_body)
649 }
650
651 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
653 self.0.request.project_id = v.into();
654 self
655 }
656
657 pub fn set_index_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
659 self.0.request.index_id = v.into();
660 self
661 }
662 }
663
664 #[doc(hidden)]
665 impl crate::RequestBuilder for GetIndex {
666 fn request_options(&mut self) -> &mut crate::RequestOptions {
667 &mut self.0.options
668 }
669 }
670
671 #[derive(Clone, Debug)]
692 pub struct ListIndexes(RequestBuilder<crate::model::ListIndexesRequest>);
693
694 impl ListIndexes {
695 pub(crate) fn new(
696 stub: std::sync::Arc<dyn super::super::stub::dynamic::DatastoreAdmin>,
697 ) -> Self {
698 Self(RequestBuilder::new(stub))
699 }
700
701 pub fn with_request<V: Into<crate::model::ListIndexesRequest>>(mut self, v: V) -> Self {
703 self.0.request = v.into();
704 self
705 }
706
707 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
709 self.0.options = v.into();
710 self
711 }
712
713 pub async fn send(self) -> Result<crate::model::ListIndexesResponse> {
715 (*self.0.stub)
716 .list_indexes(self.0.request, self.0.options)
717 .await
718 .map(crate::Response::into_body)
719 }
720
721 pub fn by_page(
723 self,
724 ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListIndexesResponse, crate::Error>
725 {
726 use std::clone::Clone;
727 let token = self.0.request.page_token.clone();
728 let execute = move |token: String| {
729 let mut builder = self.clone();
730 builder.0.request = builder.0.request.set_page_token(token);
731 builder.send()
732 };
733 google_cloud_gax::paginator::internal::new_paginator(token, execute)
734 }
735
736 pub fn by_item(
738 self,
739 ) -> impl google_cloud_gax::paginator::ItemPaginator<
740 crate::model::ListIndexesResponse,
741 crate::Error,
742 > {
743 use google_cloud_gax::paginator::Paginator;
744 self.by_page().items()
745 }
746
747 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
749 self.0.request.project_id = v.into();
750 self
751 }
752
753 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
755 self.0.request.filter = v.into();
756 self
757 }
758
759 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
761 self.0.request.page_size = v.into();
762 self
763 }
764
765 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
767 self.0.request.page_token = v.into();
768 self
769 }
770 }
771
772 #[doc(hidden)]
773 impl crate::RequestBuilder for ListIndexes {
774 fn request_options(&mut self) -> &mut crate::RequestOptions {
775 &mut self.0.options
776 }
777 }
778
779 #[derive(Clone, Debug)]
800 pub struct ListOperations(
801 RequestBuilder<google_cloud_longrunning::model::ListOperationsRequest>,
802 );
803
804 impl ListOperations {
805 pub(crate) fn new(
806 stub: std::sync::Arc<dyn super::super::stub::dynamic::DatastoreAdmin>,
807 ) -> Self {
808 Self(RequestBuilder::new(stub))
809 }
810
811 pub fn with_request<V: Into<google_cloud_longrunning::model::ListOperationsRequest>>(
813 mut self,
814 v: V,
815 ) -> Self {
816 self.0.request = v.into();
817 self
818 }
819
820 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
822 self.0.options = v.into();
823 self
824 }
825
826 pub async fn send(self) -> Result<google_cloud_longrunning::model::ListOperationsResponse> {
828 (*self.0.stub)
829 .list_operations(self.0.request, self.0.options)
830 .await
831 .map(crate::Response::into_body)
832 }
833
834 pub fn by_page(
836 self,
837 ) -> impl google_cloud_gax::paginator::Paginator<
838 google_cloud_longrunning::model::ListOperationsResponse,
839 crate::Error,
840 > {
841 use std::clone::Clone;
842 let token = self.0.request.page_token.clone();
843 let execute = move |token: String| {
844 let mut builder = self.clone();
845 builder.0.request = builder.0.request.set_page_token(token);
846 builder.send()
847 };
848 google_cloud_gax::paginator::internal::new_paginator(token, execute)
849 }
850
851 pub fn by_item(
853 self,
854 ) -> impl google_cloud_gax::paginator::ItemPaginator<
855 google_cloud_longrunning::model::ListOperationsResponse,
856 crate::Error,
857 > {
858 use google_cloud_gax::paginator::Paginator;
859 self.by_page().items()
860 }
861
862 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
864 self.0.request.name = v.into();
865 self
866 }
867
868 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
870 self.0.request.filter = v.into();
871 self
872 }
873
874 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
876 self.0.request.page_size = v.into();
877 self
878 }
879
880 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
882 self.0.request.page_token = v.into();
883 self
884 }
885
886 pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
888 self.0.request.return_partial_success = v.into();
889 self
890 }
891 }
892
893 #[doc(hidden)]
894 impl crate::RequestBuilder for ListOperations {
895 fn request_options(&mut self) -> &mut crate::RequestOptions {
896 &mut self.0.options
897 }
898 }
899
900 #[derive(Clone, Debug)]
917 pub struct GetOperation(RequestBuilder<google_cloud_longrunning::model::GetOperationRequest>);
918
919 impl GetOperation {
920 pub(crate) fn new(
921 stub: std::sync::Arc<dyn super::super::stub::dynamic::DatastoreAdmin>,
922 ) -> Self {
923 Self(RequestBuilder::new(stub))
924 }
925
926 pub fn with_request<V: Into<google_cloud_longrunning::model::GetOperationRequest>>(
928 mut self,
929 v: V,
930 ) -> Self {
931 self.0.request = v.into();
932 self
933 }
934
935 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
937 self.0.options = v.into();
938 self
939 }
940
941 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
943 (*self.0.stub)
944 .get_operation(self.0.request, self.0.options)
945 .await
946 .map(crate::Response::into_body)
947 }
948
949 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
951 self.0.request.name = v.into();
952 self
953 }
954 }
955
956 #[doc(hidden)]
957 impl crate::RequestBuilder for GetOperation {
958 fn request_options(&mut self) -> &mut crate::RequestOptions {
959 &mut self.0.options
960 }
961 }
962
963 #[derive(Clone, Debug)]
980 pub struct DeleteOperation(
981 RequestBuilder<google_cloud_longrunning::model::DeleteOperationRequest>,
982 );
983
984 impl DeleteOperation {
985 pub(crate) fn new(
986 stub: std::sync::Arc<dyn super::super::stub::dynamic::DatastoreAdmin>,
987 ) -> Self {
988 Self(RequestBuilder::new(stub))
989 }
990
991 pub fn with_request<V: Into<google_cloud_longrunning::model::DeleteOperationRequest>>(
993 mut self,
994 v: V,
995 ) -> Self {
996 self.0.request = v.into();
997 self
998 }
999
1000 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1002 self.0.options = v.into();
1003 self
1004 }
1005
1006 pub async fn send(self) -> Result<()> {
1008 (*self.0.stub)
1009 .delete_operation(self.0.request, self.0.options)
1010 .await
1011 .map(crate::Response::into_body)
1012 }
1013
1014 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1016 self.0.request.name = v.into();
1017 self
1018 }
1019 }
1020
1021 #[doc(hidden)]
1022 impl crate::RequestBuilder for DeleteOperation {
1023 fn request_options(&mut self) -> &mut crate::RequestOptions {
1024 &mut self.0.options
1025 }
1026 }
1027
1028 #[derive(Clone, Debug)]
1045 pub struct CancelOperation(
1046 RequestBuilder<google_cloud_longrunning::model::CancelOperationRequest>,
1047 );
1048
1049 impl CancelOperation {
1050 pub(crate) fn new(
1051 stub: std::sync::Arc<dyn super::super::stub::dynamic::DatastoreAdmin>,
1052 ) -> Self {
1053 Self(RequestBuilder::new(stub))
1054 }
1055
1056 pub fn with_request<V: Into<google_cloud_longrunning::model::CancelOperationRequest>>(
1058 mut self,
1059 v: V,
1060 ) -> Self {
1061 self.0.request = v.into();
1062 self
1063 }
1064
1065 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1067 self.0.options = v.into();
1068 self
1069 }
1070
1071 pub async fn send(self) -> Result<()> {
1073 (*self.0.stub)
1074 .cancel_operation(self.0.request, self.0.options)
1075 .await
1076 .map(crate::Response::into_body)
1077 }
1078
1079 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1081 self.0.request.name = v.into();
1082 self
1083 }
1084 }
1085
1086 #[doc(hidden)]
1087 impl crate::RequestBuilder for CancelOperation {
1088 fn request_options(&mut self) -> &mut crate::RequestOptions {
1089 &mut self.0.options
1090 }
1091 }
1092}