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)]
90 pub struct CreateRecognizer(RequestBuilder<crate::model::CreateRecognizerRequest>);
91
92 impl CreateRecognizer {
93 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Speech>) -> Self {
94 Self(RequestBuilder::new(stub))
95 }
96
97 pub fn with_request<V: Into<crate::model::CreateRecognizerRequest>>(
99 mut self,
100 v: V,
101 ) -> Self {
102 self.0.request = v.into();
103 self
104 }
105
106 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
108 self.0.options = v.into();
109 self
110 }
111
112 pub async fn send(self) -> Result<longrunning::model::Operation> {
119 (*self.0.stub)
120 .create_recognizer(self.0.request, self.0.options)
121 .await
122 .map(gax::response::Response::into_body)
123 }
124
125 pub fn poller(
127 self,
128 ) -> impl lro::Poller<crate::model::Recognizer, crate::model::OperationMetadata> {
129 type Operation =
130 lro::internal::Operation<crate::model::Recognizer, crate::model::OperationMetadata>;
131 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
132 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
133
134 let stub = self.0.stub.clone();
135 let mut options = self.0.options.clone();
136 options.set_retry_policy(gax::retry_policy::NeverRetry);
137 let query = move |name| {
138 let stub = stub.clone();
139 let options = options.clone();
140 async {
141 let op = GetOperation::new(stub)
142 .set_name(name)
143 .with_options(options)
144 .send()
145 .await?;
146 Ok(Operation::new(op))
147 }
148 };
149
150 let start = move || async {
151 let op = self.send().await?;
152 Ok(Operation::new(op))
153 };
154
155 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
156 }
157
158 pub fn set_recognizer<T>(mut self, v: T) -> Self
162 where
163 T: std::convert::Into<crate::model::Recognizer>,
164 {
165 self.0.request.recognizer = std::option::Option::Some(v.into());
166 self
167 }
168
169 pub fn set_or_clear_recognizer<T>(mut self, v: std::option::Option<T>) -> Self
173 where
174 T: std::convert::Into<crate::model::Recognizer>,
175 {
176 self.0.request.recognizer = v.map(|x| x.into());
177 self
178 }
179
180 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
182 self.0.request.validate_only = v.into();
183 self
184 }
185
186 pub fn set_recognizer_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
188 self.0.request.recognizer_id = v.into();
189 self
190 }
191
192 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
196 self.0.request.parent = v.into();
197 self
198 }
199 }
200
201 #[doc(hidden)]
202 impl gax::options::internal::RequestBuilder for CreateRecognizer {
203 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
204 &mut self.0.options
205 }
206 }
207
208 #[derive(Clone, Debug)]
229 pub struct ListRecognizers(RequestBuilder<crate::model::ListRecognizersRequest>);
230
231 impl ListRecognizers {
232 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Speech>) -> Self {
233 Self(RequestBuilder::new(stub))
234 }
235
236 pub fn with_request<V: Into<crate::model::ListRecognizersRequest>>(mut self, v: V) -> Self {
238 self.0.request = v.into();
239 self
240 }
241
242 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
244 self.0.options = v.into();
245 self
246 }
247
248 pub async fn send(self) -> Result<crate::model::ListRecognizersResponse> {
250 (*self.0.stub)
251 .list_recognizers(self.0.request, self.0.options)
252 .await
253 .map(gax::response::Response::into_body)
254 }
255
256 pub fn by_page(
258 self,
259 ) -> impl gax::paginator::Paginator<crate::model::ListRecognizersResponse, gax::error::Error>
260 {
261 use std::clone::Clone;
262 let token = self.0.request.page_token.clone();
263 let execute = move |token: String| {
264 let mut builder = self.clone();
265 builder.0.request = builder.0.request.set_page_token(token);
266 builder.send()
267 };
268 gax::paginator::internal::new_paginator(token, execute)
269 }
270
271 pub fn by_item(
273 self,
274 ) -> impl gax::paginator::ItemPaginator<crate::model::ListRecognizersResponse, gax::error::Error>
275 {
276 use gax::paginator::Paginator;
277 self.by_page().items()
278 }
279
280 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
284 self.0.request.parent = v.into();
285 self
286 }
287
288 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
290 self.0.request.page_size = v.into();
291 self
292 }
293
294 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
296 self.0.request.page_token = v.into();
297 self
298 }
299
300 pub fn set_show_deleted<T: Into<bool>>(mut self, v: T) -> Self {
302 self.0.request.show_deleted = v.into();
303 self
304 }
305 }
306
307 #[doc(hidden)]
308 impl gax::options::internal::RequestBuilder for ListRecognizers {
309 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
310 &mut self.0.options
311 }
312 }
313
314 #[derive(Clone, Debug)]
331 pub struct GetRecognizer(RequestBuilder<crate::model::GetRecognizerRequest>);
332
333 impl GetRecognizer {
334 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Speech>) -> Self {
335 Self(RequestBuilder::new(stub))
336 }
337
338 pub fn with_request<V: Into<crate::model::GetRecognizerRequest>>(mut self, v: V) -> Self {
340 self.0.request = v.into();
341 self
342 }
343
344 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
346 self.0.options = v.into();
347 self
348 }
349
350 pub async fn send(self) -> Result<crate::model::Recognizer> {
352 (*self.0.stub)
353 .get_recognizer(self.0.request, self.0.options)
354 .await
355 .map(gax::response::Response::into_body)
356 }
357
358 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
362 self.0.request.name = v.into();
363 self
364 }
365 }
366
367 #[doc(hidden)]
368 impl gax::options::internal::RequestBuilder for GetRecognizer {
369 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
370 &mut self.0.options
371 }
372 }
373
374 #[derive(Clone, Debug)]
392 pub struct UpdateRecognizer(RequestBuilder<crate::model::UpdateRecognizerRequest>);
393
394 impl UpdateRecognizer {
395 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Speech>) -> Self {
396 Self(RequestBuilder::new(stub))
397 }
398
399 pub fn with_request<V: Into<crate::model::UpdateRecognizerRequest>>(
401 mut self,
402 v: V,
403 ) -> Self {
404 self.0.request = v.into();
405 self
406 }
407
408 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
410 self.0.options = v.into();
411 self
412 }
413
414 pub async fn send(self) -> Result<longrunning::model::Operation> {
421 (*self.0.stub)
422 .update_recognizer(self.0.request, self.0.options)
423 .await
424 .map(gax::response::Response::into_body)
425 }
426
427 pub fn poller(
429 self,
430 ) -> impl lro::Poller<crate::model::Recognizer, crate::model::OperationMetadata> {
431 type Operation =
432 lro::internal::Operation<crate::model::Recognizer, crate::model::OperationMetadata>;
433 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
434 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
435
436 let stub = self.0.stub.clone();
437 let mut options = self.0.options.clone();
438 options.set_retry_policy(gax::retry_policy::NeverRetry);
439 let query = move |name| {
440 let stub = stub.clone();
441 let options = options.clone();
442 async {
443 let op = GetOperation::new(stub)
444 .set_name(name)
445 .with_options(options)
446 .send()
447 .await?;
448 Ok(Operation::new(op))
449 }
450 };
451
452 let start = move || async {
453 let op = self.send().await?;
454 Ok(Operation::new(op))
455 };
456
457 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
458 }
459
460 pub fn set_recognizer<T>(mut self, v: T) -> Self
464 where
465 T: std::convert::Into<crate::model::Recognizer>,
466 {
467 self.0.request.recognizer = std::option::Option::Some(v.into());
468 self
469 }
470
471 pub fn set_or_clear_recognizer<T>(mut self, v: std::option::Option<T>) -> Self
475 where
476 T: std::convert::Into<crate::model::Recognizer>,
477 {
478 self.0.request.recognizer = v.map(|x| x.into());
479 self
480 }
481
482 pub fn set_update_mask<T>(mut self, v: T) -> Self
484 where
485 T: std::convert::Into<wkt::FieldMask>,
486 {
487 self.0.request.update_mask = std::option::Option::Some(v.into());
488 self
489 }
490
491 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
493 where
494 T: std::convert::Into<wkt::FieldMask>,
495 {
496 self.0.request.update_mask = v.map(|x| x.into());
497 self
498 }
499
500 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
502 self.0.request.validate_only = v.into();
503 self
504 }
505 }
506
507 #[doc(hidden)]
508 impl gax::options::internal::RequestBuilder for UpdateRecognizer {
509 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
510 &mut self.0.options
511 }
512 }
513
514 #[derive(Clone, Debug)]
532 pub struct DeleteRecognizer(RequestBuilder<crate::model::DeleteRecognizerRequest>);
533
534 impl DeleteRecognizer {
535 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Speech>) -> Self {
536 Self(RequestBuilder::new(stub))
537 }
538
539 pub fn with_request<V: Into<crate::model::DeleteRecognizerRequest>>(
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 .delete_recognizer(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::Recognizer, crate::model::OperationMetadata> {
571 type Operation =
572 lro::internal::Operation<crate::model::Recognizer, crate::model::OperationMetadata>;
573 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
574 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
575
576 let stub = self.0.stub.clone();
577 let mut options = self.0.options.clone();
578 options.set_retry_policy(gax::retry_policy::NeverRetry);
579 let query = move |name| {
580 let stub = stub.clone();
581 let options = options.clone();
582 async {
583 let op = GetOperation::new(stub)
584 .set_name(name)
585 .with_options(options)
586 .send()
587 .await?;
588 Ok(Operation::new(op))
589 }
590 };
591
592 let start = move || async {
593 let op = self.send().await?;
594 Ok(Operation::new(op))
595 };
596
597 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
598 }
599
600 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
604 self.0.request.name = v.into();
605 self
606 }
607
608 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
610 self.0.request.validate_only = v.into();
611 self
612 }
613
614 pub fn set_allow_missing<T: Into<bool>>(mut self, v: T) -> Self {
616 self.0.request.allow_missing = v.into();
617 self
618 }
619
620 pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
622 self.0.request.etag = v.into();
623 self
624 }
625 }
626
627 #[doc(hidden)]
628 impl gax::options::internal::RequestBuilder for DeleteRecognizer {
629 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
630 &mut self.0.options
631 }
632 }
633
634 #[derive(Clone, Debug)]
652 pub struct UndeleteRecognizer(RequestBuilder<crate::model::UndeleteRecognizerRequest>);
653
654 impl UndeleteRecognizer {
655 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Speech>) -> Self {
656 Self(RequestBuilder::new(stub))
657 }
658
659 pub fn with_request<V: Into<crate::model::UndeleteRecognizerRequest>>(
661 mut self,
662 v: V,
663 ) -> Self {
664 self.0.request = v.into();
665 self
666 }
667
668 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
670 self.0.options = v.into();
671 self
672 }
673
674 pub async fn send(self) -> Result<longrunning::model::Operation> {
681 (*self.0.stub)
682 .undelete_recognizer(self.0.request, self.0.options)
683 .await
684 .map(gax::response::Response::into_body)
685 }
686
687 pub fn poller(
689 self,
690 ) -> impl lro::Poller<crate::model::Recognizer, crate::model::OperationMetadata> {
691 type Operation =
692 lro::internal::Operation<crate::model::Recognizer, crate::model::OperationMetadata>;
693 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
694 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
695
696 let stub = self.0.stub.clone();
697 let mut options = self.0.options.clone();
698 options.set_retry_policy(gax::retry_policy::NeverRetry);
699 let query = move |name| {
700 let stub = stub.clone();
701 let options = options.clone();
702 async {
703 let op = GetOperation::new(stub)
704 .set_name(name)
705 .with_options(options)
706 .send()
707 .await?;
708 Ok(Operation::new(op))
709 }
710 };
711
712 let start = move || async {
713 let op = self.send().await?;
714 Ok(Operation::new(op))
715 };
716
717 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
718 }
719
720 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
724 self.0.request.name = v.into();
725 self
726 }
727
728 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
730 self.0.request.validate_only = v.into();
731 self
732 }
733
734 pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
736 self.0.request.etag = v.into();
737 self
738 }
739 }
740
741 #[doc(hidden)]
742 impl gax::options::internal::RequestBuilder for UndeleteRecognizer {
743 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
744 &mut self.0.options
745 }
746 }
747
748 #[derive(Clone, Debug)]
765 pub struct Recognize(RequestBuilder<crate::model::RecognizeRequest>);
766
767 impl Recognize {
768 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Speech>) -> Self {
769 Self(RequestBuilder::new(stub))
770 }
771
772 pub fn with_request<V: Into<crate::model::RecognizeRequest>>(mut self, v: V) -> Self {
774 self.0.request = v.into();
775 self
776 }
777
778 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
780 self.0.options = v.into();
781 self
782 }
783
784 pub async fn send(self) -> Result<crate::model::RecognizeResponse> {
786 (*self.0.stub)
787 .recognize(self.0.request, self.0.options)
788 .await
789 .map(gax::response::Response::into_body)
790 }
791
792 pub fn set_recognizer<T: Into<std::string::String>>(mut self, v: T) -> Self {
796 self.0.request.recognizer = v.into();
797 self
798 }
799
800 pub fn set_config<T>(mut self, v: T) -> Self
802 where
803 T: std::convert::Into<crate::model::RecognitionConfig>,
804 {
805 self.0.request.config = std::option::Option::Some(v.into());
806 self
807 }
808
809 pub fn set_or_clear_config<T>(mut self, v: std::option::Option<T>) -> Self
811 where
812 T: std::convert::Into<crate::model::RecognitionConfig>,
813 {
814 self.0.request.config = v.map(|x| x.into());
815 self
816 }
817
818 pub fn set_config_mask<T>(mut self, v: T) -> Self
820 where
821 T: std::convert::Into<wkt::FieldMask>,
822 {
823 self.0.request.config_mask = std::option::Option::Some(v.into());
824 self
825 }
826
827 pub fn set_or_clear_config_mask<T>(mut self, v: std::option::Option<T>) -> Self
829 where
830 T: std::convert::Into<wkt::FieldMask>,
831 {
832 self.0.request.config_mask = v.map(|x| x.into());
833 self
834 }
835
836 pub fn set_audio_source<T: Into<Option<crate::model::recognize_request::AudioSource>>>(
841 mut self,
842 v: T,
843 ) -> Self {
844 self.0.request.audio_source = v.into();
845 self
846 }
847
848 pub fn set_content<T: std::convert::Into<::bytes::Bytes>>(mut self, v: T) -> Self {
854 self.0.request = self.0.request.set_content(v);
855 self
856 }
857
858 pub fn set_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
864 self.0.request = self.0.request.set_uri(v);
865 self
866 }
867 }
868
869 #[doc(hidden)]
870 impl gax::options::internal::RequestBuilder for Recognize {
871 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
872 &mut self.0.options
873 }
874 }
875
876 #[derive(Clone, Debug)]
894 pub struct BatchRecognize(RequestBuilder<crate::model::BatchRecognizeRequest>);
895
896 impl BatchRecognize {
897 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Speech>) -> Self {
898 Self(RequestBuilder::new(stub))
899 }
900
901 pub fn with_request<V: Into<crate::model::BatchRecognizeRequest>>(mut self, v: V) -> Self {
903 self.0.request = v.into();
904 self
905 }
906
907 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
909 self.0.options = v.into();
910 self
911 }
912
913 pub async fn send(self) -> Result<longrunning::model::Operation> {
920 (*self.0.stub)
921 .batch_recognize(self.0.request, self.0.options)
922 .await
923 .map(gax::response::Response::into_body)
924 }
925
926 pub fn poller(
928 self,
929 ) -> impl lro::Poller<crate::model::BatchRecognizeResponse, crate::model::OperationMetadata>
930 {
931 type Operation = lro::internal::Operation<
932 crate::model::BatchRecognizeResponse,
933 crate::model::OperationMetadata,
934 >;
935 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
936 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
937
938 let stub = self.0.stub.clone();
939 let mut options = self.0.options.clone();
940 options.set_retry_policy(gax::retry_policy::NeverRetry);
941 let query = move |name| {
942 let stub = stub.clone();
943 let options = options.clone();
944 async {
945 let op = GetOperation::new(stub)
946 .set_name(name)
947 .with_options(options)
948 .send()
949 .await?;
950 Ok(Operation::new(op))
951 }
952 };
953
954 let start = move || async {
955 let op = self.send().await?;
956 Ok(Operation::new(op))
957 };
958
959 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
960 }
961
962 pub fn set_recognizer<T: Into<std::string::String>>(mut self, v: T) -> Self {
966 self.0.request.recognizer = v.into();
967 self
968 }
969
970 pub fn set_config<T>(mut self, v: T) -> Self
972 where
973 T: std::convert::Into<crate::model::RecognitionConfig>,
974 {
975 self.0.request.config = std::option::Option::Some(v.into());
976 self
977 }
978
979 pub fn set_or_clear_config<T>(mut self, v: std::option::Option<T>) -> Self
981 where
982 T: std::convert::Into<crate::model::RecognitionConfig>,
983 {
984 self.0.request.config = v.map(|x| x.into());
985 self
986 }
987
988 pub fn set_config_mask<T>(mut self, v: T) -> Self
990 where
991 T: std::convert::Into<wkt::FieldMask>,
992 {
993 self.0.request.config_mask = std::option::Option::Some(v.into());
994 self
995 }
996
997 pub fn set_or_clear_config_mask<T>(mut self, v: std::option::Option<T>) -> Self
999 where
1000 T: std::convert::Into<wkt::FieldMask>,
1001 {
1002 self.0.request.config_mask = v.map(|x| x.into());
1003 self
1004 }
1005
1006 pub fn set_files<T, V>(mut self, v: T) -> Self
1008 where
1009 T: std::iter::IntoIterator<Item = V>,
1010 V: std::convert::Into<crate::model::BatchRecognizeFileMetadata>,
1011 {
1012 use std::iter::Iterator;
1013 self.0.request.files = v.into_iter().map(|i| i.into()).collect();
1014 self
1015 }
1016
1017 pub fn set_recognition_output_config<T>(mut self, v: T) -> Self
1019 where
1020 T: std::convert::Into<crate::model::RecognitionOutputConfig>,
1021 {
1022 self.0.request.recognition_output_config = std::option::Option::Some(v.into());
1023 self
1024 }
1025
1026 pub fn set_or_clear_recognition_output_config<T>(
1028 mut self,
1029 v: std::option::Option<T>,
1030 ) -> Self
1031 where
1032 T: std::convert::Into<crate::model::RecognitionOutputConfig>,
1033 {
1034 self.0.request.recognition_output_config = v.map(|x| x.into());
1035 self
1036 }
1037
1038 pub fn set_processing_strategy<
1040 T: Into<crate::model::batch_recognize_request::ProcessingStrategy>,
1041 >(
1042 mut self,
1043 v: T,
1044 ) -> Self {
1045 self.0.request.processing_strategy = v.into();
1046 self
1047 }
1048 }
1049
1050 #[doc(hidden)]
1051 impl gax::options::internal::RequestBuilder for BatchRecognize {
1052 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1053 &mut self.0.options
1054 }
1055 }
1056
1057 #[derive(Clone, Debug)]
1074 pub struct GetConfig(RequestBuilder<crate::model::GetConfigRequest>);
1075
1076 impl GetConfig {
1077 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Speech>) -> Self {
1078 Self(RequestBuilder::new(stub))
1079 }
1080
1081 pub fn with_request<V: Into<crate::model::GetConfigRequest>>(mut self, v: V) -> Self {
1083 self.0.request = v.into();
1084 self
1085 }
1086
1087 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1089 self.0.options = v.into();
1090 self
1091 }
1092
1093 pub async fn send(self) -> Result<crate::model::Config> {
1095 (*self.0.stub)
1096 .get_config(self.0.request, self.0.options)
1097 .await
1098 .map(gax::response::Response::into_body)
1099 }
1100
1101 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1105 self.0.request.name = v.into();
1106 self
1107 }
1108 }
1109
1110 #[doc(hidden)]
1111 impl gax::options::internal::RequestBuilder for GetConfig {
1112 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1113 &mut self.0.options
1114 }
1115 }
1116
1117 #[derive(Clone, Debug)]
1134 pub struct UpdateConfig(RequestBuilder<crate::model::UpdateConfigRequest>);
1135
1136 impl UpdateConfig {
1137 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Speech>) -> Self {
1138 Self(RequestBuilder::new(stub))
1139 }
1140
1141 pub fn with_request<V: Into<crate::model::UpdateConfigRequest>>(mut self, v: V) -> Self {
1143 self.0.request = v.into();
1144 self
1145 }
1146
1147 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1149 self.0.options = v.into();
1150 self
1151 }
1152
1153 pub async fn send(self) -> Result<crate::model::Config> {
1155 (*self.0.stub)
1156 .update_config(self.0.request, self.0.options)
1157 .await
1158 .map(gax::response::Response::into_body)
1159 }
1160
1161 pub fn set_config<T>(mut self, v: T) -> Self
1165 where
1166 T: std::convert::Into<crate::model::Config>,
1167 {
1168 self.0.request.config = std::option::Option::Some(v.into());
1169 self
1170 }
1171
1172 pub fn set_or_clear_config<T>(mut self, v: std::option::Option<T>) -> Self
1176 where
1177 T: std::convert::Into<crate::model::Config>,
1178 {
1179 self.0.request.config = v.map(|x| x.into());
1180 self
1181 }
1182
1183 pub fn set_update_mask<T>(mut self, v: T) -> Self
1185 where
1186 T: std::convert::Into<wkt::FieldMask>,
1187 {
1188 self.0.request.update_mask = std::option::Option::Some(v.into());
1189 self
1190 }
1191
1192 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
1194 where
1195 T: std::convert::Into<wkt::FieldMask>,
1196 {
1197 self.0.request.update_mask = v.map(|x| x.into());
1198 self
1199 }
1200 }
1201
1202 #[doc(hidden)]
1203 impl gax::options::internal::RequestBuilder for UpdateConfig {
1204 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1205 &mut self.0.options
1206 }
1207 }
1208
1209 #[derive(Clone, Debug)]
1227 pub struct CreateCustomClass(RequestBuilder<crate::model::CreateCustomClassRequest>);
1228
1229 impl CreateCustomClass {
1230 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Speech>) -> Self {
1231 Self(RequestBuilder::new(stub))
1232 }
1233
1234 pub fn with_request<V: Into<crate::model::CreateCustomClassRequest>>(
1236 mut self,
1237 v: V,
1238 ) -> Self {
1239 self.0.request = v.into();
1240 self
1241 }
1242
1243 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1245 self.0.options = v.into();
1246 self
1247 }
1248
1249 pub async fn send(self) -> Result<longrunning::model::Operation> {
1256 (*self.0.stub)
1257 .create_custom_class(self.0.request, self.0.options)
1258 .await
1259 .map(gax::response::Response::into_body)
1260 }
1261
1262 pub fn poller(
1264 self,
1265 ) -> impl lro::Poller<crate::model::CustomClass, crate::model::OperationMetadata> {
1266 type Operation = lro::internal::Operation<
1267 crate::model::CustomClass,
1268 crate::model::OperationMetadata,
1269 >;
1270 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1271 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1272
1273 let stub = self.0.stub.clone();
1274 let mut options = self.0.options.clone();
1275 options.set_retry_policy(gax::retry_policy::NeverRetry);
1276 let query = move |name| {
1277 let stub = stub.clone();
1278 let options = options.clone();
1279 async {
1280 let op = GetOperation::new(stub)
1281 .set_name(name)
1282 .with_options(options)
1283 .send()
1284 .await?;
1285 Ok(Operation::new(op))
1286 }
1287 };
1288
1289 let start = move || async {
1290 let op = self.send().await?;
1291 Ok(Operation::new(op))
1292 };
1293
1294 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
1295 }
1296
1297 pub fn set_custom_class<T>(mut self, v: T) -> Self
1301 where
1302 T: std::convert::Into<crate::model::CustomClass>,
1303 {
1304 self.0.request.custom_class = std::option::Option::Some(v.into());
1305 self
1306 }
1307
1308 pub fn set_or_clear_custom_class<T>(mut self, v: std::option::Option<T>) -> Self
1312 where
1313 T: std::convert::Into<crate::model::CustomClass>,
1314 {
1315 self.0.request.custom_class = v.map(|x| x.into());
1316 self
1317 }
1318
1319 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
1321 self.0.request.validate_only = v.into();
1322 self
1323 }
1324
1325 pub fn set_custom_class_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1327 self.0.request.custom_class_id = v.into();
1328 self
1329 }
1330
1331 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1335 self.0.request.parent = v.into();
1336 self
1337 }
1338 }
1339
1340 #[doc(hidden)]
1341 impl gax::options::internal::RequestBuilder for CreateCustomClass {
1342 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1343 &mut self.0.options
1344 }
1345 }
1346
1347 #[derive(Clone, Debug)]
1368 pub struct ListCustomClasses(RequestBuilder<crate::model::ListCustomClassesRequest>);
1369
1370 impl ListCustomClasses {
1371 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Speech>) -> Self {
1372 Self(RequestBuilder::new(stub))
1373 }
1374
1375 pub fn with_request<V: Into<crate::model::ListCustomClassesRequest>>(
1377 mut self,
1378 v: V,
1379 ) -> Self {
1380 self.0.request = v.into();
1381 self
1382 }
1383
1384 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1386 self.0.options = v.into();
1387 self
1388 }
1389
1390 pub async fn send(self) -> Result<crate::model::ListCustomClassesResponse> {
1392 (*self.0.stub)
1393 .list_custom_classes(self.0.request, self.0.options)
1394 .await
1395 .map(gax::response::Response::into_body)
1396 }
1397
1398 pub fn by_page(
1400 self,
1401 ) -> impl gax::paginator::Paginator<crate::model::ListCustomClassesResponse, gax::error::Error>
1402 {
1403 use std::clone::Clone;
1404 let token = self.0.request.page_token.clone();
1405 let execute = move |token: String| {
1406 let mut builder = self.clone();
1407 builder.0.request = builder.0.request.set_page_token(token);
1408 builder.send()
1409 };
1410 gax::paginator::internal::new_paginator(token, execute)
1411 }
1412
1413 pub fn by_item(
1415 self,
1416 ) -> impl gax::paginator::ItemPaginator<crate::model::ListCustomClassesResponse, gax::error::Error>
1417 {
1418 use gax::paginator::Paginator;
1419 self.by_page().items()
1420 }
1421
1422 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1426 self.0.request.parent = v.into();
1427 self
1428 }
1429
1430 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1432 self.0.request.page_size = v.into();
1433 self
1434 }
1435
1436 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1438 self.0.request.page_token = v.into();
1439 self
1440 }
1441
1442 pub fn set_show_deleted<T: Into<bool>>(mut self, v: T) -> Self {
1444 self.0.request.show_deleted = v.into();
1445 self
1446 }
1447 }
1448
1449 #[doc(hidden)]
1450 impl gax::options::internal::RequestBuilder for ListCustomClasses {
1451 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1452 &mut self.0.options
1453 }
1454 }
1455
1456 #[derive(Clone, Debug)]
1473 pub struct GetCustomClass(RequestBuilder<crate::model::GetCustomClassRequest>);
1474
1475 impl GetCustomClass {
1476 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Speech>) -> Self {
1477 Self(RequestBuilder::new(stub))
1478 }
1479
1480 pub fn with_request<V: Into<crate::model::GetCustomClassRequest>>(mut self, v: V) -> Self {
1482 self.0.request = v.into();
1483 self
1484 }
1485
1486 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1488 self.0.options = v.into();
1489 self
1490 }
1491
1492 pub async fn send(self) -> Result<crate::model::CustomClass> {
1494 (*self.0.stub)
1495 .get_custom_class(self.0.request, self.0.options)
1496 .await
1497 .map(gax::response::Response::into_body)
1498 }
1499
1500 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1504 self.0.request.name = v.into();
1505 self
1506 }
1507 }
1508
1509 #[doc(hidden)]
1510 impl gax::options::internal::RequestBuilder for GetCustomClass {
1511 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1512 &mut self.0.options
1513 }
1514 }
1515
1516 #[derive(Clone, Debug)]
1534 pub struct UpdateCustomClass(RequestBuilder<crate::model::UpdateCustomClassRequest>);
1535
1536 impl UpdateCustomClass {
1537 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Speech>) -> Self {
1538 Self(RequestBuilder::new(stub))
1539 }
1540
1541 pub fn with_request<V: Into<crate::model::UpdateCustomClassRequest>>(
1543 mut self,
1544 v: V,
1545 ) -> Self {
1546 self.0.request = v.into();
1547 self
1548 }
1549
1550 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1552 self.0.options = v.into();
1553 self
1554 }
1555
1556 pub async fn send(self) -> Result<longrunning::model::Operation> {
1563 (*self.0.stub)
1564 .update_custom_class(self.0.request, self.0.options)
1565 .await
1566 .map(gax::response::Response::into_body)
1567 }
1568
1569 pub fn poller(
1571 self,
1572 ) -> impl lro::Poller<crate::model::CustomClass, crate::model::OperationMetadata> {
1573 type Operation = lro::internal::Operation<
1574 crate::model::CustomClass,
1575 crate::model::OperationMetadata,
1576 >;
1577 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1578 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1579
1580 let stub = self.0.stub.clone();
1581 let mut options = self.0.options.clone();
1582 options.set_retry_policy(gax::retry_policy::NeverRetry);
1583 let query = move |name| {
1584 let stub = stub.clone();
1585 let options = options.clone();
1586 async {
1587 let op = GetOperation::new(stub)
1588 .set_name(name)
1589 .with_options(options)
1590 .send()
1591 .await?;
1592 Ok(Operation::new(op))
1593 }
1594 };
1595
1596 let start = move || async {
1597 let op = self.send().await?;
1598 Ok(Operation::new(op))
1599 };
1600
1601 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
1602 }
1603
1604 pub fn set_custom_class<T>(mut self, v: T) -> Self
1608 where
1609 T: std::convert::Into<crate::model::CustomClass>,
1610 {
1611 self.0.request.custom_class = std::option::Option::Some(v.into());
1612 self
1613 }
1614
1615 pub fn set_or_clear_custom_class<T>(mut self, v: std::option::Option<T>) -> Self
1619 where
1620 T: std::convert::Into<crate::model::CustomClass>,
1621 {
1622 self.0.request.custom_class = v.map(|x| x.into());
1623 self
1624 }
1625
1626 pub fn set_update_mask<T>(mut self, v: T) -> Self
1628 where
1629 T: std::convert::Into<wkt::FieldMask>,
1630 {
1631 self.0.request.update_mask = std::option::Option::Some(v.into());
1632 self
1633 }
1634
1635 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
1637 where
1638 T: std::convert::Into<wkt::FieldMask>,
1639 {
1640 self.0.request.update_mask = v.map(|x| x.into());
1641 self
1642 }
1643
1644 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
1646 self.0.request.validate_only = v.into();
1647 self
1648 }
1649 }
1650
1651 #[doc(hidden)]
1652 impl gax::options::internal::RequestBuilder for UpdateCustomClass {
1653 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1654 &mut self.0.options
1655 }
1656 }
1657
1658 #[derive(Clone, Debug)]
1676 pub struct DeleteCustomClass(RequestBuilder<crate::model::DeleteCustomClassRequest>);
1677
1678 impl DeleteCustomClass {
1679 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Speech>) -> Self {
1680 Self(RequestBuilder::new(stub))
1681 }
1682
1683 pub fn with_request<V: Into<crate::model::DeleteCustomClassRequest>>(
1685 mut self,
1686 v: V,
1687 ) -> Self {
1688 self.0.request = v.into();
1689 self
1690 }
1691
1692 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1694 self.0.options = v.into();
1695 self
1696 }
1697
1698 pub async fn send(self) -> Result<longrunning::model::Operation> {
1705 (*self.0.stub)
1706 .delete_custom_class(self.0.request, self.0.options)
1707 .await
1708 .map(gax::response::Response::into_body)
1709 }
1710
1711 pub fn poller(
1713 self,
1714 ) -> impl lro::Poller<crate::model::CustomClass, crate::model::OperationMetadata> {
1715 type Operation = lro::internal::Operation<
1716 crate::model::CustomClass,
1717 crate::model::OperationMetadata,
1718 >;
1719 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1720 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1721
1722 let stub = self.0.stub.clone();
1723 let mut options = self.0.options.clone();
1724 options.set_retry_policy(gax::retry_policy::NeverRetry);
1725 let query = move |name| {
1726 let stub = stub.clone();
1727 let options = options.clone();
1728 async {
1729 let op = GetOperation::new(stub)
1730 .set_name(name)
1731 .with_options(options)
1732 .send()
1733 .await?;
1734 Ok(Operation::new(op))
1735 }
1736 };
1737
1738 let start = move || async {
1739 let op = self.send().await?;
1740 Ok(Operation::new(op))
1741 };
1742
1743 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
1744 }
1745
1746 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1750 self.0.request.name = v.into();
1751 self
1752 }
1753
1754 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
1756 self.0.request.validate_only = v.into();
1757 self
1758 }
1759
1760 pub fn set_allow_missing<T: Into<bool>>(mut self, v: T) -> Self {
1762 self.0.request.allow_missing = v.into();
1763 self
1764 }
1765
1766 pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
1768 self.0.request.etag = v.into();
1769 self
1770 }
1771 }
1772
1773 #[doc(hidden)]
1774 impl gax::options::internal::RequestBuilder for DeleteCustomClass {
1775 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1776 &mut self.0.options
1777 }
1778 }
1779
1780 #[derive(Clone, Debug)]
1798 pub struct UndeleteCustomClass(RequestBuilder<crate::model::UndeleteCustomClassRequest>);
1799
1800 impl UndeleteCustomClass {
1801 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Speech>) -> Self {
1802 Self(RequestBuilder::new(stub))
1803 }
1804
1805 pub fn with_request<V: Into<crate::model::UndeleteCustomClassRequest>>(
1807 mut self,
1808 v: V,
1809 ) -> Self {
1810 self.0.request = v.into();
1811 self
1812 }
1813
1814 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1816 self.0.options = v.into();
1817 self
1818 }
1819
1820 pub async fn send(self) -> Result<longrunning::model::Operation> {
1827 (*self.0.stub)
1828 .undelete_custom_class(self.0.request, self.0.options)
1829 .await
1830 .map(gax::response::Response::into_body)
1831 }
1832
1833 pub fn poller(
1835 self,
1836 ) -> impl lro::Poller<crate::model::CustomClass, crate::model::OperationMetadata> {
1837 type Operation = lro::internal::Operation<
1838 crate::model::CustomClass,
1839 crate::model::OperationMetadata,
1840 >;
1841 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1842 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1843
1844 let stub = self.0.stub.clone();
1845 let mut options = self.0.options.clone();
1846 options.set_retry_policy(gax::retry_policy::NeverRetry);
1847 let query = move |name| {
1848 let stub = stub.clone();
1849 let options = options.clone();
1850 async {
1851 let op = GetOperation::new(stub)
1852 .set_name(name)
1853 .with_options(options)
1854 .send()
1855 .await?;
1856 Ok(Operation::new(op))
1857 }
1858 };
1859
1860 let start = move || async {
1861 let op = self.send().await?;
1862 Ok(Operation::new(op))
1863 };
1864
1865 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
1866 }
1867
1868 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1872 self.0.request.name = v.into();
1873 self
1874 }
1875
1876 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
1878 self.0.request.validate_only = v.into();
1879 self
1880 }
1881
1882 pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
1884 self.0.request.etag = v.into();
1885 self
1886 }
1887 }
1888
1889 #[doc(hidden)]
1890 impl gax::options::internal::RequestBuilder for UndeleteCustomClass {
1891 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1892 &mut self.0.options
1893 }
1894 }
1895
1896 #[derive(Clone, Debug)]
1914 pub struct CreatePhraseSet(RequestBuilder<crate::model::CreatePhraseSetRequest>);
1915
1916 impl CreatePhraseSet {
1917 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Speech>) -> Self {
1918 Self(RequestBuilder::new(stub))
1919 }
1920
1921 pub fn with_request<V: Into<crate::model::CreatePhraseSetRequest>>(mut self, v: V) -> Self {
1923 self.0.request = v.into();
1924 self
1925 }
1926
1927 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1929 self.0.options = v.into();
1930 self
1931 }
1932
1933 pub async fn send(self) -> Result<longrunning::model::Operation> {
1940 (*self.0.stub)
1941 .create_phrase_set(self.0.request, self.0.options)
1942 .await
1943 .map(gax::response::Response::into_body)
1944 }
1945
1946 pub fn poller(
1948 self,
1949 ) -> impl lro::Poller<crate::model::PhraseSet, crate::model::OperationMetadata> {
1950 type Operation =
1951 lro::internal::Operation<crate::model::PhraseSet, crate::model::OperationMetadata>;
1952 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1953 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1954
1955 let stub = self.0.stub.clone();
1956 let mut options = self.0.options.clone();
1957 options.set_retry_policy(gax::retry_policy::NeverRetry);
1958 let query = move |name| {
1959 let stub = stub.clone();
1960 let options = options.clone();
1961 async {
1962 let op = GetOperation::new(stub)
1963 .set_name(name)
1964 .with_options(options)
1965 .send()
1966 .await?;
1967 Ok(Operation::new(op))
1968 }
1969 };
1970
1971 let start = move || async {
1972 let op = self.send().await?;
1973 Ok(Operation::new(op))
1974 };
1975
1976 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
1977 }
1978
1979 pub fn set_phrase_set<T>(mut self, v: T) -> Self
1983 where
1984 T: std::convert::Into<crate::model::PhraseSet>,
1985 {
1986 self.0.request.phrase_set = std::option::Option::Some(v.into());
1987 self
1988 }
1989
1990 pub fn set_or_clear_phrase_set<T>(mut self, v: std::option::Option<T>) -> Self
1994 where
1995 T: std::convert::Into<crate::model::PhraseSet>,
1996 {
1997 self.0.request.phrase_set = v.map(|x| x.into());
1998 self
1999 }
2000
2001 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
2003 self.0.request.validate_only = v.into();
2004 self
2005 }
2006
2007 pub fn set_phrase_set_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2009 self.0.request.phrase_set_id = v.into();
2010 self
2011 }
2012
2013 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2017 self.0.request.parent = v.into();
2018 self
2019 }
2020 }
2021
2022 #[doc(hidden)]
2023 impl gax::options::internal::RequestBuilder for CreatePhraseSet {
2024 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2025 &mut self.0.options
2026 }
2027 }
2028
2029 #[derive(Clone, Debug)]
2050 pub struct ListPhraseSets(RequestBuilder<crate::model::ListPhraseSetsRequest>);
2051
2052 impl ListPhraseSets {
2053 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Speech>) -> Self {
2054 Self(RequestBuilder::new(stub))
2055 }
2056
2057 pub fn with_request<V: Into<crate::model::ListPhraseSetsRequest>>(mut self, v: V) -> Self {
2059 self.0.request = v.into();
2060 self
2061 }
2062
2063 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2065 self.0.options = v.into();
2066 self
2067 }
2068
2069 pub async fn send(self) -> Result<crate::model::ListPhraseSetsResponse> {
2071 (*self.0.stub)
2072 .list_phrase_sets(self.0.request, self.0.options)
2073 .await
2074 .map(gax::response::Response::into_body)
2075 }
2076
2077 pub fn by_page(
2079 self,
2080 ) -> impl gax::paginator::Paginator<crate::model::ListPhraseSetsResponse, gax::error::Error>
2081 {
2082 use std::clone::Clone;
2083 let token = self.0.request.page_token.clone();
2084 let execute = move |token: String| {
2085 let mut builder = self.clone();
2086 builder.0.request = builder.0.request.set_page_token(token);
2087 builder.send()
2088 };
2089 gax::paginator::internal::new_paginator(token, execute)
2090 }
2091
2092 pub fn by_item(
2094 self,
2095 ) -> impl gax::paginator::ItemPaginator<crate::model::ListPhraseSetsResponse, gax::error::Error>
2096 {
2097 use gax::paginator::Paginator;
2098 self.by_page().items()
2099 }
2100
2101 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2105 self.0.request.parent = v.into();
2106 self
2107 }
2108
2109 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2111 self.0.request.page_size = v.into();
2112 self
2113 }
2114
2115 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2117 self.0.request.page_token = v.into();
2118 self
2119 }
2120
2121 pub fn set_show_deleted<T: Into<bool>>(mut self, v: T) -> Self {
2123 self.0.request.show_deleted = v.into();
2124 self
2125 }
2126 }
2127
2128 #[doc(hidden)]
2129 impl gax::options::internal::RequestBuilder for ListPhraseSets {
2130 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2131 &mut self.0.options
2132 }
2133 }
2134
2135 #[derive(Clone, Debug)]
2152 pub struct GetPhraseSet(RequestBuilder<crate::model::GetPhraseSetRequest>);
2153
2154 impl GetPhraseSet {
2155 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Speech>) -> Self {
2156 Self(RequestBuilder::new(stub))
2157 }
2158
2159 pub fn with_request<V: Into<crate::model::GetPhraseSetRequest>>(mut self, v: V) -> Self {
2161 self.0.request = v.into();
2162 self
2163 }
2164
2165 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2167 self.0.options = v.into();
2168 self
2169 }
2170
2171 pub async fn send(self) -> Result<crate::model::PhraseSet> {
2173 (*self.0.stub)
2174 .get_phrase_set(self.0.request, self.0.options)
2175 .await
2176 .map(gax::response::Response::into_body)
2177 }
2178
2179 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2183 self.0.request.name = v.into();
2184 self
2185 }
2186 }
2187
2188 #[doc(hidden)]
2189 impl gax::options::internal::RequestBuilder for GetPhraseSet {
2190 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2191 &mut self.0.options
2192 }
2193 }
2194
2195 #[derive(Clone, Debug)]
2213 pub struct UpdatePhraseSet(RequestBuilder<crate::model::UpdatePhraseSetRequest>);
2214
2215 impl UpdatePhraseSet {
2216 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Speech>) -> Self {
2217 Self(RequestBuilder::new(stub))
2218 }
2219
2220 pub fn with_request<V: Into<crate::model::UpdatePhraseSetRequest>>(mut self, v: V) -> Self {
2222 self.0.request = v.into();
2223 self
2224 }
2225
2226 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2228 self.0.options = v.into();
2229 self
2230 }
2231
2232 pub async fn send(self) -> Result<longrunning::model::Operation> {
2239 (*self.0.stub)
2240 .update_phrase_set(self.0.request, self.0.options)
2241 .await
2242 .map(gax::response::Response::into_body)
2243 }
2244
2245 pub fn poller(
2247 self,
2248 ) -> impl lro::Poller<crate::model::PhraseSet, crate::model::OperationMetadata> {
2249 type Operation =
2250 lro::internal::Operation<crate::model::PhraseSet, crate::model::OperationMetadata>;
2251 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2252 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2253
2254 let stub = self.0.stub.clone();
2255 let mut options = self.0.options.clone();
2256 options.set_retry_policy(gax::retry_policy::NeverRetry);
2257 let query = move |name| {
2258 let stub = stub.clone();
2259 let options = options.clone();
2260 async {
2261 let op = GetOperation::new(stub)
2262 .set_name(name)
2263 .with_options(options)
2264 .send()
2265 .await?;
2266 Ok(Operation::new(op))
2267 }
2268 };
2269
2270 let start = move || async {
2271 let op = self.send().await?;
2272 Ok(Operation::new(op))
2273 };
2274
2275 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
2276 }
2277
2278 pub fn set_phrase_set<T>(mut self, v: T) -> Self
2282 where
2283 T: std::convert::Into<crate::model::PhraseSet>,
2284 {
2285 self.0.request.phrase_set = std::option::Option::Some(v.into());
2286 self
2287 }
2288
2289 pub fn set_or_clear_phrase_set<T>(mut self, v: std::option::Option<T>) -> Self
2293 where
2294 T: std::convert::Into<crate::model::PhraseSet>,
2295 {
2296 self.0.request.phrase_set = v.map(|x| x.into());
2297 self
2298 }
2299
2300 pub fn set_update_mask<T>(mut self, v: T) -> Self
2302 where
2303 T: std::convert::Into<wkt::FieldMask>,
2304 {
2305 self.0.request.update_mask = std::option::Option::Some(v.into());
2306 self
2307 }
2308
2309 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
2311 where
2312 T: std::convert::Into<wkt::FieldMask>,
2313 {
2314 self.0.request.update_mask = v.map(|x| x.into());
2315 self
2316 }
2317
2318 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
2320 self.0.request.validate_only = v.into();
2321 self
2322 }
2323 }
2324
2325 #[doc(hidden)]
2326 impl gax::options::internal::RequestBuilder for UpdatePhraseSet {
2327 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2328 &mut self.0.options
2329 }
2330 }
2331
2332 #[derive(Clone, Debug)]
2350 pub struct DeletePhraseSet(RequestBuilder<crate::model::DeletePhraseSetRequest>);
2351
2352 impl DeletePhraseSet {
2353 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Speech>) -> Self {
2354 Self(RequestBuilder::new(stub))
2355 }
2356
2357 pub fn with_request<V: Into<crate::model::DeletePhraseSetRequest>>(mut self, v: V) -> Self {
2359 self.0.request = v.into();
2360 self
2361 }
2362
2363 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2365 self.0.options = v.into();
2366 self
2367 }
2368
2369 pub async fn send(self) -> Result<longrunning::model::Operation> {
2376 (*self.0.stub)
2377 .delete_phrase_set(self.0.request, self.0.options)
2378 .await
2379 .map(gax::response::Response::into_body)
2380 }
2381
2382 pub fn poller(
2384 self,
2385 ) -> impl lro::Poller<crate::model::PhraseSet, crate::model::OperationMetadata> {
2386 type Operation =
2387 lro::internal::Operation<crate::model::PhraseSet, crate::model::OperationMetadata>;
2388 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2389 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2390
2391 let stub = self.0.stub.clone();
2392 let mut options = self.0.options.clone();
2393 options.set_retry_policy(gax::retry_policy::NeverRetry);
2394 let query = move |name| {
2395 let stub = stub.clone();
2396 let options = options.clone();
2397 async {
2398 let op = GetOperation::new(stub)
2399 .set_name(name)
2400 .with_options(options)
2401 .send()
2402 .await?;
2403 Ok(Operation::new(op))
2404 }
2405 };
2406
2407 let start = move || async {
2408 let op = self.send().await?;
2409 Ok(Operation::new(op))
2410 };
2411
2412 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
2413 }
2414
2415 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2419 self.0.request.name = v.into();
2420 self
2421 }
2422
2423 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
2425 self.0.request.validate_only = v.into();
2426 self
2427 }
2428
2429 pub fn set_allow_missing<T: Into<bool>>(mut self, v: T) -> Self {
2431 self.0.request.allow_missing = v.into();
2432 self
2433 }
2434
2435 pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
2437 self.0.request.etag = v.into();
2438 self
2439 }
2440 }
2441
2442 #[doc(hidden)]
2443 impl gax::options::internal::RequestBuilder for DeletePhraseSet {
2444 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2445 &mut self.0.options
2446 }
2447 }
2448
2449 #[derive(Clone, Debug)]
2467 pub struct UndeletePhraseSet(RequestBuilder<crate::model::UndeletePhraseSetRequest>);
2468
2469 impl UndeletePhraseSet {
2470 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Speech>) -> Self {
2471 Self(RequestBuilder::new(stub))
2472 }
2473
2474 pub fn with_request<V: Into<crate::model::UndeletePhraseSetRequest>>(
2476 mut self,
2477 v: V,
2478 ) -> Self {
2479 self.0.request = v.into();
2480 self
2481 }
2482
2483 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2485 self.0.options = v.into();
2486 self
2487 }
2488
2489 pub async fn send(self) -> Result<longrunning::model::Operation> {
2496 (*self.0.stub)
2497 .undelete_phrase_set(self.0.request, self.0.options)
2498 .await
2499 .map(gax::response::Response::into_body)
2500 }
2501
2502 pub fn poller(
2504 self,
2505 ) -> impl lro::Poller<crate::model::PhraseSet, crate::model::OperationMetadata> {
2506 type Operation =
2507 lro::internal::Operation<crate::model::PhraseSet, crate::model::OperationMetadata>;
2508 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2509 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2510
2511 let stub = self.0.stub.clone();
2512 let mut options = self.0.options.clone();
2513 options.set_retry_policy(gax::retry_policy::NeverRetry);
2514 let query = move |name| {
2515 let stub = stub.clone();
2516 let options = options.clone();
2517 async {
2518 let op = GetOperation::new(stub)
2519 .set_name(name)
2520 .with_options(options)
2521 .send()
2522 .await?;
2523 Ok(Operation::new(op))
2524 }
2525 };
2526
2527 let start = move || async {
2528 let op = self.send().await?;
2529 Ok(Operation::new(op))
2530 };
2531
2532 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
2533 }
2534
2535 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2539 self.0.request.name = v.into();
2540 self
2541 }
2542
2543 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
2545 self.0.request.validate_only = v.into();
2546 self
2547 }
2548
2549 pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
2551 self.0.request.etag = v.into();
2552 self
2553 }
2554 }
2555
2556 #[doc(hidden)]
2557 impl gax::options::internal::RequestBuilder for UndeletePhraseSet {
2558 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2559 &mut self.0.options
2560 }
2561 }
2562
2563 #[derive(Clone, Debug)]
2584 pub struct ListLocations(RequestBuilder<location::model::ListLocationsRequest>);
2585
2586 impl ListLocations {
2587 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Speech>) -> Self {
2588 Self(RequestBuilder::new(stub))
2589 }
2590
2591 pub fn with_request<V: Into<location::model::ListLocationsRequest>>(
2593 mut self,
2594 v: V,
2595 ) -> Self {
2596 self.0.request = v.into();
2597 self
2598 }
2599
2600 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2602 self.0.options = v.into();
2603 self
2604 }
2605
2606 pub async fn send(self) -> Result<location::model::ListLocationsResponse> {
2608 (*self.0.stub)
2609 .list_locations(self.0.request, self.0.options)
2610 .await
2611 .map(gax::response::Response::into_body)
2612 }
2613
2614 pub fn by_page(
2616 self,
2617 ) -> impl gax::paginator::Paginator<location::model::ListLocationsResponse, gax::error::Error>
2618 {
2619 use std::clone::Clone;
2620 let token = self.0.request.page_token.clone();
2621 let execute = move |token: String| {
2622 let mut builder = self.clone();
2623 builder.0.request = builder.0.request.set_page_token(token);
2624 builder.send()
2625 };
2626 gax::paginator::internal::new_paginator(token, execute)
2627 }
2628
2629 pub fn by_item(
2631 self,
2632 ) -> impl gax::paginator::ItemPaginator<location::model::ListLocationsResponse, gax::error::Error>
2633 {
2634 use gax::paginator::Paginator;
2635 self.by_page().items()
2636 }
2637
2638 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2640 self.0.request.name = v.into();
2641 self
2642 }
2643
2644 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
2646 self.0.request.filter = v.into();
2647 self
2648 }
2649
2650 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2652 self.0.request.page_size = v.into();
2653 self
2654 }
2655
2656 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2658 self.0.request.page_token = v.into();
2659 self
2660 }
2661 }
2662
2663 #[doc(hidden)]
2664 impl gax::options::internal::RequestBuilder for ListLocations {
2665 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2666 &mut self.0.options
2667 }
2668 }
2669
2670 #[derive(Clone, Debug)]
2687 pub struct GetLocation(RequestBuilder<location::model::GetLocationRequest>);
2688
2689 impl GetLocation {
2690 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Speech>) -> Self {
2691 Self(RequestBuilder::new(stub))
2692 }
2693
2694 pub fn with_request<V: Into<location::model::GetLocationRequest>>(mut self, v: V) -> Self {
2696 self.0.request = v.into();
2697 self
2698 }
2699
2700 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2702 self.0.options = v.into();
2703 self
2704 }
2705
2706 pub async fn send(self) -> Result<location::model::Location> {
2708 (*self.0.stub)
2709 .get_location(self.0.request, self.0.options)
2710 .await
2711 .map(gax::response::Response::into_body)
2712 }
2713
2714 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2716 self.0.request.name = v.into();
2717 self
2718 }
2719 }
2720
2721 #[doc(hidden)]
2722 impl gax::options::internal::RequestBuilder for GetLocation {
2723 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2724 &mut self.0.options
2725 }
2726 }
2727
2728 #[derive(Clone, Debug)]
2749 pub struct ListOperations(RequestBuilder<longrunning::model::ListOperationsRequest>);
2750
2751 impl ListOperations {
2752 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Speech>) -> Self {
2753 Self(RequestBuilder::new(stub))
2754 }
2755
2756 pub fn with_request<V: Into<longrunning::model::ListOperationsRequest>>(
2758 mut self,
2759 v: V,
2760 ) -> Self {
2761 self.0.request = v.into();
2762 self
2763 }
2764
2765 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2767 self.0.options = v.into();
2768 self
2769 }
2770
2771 pub async fn send(self) -> Result<longrunning::model::ListOperationsResponse> {
2773 (*self.0.stub)
2774 .list_operations(self.0.request, self.0.options)
2775 .await
2776 .map(gax::response::Response::into_body)
2777 }
2778
2779 pub fn by_page(
2781 self,
2782 ) -> impl gax::paginator::Paginator<longrunning::model::ListOperationsResponse, gax::error::Error>
2783 {
2784 use std::clone::Clone;
2785 let token = self.0.request.page_token.clone();
2786 let execute = move |token: String| {
2787 let mut builder = self.clone();
2788 builder.0.request = builder.0.request.set_page_token(token);
2789 builder.send()
2790 };
2791 gax::paginator::internal::new_paginator(token, execute)
2792 }
2793
2794 pub fn by_item(
2796 self,
2797 ) -> impl gax::paginator::ItemPaginator<
2798 longrunning::model::ListOperationsResponse,
2799 gax::error::Error,
2800 > {
2801 use gax::paginator::Paginator;
2802 self.by_page().items()
2803 }
2804
2805 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2807 self.0.request.name = v.into();
2808 self
2809 }
2810
2811 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
2813 self.0.request.filter = v.into();
2814 self
2815 }
2816
2817 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2819 self.0.request.page_size = v.into();
2820 self
2821 }
2822
2823 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2825 self.0.request.page_token = v.into();
2826 self
2827 }
2828
2829 pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
2831 self.0.request.return_partial_success = v.into();
2832 self
2833 }
2834 }
2835
2836 #[doc(hidden)]
2837 impl gax::options::internal::RequestBuilder for ListOperations {
2838 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2839 &mut self.0.options
2840 }
2841 }
2842
2843 #[derive(Clone, Debug)]
2860 pub struct GetOperation(RequestBuilder<longrunning::model::GetOperationRequest>);
2861
2862 impl GetOperation {
2863 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Speech>) -> Self {
2864 Self(RequestBuilder::new(stub))
2865 }
2866
2867 pub fn with_request<V: Into<longrunning::model::GetOperationRequest>>(
2869 mut self,
2870 v: V,
2871 ) -> Self {
2872 self.0.request = v.into();
2873 self
2874 }
2875
2876 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2878 self.0.options = v.into();
2879 self
2880 }
2881
2882 pub async fn send(self) -> Result<longrunning::model::Operation> {
2884 (*self.0.stub)
2885 .get_operation(self.0.request, self.0.options)
2886 .await
2887 .map(gax::response::Response::into_body)
2888 }
2889
2890 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2892 self.0.request.name = v.into();
2893 self
2894 }
2895 }
2896
2897 #[doc(hidden)]
2898 impl gax::options::internal::RequestBuilder for GetOperation {
2899 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2900 &mut self.0.options
2901 }
2902 }
2903
2904 #[derive(Clone, Debug)]
2921 pub struct DeleteOperation(RequestBuilder<longrunning::model::DeleteOperationRequest>);
2922
2923 impl DeleteOperation {
2924 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Speech>) -> Self {
2925 Self(RequestBuilder::new(stub))
2926 }
2927
2928 pub fn with_request<V: Into<longrunning::model::DeleteOperationRequest>>(
2930 mut self,
2931 v: V,
2932 ) -> Self {
2933 self.0.request = v.into();
2934 self
2935 }
2936
2937 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2939 self.0.options = v.into();
2940 self
2941 }
2942
2943 pub async fn send(self) -> Result<()> {
2945 (*self.0.stub)
2946 .delete_operation(self.0.request, self.0.options)
2947 .await
2948 .map(gax::response::Response::into_body)
2949 }
2950
2951 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2953 self.0.request.name = v.into();
2954 self
2955 }
2956 }
2957
2958 #[doc(hidden)]
2959 impl gax::options::internal::RequestBuilder for DeleteOperation {
2960 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2961 &mut self.0.options
2962 }
2963 }
2964
2965 #[derive(Clone, Debug)]
2982 pub struct CancelOperation(RequestBuilder<longrunning::model::CancelOperationRequest>);
2983
2984 impl CancelOperation {
2985 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Speech>) -> Self {
2986 Self(RequestBuilder::new(stub))
2987 }
2988
2989 pub fn with_request<V: Into<longrunning::model::CancelOperationRequest>>(
2991 mut self,
2992 v: V,
2993 ) -> Self {
2994 self.0.request = v.into();
2995 self
2996 }
2997
2998 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3000 self.0.options = v.into();
3001 self
3002 }
3003
3004 pub async fn send(self) -> Result<()> {
3006 (*self.0.stub)
3007 .cancel_operation(self.0.request, self.0.options)
3008 .await
3009 .map(gax::response::Response::into_body)
3010 }
3011
3012 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3014 self.0.request.name = v.into();
3015 self
3016 }
3017 }
3018
3019 #[doc(hidden)]
3020 impl gax::options::internal::RequestBuilder for CancelOperation {
3021 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3022 &mut self.0.options
3023 }
3024 }
3025}