1pub mod changes {
19 use crate::Result;
20
21 pub type ClientBuilder = crate::ClientBuilder<client::Factory, gaxi::options::Credentials>;
35
36 pub(crate) mod client {
37 use super::super::super::client::Changes;
38 pub struct Factory;
39 impl crate::ClientFactory for Factory {
40 type Client = Changes;
41 type Credentials = gaxi::options::Credentials;
42 async fn build(
43 self,
44 config: gaxi::options::ClientConfig,
45 ) -> crate::ClientBuilderResult<Self::Client> {
46 Self::Client::new(config).await
47 }
48 }
49 }
50
51 #[derive(Clone, Debug)]
53 pub(crate) struct RequestBuilder<R: std::default::Default> {
54 stub: std::sync::Arc<dyn super::super::stub::dynamic::Changes>,
55 request: R,
56 options: crate::RequestOptions,
57 }
58
59 impl<R> RequestBuilder<R>
60 where
61 R: std::default::Default,
62 {
63 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Changes>) -> Self {
64 Self {
65 stub,
66 request: R::default(),
67 options: crate::RequestOptions::default(),
68 }
69 }
70 }
71
72 #[derive(Clone, Debug)]
89 pub struct Create(RequestBuilder<crate::model::changes::CreateRequest>);
90
91 impl Create {
92 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Changes>) -> Self {
93 Self(RequestBuilder::new(stub))
94 }
95
96 pub fn with_request<V: Into<crate::model::changes::CreateRequest>>(mut self, v: V) -> Self {
98 self.0.request = v.into();
99 self
100 }
101
102 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
104 self.0.options = v.into();
105 self
106 }
107
108 pub async fn send(self) -> Result<crate::model::Change> {
110 (*self.0.stub)
111 .create(self.0.request, self.0.options)
112 .await
113 .map(crate::Response::into_body)
114 }
115
116 pub fn set_client_operation_id<T>(mut self, v: T) -> Self
118 where
119 T: std::convert::Into<std::string::String>,
120 {
121 self.0.request.client_operation_id = std::option::Option::Some(v.into());
122 self
123 }
124
125 pub fn set_or_clear_client_operation_id<T>(mut self, v: std::option::Option<T>) -> Self
127 where
128 T: std::convert::Into<std::string::String>,
129 {
130 self.0.request.client_operation_id = v.map(|x| x.into());
131 self
132 }
133
134 pub fn set_managed_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
136 self.0.request.managed_zone = v.into();
137 self
138 }
139
140 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
142 self.0.request.project = v.into();
143 self
144 }
145
146 pub fn set_body<T>(mut self, v: T) -> Self
148 where
149 T: std::convert::Into<crate::model::Change>,
150 {
151 self.0.request.body = std::option::Option::Some(v.into());
152 self
153 }
154
155 pub fn set_or_clear_body<T>(mut self, v: std::option::Option<T>) -> Self
157 where
158 T: std::convert::Into<crate::model::Change>,
159 {
160 self.0.request.body = v.map(|x| x.into());
161 self
162 }
163 }
164
165 #[doc(hidden)]
166 impl crate::RequestBuilder for Create {
167 fn request_options(&mut self) -> &mut crate::RequestOptions {
168 &mut self.0.options
169 }
170 }
171
172 #[derive(Clone, Debug)]
189 pub struct Get(RequestBuilder<crate::model::changes::GetRequest>);
190
191 impl Get {
192 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Changes>) -> Self {
193 Self(RequestBuilder::new(stub))
194 }
195
196 pub fn with_request<V: Into<crate::model::changes::GetRequest>>(mut self, v: V) -> Self {
198 self.0.request = v.into();
199 self
200 }
201
202 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
204 self.0.options = v.into();
205 self
206 }
207
208 pub async fn send(self) -> Result<crate::model::Change> {
210 (*self.0.stub)
211 .get(self.0.request, self.0.options)
212 .await
213 .map(crate::Response::into_body)
214 }
215
216 pub fn set_change_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
218 self.0.request.change_id = v.into();
219 self
220 }
221
222 pub fn set_client_operation_id<T>(mut self, v: T) -> Self
224 where
225 T: std::convert::Into<std::string::String>,
226 {
227 self.0.request.client_operation_id = std::option::Option::Some(v.into());
228 self
229 }
230
231 pub fn set_or_clear_client_operation_id<T>(mut self, v: std::option::Option<T>) -> Self
233 where
234 T: std::convert::Into<std::string::String>,
235 {
236 self.0.request.client_operation_id = v.map(|x| x.into());
237 self
238 }
239
240 pub fn set_managed_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
242 self.0.request.managed_zone = v.into();
243 self
244 }
245
246 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
248 self.0.request.project = v.into();
249 self
250 }
251 }
252
253 #[doc(hidden)]
254 impl crate::RequestBuilder for Get {
255 fn request_options(&mut self) -> &mut crate::RequestOptions {
256 &mut self.0.options
257 }
258 }
259
260 #[derive(Clone, Debug)]
281 pub struct List(RequestBuilder<crate::model::changes::ListRequest>);
282
283 impl List {
284 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Changes>) -> Self {
285 Self(RequestBuilder::new(stub))
286 }
287
288 pub fn with_request<V: Into<crate::model::changes::ListRequest>>(mut self, v: V) -> Self {
290 self.0.request = v.into();
291 self
292 }
293
294 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
296 self.0.options = v.into();
297 self
298 }
299
300 pub async fn send(self) -> Result<crate::model::ChangesListResponse> {
302 (*self.0.stub)
303 .list(self.0.request, self.0.options)
304 .await
305 .map(crate::Response::into_body)
306 }
307
308 pub fn by_page(
310 self,
311 ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ChangesListResponse, crate::Error>
312 {
313 use std::clone::Clone;
314 let token = self.0.request.page_token.clone().unwrap_or_default();
315 let execute = move |token: String| {
316 let mut builder = self.clone();
317 builder.0.request = builder.0.request.set_page_token(token);
318 builder.send()
319 };
320 google_cloud_gax::paginator::internal::new_paginator(token, execute)
321 }
322
323 pub fn by_item(
325 self,
326 ) -> impl google_cloud_gax::paginator::ItemPaginator<
327 crate::model::ChangesListResponse,
328 crate::Error,
329 > {
330 use google_cloud_gax::paginator::Paginator;
331 self.by_page().items()
332 }
333
334 pub fn set_managed_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
336 self.0.request.managed_zone = v.into();
337 self
338 }
339
340 pub fn set_max_results<T>(mut self, v: T) -> Self
342 where
343 T: std::convert::Into<i32>,
344 {
345 self.0.request.max_results = std::option::Option::Some(v.into());
346 self
347 }
348
349 pub fn set_or_clear_max_results<T>(mut self, v: std::option::Option<T>) -> Self
351 where
352 T: std::convert::Into<i32>,
353 {
354 self.0.request.max_results = v.map(|x| x.into());
355 self
356 }
357
358 pub fn set_page_token<T>(mut self, v: T) -> Self
360 where
361 T: std::convert::Into<std::string::String>,
362 {
363 self.0.request.page_token = std::option::Option::Some(v.into());
364 self
365 }
366
367 pub fn set_or_clear_page_token<T>(mut self, v: std::option::Option<T>) -> Self
369 where
370 T: std::convert::Into<std::string::String>,
371 {
372 self.0.request.page_token = v.map(|x| x.into());
373 self
374 }
375
376 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
378 self.0.request.project = v.into();
379 self
380 }
381
382 pub fn set_sort_by<T>(mut self, v: T) -> Self
384 where
385 T: std::convert::Into<crate::model::changes::list_request::SortBy>,
386 {
387 self.0.request.sort_by = std::option::Option::Some(v.into());
388 self
389 }
390
391 pub fn set_or_clear_sort_by<T>(mut self, v: std::option::Option<T>) -> Self
393 where
394 T: std::convert::Into<crate::model::changes::list_request::SortBy>,
395 {
396 self.0.request.sort_by = v.map(|x| x.into());
397 self
398 }
399
400 pub fn set_sort_order<T>(mut self, v: T) -> Self
402 where
403 T: std::convert::Into<std::string::String>,
404 {
405 self.0.request.sort_order = std::option::Option::Some(v.into());
406 self
407 }
408
409 pub fn set_or_clear_sort_order<T>(mut self, v: std::option::Option<T>) -> Self
411 where
412 T: std::convert::Into<std::string::String>,
413 {
414 self.0.request.sort_order = v.map(|x| x.into());
415 self
416 }
417 }
418
419 #[doc(hidden)]
420 impl crate::RequestBuilder for List {
421 fn request_options(&mut self) -> &mut crate::RequestOptions {
422 &mut self.0.options
423 }
424 }
425}
426
427pub mod dns_keys {
429 use crate::Result;
430
431 pub type ClientBuilder = crate::ClientBuilder<client::Factory, gaxi::options::Credentials>;
445
446 pub(crate) mod client {
447 use super::super::super::client::DnsKeys;
448 pub struct Factory;
449 impl crate::ClientFactory for Factory {
450 type Client = DnsKeys;
451 type Credentials = gaxi::options::Credentials;
452 async fn build(
453 self,
454 config: gaxi::options::ClientConfig,
455 ) -> crate::ClientBuilderResult<Self::Client> {
456 Self::Client::new(config).await
457 }
458 }
459 }
460
461 #[derive(Clone, Debug)]
463 pub(crate) struct RequestBuilder<R: std::default::Default> {
464 stub: std::sync::Arc<dyn super::super::stub::dynamic::DnsKeys>,
465 request: R,
466 options: crate::RequestOptions,
467 }
468
469 impl<R> RequestBuilder<R>
470 where
471 R: std::default::Default,
472 {
473 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::DnsKeys>) -> Self {
474 Self {
475 stub,
476 request: R::default(),
477 options: crate::RequestOptions::default(),
478 }
479 }
480 }
481
482 #[derive(Clone, Debug)]
499 pub struct Get(RequestBuilder<crate::model::dns_keys::GetRequest>);
500
501 impl Get {
502 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::DnsKeys>) -> Self {
503 Self(RequestBuilder::new(stub))
504 }
505
506 pub fn with_request<V: Into<crate::model::dns_keys::GetRequest>>(mut self, v: V) -> Self {
508 self.0.request = v.into();
509 self
510 }
511
512 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
514 self.0.options = v.into();
515 self
516 }
517
518 pub async fn send(self) -> Result<crate::model::DnsKey> {
520 (*self.0.stub)
521 .get(self.0.request, self.0.options)
522 .await
523 .map(crate::Response::into_body)
524 }
525
526 pub fn set_client_operation_id<T>(mut self, v: T) -> Self
528 where
529 T: std::convert::Into<std::string::String>,
530 {
531 self.0.request.client_operation_id = std::option::Option::Some(v.into());
532 self
533 }
534
535 pub fn set_or_clear_client_operation_id<T>(mut self, v: std::option::Option<T>) -> Self
537 where
538 T: std::convert::Into<std::string::String>,
539 {
540 self.0.request.client_operation_id = v.map(|x| x.into());
541 self
542 }
543
544 pub fn set_digest_type<T>(mut self, v: T) -> Self
546 where
547 T: std::convert::Into<std::string::String>,
548 {
549 self.0.request.digest_type = std::option::Option::Some(v.into());
550 self
551 }
552
553 pub fn set_or_clear_digest_type<T>(mut self, v: std::option::Option<T>) -> Self
555 where
556 T: std::convert::Into<std::string::String>,
557 {
558 self.0.request.digest_type = v.map(|x| x.into());
559 self
560 }
561
562 pub fn set_dns_key_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
564 self.0.request.dns_key_id = v.into();
565 self
566 }
567
568 pub fn set_managed_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
570 self.0.request.managed_zone = v.into();
571 self
572 }
573
574 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
576 self.0.request.project = v.into();
577 self
578 }
579 }
580
581 #[doc(hidden)]
582 impl crate::RequestBuilder for Get {
583 fn request_options(&mut self) -> &mut crate::RequestOptions {
584 &mut self.0.options
585 }
586 }
587
588 #[derive(Clone, Debug)]
609 pub struct List(RequestBuilder<crate::model::dns_keys::ListRequest>);
610
611 impl List {
612 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::DnsKeys>) -> Self {
613 Self(RequestBuilder::new(stub))
614 }
615
616 pub fn with_request<V: Into<crate::model::dns_keys::ListRequest>>(mut self, v: V) -> Self {
618 self.0.request = v.into();
619 self
620 }
621
622 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
624 self.0.options = v.into();
625 self
626 }
627
628 pub async fn send(self) -> Result<crate::model::DnsKeysListResponse> {
630 (*self.0.stub)
631 .list(self.0.request, self.0.options)
632 .await
633 .map(crate::Response::into_body)
634 }
635
636 pub fn by_page(
638 self,
639 ) -> impl google_cloud_gax::paginator::Paginator<crate::model::DnsKeysListResponse, crate::Error>
640 {
641 use std::clone::Clone;
642 let token = self.0.request.page_token.clone().unwrap_or_default();
643 let execute = move |token: String| {
644 let mut builder = self.clone();
645 builder.0.request = builder.0.request.set_page_token(token);
646 builder.send()
647 };
648 google_cloud_gax::paginator::internal::new_paginator(token, execute)
649 }
650
651 pub fn by_item(
653 self,
654 ) -> impl google_cloud_gax::paginator::ItemPaginator<
655 crate::model::DnsKeysListResponse,
656 crate::Error,
657 > {
658 use google_cloud_gax::paginator::Paginator;
659 self.by_page().items()
660 }
661
662 pub fn set_digest_type<T>(mut self, v: T) -> Self
664 where
665 T: std::convert::Into<std::string::String>,
666 {
667 self.0.request.digest_type = std::option::Option::Some(v.into());
668 self
669 }
670
671 pub fn set_or_clear_digest_type<T>(mut self, v: std::option::Option<T>) -> Self
673 where
674 T: std::convert::Into<std::string::String>,
675 {
676 self.0.request.digest_type = v.map(|x| x.into());
677 self
678 }
679
680 pub fn set_managed_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
682 self.0.request.managed_zone = v.into();
683 self
684 }
685
686 pub fn set_max_results<T>(mut self, v: T) -> Self
688 where
689 T: std::convert::Into<i32>,
690 {
691 self.0.request.max_results = std::option::Option::Some(v.into());
692 self
693 }
694
695 pub fn set_or_clear_max_results<T>(mut self, v: std::option::Option<T>) -> Self
697 where
698 T: std::convert::Into<i32>,
699 {
700 self.0.request.max_results = v.map(|x| x.into());
701 self
702 }
703
704 pub fn set_page_token<T>(mut self, v: T) -> Self
706 where
707 T: std::convert::Into<std::string::String>,
708 {
709 self.0.request.page_token = std::option::Option::Some(v.into());
710 self
711 }
712
713 pub fn set_or_clear_page_token<T>(mut self, v: std::option::Option<T>) -> Self
715 where
716 T: std::convert::Into<std::string::String>,
717 {
718 self.0.request.page_token = v.map(|x| x.into());
719 self
720 }
721
722 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
724 self.0.request.project = v.into();
725 self
726 }
727 }
728
729 #[doc(hidden)]
730 impl crate::RequestBuilder for List {
731 fn request_options(&mut self) -> &mut crate::RequestOptions {
732 &mut self.0.options
733 }
734 }
735}
736
737pub mod managed_zone_operations {
739 use crate::Result;
740
741 pub type ClientBuilder = crate::ClientBuilder<client::Factory, gaxi::options::Credentials>;
755
756 pub(crate) mod client {
757 use super::super::super::client::ManagedZoneOperations;
758 pub struct Factory;
759 impl crate::ClientFactory for Factory {
760 type Client = ManagedZoneOperations;
761 type Credentials = gaxi::options::Credentials;
762 async fn build(
763 self,
764 config: gaxi::options::ClientConfig,
765 ) -> crate::ClientBuilderResult<Self::Client> {
766 Self::Client::new(config).await
767 }
768 }
769 }
770
771 #[derive(Clone, Debug)]
773 pub(crate) struct RequestBuilder<R: std::default::Default> {
774 stub: std::sync::Arc<dyn super::super::stub::dynamic::ManagedZoneOperations>,
775 request: R,
776 options: crate::RequestOptions,
777 }
778
779 impl<R> RequestBuilder<R>
780 where
781 R: std::default::Default,
782 {
783 pub(crate) fn new(
784 stub: std::sync::Arc<dyn super::super::stub::dynamic::ManagedZoneOperations>,
785 ) -> Self {
786 Self {
787 stub,
788 request: R::default(),
789 options: crate::RequestOptions::default(),
790 }
791 }
792 }
793
794 #[derive(Clone, Debug)]
811 pub struct Get(RequestBuilder<crate::model::managed_zone_operations::GetRequest>);
812
813 impl Get {
814 pub(crate) fn new(
815 stub: std::sync::Arc<dyn super::super::stub::dynamic::ManagedZoneOperations>,
816 ) -> Self {
817 Self(RequestBuilder::new(stub))
818 }
819
820 pub fn with_request<V: Into<crate::model::managed_zone_operations::GetRequest>>(
822 mut self,
823 v: V,
824 ) -> Self {
825 self.0.request = v.into();
826 self
827 }
828
829 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
831 self.0.options = v.into();
832 self
833 }
834
835 pub async fn send(self) -> Result<crate::model::Operation> {
837 (*self.0.stub)
838 .get(self.0.request, self.0.options)
839 .await
840 .map(crate::Response::into_body)
841 }
842
843 pub fn set_client_operation_id<T>(mut self, v: T) -> Self
845 where
846 T: std::convert::Into<std::string::String>,
847 {
848 self.0.request.client_operation_id = std::option::Option::Some(v.into());
849 self
850 }
851
852 pub fn set_or_clear_client_operation_id<T>(mut self, v: std::option::Option<T>) -> Self
854 where
855 T: std::convert::Into<std::string::String>,
856 {
857 self.0.request.client_operation_id = v.map(|x| x.into());
858 self
859 }
860
861 pub fn set_managed_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
863 self.0.request.managed_zone = v.into();
864 self
865 }
866
867 pub fn set_operation<T: Into<std::string::String>>(mut self, v: T) -> Self {
869 self.0.request.operation = v.into();
870 self
871 }
872
873 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
875 self.0.request.project = v.into();
876 self
877 }
878 }
879
880 #[doc(hidden)]
881 impl crate::RequestBuilder for Get {
882 fn request_options(&mut self) -> &mut crate::RequestOptions {
883 &mut self.0.options
884 }
885 }
886
887 #[derive(Clone, Debug)]
908 pub struct List(RequestBuilder<crate::model::managed_zone_operations::ListRequest>);
909
910 impl List {
911 pub(crate) fn new(
912 stub: std::sync::Arc<dyn super::super::stub::dynamic::ManagedZoneOperations>,
913 ) -> Self {
914 Self(RequestBuilder::new(stub))
915 }
916
917 pub fn with_request<V: Into<crate::model::managed_zone_operations::ListRequest>>(
919 mut self,
920 v: V,
921 ) -> Self {
922 self.0.request = v.into();
923 self
924 }
925
926 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
928 self.0.options = v.into();
929 self
930 }
931
932 pub async fn send(self) -> Result<crate::model::ManagedZoneOperationsListResponse> {
934 (*self.0.stub)
935 .list(self.0.request, self.0.options)
936 .await
937 .map(crate::Response::into_body)
938 }
939
940 pub fn by_page(
942 self,
943 ) -> impl google_cloud_gax::paginator::Paginator<
944 crate::model::ManagedZoneOperationsListResponse,
945 crate::Error,
946 > {
947 use std::clone::Clone;
948 let token = self.0.request.page_token.clone().unwrap_or_default();
949 let execute = move |token: String| {
950 let mut builder = self.clone();
951 builder.0.request = builder.0.request.set_page_token(token);
952 builder.send()
953 };
954 google_cloud_gax::paginator::internal::new_paginator(token, execute)
955 }
956
957 pub fn by_item(
959 self,
960 ) -> impl google_cloud_gax::paginator::ItemPaginator<
961 crate::model::ManagedZoneOperationsListResponse,
962 crate::Error,
963 > {
964 use google_cloud_gax::paginator::Paginator;
965 self.by_page().items()
966 }
967
968 pub fn set_managed_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
970 self.0.request.managed_zone = v.into();
971 self
972 }
973
974 pub fn set_max_results<T>(mut self, v: T) -> Self
976 where
977 T: std::convert::Into<i32>,
978 {
979 self.0.request.max_results = std::option::Option::Some(v.into());
980 self
981 }
982
983 pub fn set_or_clear_max_results<T>(mut self, v: std::option::Option<T>) -> Self
985 where
986 T: std::convert::Into<i32>,
987 {
988 self.0.request.max_results = v.map(|x| x.into());
989 self
990 }
991
992 pub fn set_page_token<T>(mut self, v: T) -> Self
994 where
995 T: std::convert::Into<std::string::String>,
996 {
997 self.0.request.page_token = std::option::Option::Some(v.into());
998 self
999 }
1000
1001 pub fn set_or_clear_page_token<T>(mut self, v: std::option::Option<T>) -> Self
1003 where
1004 T: std::convert::Into<std::string::String>,
1005 {
1006 self.0.request.page_token = v.map(|x| x.into());
1007 self
1008 }
1009
1010 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
1012 self.0.request.project = v.into();
1013 self
1014 }
1015
1016 pub fn set_sort_by<T>(mut self, v: T) -> Self
1018 where
1019 T: std::convert::Into<crate::model::managed_zone_operations::list_request::SortBy>,
1020 {
1021 self.0.request.sort_by = std::option::Option::Some(v.into());
1022 self
1023 }
1024
1025 pub fn set_or_clear_sort_by<T>(mut self, v: std::option::Option<T>) -> Self
1027 where
1028 T: std::convert::Into<crate::model::managed_zone_operations::list_request::SortBy>,
1029 {
1030 self.0.request.sort_by = v.map(|x| x.into());
1031 self
1032 }
1033 }
1034
1035 #[doc(hidden)]
1036 impl crate::RequestBuilder for List {
1037 fn request_options(&mut self) -> &mut crate::RequestOptions {
1038 &mut self.0.options
1039 }
1040 }
1041}
1042
1043pub mod managed_zones {
1045 use crate::Result;
1046
1047 pub type ClientBuilder = crate::ClientBuilder<client::Factory, gaxi::options::Credentials>;
1061
1062 pub(crate) mod client {
1063 use super::super::super::client::ManagedZones;
1064 pub struct Factory;
1065 impl crate::ClientFactory for Factory {
1066 type Client = ManagedZones;
1067 type Credentials = gaxi::options::Credentials;
1068 async fn build(
1069 self,
1070 config: gaxi::options::ClientConfig,
1071 ) -> crate::ClientBuilderResult<Self::Client> {
1072 Self::Client::new(config).await
1073 }
1074 }
1075 }
1076
1077 #[derive(Clone, Debug)]
1079 pub(crate) struct RequestBuilder<R: std::default::Default> {
1080 stub: std::sync::Arc<dyn super::super::stub::dynamic::ManagedZones>,
1081 request: R,
1082 options: crate::RequestOptions,
1083 }
1084
1085 impl<R> RequestBuilder<R>
1086 where
1087 R: std::default::Default,
1088 {
1089 pub(crate) fn new(
1090 stub: std::sync::Arc<dyn super::super::stub::dynamic::ManagedZones>,
1091 ) -> Self {
1092 Self {
1093 stub,
1094 request: R::default(),
1095 options: crate::RequestOptions::default(),
1096 }
1097 }
1098 }
1099
1100 #[derive(Clone, Debug)]
1117 pub struct Create(RequestBuilder<crate::model::managed_zones::CreateRequest>);
1118
1119 impl Create {
1120 pub(crate) fn new(
1121 stub: std::sync::Arc<dyn super::super::stub::dynamic::ManagedZones>,
1122 ) -> Self {
1123 Self(RequestBuilder::new(stub))
1124 }
1125
1126 pub fn with_request<V: Into<crate::model::managed_zones::CreateRequest>>(
1128 mut self,
1129 v: V,
1130 ) -> Self {
1131 self.0.request = v.into();
1132 self
1133 }
1134
1135 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1137 self.0.options = v.into();
1138 self
1139 }
1140
1141 pub async fn send(self) -> Result<crate::model::ManagedZone> {
1143 (*self.0.stub)
1144 .create(self.0.request, self.0.options)
1145 .await
1146 .map(crate::Response::into_body)
1147 }
1148
1149 pub fn set_client_operation_id<T>(mut self, v: T) -> Self
1151 where
1152 T: std::convert::Into<std::string::String>,
1153 {
1154 self.0.request.client_operation_id = std::option::Option::Some(v.into());
1155 self
1156 }
1157
1158 pub fn set_or_clear_client_operation_id<T>(mut self, v: std::option::Option<T>) -> Self
1160 where
1161 T: std::convert::Into<std::string::String>,
1162 {
1163 self.0.request.client_operation_id = v.map(|x| x.into());
1164 self
1165 }
1166
1167 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
1169 self.0.request.project = v.into();
1170 self
1171 }
1172
1173 pub fn set_body<T>(mut self, v: T) -> Self
1175 where
1176 T: std::convert::Into<crate::model::ManagedZone>,
1177 {
1178 self.0.request.body = std::option::Option::Some(v.into());
1179 self
1180 }
1181
1182 pub fn set_or_clear_body<T>(mut self, v: std::option::Option<T>) -> Self
1184 where
1185 T: std::convert::Into<crate::model::ManagedZone>,
1186 {
1187 self.0.request.body = v.map(|x| x.into());
1188 self
1189 }
1190 }
1191
1192 #[doc(hidden)]
1193 impl crate::RequestBuilder for Create {
1194 fn request_options(&mut self) -> &mut crate::RequestOptions {
1195 &mut self.0.options
1196 }
1197 }
1198
1199 #[derive(Clone, Debug)]
1216 pub struct Delete(RequestBuilder<crate::model::managed_zones::DeleteRequest>);
1217
1218 impl Delete {
1219 pub(crate) fn new(
1220 stub: std::sync::Arc<dyn super::super::stub::dynamic::ManagedZones>,
1221 ) -> Self {
1222 Self(RequestBuilder::new(stub))
1223 }
1224
1225 pub fn with_request<V: Into<crate::model::managed_zones::DeleteRequest>>(
1227 mut self,
1228 v: V,
1229 ) -> Self {
1230 self.0.request = v.into();
1231 self
1232 }
1233
1234 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1236 self.0.options = v.into();
1237 self
1238 }
1239
1240 pub async fn send(self) -> Result<()> {
1242 (*self.0.stub)
1243 .delete(self.0.request, self.0.options)
1244 .await
1245 .map(crate::Response::into_body)
1246 }
1247
1248 pub fn set_client_operation_id<T>(mut self, v: T) -> Self
1250 where
1251 T: std::convert::Into<std::string::String>,
1252 {
1253 self.0.request.client_operation_id = std::option::Option::Some(v.into());
1254 self
1255 }
1256
1257 pub fn set_or_clear_client_operation_id<T>(mut self, v: std::option::Option<T>) -> Self
1259 where
1260 T: std::convert::Into<std::string::String>,
1261 {
1262 self.0.request.client_operation_id = v.map(|x| x.into());
1263 self
1264 }
1265
1266 pub fn set_managed_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
1268 self.0.request.managed_zone = v.into();
1269 self
1270 }
1271
1272 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
1274 self.0.request.project = v.into();
1275 self
1276 }
1277 }
1278
1279 #[doc(hidden)]
1280 impl crate::RequestBuilder for Delete {
1281 fn request_options(&mut self) -> &mut crate::RequestOptions {
1282 &mut self.0.options
1283 }
1284 }
1285
1286 #[derive(Clone, Debug)]
1303 pub struct Get(RequestBuilder<crate::model::managed_zones::GetRequest>);
1304
1305 impl Get {
1306 pub(crate) fn new(
1307 stub: std::sync::Arc<dyn super::super::stub::dynamic::ManagedZones>,
1308 ) -> Self {
1309 Self(RequestBuilder::new(stub))
1310 }
1311
1312 pub fn with_request<V: Into<crate::model::managed_zones::GetRequest>>(
1314 mut self,
1315 v: V,
1316 ) -> Self {
1317 self.0.request = v.into();
1318 self
1319 }
1320
1321 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1323 self.0.options = v.into();
1324 self
1325 }
1326
1327 pub async fn send(self) -> Result<crate::model::ManagedZone> {
1329 (*self.0.stub)
1330 .get(self.0.request, self.0.options)
1331 .await
1332 .map(crate::Response::into_body)
1333 }
1334
1335 pub fn set_client_operation_id<T>(mut self, v: T) -> Self
1337 where
1338 T: std::convert::Into<std::string::String>,
1339 {
1340 self.0.request.client_operation_id = std::option::Option::Some(v.into());
1341 self
1342 }
1343
1344 pub fn set_or_clear_client_operation_id<T>(mut self, v: std::option::Option<T>) -> Self
1346 where
1347 T: std::convert::Into<std::string::String>,
1348 {
1349 self.0.request.client_operation_id = v.map(|x| x.into());
1350 self
1351 }
1352
1353 pub fn set_managed_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
1355 self.0.request.managed_zone = v.into();
1356 self
1357 }
1358
1359 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
1361 self.0.request.project = v.into();
1362 self
1363 }
1364 }
1365
1366 #[doc(hidden)]
1367 impl crate::RequestBuilder for Get {
1368 fn request_options(&mut self) -> &mut crate::RequestOptions {
1369 &mut self.0.options
1370 }
1371 }
1372
1373 #[derive(Clone, Debug)]
1390 pub struct GetIamPolicy(RequestBuilder<crate::model::managed_zones::GetIamPolicyRequest>);
1391
1392 impl GetIamPolicy {
1393 pub(crate) fn new(
1394 stub: std::sync::Arc<dyn super::super::stub::dynamic::ManagedZones>,
1395 ) -> Self {
1396 Self(RequestBuilder::new(stub))
1397 }
1398
1399 pub fn with_request<V: Into<crate::model::managed_zones::GetIamPolicyRequest>>(
1401 mut self,
1402 v: V,
1403 ) -> Self {
1404 self.0.request = v.into();
1405 self
1406 }
1407
1408 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1410 self.0.options = v.into();
1411 self
1412 }
1413
1414 pub async fn send(self) -> Result<crate::model::GoogleIamV1Policy> {
1416 (*self.0.stub)
1417 .get_iam_policy(self.0.request, self.0.options)
1418 .await
1419 .map(crate::Response::into_body)
1420 }
1421
1422 pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
1424 self.0.request.resource = v.into();
1425 self
1426 }
1427
1428 pub fn set_body<T>(mut self, v: T) -> Self
1430 where
1431 T: std::convert::Into<crate::model::GoogleIamV1GetIamPolicyRequest>,
1432 {
1433 self.0.request.body = std::option::Option::Some(v.into());
1434 self
1435 }
1436
1437 pub fn set_or_clear_body<T>(mut self, v: std::option::Option<T>) -> Self
1439 where
1440 T: std::convert::Into<crate::model::GoogleIamV1GetIamPolicyRequest>,
1441 {
1442 self.0.request.body = v.map(|x| x.into());
1443 self
1444 }
1445 }
1446
1447 #[doc(hidden)]
1448 impl crate::RequestBuilder for GetIamPolicy {
1449 fn request_options(&mut self) -> &mut crate::RequestOptions {
1450 &mut self.0.options
1451 }
1452 }
1453
1454 #[derive(Clone, Debug)]
1475 pub struct List(RequestBuilder<crate::model::managed_zones::ListRequest>);
1476
1477 impl List {
1478 pub(crate) fn new(
1479 stub: std::sync::Arc<dyn super::super::stub::dynamic::ManagedZones>,
1480 ) -> Self {
1481 Self(RequestBuilder::new(stub))
1482 }
1483
1484 pub fn with_request<V: Into<crate::model::managed_zones::ListRequest>>(
1486 mut self,
1487 v: V,
1488 ) -> Self {
1489 self.0.request = v.into();
1490 self
1491 }
1492
1493 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1495 self.0.options = v.into();
1496 self
1497 }
1498
1499 pub async fn send(self) -> Result<crate::model::ManagedZonesListResponse> {
1501 (*self.0.stub)
1502 .list(self.0.request, self.0.options)
1503 .await
1504 .map(crate::Response::into_body)
1505 }
1506
1507 pub fn by_page(
1509 self,
1510 ) -> impl google_cloud_gax::paginator::Paginator<
1511 crate::model::ManagedZonesListResponse,
1512 crate::Error,
1513 > {
1514 use std::clone::Clone;
1515 let token = self.0.request.page_token.clone().unwrap_or_default();
1516 let execute = move |token: String| {
1517 let mut builder = self.clone();
1518 builder.0.request = builder.0.request.set_page_token(token);
1519 builder.send()
1520 };
1521 google_cloud_gax::paginator::internal::new_paginator(token, execute)
1522 }
1523
1524 pub fn by_item(
1526 self,
1527 ) -> impl google_cloud_gax::paginator::ItemPaginator<
1528 crate::model::ManagedZonesListResponse,
1529 crate::Error,
1530 > {
1531 use google_cloud_gax::paginator::Paginator;
1532 self.by_page().items()
1533 }
1534
1535 pub fn set_dns_name<T>(mut self, v: T) -> Self
1537 where
1538 T: std::convert::Into<std::string::String>,
1539 {
1540 self.0.request.dns_name = std::option::Option::Some(v.into());
1541 self
1542 }
1543
1544 pub fn set_or_clear_dns_name<T>(mut self, v: std::option::Option<T>) -> Self
1546 where
1547 T: std::convert::Into<std::string::String>,
1548 {
1549 self.0.request.dns_name = v.map(|x| x.into());
1550 self
1551 }
1552
1553 pub fn set_max_results<T>(mut self, v: T) -> Self
1555 where
1556 T: std::convert::Into<i32>,
1557 {
1558 self.0.request.max_results = std::option::Option::Some(v.into());
1559 self
1560 }
1561
1562 pub fn set_or_clear_max_results<T>(mut self, v: std::option::Option<T>) -> Self
1564 where
1565 T: std::convert::Into<i32>,
1566 {
1567 self.0.request.max_results = v.map(|x| x.into());
1568 self
1569 }
1570
1571 pub fn set_page_token<T>(mut self, v: T) -> Self
1573 where
1574 T: std::convert::Into<std::string::String>,
1575 {
1576 self.0.request.page_token = std::option::Option::Some(v.into());
1577 self
1578 }
1579
1580 pub fn set_or_clear_page_token<T>(mut self, v: std::option::Option<T>) -> Self
1582 where
1583 T: std::convert::Into<std::string::String>,
1584 {
1585 self.0.request.page_token = v.map(|x| x.into());
1586 self
1587 }
1588
1589 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
1591 self.0.request.project = v.into();
1592 self
1593 }
1594 }
1595
1596 #[doc(hidden)]
1597 impl crate::RequestBuilder for List {
1598 fn request_options(&mut self) -> &mut crate::RequestOptions {
1599 &mut self.0.options
1600 }
1601 }
1602
1603 #[derive(Clone, Debug)]
1620 pub struct Patch(RequestBuilder<crate::model::managed_zones::PatchRequest>);
1621
1622 impl Patch {
1623 pub(crate) fn new(
1624 stub: std::sync::Arc<dyn super::super::stub::dynamic::ManagedZones>,
1625 ) -> Self {
1626 Self(RequestBuilder::new(stub))
1627 }
1628
1629 pub fn with_request<V: Into<crate::model::managed_zones::PatchRequest>>(
1631 mut self,
1632 v: V,
1633 ) -> Self {
1634 self.0.request = v.into();
1635 self
1636 }
1637
1638 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1640 self.0.options = v.into();
1641 self
1642 }
1643
1644 pub async fn send(self) -> Result<crate::model::Operation> {
1646 (*self.0.stub)
1647 .patch(self.0.request, self.0.options)
1648 .await
1649 .map(crate::Response::into_body)
1650 }
1651
1652 pub fn poller(
1654 self,
1655 ) -> impl google_cloud_lro::Poller<crate::model::Operation, crate::model::Operation>
1656 {
1657 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1658 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1659 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
1660 if let Some(ref mut details) = poller_options.tracing {
1661 details.method_name =
1662 "google_cloud_dns_v1::client::ManagedZones::patch::until_done";
1663 }
1664
1665 let stub = self.0.stub.clone();
1666 let mut options = self.0.options.clone();
1667 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
1668 let project = self.0.request.project.clone();
1669 let managed_zone = self.0.request.managed_zone.clone();
1670 let query = move |name| {
1671 let stub = stub.clone();
1672 let options = options.clone();
1673 let project = project.clone();
1674 let managed_zone = managed_zone.clone();
1675 async {
1676 GetOperation::new(stub)
1677 .set_project(project)
1678 .set_managed_zone(managed_zone)
1679 .set_operation(name)
1680 .with_options(options)
1681 .send()
1682 .await
1683 }
1684 };
1685
1686 let start = move || async { self.send().await };
1687
1688 use google_cloud_lro::internal::PollerExt;
1689 google_cloud_lro::internal::new_discovery_poller(
1690 polling_error_policy,
1691 polling_backoff_policy,
1692 start,
1693 query,
1694 )
1695 .with_options(poller_options)
1696 }
1697
1698 pub fn set_client_operation_id<T>(mut self, v: T) -> Self
1700 where
1701 T: std::convert::Into<std::string::String>,
1702 {
1703 self.0.request.client_operation_id = std::option::Option::Some(v.into());
1704 self
1705 }
1706
1707 pub fn set_or_clear_client_operation_id<T>(mut self, v: std::option::Option<T>) -> Self
1709 where
1710 T: std::convert::Into<std::string::String>,
1711 {
1712 self.0.request.client_operation_id = v.map(|x| x.into());
1713 self
1714 }
1715
1716 pub fn set_managed_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
1718 self.0.request.managed_zone = v.into();
1719 self
1720 }
1721
1722 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
1724 self.0.request.project = v.into();
1725 self
1726 }
1727
1728 pub fn set_body<T>(mut self, v: T) -> Self
1730 where
1731 T: std::convert::Into<crate::model::ManagedZone>,
1732 {
1733 self.0.request.body = std::option::Option::Some(v.into());
1734 self
1735 }
1736
1737 pub fn set_or_clear_body<T>(mut self, v: std::option::Option<T>) -> Self
1739 where
1740 T: std::convert::Into<crate::model::ManagedZone>,
1741 {
1742 self.0.request.body = v.map(|x| x.into());
1743 self
1744 }
1745 }
1746
1747 #[doc(hidden)]
1748 impl crate::RequestBuilder for Patch {
1749 fn request_options(&mut self) -> &mut crate::RequestOptions {
1750 &mut self.0.options
1751 }
1752 }
1753
1754 #[derive(Clone, Debug)]
1771 pub struct SetIamPolicy(RequestBuilder<crate::model::managed_zones::SetIamPolicyRequest>);
1772
1773 impl SetIamPolicy {
1774 pub(crate) fn new(
1775 stub: std::sync::Arc<dyn super::super::stub::dynamic::ManagedZones>,
1776 ) -> Self {
1777 Self(RequestBuilder::new(stub))
1778 }
1779
1780 pub fn with_request<V: Into<crate::model::managed_zones::SetIamPolicyRequest>>(
1782 mut self,
1783 v: V,
1784 ) -> Self {
1785 self.0.request = v.into();
1786 self
1787 }
1788
1789 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1791 self.0.options = v.into();
1792 self
1793 }
1794
1795 pub async fn send(self) -> Result<crate::model::GoogleIamV1Policy> {
1797 (*self.0.stub)
1798 .set_iam_policy(self.0.request, self.0.options)
1799 .await
1800 .map(crate::Response::into_body)
1801 }
1802
1803 pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
1805 self.0.request.resource = v.into();
1806 self
1807 }
1808
1809 pub fn set_body<T>(mut self, v: T) -> Self
1811 where
1812 T: std::convert::Into<crate::model::GoogleIamV1SetIamPolicyRequest>,
1813 {
1814 self.0.request.body = std::option::Option::Some(v.into());
1815 self
1816 }
1817
1818 pub fn set_or_clear_body<T>(mut self, v: std::option::Option<T>) -> Self
1820 where
1821 T: std::convert::Into<crate::model::GoogleIamV1SetIamPolicyRequest>,
1822 {
1823 self.0.request.body = v.map(|x| x.into());
1824 self
1825 }
1826 }
1827
1828 #[doc(hidden)]
1829 impl crate::RequestBuilder for SetIamPolicy {
1830 fn request_options(&mut self) -> &mut crate::RequestOptions {
1831 &mut self.0.options
1832 }
1833 }
1834
1835 #[derive(Clone, Debug)]
1852 pub struct TestIamPermissions(
1853 RequestBuilder<crate::model::managed_zones::TestIamPermissionsRequest>,
1854 );
1855
1856 impl TestIamPermissions {
1857 pub(crate) fn new(
1858 stub: std::sync::Arc<dyn super::super::stub::dynamic::ManagedZones>,
1859 ) -> Self {
1860 Self(RequestBuilder::new(stub))
1861 }
1862
1863 pub fn with_request<V: Into<crate::model::managed_zones::TestIamPermissionsRequest>>(
1865 mut self,
1866 v: V,
1867 ) -> Self {
1868 self.0.request = v.into();
1869 self
1870 }
1871
1872 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1874 self.0.options = v.into();
1875 self
1876 }
1877
1878 pub async fn send(self) -> Result<crate::model::GoogleIamV1TestIamPermissionsResponse> {
1880 (*self.0.stub)
1881 .test_iam_permissions(self.0.request, self.0.options)
1882 .await
1883 .map(crate::Response::into_body)
1884 }
1885
1886 pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
1888 self.0.request.resource = v.into();
1889 self
1890 }
1891
1892 pub fn set_body<T>(mut self, v: T) -> Self
1894 where
1895 T: std::convert::Into<crate::model::GoogleIamV1TestIamPermissionsRequest>,
1896 {
1897 self.0.request.body = std::option::Option::Some(v.into());
1898 self
1899 }
1900
1901 pub fn set_or_clear_body<T>(mut self, v: std::option::Option<T>) -> Self
1903 where
1904 T: std::convert::Into<crate::model::GoogleIamV1TestIamPermissionsRequest>,
1905 {
1906 self.0.request.body = v.map(|x| x.into());
1907 self
1908 }
1909 }
1910
1911 #[doc(hidden)]
1912 impl crate::RequestBuilder for TestIamPermissions {
1913 fn request_options(&mut self) -> &mut crate::RequestOptions {
1914 &mut self.0.options
1915 }
1916 }
1917
1918 #[derive(Clone, Debug)]
1935 pub struct Update(RequestBuilder<crate::model::managed_zones::UpdateRequest>);
1936
1937 impl Update {
1938 pub(crate) fn new(
1939 stub: std::sync::Arc<dyn super::super::stub::dynamic::ManagedZones>,
1940 ) -> Self {
1941 Self(RequestBuilder::new(stub))
1942 }
1943
1944 pub fn with_request<V: Into<crate::model::managed_zones::UpdateRequest>>(
1946 mut self,
1947 v: V,
1948 ) -> Self {
1949 self.0.request = v.into();
1950 self
1951 }
1952
1953 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1955 self.0.options = v.into();
1956 self
1957 }
1958
1959 pub async fn send(self) -> Result<crate::model::Operation> {
1961 (*self.0.stub)
1962 .update(self.0.request, self.0.options)
1963 .await
1964 .map(crate::Response::into_body)
1965 }
1966
1967 pub fn poller(
1969 self,
1970 ) -> impl google_cloud_lro::Poller<crate::model::Operation, crate::model::Operation>
1971 {
1972 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1973 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1974 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
1975 if let Some(ref mut details) = poller_options.tracing {
1976 details.method_name =
1977 "google_cloud_dns_v1::client::ManagedZones::update::until_done";
1978 }
1979
1980 let stub = self.0.stub.clone();
1981 let mut options = self.0.options.clone();
1982 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
1983 let project = self.0.request.project.clone();
1984 let managed_zone = self.0.request.managed_zone.clone();
1985 let query = move |name| {
1986 let stub = stub.clone();
1987 let options = options.clone();
1988 let project = project.clone();
1989 let managed_zone = managed_zone.clone();
1990 async {
1991 GetOperation::new(stub)
1992 .set_project(project)
1993 .set_managed_zone(managed_zone)
1994 .set_operation(name)
1995 .with_options(options)
1996 .send()
1997 .await
1998 }
1999 };
2000
2001 let start = move || async { self.send().await };
2002
2003 use google_cloud_lro::internal::PollerExt;
2004 google_cloud_lro::internal::new_discovery_poller(
2005 polling_error_policy,
2006 polling_backoff_policy,
2007 start,
2008 query,
2009 )
2010 .with_options(poller_options)
2011 }
2012
2013 pub fn set_client_operation_id<T>(mut self, v: T) -> Self
2015 where
2016 T: std::convert::Into<std::string::String>,
2017 {
2018 self.0.request.client_operation_id = std::option::Option::Some(v.into());
2019 self
2020 }
2021
2022 pub fn set_or_clear_client_operation_id<T>(mut self, v: std::option::Option<T>) -> Self
2024 where
2025 T: std::convert::Into<std::string::String>,
2026 {
2027 self.0.request.client_operation_id = v.map(|x| x.into());
2028 self
2029 }
2030
2031 pub fn set_managed_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
2033 self.0.request.managed_zone = v.into();
2034 self
2035 }
2036
2037 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
2039 self.0.request.project = v.into();
2040 self
2041 }
2042
2043 pub fn set_body<T>(mut self, v: T) -> Self
2045 where
2046 T: std::convert::Into<crate::model::ManagedZone>,
2047 {
2048 self.0.request.body = std::option::Option::Some(v.into());
2049 self
2050 }
2051
2052 pub fn set_or_clear_body<T>(mut self, v: std::option::Option<T>) -> Self
2054 where
2055 T: std::convert::Into<crate::model::ManagedZone>,
2056 {
2057 self.0.request.body = v.map(|x| x.into());
2058 self
2059 }
2060 }
2061
2062 #[doc(hidden)]
2063 impl crate::RequestBuilder for Update {
2064 fn request_options(&mut self) -> &mut crate::RequestOptions {
2065 &mut self.0.options
2066 }
2067 }
2068
2069 #[derive(Clone, Debug)]
2086 pub struct GetOperation(RequestBuilder<crate::model::managed_zone_operations::GetRequest>);
2087
2088 impl GetOperation {
2089 pub(crate) fn new(
2090 stub: std::sync::Arc<dyn super::super::stub::dynamic::ManagedZones>,
2091 ) -> Self {
2092 Self(RequestBuilder::new(stub))
2093 }
2094
2095 pub fn with_request<V: Into<crate::model::managed_zone_operations::GetRequest>>(
2097 mut self,
2098 v: V,
2099 ) -> Self {
2100 self.0.request = v.into();
2101 self
2102 }
2103
2104 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2106 self.0.options = v.into();
2107 self
2108 }
2109
2110 pub async fn send(self) -> Result<crate::model::Operation> {
2112 (*self.0.stub)
2113 .get_operation(self.0.request, self.0.options)
2114 .await
2115 .map(crate::Response::into_body)
2116 }
2117
2118 pub fn set_client_operation_id<T>(mut self, v: T) -> Self
2120 where
2121 T: std::convert::Into<std::string::String>,
2122 {
2123 self.0.request.client_operation_id = std::option::Option::Some(v.into());
2124 self
2125 }
2126
2127 pub fn set_or_clear_client_operation_id<T>(mut self, v: std::option::Option<T>) -> Self
2129 where
2130 T: std::convert::Into<std::string::String>,
2131 {
2132 self.0.request.client_operation_id = v.map(|x| x.into());
2133 self
2134 }
2135
2136 pub fn set_managed_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
2138 self.0.request.managed_zone = v.into();
2139 self
2140 }
2141
2142 pub fn set_operation<T: Into<std::string::String>>(mut self, v: T) -> Self {
2144 self.0.request.operation = v.into();
2145 self
2146 }
2147
2148 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
2150 self.0.request.project = v.into();
2151 self
2152 }
2153 }
2154
2155 #[doc(hidden)]
2156 impl crate::RequestBuilder for GetOperation {
2157 fn request_options(&mut self) -> &mut crate::RequestOptions {
2158 &mut self.0.options
2159 }
2160 }
2161}
2162
2163pub mod policies {
2165 use crate::Result;
2166
2167 pub type ClientBuilder = crate::ClientBuilder<client::Factory, gaxi::options::Credentials>;
2181
2182 pub(crate) mod client {
2183 use super::super::super::client::Policies;
2184 pub struct Factory;
2185 impl crate::ClientFactory for Factory {
2186 type Client = Policies;
2187 type Credentials = gaxi::options::Credentials;
2188 async fn build(
2189 self,
2190 config: gaxi::options::ClientConfig,
2191 ) -> crate::ClientBuilderResult<Self::Client> {
2192 Self::Client::new(config).await
2193 }
2194 }
2195 }
2196
2197 #[derive(Clone, Debug)]
2199 pub(crate) struct RequestBuilder<R: std::default::Default> {
2200 stub: std::sync::Arc<dyn super::super::stub::dynamic::Policies>,
2201 request: R,
2202 options: crate::RequestOptions,
2203 }
2204
2205 impl<R> RequestBuilder<R>
2206 where
2207 R: std::default::Default,
2208 {
2209 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Policies>) -> Self {
2210 Self {
2211 stub,
2212 request: R::default(),
2213 options: crate::RequestOptions::default(),
2214 }
2215 }
2216 }
2217
2218 #[derive(Clone, Debug)]
2235 pub struct Create(RequestBuilder<crate::model::policies::CreateRequest>);
2236
2237 impl Create {
2238 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Policies>) -> Self {
2239 Self(RequestBuilder::new(stub))
2240 }
2241
2242 pub fn with_request<V: Into<crate::model::policies::CreateRequest>>(
2244 mut self,
2245 v: V,
2246 ) -> Self {
2247 self.0.request = v.into();
2248 self
2249 }
2250
2251 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2253 self.0.options = v.into();
2254 self
2255 }
2256
2257 pub async fn send(self) -> Result<crate::model::Policy> {
2259 (*self.0.stub)
2260 .create(self.0.request, self.0.options)
2261 .await
2262 .map(crate::Response::into_body)
2263 }
2264
2265 pub fn set_client_operation_id<T>(mut self, v: T) -> Self
2267 where
2268 T: std::convert::Into<std::string::String>,
2269 {
2270 self.0.request.client_operation_id = std::option::Option::Some(v.into());
2271 self
2272 }
2273
2274 pub fn set_or_clear_client_operation_id<T>(mut self, v: std::option::Option<T>) -> Self
2276 where
2277 T: std::convert::Into<std::string::String>,
2278 {
2279 self.0.request.client_operation_id = v.map(|x| x.into());
2280 self
2281 }
2282
2283 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
2285 self.0.request.project = v.into();
2286 self
2287 }
2288
2289 pub fn set_body<T>(mut self, v: T) -> Self
2291 where
2292 T: std::convert::Into<crate::model::Policy>,
2293 {
2294 self.0.request.body = std::option::Option::Some(v.into());
2295 self
2296 }
2297
2298 pub fn set_or_clear_body<T>(mut self, v: std::option::Option<T>) -> Self
2300 where
2301 T: std::convert::Into<crate::model::Policy>,
2302 {
2303 self.0.request.body = v.map(|x| x.into());
2304 self
2305 }
2306 }
2307
2308 #[doc(hidden)]
2309 impl crate::RequestBuilder for Create {
2310 fn request_options(&mut self) -> &mut crate::RequestOptions {
2311 &mut self.0.options
2312 }
2313 }
2314
2315 #[derive(Clone, Debug)]
2332 pub struct Delete(RequestBuilder<crate::model::policies::DeleteRequest>);
2333
2334 impl Delete {
2335 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Policies>) -> Self {
2336 Self(RequestBuilder::new(stub))
2337 }
2338
2339 pub fn with_request<V: Into<crate::model::policies::DeleteRequest>>(
2341 mut self,
2342 v: V,
2343 ) -> Self {
2344 self.0.request = v.into();
2345 self
2346 }
2347
2348 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2350 self.0.options = v.into();
2351 self
2352 }
2353
2354 pub async fn send(self) -> Result<()> {
2356 (*self.0.stub)
2357 .delete(self.0.request, self.0.options)
2358 .await
2359 .map(crate::Response::into_body)
2360 }
2361
2362 pub fn set_client_operation_id<T>(mut self, v: T) -> Self
2364 where
2365 T: std::convert::Into<std::string::String>,
2366 {
2367 self.0.request.client_operation_id = std::option::Option::Some(v.into());
2368 self
2369 }
2370
2371 pub fn set_or_clear_client_operation_id<T>(mut self, v: std::option::Option<T>) -> Self
2373 where
2374 T: std::convert::Into<std::string::String>,
2375 {
2376 self.0.request.client_operation_id = v.map(|x| x.into());
2377 self
2378 }
2379
2380 pub fn set_policy<T: Into<std::string::String>>(mut self, v: T) -> Self {
2382 self.0.request.policy = v.into();
2383 self
2384 }
2385
2386 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
2388 self.0.request.project = v.into();
2389 self
2390 }
2391 }
2392
2393 #[doc(hidden)]
2394 impl crate::RequestBuilder for Delete {
2395 fn request_options(&mut self) -> &mut crate::RequestOptions {
2396 &mut self.0.options
2397 }
2398 }
2399
2400 #[derive(Clone, Debug)]
2417 pub struct Get(RequestBuilder<crate::model::policies::GetRequest>);
2418
2419 impl Get {
2420 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Policies>) -> Self {
2421 Self(RequestBuilder::new(stub))
2422 }
2423
2424 pub fn with_request<V: Into<crate::model::policies::GetRequest>>(mut self, v: V) -> Self {
2426 self.0.request = v.into();
2427 self
2428 }
2429
2430 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2432 self.0.options = v.into();
2433 self
2434 }
2435
2436 pub async fn send(self) -> Result<crate::model::Policy> {
2438 (*self.0.stub)
2439 .get(self.0.request, self.0.options)
2440 .await
2441 .map(crate::Response::into_body)
2442 }
2443
2444 pub fn set_client_operation_id<T>(mut self, v: T) -> Self
2446 where
2447 T: std::convert::Into<std::string::String>,
2448 {
2449 self.0.request.client_operation_id = std::option::Option::Some(v.into());
2450 self
2451 }
2452
2453 pub fn set_or_clear_client_operation_id<T>(mut self, v: std::option::Option<T>) -> Self
2455 where
2456 T: std::convert::Into<std::string::String>,
2457 {
2458 self.0.request.client_operation_id = v.map(|x| x.into());
2459 self
2460 }
2461
2462 pub fn set_policy<T: Into<std::string::String>>(mut self, v: T) -> Self {
2464 self.0.request.policy = v.into();
2465 self
2466 }
2467
2468 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
2470 self.0.request.project = v.into();
2471 self
2472 }
2473 }
2474
2475 #[doc(hidden)]
2476 impl crate::RequestBuilder for Get {
2477 fn request_options(&mut self) -> &mut crate::RequestOptions {
2478 &mut self.0.options
2479 }
2480 }
2481
2482 #[derive(Clone, Debug)]
2503 pub struct List(RequestBuilder<crate::model::policies::ListRequest>);
2504
2505 impl List {
2506 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Policies>) -> Self {
2507 Self(RequestBuilder::new(stub))
2508 }
2509
2510 pub fn with_request<V: Into<crate::model::policies::ListRequest>>(mut self, v: V) -> Self {
2512 self.0.request = v.into();
2513 self
2514 }
2515
2516 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2518 self.0.options = v.into();
2519 self
2520 }
2521
2522 pub async fn send(self) -> Result<crate::model::PoliciesListResponse> {
2524 (*self.0.stub)
2525 .list(self.0.request, self.0.options)
2526 .await
2527 .map(crate::Response::into_body)
2528 }
2529
2530 pub fn by_page(
2532 self,
2533 ) -> impl google_cloud_gax::paginator::Paginator<crate::model::PoliciesListResponse, crate::Error>
2534 {
2535 use std::clone::Clone;
2536 let token = self.0.request.page_token.clone().unwrap_or_default();
2537 let execute = move |token: String| {
2538 let mut builder = self.clone();
2539 builder.0.request = builder.0.request.set_page_token(token);
2540 builder.send()
2541 };
2542 google_cloud_gax::paginator::internal::new_paginator(token, execute)
2543 }
2544
2545 pub fn by_item(
2547 self,
2548 ) -> impl google_cloud_gax::paginator::ItemPaginator<
2549 crate::model::PoliciesListResponse,
2550 crate::Error,
2551 > {
2552 use google_cloud_gax::paginator::Paginator;
2553 self.by_page().items()
2554 }
2555
2556 pub fn set_max_results<T>(mut self, v: T) -> Self
2558 where
2559 T: std::convert::Into<i32>,
2560 {
2561 self.0.request.max_results = std::option::Option::Some(v.into());
2562 self
2563 }
2564
2565 pub fn set_or_clear_max_results<T>(mut self, v: std::option::Option<T>) -> Self
2567 where
2568 T: std::convert::Into<i32>,
2569 {
2570 self.0.request.max_results = v.map(|x| x.into());
2571 self
2572 }
2573
2574 pub fn set_page_token<T>(mut self, v: T) -> Self
2576 where
2577 T: std::convert::Into<std::string::String>,
2578 {
2579 self.0.request.page_token = std::option::Option::Some(v.into());
2580 self
2581 }
2582
2583 pub fn set_or_clear_page_token<T>(mut self, v: std::option::Option<T>) -> Self
2585 where
2586 T: std::convert::Into<std::string::String>,
2587 {
2588 self.0.request.page_token = v.map(|x| x.into());
2589 self
2590 }
2591
2592 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
2594 self.0.request.project = v.into();
2595 self
2596 }
2597 }
2598
2599 #[doc(hidden)]
2600 impl crate::RequestBuilder for List {
2601 fn request_options(&mut self) -> &mut crate::RequestOptions {
2602 &mut self.0.options
2603 }
2604 }
2605
2606 #[derive(Clone, Debug)]
2623 pub struct Patch(RequestBuilder<crate::model::policies::PatchRequest>);
2624
2625 impl Patch {
2626 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Policies>) -> Self {
2627 Self(RequestBuilder::new(stub))
2628 }
2629
2630 pub fn with_request<V: Into<crate::model::policies::PatchRequest>>(mut self, v: V) -> Self {
2632 self.0.request = v.into();
2633 self
2634 }
2635
2636 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2638 self.0.options = v.into();
2639 self
2640 }
2641
2642 pub async fn send(self) -> Result<crate::model::PoliciesPatchResponse> {
2644 (*self.0.stub)
2645 .patch(self.0.request, self.0.options)
2646 .await
2647 .map(crate::Response::into_body)
2648 }
2649
2650 pub fn set_client_operation_id<T>(mut self, v: T) -> Self
2652 where
2653 T: std::convert::Into<std::string::String>,
2654 {
2655 self.0.request.client_operation_id = std::option::Option::Some(v.into());
2656 self
2657 }
2658
2659 pub fn set_or_clear_client_operation_id<T>(mut self, v: std::option::Option<T>) -> Self
2661 where
2662 T: std::convert::Into<std::string::String>,
2663 {
2664 self.0.request.client_operation_id = v.map(|x| x.into());
2665 self
2666 }
2667
2668 pub fn set_policy<T: Into<std::string::String>>(mut self, v: T) -> Self {
2670 self.0.request.policy = v.into();
2671 self
2672 }
2673
2674 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
2676 self.0.request.project = v.into();
2677 self
2678 }
2679
2680 pub fn set_body<T>(mut self, v: T) -> Self
2682 where
2683 T: std::convert::Into<crate::model::Policy>,
2684 {
2685 self.0.request.body = std::option::Option::Some(v.into());
2686 self
2687 }
2688
2689 pub fn set_or_clear_body<T>(mut self, v: std::option::Option<T>) -> Self
2691 where
2692 T: std::convert::Into<crate::model::Policy>,
2693 {
2694 self.0.request.body = v.map(|x| x.into());
2695 self
2696 }
2697 }
2698
2699 #[doc(hidden)]
2700 impl crate::RequestBuilder for Patch {
2701 fn request_options(&mut self) -> &mut crate::RequestOptions {
2702 &mut self.0.options
2703 }
2704 }
2705
2706 #[derive(Clone, Debug)]
2723 pub struct Update(RequestBuilder<crate::model::policies::UpdateRequest>);
2724
2725 impl Update {
2726 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Policies>) -> Self {
2727 Self(RequestBuilder::new(stub))
2728 }
2729
2730 pub fn with_request<V: Into<crate::model::policies::UpdateRequest>>(
2732 mut self,
2733 v: V,
2734 ) -> Self {
2735 self.0.request = v.into();
2736 self
2737 }
2738
2739 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2741 self.0.options = v.into();
2742 self
2743 }
2744
2745 pub async fn send(self) -> Result<crate::model::PoliciesUpdateResponse> {
2747 (*self.0.stub)
2748 .update(self.0.request, self.0.options)
2749 .await
2750 .map(crate::Response::into_body)
2751 }
2752
2753 pub fn set_client_operation_id<T>(mut self, v: T) -> Self
2755 where
2756 T: std::convert::Into<std::string::String>,
2757 {
2758 self.0.request.client_operation_id = std::option::Option::Some(v.into());
2759 self
2760 }
2761
2762 pub fn set_or_clear_client_operation_id<T>(mut self, v: std::option::Option<T>) -> Self
2764 where
2765 T: std::convert::Into<std::string::String>,
2766 {
2767 self.0.request.client_operation_id = v.map(|x| x.into());
2768 self
2769 }
2770
2771 pub fn set_policy<T: Into<std::string::String>>(mut self, v: T) -> Self {
2773 self.0.request.policy = v.into();
2774 self
2775 }
2776
2777 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
2779 self.0.request.project = v.into();
2780 self
2781 }
2782
2783 pub fn set_body<T>(mut self, v: T) -> Self
2785 where
2786 T: std::convert::Into<crate::model::Policy>,
2787 {
2788 self.0.request.body = std::option::Option::Some(v.into());
2789 self
2790 }
2791
2792 pub fn set_or_clear_body<T>(mut self, v: std::option::Option<T>) -> Self
2794 where
2795 T: std::convert::Into<crate::model::Policy>,
2796 {
2797 self.0.request.body = v.map(|x| x.into());
2798 self
2799 }
2800 }
2801
2802 #[doc(hidden)]
2803 impl crate::RequestBuilder for Update {
2804 fn request_options(&mut self) -> &mut crate::RequestOptions {
2805 &mut self.0.options
2806 }
2807 }
2808}
2809
2810pub mod projects {
2812 use crate::Result;
2813
2814 pub type ClientBuilder = crate::ClientBuilder<client::Factory, gaxi::options::Credentials>;
2828
2829 pub(crate) mod client {
2830 use super::super::super::client::Projects;
2831 pub struct Factory;
2832 impl crate::ClientFactory for Factory {
2833 type Client = Projects;
2834 type Credentials = gaxi::options::Credentials;
2835 async fn build(
2836 self,
2837 config: gaxi::options::ClientConfig,
2838 ) -> crate::ClientBuilderResult<Self::Client> {
2839 Self::Client::new(config).await
2840 }
2841 }
2842 }
2843
2844 #[derive(Clone, Debug)]
2846 pub(crate) struct RequestBuilder<R: std::default::Default> {
2847 stub: std::sync::Arc<dyn super::super::stub::dynamic::Projects>,
2848 request: R,
2849 options: crate::RequestOptions,
2850 }
2851
2852 impl<R> RequestBuilder<R>
2853 where
2854 R: std::default::Default,
2855 {
2856 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Projects>) -> Self {
2857 Self {
2858 stub,
2859 request: R::default(),
2860 options: crate::RequestOptions::default(),
2861 }
2862 }
2863 }
2864
2865 #[derive(Clone, Debug)]
2882 pub struct Get(RequestBuilder<crate::model::projects::GetRequest>);
2883
2884 impl Get {
2885 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Projects>) -> Self {
2886 Self(RequestBuilder::new(stub))
2887 }
2888
2889 pub fn with_request<V: Into<crate::model::projects::GetRequest>>(mut self, v: V) -> Self {
2891 self.0.request = v.into();
2892 self
2893 }
2894
2895 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2897 self.0.options = v.into();
2898 self
2899 }
2900
2901 pub async fn send(self) -> Result<crate::model::Project> {
2903 (*self.0.stub)
2904 .get(self.0.request, self.0.options)
2905 .await
2906 .map(crate::Response::into_body)
2907 }
2908
2909 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
2911 self.0.request.project = v.into();
2912 self
2913 }
2914 }
2915
2916 #[doc(hidden)]
2917 impl crate::RequestBuilder for Get {
2918 fn request_options(&mut self) -> &mut crate::RequestOptions {
2919 &mut self.0.options
2920 }
2921 }
2922}
2923
2924pub mod resource_record_sets {
2926 use crate::Result;
2927
2928 pub type ClientBuilder = crate::ClientBuilder<client::Factory, gaxi::options::Credentials>;
2942
2943 pub(crate) mod client {
2944 use super::super::super::client::ResourceRecordSets;
2945 pub struct Factory;
2946 impl crate::ClientFactory for Factory {
2947 type Client = ResourceRecordSets;
2948 type Credentials = gaxi::options::Credentials;
2949 async fn build(
2950 self,
2951 config: gaxi::options::ClientConfig,
2952 ) -> crate::ClientBuilderResult<Self::Client> {
2953 Self::Client::new(config).await
2954 }
2955 }
2956 }
2957
2958 #[derive(Clone, Debug)]
2960 pub(crate) struct RequestBuilder<R: std::default::Default> {
2961 stub: std::sync::Arc<dyn super::super::stub::dynamic::ResourceRecordSets>,
2962 request: R,
2963 options: crate::RequestOptions,
2964 }
2965
2966 impl<R> RequestBuilder<R>
2967 where
2968 R: std::default::Default,
2969 {
2970 pub(crate) fn new(
2971 stub: std::sync::Arc<dyn super::super::stub::dynamic::ResourceRecordSets>,
2972 ) -> Self {
2973 Self {
2974 stub,
2975 request: R::default(),
2976 options: crate::RequestOptions::default(),
2977 }
2978 }
2979 }
2980
2981 #[derive(Clone, Debug)]
2998 pub struct Create(RequestBuilder<crate::model::resource_record_sets::CreateRequest>);
2999
3000 impl Create {
3001 pub(crate) fn new(
3002 stub: std::sync::Arc<dyn super::super::stub::dynamic::ResourceRecordSets>,
3003 ) -> Self {
3004 Self(RequestBuilder::new(stub))
3005 }
3006
3007 pub fn with_request<V: Into<crate::model::resource_record_sets::CreateRequest>>(
3009 mut self,
3010 v: V,
3011 ) -> Self {
3012 self.0.request = v.into();
3013 self
3014 }
3015
3016 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3018 self.0.options = v.into();
3019 self
3020 }
3021
3022 pub async fn send(self) -> Result<crate::model::ResourceRecordSet> {
3024 (*self.0.stub)
3025 .create(self.0.request, self.0.options)
3026 .await
3027 .map(crate::Response::into_body)
3028 }
3029
3030 pub fn set_client_operation_id<T>(mut self, v: T) -> Self
3032 where
3033 T: std::convert::Into<std::string::String>,
3034 {
3035 self.0.request.client_operation_id = std::option::Option::Some(v.into());
3036 self
3037 }
3038
3039 pub fn set_or_clear_client_operation_id<T>(mut self, v: std::option::Option<T>) -> Self
3041 where
3042 T: std::convert::Into<std::string::String>,
3043 {
3044 self.0.request.client_operation_id = v.map(|x| x.into());
3045 self
3046 }
3047
3048 pub fn set_managed_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
3050 self.0.request.managed_zone = v.into();
3051 self
3052 }
3053
3054 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
3056 self.0.request.project = v.into();
3057 self
3058 }
3059
3060 pub fn set_body<T>(mut self, v: T) -> Self
3062 where
3063 T: std::convert::Into<crate::model::ResourceRecordSet>,
3064 {
3065 self.0.request.body = std::option::Option::Some(v.into());
3066 self
3067 }
3068
3069 pub fn set_or_clear_body<T>(mut self, v: std::option::Option<T>) -> Self
3071 where
3072 T: std::convert::Into<crate::model::ResourceRecordSet>,
3073 {
3074 self.0.request.body = v.map(|x| x.into());
3075 self
3076 }
3077 }
3078
3079 #[doc(hidden)]
3080 impl crate::RequestBuilder for Create {
3081 fn request_options(&mut self) -> &mut crate::RequestOptions {
3082 &mut self.0.options
3083 }
3084 }
3085
3086 #[derive(Clone, Debug)]
3103 pub struct Delete(RequestBuilder<crate::model::resource_record_sets::DeleteRequest>);
3104
3105 impl Delete {
3106 pub(crate) fn new(
3107 stub: std::sync::Arc<dyn super::super::stub::dynamic::ResourceRecordSets>,
3108 ) -> Self {
3109 Self(RequestBuilder::new(stub))
3110 }
3111
3112 pub fn with_request<V: Into<crate::model::resource_record_sets::DeleteRequest>>(
3114 mut self,
3115 v: V,
3116 ) -> Self {
3117 self.0.request = v.into();
3118 self
3119 }
3120
3121 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3123 self.0.options = v.into();
3124 self
3125 }
3126
3127 pub async fn send(self) -> Result<crate::model::ResourceRecordSetsDeleteResponse> {
3129 (*self.0.stub)
3130 .delete(self.0.request, self.0.options)
3131 .await
3132 .map(crate::Response::into_body)
3133 }
3134
3135 pub fn set_client_operation_id<T>(mut self, v: T) -> Self
3137 where
3138 T: std::convert::Into<std::string::String>,
3139 {
3140 self.0.request.client_operation_id = std::option::Option::Some(v.into());
3141 self
3142 }
3143
3144 pub fn set_or_clear_client_operation_id<T>(mut self, v: std::option::Option<T>) -> Self
3146 where
3147 T: std::convert::Into<std::string::String>,
3148 {
3149 self.0.request.client_operation_id = v.map(|x| x.into());
3150 self
3151 }
3152
3153 pub fn set_managed_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
3155 self.0.request.managed_zone = v.into();
3156 self
3157 }
3158
3159 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3161 self.0.request.name = v.into();
3162 self
3163 }
3164
3165 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
3167 self.0.request.project = v.into();
3168 self
3169 }
3170
3171 pub fn set_type<T: Into<std::string::String>>(mut self, v: T) -> Self {
3173 self.0.request.r#type = v.into();
3174 self
3175 }
3176 }
3177
3178 #[doc(hidden)]
3179 impl crate::RequestBuilder for Delete {
3180 fn request_options(&mut self) -> &mut crate::RequestOptions {
3181 &mut self.0.options
3182 }
3183 }
3184
3185 #[derive(Clone, Debug)]
3202 pub struct Get(RequestBuilder<crate::model::resource_record_sets::GetRequest>);
3203
3204 impl Get {
3205 pub(crate) fn new(
3206 stub: std::sync::Arc<dyn super::super::stub::dynamic::ResourceRecordSets>,
3207 ) -> Self {
3208 Self(RequestBuilder::new(stub))
3209 }
3210
3211 pub fn with_request<V: Into<crate::model::resource_record_sets::GetRequest>>(
3213 mut self,
3214 v: V,
3215 ) -> Self {
3216 self.0.request = v.into();
3217 self
3218 }
3219
3220 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3222 self.0.options = v.into();
3223 self
3224 }
3225
3226 pub async fn send(self) -> Result<crate::model::ResourceRecordSet> {
3228 (*self.0.stub)
3229 .get(self.0.request, self.0.options)
3230 .await
3231 .map(crate::Response::into_body)
3232 }
3233
3234 pub fn set_client_operation_id<T>(mut self, v: T) -> Self
3236 where
3237 T: std::convert::Into<std::string::String>,
3238 {
3239 self.0.request.client_operation_id = std::option::Option::Some(v.into());
3240 self
3241 }
3242
3243 pub fn set_or_clear_client_operation_id<T>(mut self, v: std::option::Option<T>) -> Self
3245 where
3246 T: std::convert::Into<std::string::String>,
3247 {
3248 self.0.request.client_operation_id = v.map(|x| x.into());
3249 self
3250 }
3251
3252 pub fn set_managed_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
3254 self.0.request.managed_zone = v.into();
3255 self
3256 }
3257
3258 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3260 self.0.request.name = v.into();
3261 self
3262 }
3263
3264 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
3266 self.0.request.project = v.into();
3267 self
3268 }
3269
3270 pub fn set_type<T: Into<std::string::String>>(mut self, v: T) -> Self {
3272 self.0.request.r#type = v.into();
3273 self
3274 }
3275 }
3276
3277 #[doc(hidden)]
3278 impl crate::RequestBuilder for Get {
3279 fn request_options(&mut self) -> &mut crate::RequestOptions {
3280 &mut self.0.options
3281 }
3282 }
3283
3284 #[derive(Clone, Debug)]
3305 pub struct List(RequestBuilder<crate::model::resource_record_sets::ListRequest>);
3306
3307 impl List {
3308 pub(crate) fn new(
3309 stub: std::sync::Arc<dyn super::super::stub::dynamic::ResourceRecordSets>,
3310 ) -> Self {
3311 Self(RequestBuilder::new(stub))
3312 }
3313
3314 pub fn with_request<V: Into<crate::model::resource_record_sets::ListRequest>>(
3316 mut self,
3317 v: V,
3318 ) -> Self {
3319 self.0.request = v.into();
3320 self
3321 }
3322
3323 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3325 self.0.options = v.into();
3326 self
3327 }
3328
3329 pub async fn send(self) -> Result<crate::model::ResourceRecordSetsListResponse> {
3331 (*self.0.stub)
3332 .list(self.0.request, self.0.options)
3333 .await
3334 .map(crate::Response::into_body)
3335 }
3336
3337 pub fn by_page(
3339 self,
3340 ) -> impl google_cloud_gax::paginator::Paginator<
3341 crate::model::ResourceRecordSetsListResponse,
3342 crate::Error,
3343 > {
3344 use std::clone::Clone;
3345 let token = self.0.request.page_token.clone().unwrap_or_default();
3346 let execute = move |token: String| {
3347 let mut builder = self.clone();
3348 builder.0.request = builder.0.request.set_page_token(token);
3349 builder.send()
3350 };
3351 google_cloud_gax::paginator::internal::new_paginator(token, execute)
3352 }
3353
3354 pub fn by_item(
3356 self,
3357 ) -> impl google_cloud_gax::paginator::ItemPaginator<
3358 crate::model::ResourceRecordSetsListResponse,
3359 crate::Error,
3360 > {
3361 use google_cloud_gax::paginator::Paginator;
3362 self.by_page().items()
3363 }
3364
3365 pub fn set_filter<T>(mut self, v: T) -> Self
3367 where
3368 T: std::convert::Into<std::string::String>,
3369 {
3370 self.0.request.filter = std::option::Option::Some(v.into());
3371 self
3372 }
3373
3374 pub fn set_or_clear_filter<T>(mut self, v: std::option::Option<T>) -> Self
3376 where
3377 T: std::convert::Into<std::string::String>,
3378 {
3379 self.0.request.filter = v.map(|x| x.into());
3380 self
3381 }
3382
3383 pub fn set_managed_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
3385 self.0.request.managed_zone = v.into();
3386 self
3387 }
3388
3389 pub fn set_max_results<T>(mut self, v: T) -> Self
3391 where
3392 T: std::convert::Into<i32>,
3393 {
3394 self.0.request.max_results = std::option::Option::Some(v.into());
3395 self
3396 }
3397
3398 pub fn set_or_clear_max_results<T>(mut self, v: std::option::Option<T>) -> Self
3400 where
3401 T: std::convert::Into<i32>,
3402 {
3403 self.0.request.max_results = v.map(|x| x.into());
3404 self
3405 }
3406
3407 pub fn set_name<T>(mut self, v: T) -> Self
3409 where
3410 T: std::convert::Into<std::string::String>,
3411 {
3412 self.0.request.name = std::option::Option::Some(v.into());
3413 self
3414 }
3415
3416 pub fn set_or_clear_name<T>(mut self, v: std::option::Option<T>) -> Self
3418 where
3419 T: std::convert::Into<std::string::String>,
3420 {
3421 self.0.request.name = v.map(|x| x.into());
3422 self
3423 }
3424
3425 pub fn set_page_token<T>(mut self, v: T) -> Self
3427 where
3428 T: std::convert::Into<std::string::String>,
3429 {
3430 self.0.request.page_token = std::option::Option::Some(v.into());
3431 self
3432 }
3433
3434 pub fn set_or_clear_page_token<T>(mut self, v: std::option::Option<T>) -> Self
3436 where
3437 T: std::convert::Into<std::string::String>,
3438 {
3439 self.0.request.page_token = v.map(|x| x.into());
3440 self
3441 }
3442
3443 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
3445 self.0.request.project = v.into();
3446 self
3447 }
3448
3449 pub fn set_type<T>(mut self, v: T) -> Self
3451 where
3452 T: std::convert::Into<std::string::String>,
3453 {
3454 self.0.request.r#type = std::option::Option::Some(v.into());
3455 self
3456 }
3457
3458 pub fn set_or_clear_type<T>(mut self, v: std::option::Option<T>) -> Self
3460 where
3461 T: std::convert::Into<std::string::String>,
3462 {
3463 self.0.request.r#type = v.map(|x| x.into());
3464 self
3465 }
3466 }
3467
3468 #[doc(hidden)]
3469 impl crate::RequestBuilder for List {
3470 fn request_options(&mut self) -> &mut crate::RequestOptions {
3471 &mut self.0.options
3472 }
3473 }
3474
3475 #[derive(Clone, Debug)]
3492 pub struct Patch(RequestBuilder<crate::model::resource_record_sets::PatchRequest>);
3493
3494 impl Patch {
3495 pub(crate) fn new(
3496 stub: std::sync::Arc<dyn super::super::stub::dynamic::ResourceRecordSets>,
3497 ) -> Self {
3498 Self(RequestBuilder::new(stub))
3499 }
3500
3501 pub fn with_request<V: Into<crate::model::resource_record_sets::PatchRequest>>(
3503 mut self,
3504 v: V,
3505 ) -> Self {
3506 self.0.request = v.into();
3507 self
3508 }
3509
3510 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3512 self.0.options = v.into();
3513 self
3514 }
3515
3516 pub async fn send(self) -> Result<crate::model::ResourceRecordSet> {
3518 (*self.0.stub)
3519 .patch(self.0.request, self.0.options)
3520 .await
3521 .map(crate::Response::into_body)
3522 }
3523
3524 pub fn set_client_operation_id<T>(mut self, v: T) -> Self
3526 where
3527 T: std::convert::Into<std::string::String>,
3528 {
3529 self.0.request.client_operation_id = std::option::Option::Some(v.into());
3530 self
3531 }
3532
3533 pub fn set_or_clear_client_operation_id<T>(mut self, v: std::option::Option<T>) -> Self
3535 where
3536 T: std::convert::Into<std::string::String>,
3537 {
3538 self.0.request.client_operation_id = v.map(|x| x.into());
3539 self
3540 }
3541
3542 pub fn set_managed_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
3544 self.0.request.managed_zone = v.into();
3545 self
3546 }
3547
3548 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3550 self.0.request.name = v.into();
3551 self
3552 }
3553
3554 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
3556 self.0.request.project = v.into();
3557 self
3558 }
3559
3560 pub fn set_type<T: Into<std::string::String>>(mut self, v: T) -> Self {
3562 self.0.request.r#type = v.into();
3563 self
3564 }
3565
3566 pub fn set_body<T>(mut self, v: T) -> Self
3568 where
3569 T: std::convert::Into<crate::model::ResourceRecordSet>,
3570 {
3571 self.0.request.body = std::option::Option::Some(v.into());
3572 self
3573 }
3574
3575 pub fn set_or_clear_body<T>(mut self, v: std::option::Option<T>) -> Self
3577 where
3578 T: std::convert::Into<crate::model::ResourceRecordSet>,
3579 {
3580 self.0.request.body = v.map(|x| x.into());
3581 self
3582 }
3583 }
3584
3585 #[doc(hidden)]
3586 impl crate::RequestBuilder for Patch {
3587 fn request_options(&mut self) -> &mut crate::RequestOptions {
3588 &mut self.0.options
3589 }
3590 }
3591}
3592
3593pub mod response_policies {
3595 use crate::Result;
3596
3597 pub type ClientBuilder = crate::ClientBuilder<client::Factory, gaxi::options::Credentials>;
3611
3612 pub(crate) mod client {
3613 use super::super::super::client::ResponsePolicies;
3614 pub struct Factory;
3615 impl crate::ClientFactory for Factory {
3616 type Client = ResponsePolicies;
3617 type Credentials = gaxi::options::Credentials;
3618 async fn build(
3619 self,
3620 config: gaxi::options::ClientConfig,
3621 ) -> crate::ClientBuilderResult<Self::Client> {
3622 Self::Client::new(config).await
3623 }
3624 }
3625 }
3626
3627 #[derive(Clone, Debug)]
3629 pub(crate) struct RequestBuilder<R: std::default::Default> {
3630 stub: std::sync::Arc<dyn super::super::stub::dynamic::ResponsePolicies>,
3631 request: R,
3632 options: crate::RequestOptions,
3633 }
3634
3635 impl<R> RequestBuilder<R>
3636 where
3637 R: std::default::Default,
3638 {
3639 pub(crate) fn new(
3640 stub: std::sync::Arc<dyn super::super::stub::dynamic::ResponsePolicies>,
3641 ) -> Self {
3642 Self {
3643 stub,
3644 request: R::default(),
3645 options: crate::RequestOptions::default(),
3646 }
3647 }
3648 }
3649
3650 #[derive(Clone, Debug)]
3667 pub struct Create(RequestBuilder<crate::model::response_policies::CreateRequest>);
3668
3669 impl Create {
3670 pub(crate) fn new(
3671 stub: std::sync::Arc<dyn super::super::stub::dynamic::ResponsePolicies>,
3672 ) -> Self {
3673 Self(RequestBuilder::new(stub))
3674 }
3675
3676 pub fn with_request<V: Into<crate::model::response_policies::CreateRequest>>(
3678 mut self,
3679 v: V,
3680 ) -> Self {
3681 self.0.request = v.into();
3682 self
3683 }
3684
3685 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3687 self.0.options = v.into();
3688 self
3689 }
3690
3691 pub async fn send(self) -> Result<crate::model::ResponsePolicy> {
3693 (*self.0.stub)
3694 .create(self.0.request, self.0.options)
3695 .await
3696 .map(crate::Response::into_body)
3697 }
3698
3699 pub fn set_client_operation_id<T>(mut self, v: T) -> Self
3701 where
3702 T: std::convert::Into<std::string::String>,
3703 {
3704 self.0.request.client_operation_id = std::option::Option::Some(v.into());
3705 self
3706 }
3707
3708 pub fn set_or_clear_client_operation_id<T>(mut self, v: std::option::Option<T>) -> Self
3710 where
3711 T: std::convert::Into<std::string::String>,
3712 {
3713 self.0.request.client_operation_id = v.map(|x| x.into());
3714 self
3715 }
3716
3717 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
3719 self.0.request.project = v.into();
3720 self
3721 }
3722
3723 pub fn set_body<T>(mut self, v: T) -> Self
3725 where
3726 T: std::convert::Into<crate::model::ResponsePolicy>,
3727 {
3728 self.0.request.body = std::option::Option::Some(v.into());
3729 self
3730 }
3731
3732 pub fn set_or_clear_body<T>(mut self, v: std::option::Option<T>) -> Self
3734 where
3735 T: std::convert::Into<crate::model::ResponsePolicy>,
3736 {
3737 self.0.request.body = v.map(|x| x.into());
3738 self
3739 }
3740 }
3741
3742 #[doc(hidden)]
3743 impl crate::RequestBuilder for Create {
3744 fn request_options(&mut self) -> &mut crate::RequestOptions {
3745 &mut self.0.options
3746 }
3747 }
3748
3749 #[derive(Clone, Debug)]
3766 pub struct Delete(RequestBuilder<crate::model::response_policies::DeleteRequest>);
3767
3768 impl Delete {
3769 pub(crate) fn new(
3770 stub: std::sync::Arc<dyn super::super::stub::dynamic::ResponsePolicies>,
3771 ) -> Self {
3772 Self(RequestBuilder::new(stub))
3773 }
3774
3775 pub fn with_request<V: Into<crate::model::response_policies::DeleteRequest>>(
3777 mut self,
3778 v: V,
3779 ) -> Self {
3780 self.0.request = v.into();
3781 self
3782 }
3783
3784 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3786 self.0.options = v.into();
3787 self
3788 }
3789
3790 pub async fn send(self) -> Result<()> {
3792 (*self.0.stub)
3793 .delete(self.0.request, self.0.options)
3794 .await
3795 .map(crate::Response::into_body)
3796 }
3797
3798 pub fn set_client_operation_id<T>(mut self, v: T) -> Self
3800 where
3801 T: std::convert::Into<std::string::String>,
3802 {
3803 self.0.request.client_operation_id = std::option::Option::Some(v.into());
3804 self
3805 }
3806
3807 pub fn set_or_clear_client_operation_id<T>(mut self, v: std::option::Option<T>) -> Self
3809 where
3810 T: std::convert::Into<std::string::String>,
3811 {
3812 self.0.request.client_operation_id = v.map(|x| x.into());
3813 self
3814 }
3815
3816 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
3818 self.0.request.project = v.into();
3819 self
3820 }
3821
3822 pub fn set_response_policy<T: Into<std::string::String>>(mut self, v: T) -> Self {
3824 self.0.request.response_policy = v.into();
3825 self
3826 }
3827 }
3828
3829 #[doc(hidden)]
3830 impl crate::RequestBuilder for Delete {
3831 fn request_options(&mut self) -> &mut crate::RequestOptions {
3832 &mut self.0.options
3833 }
3834 }
3835
3836 #[derive(Clone, Debug)]
3853 pub struct Get(RequestBuilder<crate::model::response_policies::GetRequest>);
3854
3855 impl Get {
3856 pub(crate) fn new(
3857 stub: std::sync::Arc<dyn super::super::stub::dynamic::ResponsePolicies>,
3858 ) -> Self {
3859 Self(RequestBuilder::new(stub))
3860 }
3861
3862 pub fn with_request<V: Into<crate::model::response_policies::GetRequest>>(
3864 mut self,
3865 v: V,
3866 ) -> Self {
3867 self.0.request = v.into();
3868 self
3869 }
3870
3871 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3873 self.0.options = v.into();
3874 self
3875 }
3876
3877 pub async fn send(self) -> Result<crate::model::ResponsePolicy> {
3879 (*self.0.stub)
3880 .get(self.0.request, self.0.options)
3881 .await
3882 .map(crate::Response::into_body)
3883 }
3884
3885 pub fn set_client_operation_id<T>(mut self, v: T) -> Self
3887 where
3888 T: std::convert::Into<std::string::String>,
3889 {
3890 self.0.request.client_operation_id = std::option::Option::Some(v.into());
3891 self
3892 }
3893
3894 pub fn set_or_clear_client_operation_id<T>(mut self, v: std::option::Option<T>) -> Self
3896 where
3897 T: std::convert::Into<std::string::String>,
3898 {
3899 self.0.request.client_operation_id = v.map(|x| x.into());
3900 self
3901 }
3902
3903 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
3905 self.0.request.project = v.into();
3906 self
3907 }
3908
3909 pub fn set_response_policy<T: Into<std::string::String>>(mut self, v: T) -> Self {
3911 self.0.request.response_policy = v.into();
3912 self
3913 }
3914 }
3915
3916 #[doc(hidden)]
3917 impl crate::RequestBuilder for Get {
3918 fn request_options(&mut self) -> &mut crate::RequestOptions {
3919 &mut self.0.options
3920 }
3921 }
3922
3923 #[derive(Clone, Debug)]
3944 pub struct List(RequestBuilder<crate::model::response_policies::ListRequest>);
3945
3946 impl List {
3947 pub(crate) fn new(
3948 stub: std::sync::Arc<dyn super::super::stub::dynamic::ResponsePolicies>,
3949 ) -> Self {
3950 Self(RequestBuilder::new(stub))
3951 }
3952
3953 pub fn with_request<V: Into<crate::model::response_policies::ListRequest>>(
3955 mut self,
3956 v: V,
3957 ) -> Self {
3958 self.0.request = v.into();
3959 self
3960 }
3961
3962 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3964 self.0.options = v.into();
3965 self
3966 }
3967
3968 pub async fn send(self) -> Result<crate::model::ResponsePoliciesListResponse> {
3970 (*self.0.stub)
3971 .list(self.0.request, self.0.options)
3972 .await
3973 .map(crate::Response::into_body)
3974 }
3975
3976 pub fn by_page(
3978 self,
3979 ) -> impl google_cloud_gax::paginator::Paginator<
3980 crate::model::ResponsePoliciesListResponse,
3981 crate::Error,
3982 > {
3983 use std::clone::Clone;
3984 let token = self.0.request.page_token.clone().unwrap_or_default();
3985 let execute = move |token: String| {
3986 let mut builder = self.clone();
3987 builder.0.request = builder.0.request.set_page_token(token);
3988 builder.send()
3989 };
3990 google_cloud_gax::paginator::internal::new_paginator(token, execute)
3991 }
3992
3993 pub fn by_item(
3995 self,
3996 ) -> impl google_cloud_gax::paginator::ItemPaginator<
3997 crate::model::ResponsePoliciesListResponse,
3998 crate::Error,
3999 > {
4000 use google_cloud_gax::paginator::Paginator;
4001 self.by_page().items()
4002 }
4003
4004 pub fn set_max_results<T>(mut self, v: T) -> Self
4006 where
4007 T: std::convert::Into<i32>,
4008 {
4009 self.0.request.max_results = std::option::Option::Some(v.into());
4010 self
4011 }
4012
4013 pub fn set_or_clear_max_results<T>(mut self, v: std::option::Option<T>) -> Self
4015 where
4016 T: std::convert::Into<i32>,
4017 {
4018 self.0.request.max_results = v.map(|x| x.into());
4019 self
4020 }
4021
4022 pub fn set_page_token<T>(mut self, v: T) -> Self
4024 where
4025 T: std::convert::Into<std::string::String>,
4026 {
4027 self.0.request.page_token = std::option::Option::Some(v.into());
4028 self
4029 }
4030
4031 pub fn set_or_clear_page_token<T>(mut self, v: std::option::Option<T>) -> Self
4033 where
4034 T: std::convert::Into<std::string::String>,
4035 {
4036 self.0.request.page_token = v.map(|x| x.into());
4037 self
4038 }
4039
4040 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
4042 self.0.request.project = v.into();
4043 self
4044 }
4045 }
4046
4047 #[doc(hidden)]
4048 impl crate::RequestBuilder for List {
4049 fn request_options(&mut self) -> &mut crate::RequestOptions {
4050 &mut self.0.options
4051 }
4052 }
4053
4054 #[derive(Clone, Debug)]
4071 pub struct Patch(RequestBuilder<crate::model::response_policies::PatchRequest>);
4072
4073 impl Patch {
4074 pub(crate) fn new(
4075 stub: std::sync::Arc<dyn super::super::stub::dynamic::ResponsePolicies>,
4076 ) -> Self {
4077 Self(RequestBuilder::new(stub))
4078 }
4079
4080 pub fn with_request<V: Into<crate::model::response_policies::PatchRequest>>(
4082 mut self,
4083 v: V,
4084 ) -> Self {
4085 self.0.request = v.into();
4086 self
4087 }
4088
4089 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4091 self.0.options = v.into();
4092 self
4093 }
4094
4095 pub async fn send(self) -> Result<crate::model::ResponsePoliciesPatchResponse> {
4097 (*self.0.stub)
4098 .patch(self.0.request, self.0.options)
4099 .await
4100 .map(crate::Response::into_body)
4101 }
4102
4103 pub fn set_client_operation_id<T>(mut self, v: T) -> Self
4105 where
4106 T: std::convert::Into<std::string::String>,
4107 {
4108 self.0.request.client_operation_id = std::option::Option::Some(v.into());
4109 self
4110 }
4111
4112 pub fn set_or_clear_client_operation_id<T>(mut self, v: std::option::Option<T>) -> Self
4114 where
4115 T: std::convert::Into<std::string::String>,
4116 {
4117 self.0.request.client_operation_id = v.map(|x| x.into());
4118 self
4119 }
4120
4121 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
4123 self.0.request.project = v.into();
4124 self
4125 }
4126
4127 pub fn set_response_policy<T: Into<std::string::String>>(mut self, v: T) -> Self {
4129 self.0.request.response_policy = v.into();
4130 self
4131 }
4132
4133 pub fn set_body<T>(mut self, v: T) -> Self
4135 where
4136 T: std::convert::Into<crate::model::ResponsePolicy>,
4137 {
4138 self.0.request.body = std::option::Option::Some(v.into());
4139 self
4140 }
4141
4142 pub fn set_or_clear_body<T>(mut self, v: std::option::Option<T>) -> Self
4144 where
4145 T: std::convert::Into<crate::model::ResponsePolicy>,
4146 {
4147 self.0.request.body = v.map(|x| x.into());
4148 self
4149 }
4150 }
4151
4152 #[doc(hidden)]
4153 impl crate::RequestBuilder for Patch {
4154 fn request_options(&mut self) -> &mut crate::RequestOptions {
4155 &mut self.0.options
4156 }
4157 }
4158
4159 #[derive(Clone, Debug)]
4176 pub struct Update(RequestBuilder<crate::model::response_policies::UpdateRequest>);
4177
4178 impl Update {
4179 pub(crate) fn new(
4180 stub: std::sync::Arc<dyn super::super::stub::dynamic::ResponsePolicies>,
4181 ) -> Self {
4182 Self(RequestBuilder::new(stub))
4183 }
4184
4185 pub fn with_request<V: Into<crate::model::response_policies::UpdateRequest>>(
4187 mut self,
4188 v: V,
4189 ) -> Self {
4190 self.0.request = v.into();
4191 self
4192 }
4193
4194 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4196 self.0.options = v.into();
4197 self
4198 }
4199
4200 pub async fn send(self) -> Result<crate::model::ResponsePoliciesUpdateResponse> {
4202 (*self.0.stub)
4203 .update(self.0.request, self.0.options)
4204 .await
4205 .map(crate::Response::into_body)
4206 }
4207
4208 pub fn set_client_operation_id<T>(mut self, v: T) -> Self
4210 where
4211 T: std::convert::Into<std::string::String>,
4212 {
4213 self.0.request.client_operation_id = std::option::Option::Some(v.into());
4214 self
4215 }
4216
4217 pub fn set_or_clear_client_operation_id<T>(mut self, v: std::option::Option<T>) -> Self
4219 where
4220 T: std::convert::Into<std::string::String>,
4221 {
4222 self.0.request.client_operation_id = v.map(|x| x.into());
4223 self
4224 }
4225
4226 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
4228 self.0.request.project = v.into();
4229 self
4230 }
4231
4232 pub fn set_response_policy<T: Into<std::string::String>>(mut self, v: T) -> Self {
4234 self.0.request.response_policy = v.into();
4235 self
4236 }
4237
4238 pub fn set_body<T>(mut self, v: T) -> Self
4240 where
4241 T: std::convert::Into<crate::model::ResponsePolicy>,
4242 {
4243 self.0.request.body = std::option::Option::Some(v.into());
4244 self
4245 }
4246
4247 pub fn set_or_clear_body<T>(mut self, v: std::option::Option<T>) -> Self
4249 where
4250 T: std::convert::Into<crate::model::ResponsePolicy>,
4251 {
4252 self.0.request.body = v.map(|x| x.into());
4253 self
4254 }
4255 }
4256
4257 #[doc(hidden)]
4258 impl crate::RequestBuilder for Update {
4259 fn request_options(&mut self) -> &mut crate::RequestOptions {
4260 &mut self.0.options
4261 }
4262 }
4263}
4264
4265pub mod response_policy_rules {
4267 use crate::Result;
4268
4269 pub type ClientBuilder = crate::ClientBuilder<client::Factory, gaxi::options::Credentials>;
4283
4284 pub(crate) mod client {
4285 use super::super::super::client::ResponsePolicyRules;
4286 pub struct Factory;
4287 impl crate::ClientFactory for Factory {
4288 type Client = ResponsePolicyRules;
4289 type Credentials = gaxi::options::Credentials;
4290 async fn build(
4291 self,
4292 config: gaxi::options::ClientConfig,
4293 ) -> crate::ClientBuilderResult<Self::Client> {
4294 Self::Client::new(config).await
4295 }
4296 }
4297 }
4298
4299 #[derive(Clone, Debug)]
4301 pub(crate) struct RequestBuilder<R: std::default::Default> {
4302 stub: std::sync::Arc<dyn super::super::stub::dynamic::ResponsePolicyRules>,
4303 request: R,
4304 options: crate::RequestOptions,
4305 }
4306
4307 impl<R> RequestBuilder<R>
4308 where
4309 R: std::default::Default,
4310 {
4311 pub(crate) fn new(
4312 stub: std::sync::Arc<dyn super::super::stub::dynamic::ResponsePolicyRules>,
4313 ) -> Self {
4314 Self {
4315 stub,
4316 request: R::default(),
4317 options: crate::RequestOptions::default(),
4318 }
4319 }
4320 }
4321
4322 #[derive(Clone, Debug)]
4339 pub struct Create(RequestBuilder<crate::model::response_policy_rules::CreateRequest>);
4340
4341 impl Create {
4342 pub(crate) fn new(
4343 stub: std::sync::Arc<dyn super::super::stub::dynamic::ResponsePolicyRules>,
4344 ) -> Self {
4345 Self(RequestBuilder::new(stub))
4346 }
4347
4348 pub fn with_request<V: Into<crate::model::response_policy_rules::CreateRequest>>(
4350 mut self,
4351 v: V,
4352 ) -> Self {
4353 self.0.request = v.into();
4354 self
4355 }
4356
4357 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4359 self.0.options = v.into();
4360 self
4361 }
4362
4363 pub async fn send(self) -> Result<crate::model::ResponsePolicyRule> {
4365 (*self.0.stub)
4366 .create(self.0.request, self.0.options)
4367 .await
4368 .map(crate::Response::into_body)
4369 }
4370
4371 pub fn set_client_operation_id<T>(mut self, v: T) -> Self
4373 where
4374 T: std::convert::Into<std::string::String>,
4375 {
4376 self.0.request.client_operation_id = std::option::Option::Some(v.into());
4377 self
4378 }
4379
4380 pub fn set_or_clear_client_operation_id<T>(mut self, v: std::option::Option<T>) -> Self
4382 where
4383 T: std::convert::Into<std::string::String>,
4384 {
4385 self.0.request.client_operation_id = v.map(|x| x.into());
4386 self
4387 }
4388
4389 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
4391 self.0.request.project = v.into();
4392 self
4393 }
4394
4395 pub fn set_response_policy<T: Into<std::string::String>>(mut self, v: T) -> Self {
4397 self.0.request.response_policy = v.into();
4398 self
4399 }
4400
4401 pub fn set_body<T>(mut self, v: T) -> Self
4403 where
4404 T: std::convert::Into<crate::model::ResponsePolicyRule>,
4405 {
4406 self.0.request.body = std::option::Option::Some(v.into());
4407 self
4408 }
4409
4410 pub fn set_or_clear_body<T>(mut self, v: std::option::Option<T>) -> Self
4412 where
4413 T: std::convert::Into<crate::model::ResponsePolicyRule>,
4414 {
4415 self.0.request.body = v.map(|x| x.into());
4416 self
4417 }
4418 }
4419
4420 #[doc(hidden)]
4421 impl crate::RequestBuilder for Create {
4422 fn request_options(&mut self) -> &mut crate::RequestOptions {
4423 &mut self.0.options
4424 }
4425 }
4426
4427 #[derive(Clone, Debug)]
4444 pub struct Delete(RequestBuilder<crate::model::response_policy_rules::DeleteRequest>);
4445
4446 impl Delete {
4447 pub(crate) fn new(
4448 stub: std::sync::Arc<dyn super::super::stub::dynamic::ResponsePolicyRules>,
4449 ) -> Self {
4450 Self(RequestBuilder::new(stub))
4451 }
4452
4453 pub fn with_request<V: Into<crate::model::response_policy_rules::DeleteRequest>>(
4455 mut self,
4456 v: V,
4457 ) -> Self {
4458 self.0.request = v.into();
4459 self
4460 }
4461
4462 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4464 self.0.options = v.into();
4465 self
4466 }
4467
4468 pub async fn send(self) -> Result<()> {
4470 (*self.0.stub)
4471 .delete(self.0.request, self.0.options)
4472 .await
4473 .map(crate::Response::into_body)
4474 }
4475
4476 pub fn set_client_operation_id<T>(mut self, v: T) -> Self
4478 where
4479 T: std::convert::Into<std::string::String>,
4480 {
4481 self.0.request.client_operation_id = std::option::Option::Some(v.into());
4482 self
4483 }
4484
4485 pub fn set_or_clear_client_operation_id<T>(mut self, v: std::option::Option<T>) -> Self
4487 where
4488 T: std::convert::Into<std::string::String>,
4489 {
4490 self.0.request.client_operation_id = v.map(|x| x.into());
4491 self
4492 }
4493
4494 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
4496 self.0.request.project = v.into();
4497 self
4498 }
4499
4500 pub fn set_response_policy<T: Into<std::string::String>>(mut self, v: T) -> Self {
4502 self.0.request.response_policy = v.into();
4503 self
4504 }
4505
4506 pub fn set_response_policy_rule<T: Into<std::string::String>>(mut self, v: T) -> Self {
4508 self.0.request.response_policy_rule = v.into();
4509 self
4510 }
4511 }
4512
4513 #[doc(hidden)]
4514 impl crate::RequestBuilder for Delete {
4515 fn request_options(&mut self) -> &mut crate::RequestOptions {
4516 &mut self.0.options
4517 }
4518 }
4519
4520 #[derive(Clone, Debug)]
4537 pub struct Get(RequestBuilder<crate::model::response_policy_rules::GetRequest>);
4538
4539 impl Get {
4540 pub(crate) fn new(
4541 stub: std::sync::Arc<dyn super::super::stub::dynamic::ResponsePolicyRules>,
4542 ) -> Self {
4543 Self(RequestBuilder::new(stub))
4544 }
4545
4546 pub fn with_request<V: Into<crate::model::response_policy_rules::GetRequest>>(
4548 mut self,
4549 v: V,
4550 ) -> Self {
4551 self.0.request = v.into();
4552 self
4553 }
4554
4555 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4557 self.0.options = v.into();
4558 self
4559 }
4560
4561 pub async fn send(self) -> Result<crate::model::ResponsePolicyRule> {
4563 (*self.0.stub)
4564 .get(self.0.request, self.0.options)
4565 .await
4566 .map(crate::Response::into_body)
4567 }
4568
4569 pub fn set_client_operation_id<T>(mut self, v: T) -> Self
4571 where
4572 T: std::convert::Into<std::string::String>,
4573 {
4574 self.0.request.client_operation_id = std::option::Option::Some(v.into());
4575 self
4576 }
4577
4578 pub fn set_or_clear_client_operation_id<T>(mut self, v: std::option::Option<T>) -> Self
4580 where
4581 T: std::convert::Into<std::string::String>,
4582 {
4583 self.0.request.client_operation_id = v.map(|x| x.into());
4584 self
4585 }
4586
4587 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
4589 self.0.request.project = v.into();
4590 self
4591 }
4592
4593 pub fn set_response_policy<T: Into<std::string::String>>(mut self, v: T) -> Self {
4595 self.0.request.response_policy = v.into();
4596 self
4597 }
4598
4599 pub fn set_response_policy_rule<T: Into<std::string::String>>(mut self, v: T) -> Self {
4601 self.0.request.response_policy_rule = v.into();
4602 self
4603 }
4604 }
4605
4606 #[doc(hidden)]
4607 impl crate::RequestBuilder for Get {
4608 fn request_options(&mut self) -> &mut crate::RequestOptions {
4609 &mut self.0.options
4610 }
4611 }
4612
4613 #[derive(Clone, Debug)]
4634 pub struct List(RequestBuilder<crate::model::response_policy_rules::ListRequest>);
4635
4636 impl List {
4637 pub(crate) fn new(
4638 stub: std::sync::Arc<dyn super::super::stub::dynamic::ResponsePolicyRules>,
4639 ) -> Self {
4640 Self(RequestBuilder::new(stub))
4641 }
4642
4643 pub fn with_request<V: Into<crate::model::response_policy_rules::ListRequest>>(
4645 mut self,
4646 v: V,
4647 ) -> Self {
4648 self.0.request = v.into();
4649 self
4650 }
4651
4652 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4654 self.0.options = v.into();
4655 self
4656 }
4657
4658 pub async fn send(self) -> Result<crate::model::ResponsePolicyRulesListResponse> {
4660 (*self.0.stub)
4661 .list(self.0.request, self.0.options)
4662 .await
4663 .map(crate::Response::into_body)
4664 }
4665
4666 pub fn by_page(
4668 self,
4669 ) -> impl google_cloud_gax::paginator::Paginator<
4670 crate::model::ResponsePolicyRulesListResponse,
4671 crate::Error,
4672 > {
4673 use std::clone::Clone;
4674 let token = self.0.request.page_token.clone().unwrap_or_default();
4675 let execute = move |token: String| {
4676 let mut builder = self.clone();
4677 builder.0.request = builder.0.request.set_page_token(token);
4678 builder.send()
4679 };
4680 google_cloud_gax::paginator::internal::new_paginator(token, execute)
4681 }
4682
4683 pub fn by_item(
4685 self,
4686 ) -> impl google_cloud_gax::paginator::ItemPaginator<
4687 crate::model::ResponsePolicyRulesListResponse,
4688 crate::Error,
4689 > {
4690 use google_cloud_gax::paginator::Paginator;
4691 self.by_page().items()
4692 }
4693
4694 pub fn set_max_results<T>(mut self, v: T) -> Self
4696 where
4697 T: std::convert::Into<i32>,
4698 {
4699 self.0.request.max_results = std::option::Option::Some(v.into());
4700 self
4701 }
4702
4703 pub fn set_or_clear_max_results<T>(mut self, v: std::option::Option<T>) -> Self
4705 where
4706 T: std::convert::Into<i32>,
4707 {
4708 self.0.request.max_results = v.map(|x| x.into());
4709 self
4710 }
4711
4712 pub fn set_page_token<T>(mut self, v: T) -> Self
4714 where
4715 T: std::convert::Into<std::string::String>,
4716 {
4717 self.0.request.page_token = std::option::Option::Some(v.into());
4718 self
4719 }
4720
4721 pub fn set_or_clear_page_token<T>(mut self, v: std::option::Option<T>) -> Self
4723 where
4724 T: std::convert::Into<std::string::String>,
4725 {
4726 self.0.request.page_token = v.map(|x| x.into());
4727 self
4728 }
4729
4730 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
4732 self.0.request.project = v.into();
4733 self
4734 }
4735
4736 pub fn set_response_policy<T: Into<std::string::String>>(mut self, v: T) -> Self {
4738 self.0.request.response_policy = v.into();
4739 self
4740 }
4741 }
4742
4743 #[doc(hidden)]
4744 impl crate::RequestBuilder for List {
4745 fn request_options(&mut self) -> &mut crate::RequestOptions {
4746 &mut self.0.options
4747 }
4748 }
4749
4750 #[derive(Clone, Debug)]
4767 pub struct Patch(RequestBuilder<crate::model::response_policy_rules::PatchRequest>);
4768
4769 impl Patch {
4770 pub(crate) fn new(
4771 stub: std::sync::Arc<dyn super::super::stub::dynamic::ResponsePolicyRules>,
4772 ) -> Self {
4773 Self(RequestBuilder::new(stub))
4774 }
4775
4776 pub fn with_request<V: Into<crate::model::response_policy_rules::PatchRequest>>(
4778 mut self,
4779 v: V,
4780 ) -> Self {
4781 self.0.request = v.into();
4782 self
4783 }
4784
4785 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4787 self.0.options = v.into();
4788 self
4789 }
4790
4791 pub async fn send(self) -> Result<crate::model::ResponsePolicyRulesPatchResponse> {
4793 (*self.0.stub)
4794 .patch(self.0.request, self.0.options)
4795 .await
4796 .map(crate::Response::into_body)
4797 }
4798
4799 pub fn set_client_operation_id<T>(mut self, v: T) -> Self
4801 where
4802 T: std::convert::Into<std::string::String>,
4803 {
4804 self.0.request.client_operation_id = std::option::Option::Some(v.into());
4805 self
4806 }
4807
4808 pub fn set_or_clear_client_operation_id<T>(mut self, v: std::option::Option<T>) -> Self
4810 where
4811 T: std::convert::Into<std::string::String>,
4812 {
4813 self.0.request.client_operation_id = v.map(|x| x.into());
4814 self
4815 }
4816
4817 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
4819 self.0.request.project = v.into();
4820 self
4821 }
4822
4823 pub fn set_response_policy<T: Into<std::string::String>>(mut self, v: T) -> Self {
4825 self.0.request.response_policy = v.into();
4826 self
4827 }
4828
4829 pub fn set_response_policy_rule<T: Into<std::string::String>>(mut self, v: T) -> Self {
4831 self.0.request.response_policy_rule = v.into();
4832 self
4833 }
4834
4835 pub fn set_body<T>(mut self, v: T) -> Self
4837 where
4838 T: std::convert::Into<crate::model::ResponsePolicyRule>,
4839 {
4840 self.0.request.body = std::option::Option::Some(v.into());
4841 self
4842 }
4843
4844 pub fn set_or_clear_body<T>(mut self, v: std::option::Option<T>) -> Self
4846 where
4847 T: std::convert::Into<crate::model::ResponsePolicyRule>,
4848 {
4849 self.0.request.body = v.map(|x| x.into());
4850 self
4851 }
4852 }
4853
4854 #[doc(hidden)]
4855 impl crate::RequestBuilder for Patch {
4856 fn request_options(&mut self) -> &mut crate::RequestOptions {
4857 &mut self.0.options
4858 }
4859 }
4860
4861 #[derive(Clone, Debug)]
4878 pub struct Update(RequestBuilder<crate::model::response_policy_rules::UpdateRequest>);
4879
4880 impl Update {
4881 pub(crate) fn new(
4882 stub: std::sync::Arc<dyn super::super::stub::dynamic::ResponsePolicyRules>,
4883 ) -> Self {
4884 Self(RequestBuilder::new(stub))
4885 }
4886
4887 pub fn with_request<V: Into<crate::model::response_policy_rules::UpdateRequest>>(
4889 mut self,
4890 v: V,
4891 ) -> Self {
4892 self.0.request = v.into();
4893 self
4894 }
4895
4896 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4898 self.0.options = v.into();
4899 self
4900 }
4901
4902 pub async fn send(self) -> Result<crate::model::ResponsePolicyRulesUpdateResponse> {
4904 (*self.0.stub)
4905 .update(self.0.request, self.0.options)
4906 .await
4907 .map(crate::Response::into_body)
4908 }
4909
4910 pub fn set_client_operation_id<T>(mut self, v: T) -> Self
4912 where
4913 T: std::convert::Into<std::string::String>,
4914 {
4915 self.0.request.client_operation_id = std::option::Option::Some(v.into());
4916 self
4917 }
4918
4919 pub fn set_or_clear_client_operation_id<T>(mut self, v: std::option::Option<T>) -> Self
4921 where
4922 T: std::convert::Into<std::string::String>,
4923 {
4924 self.0.request.client_operation_id = v.map(|x| x.into());
4925 self
4926 }
4927
4928 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
4930 self.0.request.project = v.into();
4931 self
4932 }
4933
4934 pub fn set_response_policy<T: Into<std::string::String>>(mut self, v: T) -> Self {
4936 self.0.request.response_policy = v.into();
4937 self
4938 }
4939
4940 pub fn set_response_policy_rule<T: Into<std::string::String>>(mut self, v: T) -> Self {
4942 self.0.request.response_policy_rule = v.into();
4943 self
4944 }
4945
4946 pub fn set_body<T>(mut self, v: T) -> Self
4948 where
4949 T: std::convert::Into<crate::model::ResponsePolicyRule>,
4950 {
4951 self.0.request.body = std::option::Option::Some(v.into());
4952 self
4953 }
4954
4955 pub fn set_or_clear_body<T>(mut self, v: std::option::Option<T>) -> Self
4957 where
4958 T: std::convert::Into<crate::model::ResponsePolicyRule>,
4959 {
4960 self.0.request.body = v.map(|x| x.into());
4961 self
4962 }
4963 }
4964
4965 #[doc(hidden)]
4966 impl crate::RequestBuilder for Update {
4967 fn request_options(&mut self) -> &mut crate::RequestOptions {
4968 &mut self.0.options
4969 }
4970 }
4971}