1pub mod speech {
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::Speech;
38 pub struct Factory;
39 impl gax::client_builder::internal::ClientFactory for Factory {
40 type Client = Speech;
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::Speech>,
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(stub: std::sync::Arc<dyn super::super::stub::dynamic::Speech>) -> Self {
64 Self {
65 stub,
66 request: R::default(),
67 options: gax::options::RequestOptions::default(),
68 }
69 }
70 }
71
72 #[derive(Clone, Debug)]
91 pub struct CreateRecognizer(RequestBuilder<crate::model::CreateRecognizerRequest>);
92
93 impl CreateRecognizer {
94 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Speech>) -> Self {
95 Self(RequestBuilder::new(stub))
96 }
97
98 pub fn with_request<V: Into<crate::model::CreateRecognizerRequest>>(
100 mut self,
101 v: V,
102 ) -> Self {
103 self.0.request = v.into();
104 self
105 }
106
107 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
109 self.0.options = v.into();
110 self
111 }
112
113 pub async fn send(self) -> Result<longrunning::model::Operation> {
120 (*self.0.stub)
121 .create_recognizer(self.0.request, self.0.options)
122 .await
123 .map(gax::response::Response::into_body)
124 }
125
126 pub fn poller(
128 self,
129 ) -> impl lro::Poller<crate::model::Recognizer, crate::model::OperationMetadata> {
130 type Operation =
131 lro::internal::Operation<crate::model::Recognizer, crate::model::OperationMetadata>;
132 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
133 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
134
135 let stub = self.0.stub.clone();
136 let mut options = self.0.options.clone();
137 options.set_retry_policy(gax::retry_policy::NeverRetry);
138 let query = move |name| {
139 let stub = stub.clone();
140 let options = options.clone();
141 async {
142 let op = GetOperation::new(stub)
143 .set_name(name)
144 .with_options(options)
145 .send()
146 .await?;
147 Ok(Operation::new(op))
148 }
149 };
150
151 let start = move || async {
152 let op = self.send().await?;
153 Ok(Operation::new(op))
154 };
155
156 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
157 }
158
159 pub fn set_recognizer<T>(mut self, v: T) -> Self
163 where
164 T: std::convert::Into<crate::model::Recognizer>,
165 {
166 self.0.request.recognizer = std::option::Option::Some(v.into());
167 self
168 }
169
170 pub fn set_or_clear_recognizer<T>(mut self, v: std::option::Option<T>) -> Self
174 where
175 T: std::convert::Into<crate::model::Recognizer>,
176 {
177 self.0.request.recognizer = v.map(|x| x.into());
178 self
179 }
180
181 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
183 self.0.request.validate_only = v.into();
184 self
185 }
186
187 pub fn set_recognizer_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
189 self.0.request.recognizer_id = v.into();
190 self
191 }
192
193 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
197 self.0.request.parent = v.into();
198 self
199 }
200 }
201
202 #[doc(hidden)]
203 impl gax::options::internal::RequestBuilder for CreateRecognizer {
204 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
205 &mut self.0.options
206 }
207 }
208
209 #[derive(Clone, Debug)]
231 pub struct ListRecognizers(RequestBuilder<crate::model::ListRecognizersRequest>);
232
233 impl ListRecognizers {
234 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Speech>) -> Self {
235 Self(RequestBuilder::new(stub))
236 }
237
238 pub fn with_request<V: Into<crate::model::ListRecognizersRequest>>(mut self, v: V) -> Self {
240 self.0.request = v.into();
241 self
242 }
243
244 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
246 self.0.options = v.into();
247 self
248 }
249
250 pub async fn send(self) -> Result<crate::model::ListRecognizersResponse> {
252 (*self.0.stub)
253 .list_recognizers(self.0.request, self.0.options)
254 .await
255 .map(gax::response::Response::into_body)
256 }
257
258 pub fn by_page(
260 self,
261 ) -> impl gax::paginator::Paginator<crate::model::ListRecognizersResponse, gax::error::Error>
262 {
263 use std::clone::Clone;
264 let token = self.0.request.page_token.clone();
265 let execute = move |token: String| {
266 let mut builder = self.clone();
267 builder.0.request = builder.0.request.set_page_token(token);
268 builder.send()
269 };
270 gax::paginator::internal::new_paginator(token, execute)
271 }
272
273 pub fn by_item(
275 self,
276 ) -> impl gax::paginator::ItemPaginator<crate::model::ListRecognizersResponse, gax::error::Error>
277 {
278 use gax::paginator::Paginator;
279 self.by_page().items()
280 }
281
282 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
286 self.0.request.parent = v.into();
287 self
288 }
289
290 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
292 self.0.request.page_size = v.into();
293 self
294 }
295
296 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
298 self.0.request.page_token = v.into();
299 self
300 }
301
302 pub fn set_show_deleted<T: Into<bool>>(mut self, v: T) -> Self {
304 self.0.request.show_deleted = v.into();
305 self
306 }
307 }
308
309 #[doc(hidden)]
310 impl gax::options::internal::RequestBuilder for ListRecognizers {
311 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
312 &mut self.0.options
313 }
314 }
315
316 #[derive(Clone, Debug)]
334 pub struct GetRecognizer(RequestBuilder<crate::model::GetRecognizerRequest>);
335
336 impl GetRecognizer {
337 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Speech>) -> Self {
338 Self(RequestBuilder::new(stub))
339 }
340
341 pub fn with_request<V: Into<crate::model::GetRecognizerRequest>>(mut self, v: V) -> Self {
343 self.0.request = v.into();
344 self
345 }
346
347 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
349 self.0.options = v.into();
350 self
351 }
352
353 pub async fn send(self) -> Result<crate::model::Recognizer> {
355 (*self.0.stub)
356 .get_recognizer(self.0.request, self.0.options)
357 .await
358 .map(gax::response::Response::into_body)
359 }
360
361 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
365 self.0.request.name = v.into();
366 self
367 }
368 }
369
370 #[doc(hidden)]
371 impl gax::options::internal::RequestBuilder for GetRecognizer {
372 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
373 &mut self.0.options
374 }
375 }
376
377 #[derive(Clone, Debug)]
396 pub struct UpdateRecognizer(RequestBuilder<crate::model::UpdateRecognizerRequest>);
397
398 impl UpdateRecognizer {
399 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Speech>) -> Self {
400 Self(RequestBuilder::new(stub))
401 }
402
403 pub fn with_request<V: Into<crate::model::UpdateRecognizerRequest>>(
405 mut self,
406 v: V,
407 ) -> Self {
408 self.0.request = v.into();
409 self
410 }
411
412 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
414 self.0.options = v.into();
415 self
416 }
417
418 pub async fn send(self) -> Result<longrunning::model::Operation> {
425 (*self.0.stub)
426 .update_recognizer(self.0.request, self.0.options)
427 .await
428 .map(gax::response::Response::into_body)
429 }
430
431 pub fn poller(
433 self,
434 ) -> impl lro::Poller<crate::model::Recognizer, crate::model::OperationMetadata> {
435 type Operation =
436 lro::internal::Operation<crate::model::Recognizer, crate::model::OperationMetadata>;
437 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
438 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
439
440 let stub = self.0.stub.clone();
441 let mut options = self.0.options.clone();
442 options.set_retry_policy(gax::retry_policy::NeverRetry);
443 let query = move |name| {
444 let stub = stub.clone();
445 let options = options.clone();
446 async {
447 let op = GetOperation::new(stub)
448 .set_name(name)
449 .with_options(options)
450 .send()
451 .await?;
452 Ok(Operation::new(op))
453 }
454 };
455
456 let start = move || async {
457 let op = self.send().await?;
458 Ok(Operation::new(op))
459 };
460
461 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
462 }
463
464 pub fn set_recognizer<T>(mut self, v: T) -> Self
468 where
469 T: std::convert::Into<crate::model::Recognizer>,
470 {
471 self.0.request.recognizer = std::option::Option::Some(v.into());
472 self
473 }
474
475 pub fn set_or_clear_recognizer<T>(mut self, v: std::option::Option<T>) -> Self
479 where
480 T: std::convert::Into<crate::model::Recognizer>,
481 {
482 self.0.request.recognizer = v.map(|x| x.into());
483 self
484 }
485
486 pub fn set_update_mask<T>(mut self, v: T) -> Self
488 where
489 T: std::convert::Into<wkt::FieldMask>,
490 {
491 self.0.request.update_mask = std::option::Option::Some(v.into());
492 self
493 }
494
495 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
497 where
498 T: std::convert::Into<wkt::FieldMask>,
499 {
500 self.0.request.update_mask = v.map(|x| x.into());
501 self
502 }
503
504 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
506 self.0.request.validate_only = v.into();
507 self
508 }
509 }
510
511 #[doc(hidden)]
512 impl gax::options::internal::RequestBuilder for UpdateRecognizer {
513 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
514 &mut self.0.options
515 }
516 }
517
518 #[derive(Clone, Debug)]
537 pub struct DeleteRecognizer(RequestBuilder<crate::model::DeleteRecognizerRequest>);
538
539 impl DeleteRecognizer {
540 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Speech>) -> Self {
541 Self(RequestBuilder::new(stub))
542 }
543
544 pub fn with_request<V: Into<crate::model::DeleteRecognizerRequest>>(
546 mut self,
547 v: V,
548 ) -> Self {
549 self.0.request = v.into();
550 self
551 }
552
553 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
555 self.0.options = v.into();
556 self
557 }
558
559 pub async fn send(self) -> Result<longrunning::model::Operation> {
566 (*self.0.stub)
567 .delete_recognizer(self.0.request, self.0.options)
568 .await
569 .map(gax::response::Response::into_body)
570 }
571
572 pub fn poller(
574 self,
575 ) -> impl lro::Poller<crate::model::Recognizer, crate::model::OperationMetadata> {
576 type Operation =
577 lro::internal::Operation<crate::model::Recognizer, crate::model::OperationMetadata>;
578 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
579 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
580
581 let stub = self.0.stub.clone();
582 let mut options = self.0.options.clone();
583 options.set_retry_policy(gax::retry_policy::NeverRetry);
584 let query = move |name| {
585 let stub = stub.clone();
586 let options = options.clone();
587 async {
588 let op = GetOperation::new(stub)
589 .set_name(name)
590 .with_options(options)
591 .send()
592 .await?;
593 Ok(Operation::new(op))
594 }
595 };
596
597 let start = move || async {
598 let op = self.send().await?;
599 Ok(Operation::new(op))
600 };
601
602 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
603 }
604
605 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
609 self.0.request.name = v.into();
610 self
611 }
612
613 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
615 self.0.request.validate_only = v.into();
616 self
617 }
618
619 pub fn set_allow_missing<T: Into<bool>>(mut self, v: T) -> Self {
621 self.0.request.allow_missing = v.into();
622 self
623 }
624
625 pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
627 self.0.request.etag = v.into();
628 self
629 }
630 }
631
632 #[doc(hidden)]
633 impl gax::options::internal::RequestBuilder for DeleteRecognizer {
634 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
635 &mut self.0.options
636 }
637 }
638
639 #[derive(Clone, Debug)]
658 pub struct UndeleteRecognizer(RequestBuilder<crate::model::UndeleteRecognizerRequest>);
659
660 impl UndeleteRecognizer {
661 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Speech>) -> Self {
662 Self(RequestBuilder::new(stub))
663 }
664
665 pub fn with_request<V: Into<crate::model::UndeleteRecognizerRequest>>(
667 mut self,
668 v: V,
669 ) -> Self {
670 self.0.request = v.into();
671 self
672 }
673
674 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
676 self.0.options = v.into();
677 self
678 }
679
680 pub async fn send(self) -> Result<longrunning::model::Operation> {
687 (*self.0.stub)
688 .undelete_recognizer(self.0.request, self.0.options)
689 .await
690 .map(gax::response::Response::into_body)
691 }
692
693 pub fn poller(
695 self,
696 ) -> impl lro::Poller<crate::model::Recognizer, crate::model::OperationMetadata> {
697 type Operation =
698 lro::internal::Operation<crate::model::Recognizer, crate::model::OperationMetadata>;
699 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
700 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
701
702 let stub = self.0.stub.clone();
703 let mut options = self.0.options.clone();
704 options.set_retry_policy(gax::retry_policy::NeverRetry);
705 let query = move |name| {
706 let stub = stub.clone();
707 let options = options.clone();
708 async {
709 let op = GetOperation::new(stub)
710 .set_name(name)
711 .with_options(options)
712 .send()
713 .await?;
714 Ok(Operation::new(op))
715 }
716 };
717
718 let start = move || async {
719 let op = self.send().await?;
720 Ok(Operation::new(op))
721 };
722
723 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
724 }
725
726 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
730 self.0.request.name = v.into();
731 self
732 }
733
734 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
736 self.0.request.validate_only = v.into();
737 self
738 }
739
740 pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
742 self.0.request.etag = v.into();
743 self
744 }
745 }
746
747 #[doc(hidden)]
748 impl gax::options::internal::RequestBuilder for UndeleteRecognizer {
749 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
750 &mut self.0.options
751 }
752 }
753
754 #[derive(Clone, Debug)]
772 pub struct Recognize(RequestBuilder<crate::model::RecognizeRequest>);
773
774 impl Recognize {
775 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Speech>) -> Self {
776 Self(RequestBuilder::new(stub))
777 }
778
779 pub fn with_request<V: Into<crate::model::RecognizeRequest>>(mut self, v: V) -> Self {
781 self.0.request = v.into();
782 self
783 }
784
785 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
787 self.0.options = v.into();
788 self
789 }
790
791 pub async fn send(self) -> Result<crate::model::RecognizeResponse> {
793 (*self.0.stub)
794 .recognize(self.0.request, self.0.options)
795 .await
796 .map(gax::response::Response::into_body)
797 }
798
799 pub fn set_recognizer<T: Into<std::string::String>>(mut self, v: T) -> Self {
803 self.0.request.recognizer = v.into();
804 self
805 }
806
807 pub fn set_config<T>(mut self, v: T) -> Self
809 where
810 T: std::convert::Into<crate::model::RecognitionConfig>,
811 {
812 self.0.request.config = std::option::Option::Some(v.into());
813 self
814 }
815
816 pub fn set_or_clear_config<T>(mut self, v: std::option::Option<T>) -> Self
818 where
819 T: std::convert::Into<crate::model::RecognitionConfig>,
820 {
821 self.0.request.config = v.map(|x| x.into());
822 self
823 }
824
825 pub fn set_config_mask<T>(mut self, v: T) -> Self
827 where
828 T: std::convert::Into<wkt::FieldMask>,
829 {
830 self.0.request.config_mask = std::option::Option::Some(v.into());
831 self
832 }
833
834 pub fn set_or_clear_config_mask<T>(mut self, v: std::option::Option<T>) -> Self
836 where
837 T: std::convert::Into<wkt::FieldMask>,
838 {
839 self.0.request.config_mask = v.map(|x| x.into());
840 self
841 }
842
843 pub fn set_audio_source<T: Into<Option<crate::model::recognize_request::AudioSource>>>(
848 mut self,
849 v: T,
850 ) -> Self {
851 self.0.request.audio_source = v.into();
852 self
853 }
854
855 pub fn set_content<T: std::convert::Into<::bytes::Bytes>>(mut self, v: T) -> Self {
861 self.0.request = self.0.request.set_content(v);
862 self
863 }
864
865 pub fn set_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
871 self.0.request = self.0.request.set_uri(v);
872 self
873 }
874 }
875
876 #[doc(hidden)]
877 impl gax::options::internal::RequestBuilder for Recognize {
878 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
879 &mut self.0.options
880 }
881 }
882
883 #[derive(Clone, Debug)]
902 pub struct BatchRecognize(RequestBuilder<crate::model::BatchRecognizeRequest>);
903
904 impl BatchRecognize {
905 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Speech>) -> Self {
906 Self(RequestBuilder::new(stub))
907 }
908
909 pub fn with_request<V: Into<crate::model::BatchRecognizeRequest>>(mut self, v: V) -> Self {
911 self.0.request = v.into();
912 self
913 }
914
915 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
917 self.0.options = v.into();
918 self
919 }
920
921 pub async fn send(self) -> Result<longrunning::model::Operation> {
928 (*self.0.stub)
929 .batch_recognize(self.0.request, self.0.options)
930 .await
931 .map(gax::response::Response::into_body)
932 }
933
934 pub fn poller(
936 self,
937 ) -> impl lro::Poller<crate::model::BatchRecognizeResponse, crate::model::OperationMetadata>
938 {
939 type Operation = lro::internal::Operation<
940 crate::model::BatchRecognizeResponse,
941 crate::model::OperationMetadata,
942 >;
943 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
944 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
945
946 let stub = self.0.stub.clone();
947 let mut options = self.0.options.clone();
948 options.set_retry_policy(gax::retry_policy::NeverRetry);
949 let query = move |name| {
950 let stub = stub.clone();
951 let options = options.clone();
952 async {
953 let op = GetOperation::new(stub)
954 .set_name(name)
955 .with_options(options)
956 .send()
957 .await?;
958 Ok(Operation::new(op))
959 }
960 };
961
962 let start = move || async {
963 let op = self.send().await?;
964 Ok(Operation::new(op))
965 };
966
967 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
968 }
969
970 pub fn set_recognizer<T: Into<std::string::String>>(mut self, v: T) -> Self {
974 self.0.request.recognizer = v.into();
975 self
976 }
977
978 pub fn set_config<T>(mut self, v: T) -> Self
980 where
981 T: std::convert::Into<crate::model::RecognitionConfig>,
982 {
983 self.0.request.config = std::option::Option::Some(v.into());
984 self
985 }
986
987 pub fn set_or_clear_config<T>(mut self, v: std::option::Option<T>) -> Self
989 where
990 T: std::convert::Into<crate::model::RecognitionConfig>,
991 {
992 self.0.request.config = v.map(|x| x.into());
993 self
994 }
995
996 pub fn set_config_mask<T>(mut self, v: T) -> Self
998 where
999 T: std::convert::Into<wkt::FieldMask>,
1000 {
1001 self.0.request.config_mask = std::option::Option::Some(v.into());
1002 self
1003 }
1004
1005 pub fn set_or_clear_config_mask<T>(mut self, v: std::option::Option<T>) -> Self
1007 where
1008 T: std::convert::Into<wkt::FieldMask>,
1009 {
1010 self.0.request.config_mask = v.map(|x| x.into());
1011 self
1012 }
1013
1014 pub fn set_files<T, V>(mut self, v: T) -> Self
1016 where
1017 T: std::iter::IntoIterator<Item = V>,
1018 V: std::convert::Into<crate::model::BatchRecognizeFileMetadata>,
1019 {
1020 use std::iter::Iterator;
1021 self.0.request.files = v.into_iter().map(|i| i.into()).collect();
1022 self
1023 }
1024
1025 pub fn set_recognition_output_config<T>(mut self, v: T) -> Self
1027 where
1028 T: std::convert::Into<crate::model::RecognitionOutputConfig>,
1029 {
1030 self.0.request.recognition_output_config = std::option::Option::Some(v.into());
1031 self
1032 }
1033
1034 pub fn set_or_clear_recognition_output_config<T>(
1036 mut self,
1037 v: std::option::Option<T>,
1038 ) -> Self
1039 where
1040 T: std::convert::Into<crate::model::RecognitionOutputConfig>,
1041 {
1042 self.0.request.recognition_output_config = v.map(|x| x.into());
1043 self
1044 }
1045
1046 pub fn set_processing_strategy<
1048 T: Into<crate::model::batch_recognize_request::ProcessingStrategy>,
1049 >(
1050 mut self,
1051 v: T,
1052 ) -> Self {
1053 self.0.request.processing_strategy = v.into();
1054 self
1055 }
1056 }
1057
1058 #[doc(hidden)]
1059 impl gax::options::internal::RequestBuilder for BatchRecognize {
1060 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1061 &mut self.0.options
1062 }
1063 }
1064
1065 #[derive(Clone, Debug)]
1083 pub struct GetConfig(RequestBuilder<crate::model::GetConfigRequest>);
1084
1085 impl GetConfig {
1086 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Speech>) -> Self {
1087 Self(RequestBuilder::new(stub))
1088 }
1089
1090 pub fn with_request<V: Into<crate::model::GetConfigRequest>>(mut self, v: V) -> Self {
1092 self.0.request = v.into();
1093 self
1094 }
1095
1096 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1098 self.0.options = v.into();
1099 self
1100 }
1101
1102 pub async fn send(self) -> Result<crate::model::Config> {
1104 (*self.0.stub)
1105 .get_config(self.0.request, self.0.options)
1106 .await
1107 .map(gax::response::Response::into_body)
1108 }
1109
1110 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1114 self.0.request.name = v.into();
1115 self
1116 }
1117 }
1118
1119 #[doc(hidden)]
1120 impl gax::options::internal::RequestBuilder for GetConfig {
1121 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1122 &mut self.0.options
1123 }
1124 }
1125
1126 #[derive(Clone, Debug)]
1144 pub struct UpdateConfig(RequestBuilder<crate::model::UpdateConfigRequest>);
1145
1146 impl UpdateConfig {
1147 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Speech>) -> Self {
1148 Self(RequestBuilder::new(stub))
1149 }
1150
1151 pub fn with_request<V: Into<crate::model::UpdateConfigRequest>>(mut self, v: V) -> Self {
1153 self.0.request = v.into();
1154 self
1155 }
1156
1157 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1159 self.0.options = v.into();
1160 self
1161 }
1162
1163 pub async fn send(self) -> Result<crate::model::Config> {
1165 (*self.0.stub)
1166 .update_config(self.0.request, self.0.options)
1167 .await
1168 .map(gax::response::Response::into_body)
1169 }
1170
1171 pub fn set_config<T>(mut self, v: T) -> Self
1175 where
1176 T: std::convert::Into<crate::model::Config>,
1177 {
1178 self.0.request.config = std::option::Option::Some(v.into());
1179 self
1180 }
1181
1182 pub fn set_or_clear_config<T>(mut self, v: std::option::Option<T>) -> Self
1186 where
1187 T: std::convert::Into<crate::model::Config>,
1188 {
1189 self.0.request.config = v.map(|x| x.into());
1190 self
1191 }
1192
1193 pub fn set_update_mask<T>(mut self, v: T) -> Self
1195 where
1196 T: std::convert::Into<wkt::FieldMask>,
1197 {
1198 self.0.request.update_mask = std::option::Option::Some(v.into());
1199 self
1200 }
1201
1202 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
1204 where
1205 T: std::convert::Into<wkt::FieldMask>,
1206 {
1207 self.0.request.update_mask = v.map(|x| x.into());
1208 self
1209 }
1210 }
1211
1212 #[doc(hidden)]
1213 impl gax::options::internal::RequestBuilder for UpdateConfig {
1214 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1215 &mut self.0.options
1216 }
1217 }
1218
1219 #[derive(Clone, Debug)]
1238 pub struct CreateCustomClass(RequestBuilder<crate::model::CreateCustomClassRequest>);
1239
1240 impl CreateCustomClass {
1241 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Speech>) -> Self {
1242 Self(RequestBuilder::new(stub))
1243 }
1244
1245 pub fn with_request<V: Into<crate::model::CreateCustomClassRequest>>(
1247 mut self,
1248 v: V,
1249 ) -> Self {
1250 self.0.request = v.into();
1251 self
1252 }
1253
1254 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1256 self.0.options = v.into();
1257 self
1258 }
1259
1260 pub async fn send(self) -> Result<longrunning::model::Operation> {
1267 (*self.0.stub)
1268 .create_custom_class(self.0.request, self.0.options)
1269 .await
1270 .map(gax::response::Response::into_body)
1271 }
1272
1273 pub fn poller(
1275 self,
1276 ) -> impl lro::Poller<crate::model::CustomClass, crate::model::OperationMetadata> {
1277 type Operation = lro::internal::Operation<
1278 crate::model::CustomClass,
1279 crate::model::OperationMetadata,
1280 >;
1281 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1282 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1283
1284 let stub = self.0.stub.clone();
1285 let mut options = self.0.options.clone();
1286 options.set_retry_policy(gax::retry_policy::NeverRetry);
1287 let query = move |name| {
1288 let stub = stub.clone();
1289 let options = options.clone();
1290 async {
1291 let op = GetOperation::new(stub)
1292 .set_name(name)
1293 .with_options(options)
1294 .send()
1295 .await?;
1296 Ok(Operation::new(op))
1297 }
1298 };
1299
1300 let start = move || async {
1301 let op = self.send().await?;
1302 Ok(Operation::new(op))
1303 };
1304
1305 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
1306 }
1307
1308 pub fn set_custom_class<T>(mut self, v: T) -> Self
1312 where
1313 T: std::convert::Into<crate::model::CustomClass>,
1314 {
1315 self.0.request.custom_class = std::option::Option::Some(v.into());
1316 self
1317 }
1318
1319 pub fn set_or_clear_custom_class<T>(mut self, v: std::option::Option<T>) -> Self
1323 where
1324 T: std::convert::Into<crate::model::CustomClass>,
1325 {
1326 self.0.request.custom_class = v.map(|x| x.into());
1327 self
1328 }
1329
1330 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
1332 self.0.request.validate_only = v.into();
1333 self
1334 }
1335
1336 pub fn set_custom_class_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1338 self.0.request.custom_class_id = v.into();
1339 self
1340 }
1341
1342 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1346 self.0.request.parent = v.into();
1347 self
1348 }
1349 }
1350
1351 #[doc(hidden)]
1352 impl gax::options::internal::RequestBuilder for CreateCustomClass {
1353 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1354 &mut self.0.options
1355 }
1356 }
1357
1358 #[derive(Clone, Debug)]
1380 pub struct ListCustomClasses(RequestBuilder<crate::model::ListCustomClassesRequest>);
1381
1382 impl ListCustomClasses {
1383 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Speech>) -> Self {
1384 Self(RequestBuilder::new(stub))
1385 }
1386
1387 pub fn with_request<V: Into<crate::model::ListCustomClassesRequest>>(
1389 mut self,
1390 v: V,
1391 ) -> Self {
1392 self.0.request = v.into();
1393 self
1394 }
1395
1396 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1398 self.0.options = v.into();
1399 self
1400 }
1401
1402 pub async fn send(self) -> Result<crate::model::ListCustomClassesResponse> {
1404 (*self.0.stub)
1405 .list_custom_classes(self.0.request, self.0.options)
1406 .await
1407 .map(gax::response::Response::into_body)
1408 }
1409
1410 pub fn by_page(
1412 self,
1413 ) -> impl gax::paginator::Paginator<crate::model::ListCustomClassesResponse, gax::error::Error>
1414 {
1415 use std::clone::Clone;
1416 let token = self.0.request.page_token.clone();
1417 let execute = move |token: String| {
1418 let mut builder = self.clone();
1419 builder.0.request = builder.0.request.set_page_token(token);
1420 builder.send()
1421 };
1422 gax::paginator::internal::new_paginator(token, execute)
1423 }
1424
1425 pub fn by_item(
1427 self,
1428 ) -> impl gax::paginator::ItemPaginator<crate::model::ListCustomClassesResponse, gax::error::Error>
1429 {
1430 use gax::paginator::Paginator;
1431 self.by_page().items()
1432 }
1433
1434 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1438 self.0.request.parent = v.into();
1439 self
1440 }
1441
1442 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1444 self.0.request.page_size = v.into();
1445 self
1446 }
1447
1448 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1450 self.0.request.page_token = v.into();
1451 self
1452 }
1453
1454 pub fn set_show_deleted<T: Into<bool>>(mut self, v: T) -> Self {
1456 self.0.request.show_deleted = v.into();
1457 self
1458 }
1459 }
1460
1461 #[doc(hidden)]
1462 impl gax::options::internal::RequestBuilder for ListCustomClasses {
1463 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1464 &mut self.0.options
1465 }
1466 }
1467
1468 #[derive(Clone, Debug)]
1486 pub struct GetCustomClass(RequestBuilder<crate::model::GetCustomClassRequest>);
1487
1488 impl GetCustomClass {
1489 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Speech>) -> Self {
1490 Self(RequestBuilder::new(stub))
1491 }
1492
1493 pub fn with_request<V: Into<crate::model::GetCustomClassRequest>>(mut self, v: V) -> Self {
1495 self.0.request = v.into();
1496 self
1497 }
1498
1499 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1501 self.0.options = v.into();
1502 self
1503 }
1504
1505 pub async fn send(self) -> Result<crate::model::CustomClass> {
1507 (*self.0.stub)
1508 .get_custom_class(self.0.request, self.0.options)
1509 .await
1510 .map(gax::response::Response::into_body)
1511 }
1512
1513 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1517 self.0.request.name = v.into();
1518 self
1519 }
1520 }
1521
1522 #[doc(hidden)]
1523 impl gax::options::internal::RequestBuilder for GetCustomClass {
1524 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1525 &mut self.0.options
1526 }
1527 }
1528
1529 #[derive(Clone, Debug)]
1548 pub struct UpdateCustomClass(RequestBuilder<crate::model::UpdateCustomClassRequest>);
1549
1550 impl UpdateCustomClass {
1551 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Speech>) -> Self {
1552 Self(RequestBuilder::new(stub))
1553 }
1554
1555 pub fn with_request<V: Into<crate::model::UpdateCustomClassRequest>>(
1557 mut self,
1558 v: V,
1559 ) -> Self {
1560 self.0.request = v.into();
1561 self
1562 }
1563
1564 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1566 self.0.options = v.into();
1567 self
1568 }
1569
1570 pub async fn send(self) -> Result<longrunning::model::Operation> {
1577 (*self.0.stub)
1578 .update_custom_class(self.0.request, self.0.options)
1579 .await
1580 .map(gax::response::Response::into_body)
1581 }
1582
1583 pub fn poller(
1585 self,
1586 ) -> impl lro::Poller<crate::model::CustomClass, crate::model::OperationMetadata> {
1587 type Operation = lro::internal::Operation<
1588 crate::model::CustomClass,
1589 crate::model::OperationMetadata,
1590 >;
1591 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1592 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1593
1594 let stub = self.0.stub.clone();
1595 let mut options = self.0.options.clone();
1596 options.set_retry_policy(gax::retry_policy::NeverRetry);
1597 let query = move |name| {
1598 let stub = stub.clone();
1599 let options = options.clone();
1600 async {
1601 let op = GetOperation::new(stub)
1602 .set_name(name)
1603 .with_options(options)
1604 .send()
1605 .await?;
1606 Ok(Operation::new(op))
1607 }
1608 };
1609
1610 let start = move || async {
1611 let op = self.send().await?;
1612 Ok(Operation::new(op))
1613 };
1614
1615 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
1616 }
1617
1618 pub fn set_custom_class<T>(mut self, v: T) -> Self
1622 where
1623 T: std::convert::Into<crate::model::CustomClass>,
1624 {
1625 self.0.request.custom_class = std::option::Option::Some(v.into());
1626 self
1627 }
1628
1629 pub fn set_or_clear_custom_class<T>(mut self, v: std::option::Option<T>) -> Self
1633 where
1634 T: std::convert::Into<crate::model::CustomClass>,
1635 {
1636 self.0.request.custom_class = v.map(|x| x.into());
1637 self
1638 }
1639
1640 pub fn set_update_mask<T>(mut self, v: T) -> Self
1642 where
1643 T: std::convert::Into<wkt::FieldMask>,
1644 {
1645 self.0.request.update_mask = std::option::Option::Some(v.into());
1646 self
1647 }
1648
1649 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
1651 where
1652 T: std::convert::Into<wkt::FieldMask>,
1653 {
1654 self.0.request.update_mask = v.map(|x| x.into());
1655 self
1656 }
1657
1658 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
1660 self.0.request.validate_only = v.into();
1661 self
1662 }
1663 }
1664
1665 #[doc(hidden)]
1666 impl gax::options::internal::RequestBuilder for UpdateCustomClass {
1667 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1668 &mut self.0.options
1669 }
1670 }
1671
1672 #[derive(Clone, Debug)]
1691 pub struct DeleteCustomClass(RequestBuilder<crate::model::DeleteCustomClassRequest>);
1692
1693 impl DeleteCustomClass {
1694 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Speech>) -> Self {
1695 Self(RequestBuilder::new(stub))
1696 }
1697
1698 pub fn with_request<V: Into<crate::model::DeleteCustomClassRequest>>(
1700 mut self,
1701 v: V,
1702 ) -> Self {
1703 self.0.request = v.into();
1704 self
1705 }
1706
1707 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1709 self.0.options = v.into();
1710 self
1711 }
1712
1713 pub async fn send(self) -> Result<longrunning::model::Operation> {
1720 (*self.0.stub)
1721 .delete_custom_class(self.0.request, self.0.options)
1722 .await
1723 .map(gax::response::Response::into_body)
1724 }
1725
1726 pub fn poller(
1728 self,
1729 ) -> impl lro::Poller<crate::model::CustomClass, crate::model::OperationMetadata> {
1730 type Operation = lro::internal::Operation<
1731 crate::model::CustomClass,
1732 crate::model::OperationMetadata,
1733 >;
1734 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1735 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1736
1737 let stub = self.0.stub.clone();
1738 let mut options = self.0.options.clone();
1739 options.set_retry_policy(gax::retry_policy::NeverRetry);
1740 let query = move |name| {
1741 let stub = stub.clone();
1742 let options = options.clone();
1743 async {
1744 let op = GetOperation::new(stub)
1745 .set_name(name)
1746 .with_options(options)
1747 .send()
1748 .await?;
1749 Ok(Operation::new(op))
1750 }
1751 };
1752
1753 let start = move || async {
1754 let op = self.send().await?;
1755 Ok(Operation::new(op))
1756 };
1757
1758 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
1759 }
1760
1761 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1765 self.0.request.name = v.into();
1766 self
1767 }
1768
1769 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
1771 self.0.request.validate_only = v.into();
1772 self
1773 }
1774
1775 pub fn set_allow_missing<T: Into<bool>>(mut self, v: T) -> Self {
1777 self.0.request.allow_missing = v.into();
1778 self
1779 }
1780
1781 pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
1783 self.0.request.etag = v.into();
1784 self
1785 }
1786 }
1787
1788 #[doc(hidden)]
1789 impl gax::options::internal::RequestBuilder for DeleteCustomClass {
1790 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1791 &mut self.0.options
1792 }
1793 }
1794
1795 #[derive(Clone, Debug)]
1814 pub struct UndeleteCustomClass(RequestBuilder<crate::model::UndeleteCustomClassRequest>);
1815
1816 impl UndeleteCustomClass {
1817 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Speech>) -> Self {
1818 Self(RequestBuilder::new(stub))
1819 }
1820
1821 pub fn with_request<V: Into<crate::model::UndeleteCustomClassRequest>>(
1823 mut self,
1824 v: V,
1825 ) -> Self {
1826 self.0.request = v.into();
1827 self
1828 }
1829
1830 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1832 self.0.options = v.into();
1833 self
1834 }
1835
1836 pub async fn send(self) -> Result<longrunning::model::Operation> {
1843 (*self.0.stub)
1844 .undelete_custom_class(self.0.request, self.0.options)
1845 .await
1846 .map(gax::response::Response::into_body)
1847 }
1848
1849 pub fn poller(
1851 self,
1852 ) -> impl lro::Poller<crate::model::CustomClass, crate::model::OperationMetadata> {
1853 type Operation = lro::internal::Operation<
1854 crate::model::CustomClass,
1855 crate::model::OperationMetadata,
1856 >;
1857 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1858 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1859
1860 let stub = self.0.stub.clone();
1861 let mut options = self.0.options.clone();
1862 options.set_retry_policy(gax::retry_policy::NeverRetry);
1863 let query = move |name| {
1864 let stub = stub.clone();
1865 let options = options.clone();
1866 async {
1867 let op = GetOperation::new(stub)
1868 .set_name(name)
1869 .with_options(options)
1870 .send()
1871 .await?;
1872 Ok(Operation::new(op))
1873 }
1874 };
1875
1876 let start = move || async {
1877 let op = self.send().await?;
1878 Ok(Operation::new(op))
1879 };
1880
1881 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
1882 }
1883
1884 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1888 self.0.request.name = v.into();
1889 self
1890 }
1891
1892 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
1894 self.0.request.validate_only = v.into();
1895 self
1896 }
1897
1898 pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
1900 self.0.request.etag = v.into();
1901 self
1902 }
1903 }
1904
1905 #[doc(hidden)]
1906 impl gax::options::internal::RequestBuilder for UndeleteCustomClass {
1907 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1908 &mut self.0.options
1909 }
1910 }
1911
1912 #[derive(Clone, Debug)]
1931 pub struct CreatePhraseSet(RequestBuilder<crate::model::CreatePhraseSetRequest>);
1932
1933 impl CreatePhraseSet {
1934 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Speech>) -> Self {
1935 Self(RequestBuilder::new(stub))
1936 }
1937
1938 pub fn with_request<V: Into<crate::model::CreatePhraseSetRequest>>(mut self, v: V) -> Self {
1940 self.0.request = v.into();
1941 self
1942 }
1943
1944 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1946 self.0.options = v.into();
1947 self
1948 }
1949
1950 pub async fn send(self) -> Result<longrunning::model::Operation> {
1957 (*self.0.stub)
1958 .create_phrase_set(self.0.request, self.0.options)
1959 .await
1960 .map(gax::response::Response::into_body)
1961 }
1962
1963 pub fn poller(
1965 self,
1966 ) -> impl lro::Poller<crate::model::PhraseSet, crate::model::OperationMetadata> {
1967 type Operation =
1968 lro::internal::Operation<crate::model::PhraseSet, crate::model::OperationMetadata>;
1969 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1970 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1971
1972 let stub = self.0.stub.clone();
1973 let mut options = self.0.options.clone();
1974 options.set_retry_policy(gax::retry_policy::NeverRetry);
1975 let query = move |name| {
1976 let stub = stub.clone();
1977 let options = options.clone();
1978 async {
1979 let op = GetOperation::new(stub)
1980 .set_name(name)
1981 .with_options(options)
1982 .send()
1983 .await?;
1984 Ok(Operation::new(op))
1985 }
1986 };
1987
1988 let start = move || async {
1989 let op = self.send().await?;
1990 Ok(Operation::new(op))
1991 };
1992
1993 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
1994 }
1995
1996 pub fn set_phrase_set<T>(mut self, v: T) -> Self
2000 where
2001 T: std::convert::Into<crate::model::PhraseSet>,
2002 {
2003 self.0.request.phrase_set = std::option::Option::Some(v.into());
2004 self
2005 }
2006
2007 pub fn set_or_clear_phrase_set<T>(mut self, v: std::option::Option<T>) -> Self
2011 where
2012 T: std::convert::Into<crate::model::PhraseSet>,
2013 {
2014 self.0.request.phrase_set = v.map(|x| x.into());
2015 self
2016 }
2017
2018 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
2020 self.0.request.validate_only = v.into();
2021 self
2022 }
2023
2024 pub fn set_phrase_set_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2026 self.0.request.phrase_set_id = v.into();
2027 self
2028 }
2029
2030 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2034 self.0.request.parent = v.into();
2035 self
2036 }
2037 }
2038
2039 #[doc(hidden)]
2040 impl gax::options::internal::RequestBuilder for CreatePhraseSet {
2041 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2042 &mut self.0.options
2043 }
2044 }
2045
2046 #[derive(Clone, Debug)]
2068 pub struct ListPhraseSets(RequestBuilder<crate::model::ListPhraseSetsRequest>);
2069
2070 impl ListPhraseSets {
2071 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Speech>) -> Self {
2072 Self(RequestBuilder::new(stub))
2073 }
2074
2075 pub fn with_request<V: Into<crate::model::ListPhraseSetsRequest>>(mut self, v: V) -> Self {
2077 self.0.request = v.into();
2078 self
2079 }
2080
2081 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2083 self.0.options = v.into();
2084 self
2085 }
2086
2087 pub async fn send(self) -> Result<crate::model::ListPhraseSetsResponse> {
2089 (*self.0.stub)
2090 .list_phrase_sets(self.0.request, self.0.options)
2091 .await
2092 .map(gax::response::Response::into_body)
2093 }
2094
2095 pub fn by_page(
2097 self,
2098 ) -> impl gax::paginator::Paginator<crate::model::ListPhraseSetsResponse, gax::error::Error>
2099 {
2100 use std::clone::Clone;
2101 let token = self.0.request.page_token.clone();
2102 let execute = move |token: String| {
2103 let mut builder = self.clone();
2104 builder.0.request = builder.0.request.set_page_token(token);
2105 builder.send()
2106 };
2107 gax::paginator::internal::new_paginator(token, execute)
2108 }
2109
2110 pub fn by_item(
2112 self,
2113 ) -> impl gax::paginator::ItemPaginator<crate::model::ListPhraseSetsResponse, gax::error::Error>
2114 {
2115 use gax::paginator::Paginator;
2116 self.by_page().items()
2117 }
2118
2119 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2123 self.0.request.parent = v.into();
2124 self
2125 }
2126
2127 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2129 self.0.request.page_size = v.into();
2130 self
2131 }
2132
2133 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2135 self.0.request.page_token = v.into();
2136 self
2137 }
2138
2139 pub fn set_show_deleted<T: Into<bool>>(mut self, v: T) -> Self {
2141 self.0.request.show_deleted = v.into();
2142 self
2143 }
2144 }
2145
2146 #[doc(hidden)]
2147 impl gax::options::internal::RequestBuilder for ListPhraseSets {
2148 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2149 &mut self.0.options
2150 }
2151 }
2152
2153 #[derive(Clone, Debug)]
2171 pub struct GetPhraseSet(RequestBuilder<crate::model::GetPhraseSetRequest>);
2172
2173 impl GetPhraseSet {
2174 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Speech>) -> Self {
2175 Self(RequestBuilder::new(stub))
2176 }
2177
2178 pub fn with_request<V: Into<crate::model::GetPhraseSetRequest>>(mut self, v: V) -> Self {
2180 self.0.request = v.into();
2181 self
2182 }
2183
2184 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2186 self.0.options = v.into();
2187 self
2188 }
2189
2190 pub async fn send(self) -> Result<crate::model::PhraseSet> {
2192 (*self.0.stub)
2193 .get_phrase_set(self.0.request, self.0.options)
2194 .await
2195 .map(gax::response::Response::into_body)
2196 }
2197
2198 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2202 self.0.request.name = v.into();
2203 self
2204 }
2205 }
2206
2207 #[doc(hidden)]
2208 impl gax::options::internal::RequestBuilder for GetPhraseSet {
2209 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2210 &mut self.0.options
2211 }
2212 }
2213
2214 #[derive(Clone, Debug)]
2233 pub struct UpdatePhraseSet(RequestBuilder<crate::model::UpdatePhraseSetRequest>);
2234
2235 impl UpdatePhraseSet {
2236 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Speech>) -> Self {
2237 Self(RequestBuilder::new(stub))
2238 }
2239
2240 pub fn with_request<V: Into<crate::model::UpdatePhraseSetRequest>>(mut self, v: V) -> Self {
2242 self.0.request = v.into();
2243 self
2244 }
2245
2246 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2248 self.0.options = v.into();
2249 self
2250 }
2251
2252 pub async fn send(self) -> Result<longrunning::model::Operation> {
2259 (*self.0.stub)
2260 .update_phrase_set(self.0.request, self.0.options)
2261 .await
2262 .map(gax::response::Response::into_body)
2263 }
2264
2265 pub fn poller(
2267 self,
2268 ) -> impl lro::Poller<crate::model::PhraseSet, crate::model::OperationMetadata> {
2269 type Operation =
2270 lro::internal::Operation<crate::model::PhraseSet, crate::model::OperationMetadata>;
2271 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2272 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2273
2274 let stub = self.0.stub.clone();
2275 let mut options = self.0.options.clone();
2276 options.set_retry_policy(gax::retry_policy::NeverRetry);
2277 let query = move |name| {
2278 let stub = stub.clone();
2279 let options = options.clone();
2280 async {
2281 let op = GetOperation::new(stub)
2282 .set_name(name)
2283 .with_options(options)
2284 .send()
2285 .await?;
2286 Ok(Operation::new(op))
2287 }
2288 };
2289
2290 let start = move || async {
2291 let op = self.send().await?;
2292 Ok(Operation::new(op))
2293 };
2294
2295 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
2296 }
2297
2298 pub fn set_phrase_set<T>(mut self, v: T) -> Self
2302 where
2303 T: std::convert::Into<crate::model::PhraseSet>,
2304 {
2305 self.0.request.phrase_set = std::option::Option::Some(v.into());
2306 self
2307 }
2308
2309 pub fn set_or_clear_phrase_set<T>(mut self, v: std::option::Option<T>) -> Self
2313 where
2314 T: std::convert::Into<crate::model::PhraseSet>,
2315 {
2316 self.0.request.phrase_set = v.map(|x| x.into());
2317 self
2318 }
2319
2320 pub fn set_update_mask<T>(mut self, v: T) -> Self
2322 where
2323 T: std::convert::Into<wkt::FieldMask>,
2324 {
2325 self.0.request.update_mask = std::option::Option::Some(v.into());
2326 self
2327 }
2328
2329 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
2331 where
2332 T: std::convert::Into<wkt::FieldMask>,
2333 {
2334 self.0.request.update_mask = v.map(|x| x.into());
2335 self
2336 }
2337
2338 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
2340 self.0.request.validate_only = v.into();
2341 self
2342 }
2343 }
2344
2345 #[doc(hidden)]
2346 impl gax::options::internal::RequestBuilder for UpdatePhraseSet {
2347 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2348 &mut self.0.options
2349 }
2350 }
2351
2352 #[derive(Clone, Debug)]
2371 pub struct DeletePhraseSet(RequestBuilder<crate::model::DeletePhraseSetRequest>);
2372
2373 impl DeletePhraseSet {
2374 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Speech>) -> Self {
2375 Self(RequestBuilder::new(stub))
2376 }
2377
2378 pub fn with_request<V: Into<crate::model::DeletePhraseSetRequest>>(mut self, v: V) -> Self {
2380 self.0.request = v.into();
2381 self
2382 }
2383
2384 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2386 self.0.options = v.into();
2387 self
2388 }
2389
2390 pub async fn send(self) -> Result<longrunning::model::Operation> {
2397 (*self.0.stub)
2398 .delete_phrase_set(self.0.request, self.0.options)
2399 .await
2400 .map(gax::response::Response::into_body)
2401 }
2402
2403 pub fn poller(
2405 self,
2406 ) -> impl lro::Poller<crate::model::PhraseSet, crate::model::OperationMetadata> {
2407 type Operation =
2408 lro::internal::Operation<crate::model::PhraseSet, crate::model::OperationMetadata>;
2409 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2410 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2411
2412 let stub = self.0.stub.clone();
2413 let mut options = self.0.options.clone();
2414 options.set_retry_policy(gax::retry_policy::NeverRetry);
2415 let query = move |name| {
2416 let stub = stub.clone();
2417 let options = options.clone();
2418 async {
2419 let op = GetOperation::new(stub)
2420 .set_name(name)
2421 .with_options(options)
2422 .send()
2423 .await?;
2424 Ok(Operation::new(op))
2425 }
2426 };
2427
2428 let start = move || async {
2429 let op = self.send().await?;
2430 Ok(Operation::new(op))
2431 };
2432
2433 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
2434 }
2435
2436 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2440 self.0.request.name = v.into();
2441 self
2442 }
2443
2444 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
2446 self.0.request.validate_only = v.into();
2447 self
2448 }
2449
2450 pub fn set_allow_missing<T: Into<bool>>(mut self, v: T) -> Self {
2452 self.0.request.allow_missing = v.into();
2453 self
2454 }
2455
2456 pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
2458 self.0.request.etag = v.into();
2459 self
2460 }
2461 }
2462
2463 #[doc(hidden)]
2464 impl gax::options::internal::RequestBuilder for DeletePhraseSet {
2465 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2466 &mut self.0.options
2467 }
2468 }
2469
2470 #[derive(Clone, Debug)]
2489 pub struct UndeletePhraseSet(RequestBuilder<crate::model::UndeletePhraseSetRequest>);
2490
2491 impl UndeletePhraseSet {
2492 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Speech>) -> Self {
2493 Self(RequestBuilder::new(stub))
2494 }
2495
2496 pub fn with_request<V: Into<crate::model::UndeletePhraseSetRequest>>(
2498 mut self,
2499 v: V,
2500 ) -> Self {
2501 self.0.request = v.into();
2502 self
2503 }
2504
2505 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2507 self.0.options = v.into();
2508 self
2509 }
2510
2511 pub async fn send(self) -> Result<longrunning::model::Operation> {
2518 (*self.0.stub)
2519 .undelete_phrase_set(self.0.request, self.0.options)
2520 .await
2521 .map(gax::response::Response::into_body)
2522 }
2523
2524 pub fn poller(
2526 self,
2527 ) -> impl lro::Poller<crate::model::PhraseSet, crate::model::OperationMetadata> {
2528 type Operation =
2529 lro::internal::Operation<crate::model::PhraseSet, crate::model::OperationMetadata>;
2530 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2531 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2532
2533 let stub = self.0.stub.clone();
2534 let mut options = self.0.options.clone();
2535 options.set_retry_policy(gax::retry_policy::NeverRetry);
2536 let query = move |name| {
2537 let stub = stub.clone();
2538 let options = options.clone();
2539 async {
2540 let op = GetOperation::new(stub)
2541 .set_name(name)
2542 .with_options(options)
2543 .send()
2544 .await?;
2545 Ok(Operation::new(op))
2546 }
2547 };
2548
2549 let start = move || async {
2550 let op = self.send().await?;
2551 Ok(Operation::new(op))
2552 };
2553
2554 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
2555 }
2556
2557 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2561 self.0.request.name = v.into();
2562 self
2563 }
2564
2565 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
2567 self.0.request.validate_only = v.into();
2568 self
2569 }
2570
2571 pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
2573 self.0.request.etag = v.into();
2574 self
2575 }
2576 }
2577
2578 #[doc(hidden)]
2579 impl gax::options::internal::RequestBuilder for UndeletePhraseSet {
2580 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2581 &mut self.0.options
2582 }
2583 }
2584
2585 #[derive(Clone, Debug)]
2607 pub struct ListLocations(RequestBuilder<location::model::ListLocationsRequest>);
2608
2609 impl ListLocations {
2610 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Speech>) -> Self {
2611 Self(RequestBuilder::new(stub))
2612 }
2613
2614 pub fn with_request<V: Into<location::model::ListLocationsRequest>>(
2616 mut self,
2617 v: V,
2618 ) -> Self {
2619 self.0.request = v.into();
2620 self
2621 }
2622
2623 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2625 self.0.options = v.into();
2626 self
2627 }
2628
2629 pub async fn send(self) -> Result<location::model::ListLocationsResponse> {
2631 (*self.0.stub)
2632 .list_locations(self.0.request, self.0.options)
2633 .await
2634 .map(gax::response::Response::into_body)
2635 }
2636
2637 pub fn by_page(
2639 self,
2640 ) -> impl gax::paginator::Paginator<location::model::ListLocationsResponse, gax::error::Error>
2641 {
2642 use std::clone::Clone;
2643 let token = self.0.request.page_token.clone();
2644 let execute = move |token: String| {
2645 let mut builder = self.clone();
2646 builder.0.request = builder.0.request.set_page_token(token);
2647 builder.send()
2648 };
2649 gax::paginator::internal::new_paginator(token, execute)
2650 }
2651
2652 pub fn by_item(
2654 self,
2655 ) -> impl gax::paginator::ItemPaginator<location::model::ListLocationsResponse, gax::error::Error>
2656 {
2657 use gax::paginator::Paginator;
2658 self.by_page().items()
2659 }
2660
2661 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2663 self.0.request.name = v.into();
2664 self
2665 }
2666
2667 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
2669 self.0.request.filter = v.into();
2670 self
2671 }
2672
2673 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2675 self.0.request.page_size = v.into();
2676 self
2677 }
2678
2679 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2681 self.0.request.page_token = v.into();
2682 self
2683 }
2684 }
2685
2686 #[doc(hidden)]
2687 impl gax::options::internal::RequestBuilder for ListLocations {
2688 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2689 &mut self.0.options
2690 }
2691 }
2692
2693 #[derive(Clone, Debug)]
2711 pub struct GetLocation(RequestBuilder<location::model::GetLocationRequest>);
2712
2713 impl GetLocation {
2714 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Speech>) -> Self {
2715 Self(RequestBuilder::new(stub))
2716 }
2717
2718 pub fn with_request<V: Into<location::model::GetLocationRequest>>(mut self, v: V) -> Self {
2720 self.0.request = v.into();
2721 self
2722 }
2723
2724 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2726 self.0.options = v.into();
2727 self
2728 }
2729
2730 pub async fn send(self) -> Result<location::model::Location> {
2732 (*self.0.stub)
2733 .get_location(self.0.request, self.0.options)
2734 .await
2735 .map(gax::response::Response::into_body)
2736 }
2737
2738 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2740 self.0.request.name = v.into();
2741 self
2742 }
2743 }
2744
2745 #[doc(hidden)]
2746 impl gax::options::internal::RequestBuilder for GetLocation {
2747 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2748 &mut self.0.options
2749 }
2750 }
2751
2752 #[derive(Clone, Debug)]
2774 pub struct ListOperations(RequestBuilder<longrunning::model::ListOperationsRequest>);
2775
2776 impl ListOperations {
2777 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Speech>) -> Self {
2778 Self(RequestBuilder::new(stub))
2779 }
2780
2781 pub fn with_request<V: Into<longrunning::model::ListOperationsRequest>>(
2783 mut self,
2784 v: V,
2785 ) -> Self {
2786 self.0.request = v.into();
2787 self
2788 }
2789
2790 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2792 self.0.options = v.into();
2793 self
2794 }
2795
2796 pub async fn send(self) -> Result<longrunning::model::ListOperationsResponse> {
2798 (*self.0.stub)
2799 .list_operations(self.0.request, self.0.options)
2800 .await
2801 .map(gax::response::Response::into_body)
2802 }
2803
2804 pub fn by_page(
2806 self,
2807 ) -> impl gax::paginator::Paginator<longrunning::model::ListOperationsResponse, gax::error::Error>
2808 {
2809 use std::clone::Clone;
2810 let token = self.0.request.page_token.clone();
2811 let execute = move |token: String| {
2812 let mut builder = self.clone();
2813 builder.0.request = builder.0.request.set_page_token(token);
2814 builder.send()
2815 };
2816 gax::paginator::internal::new_paginator(token, execute)
2817 }
2818
2819 pub fn by_item(
2821 self,
2822 ) -> impl gax::paginator::ItemPaginator<
2823 longrunning::model::ListOperationsResponse,
2824 gax::error::Error,
2825 > {
2826 use gax::paginator::Paginator;
2827 self.by_page().items()
2828 }
2829
2830 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2832 self.0.request.name = v.into();
2833 self
2834 }
2835
2836 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
2838 self.0.request.filter = v.into();
2839 self
2840 }
2841
2842 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2844 self.0.request.page_size = v.into();
2845 self
2846 }
2847
2848 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2850 self.0.request.page_token = v.into();
2851 self
2852 }
2853
2854 pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
2856 self.0.request.return_partial_success = v.into();
2857 self
2858 }
2859 }
2860
2861 #[doc(hidden)]
2862 impl gax::options::internal::RequestBuilder for ListOperations {
2863 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2864 &mut self.0.options
2865 }
2866 }
2867
2868 #[derive(Clone, Debug)]
2886 pub struct GetOperation(RequestBuilder<longrunning::model::GetOperationRequest>);
2887
2888 impl GetOperation {
2889 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Speech>) -> Self {
2890 Self(RequestBuilder::new(stub))
2891 }
2892
2893 pub fn with_request<V: Into<longrunning::model::GetOperationRequest>>(
2895 mut self,
2896 v: V,
2897 ) -> Self {
2898 self.0.request = v.into();
2899 self
2900 }
2901
2902 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2904 self.0.options = v.into();
2905 self
2906 }
2907
2908 pub async fn send(self) -> Result<longrunning::model::Operation> {
2910 (*self.0.stub)
2911 .get_operation(self.0.request, self.0.options)
2912 .await
2913 .map(gax::response::Response::into_body)
2914 }
2915
2916 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2918 self.0.request.name = v.into();
2919 self
2920 }
2921 }
2922
2923 #[doc(hidden)]
2924 impl gax::options::internal::RequestBuilder for GetOperation {
2925 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2926 &mut self.0.options
2927 }
2928 }
2929
2930 #[derive(Clone, Debug)]
2948 pub struct DeleteOperation(RequestBuilder<longrunning::model::DeleteOperationRequest>);
2949
2950 impl DeleteOperation {
2951 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Speech>) -> Self {
2952 Self(RequestBuilder::new(stub))
2953 }
2954
2955 pub fn with_request<V: Into<longrunning::model::DeleteOperationRequest>>(
2957 mut self,
2958 v: V,
2959 ) -> Self {
2960 self.0.request = v.into();
2961 self
2962 }
2963
2964 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2966 self.0.options = v.into();
2967 self
2968 }
2969
2970 pub async fn send(self) -> Result<()> {
2972 (*self.0.stub)
2973 .delete_operation(self.0.request, self.0.options)
2974 .await
2975 .map(gax::response::Response::into_body)
2976 }
2977
2978 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2980 self.0.request.name = v.into();
2981 self
2982 }
2983 }
2984
2985 #[doc(hidden)]
2986 impl gax::options::internal::RequestBuilder for DeleteOperation {
2987 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2988 &mut self.0.options
2989 }
2990 }
2991
2992 #[derive(Clone, Debug)]
3010 pub struct CancelOperation(RequestBuilder<longrunning::model::CancelOperationRequest>);
3011
3012 impl CancelOperation {
3013 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Speech>) -> Self {
3014 Self(RequestBuilder::new(stub))
3015 }
3016
3017 pub fn with_request<V: Into<longrunning::model::CancelOperationRequest>>(
3019 mut self,
3020 v: V,
3021 ) -> Self {
3022 self.0.request = v.into();
3023 self
3024 }
3025
3026 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3028 self.0.options = v.into();
3029 self
3030 }
3031
3032 pub async fn send(self) -> Result<()> {
3034 (*self.0.stub)
3035 .cancel_operation(self.0.request, self.0.options)
3036 .await
3037 .map(gax::response::Response::into_body)
3038 }
3039
3040 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3042 self.0.request.name = v.into();
3043 self
3044 }
3045 }
3046
3047 #[doc(hidden)]
3048 impl gax::options::internal::RequestBuilder for CancelOperation {
3049 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3050 &mut self.0.options
3051 }
3052 }
3053}