1pub mod sql_backup_runs_service {
18 use crate::Result;
19
20 pub type ClientBuilder =
34 gax::client_builder::ClientBuilder<client::Factory, gaxi::options::Credentials>;
35
36 pub(crate) mod client {
37 use super::super::super::client::SqlBackupRunsService;
38 pub struct Factory;
39 impl gax::client_builder::internal::ClientFactory for Factory {
40 type Client = SqlBackupRunsService;
41 type Credentials = gaxi::options::Credentials;
42 async fn build(self, config: gaxi::options::ClientConfig) -> gax::Result<Self::Client> {
43 Self::Client::new(config).await
44 }
45 }
46 }
47
48 #[derive(Clone, Debug)]
50 pub(crate) struct RequestBuilder<R: std::default::Default> {
51 stub: std::sync::Arc<dyn super::super::stub::dynamic::SqlBackupRunsService>,
52 request: R,
53 options: gax::options::RequestOptions,
54 }
55
56 impl<R> RequestBuilder<R>
57 where
58 R: std::default::Default,
59 {
60 pub(crate) fn new(
61 stub: std::sync::Arc<dyn super::super::stub::dynamic::SqlBackupRunsService>,
62 ) -> Self {
63 Self {
64 stub,
65 request: R::default(),
66 options: gax::options::RequestOptions::default(),
67 }
68 }
69 }
70
71 #[derive(Clone, Debug)]
88 pub struct Delete(RequestBuilder<crate::model::SqlBackupRunsDeleteRequest>);
89
90 impl Delete {
91 pub(crate) fn new(
92 stub: std::sync::Arc<dyn super::super::stub::dynamic::SqlBackupRunsService>,
93 ) -> Self {
94 Self(RequestBuilder::new(stub))
95 }
96
97 pub fn with_request<V: Into<crate::model::SqlBackupRunsDeleteRequest>>(
99 mut self,
100 v: V,
101 ) -> Self {
102 self.0.request = v.into();
103 self
104 }
105
106 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
108 self.0.options = v.into();
109 self
110 }
111
112 pub async fn send(self) -> Result<crate::model::Operation> {
114 (*self.0.stub)
115 .delete(self.0.request, self.0.options)
116 .await
117 .map(gax::response::Response::into_body)
118 }
119
120 pub fn set_id<T: Into<i64>>(mut self, v: T) -> Self {
122 self.0.request.id = v.into();
123 self
124 }
125
126 pub fn set_instance<T: Into<std::string::String>>(mut self, v: T) -> Self {
128 self.0.request.instance = v.into();
129 self
130 }
131
132 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
134 self.0.request.project = v.into();
135 self
136 }
137 }
138
139 #[doc(hidden)]
140 impl gax::options::internal::RequestBuilder for Delete {
141 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
142 &mut self.0.options
143 }
144 }
145
146 #[derive(Clone, Debug)]
163 pub struct Get(RequestBuilder<crate::model::SqlBackupRunsGetRequest>);
164
165 impl Get {
166 pub(crate) fn new(
167 stub: std::sync::Arc<dyn super::super::stub::dynamic::SqlBackupRunsService>,
168 ) -> Self {
169 Self(RequestBuilder::new(stub))
170 }
171
172 pub fn with_request<V: Into<crate::model::SqlBackupRunsGetRequest>>(
174 mut self,
175 v: V,
176 ) -> Self {
177 self.0.request = v.into();
178 self
179 }
180
181 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
183 self.0.options = v.into();
184 self
185 }
186
187 pub async fn send(self) -> Result<crate::model::BackupRun> {
189 (*self.0.stub)
190 .get(self.0.request, self.0.options)
191 .await
192 .map(gax::response::Response::into_body)
193 }
194
195 pub fn set_id<T: Into<i64>>(mut self, v: T) -> Self {
197 self.0.request.id = v.into();
198 self
199 }
200
201 pub fn set_instance<T: Into<std::string::String>>(mut self, v: T) -> Self {
203 self.0.request.instance = v.into();
204 self
205 }
206
207 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
209 self.0.request.project = v.into();
210 self
211 }
212 }
213
214 #[doc(hidden)]
215 impl gax::options::internal::RequestBuilder for Get {
216 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
217 &mut self.0.options
218 }
219 }
220
221 #[derive(Clone, Debug)]
238 pub struct Insert(RequestBuilder<crate::model::SqlBackupRunsInsertRequest>);
239
240 impl Insert {
241 pub(crate) fn new(
242 stub: std::sync::Arc<dyn super::super::stub::dynamic::SqlBackupRunsService>,
243 ) -> Self {
244 Self(RequestBuilder::new(stub))
245 }
246
247 pub fn with_request<V: Into<crate::model::SqlBackupRunsInsertRequest>>(
249 mut self,
250 v: V,
251 ) -> Self {
252 self.0.request = v.into();
253 self
254 }
255
256 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
258 self.0.options = v.into();
259 self
260 }
261
262 pub async fn send(self) -> Result<crate::model::Operation> {
264 (*self.0.stub)
265 .insert(self.0.request, self.0.options)
266 .await
267 .map(gax::response::Response::into_body)
268 }
269
270 pub fn set_instance<T: Into<std::string::String>>(mut self, v: T) -> Self {
272 self.0.request.instance = v.into();
273 self
274 }
275
276 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
278 self.0.request.project = v.into();
279 self
280 }
281
282 pub fn set_body<T: Into<std::option::Option<crate::model::BackupRun>>>(
284 mut self,
285 v: T,
286 ) -> Self {
287 self.0.request.body = v.into();
288 self
289 }
290 }
291
292 #[doc(hidden)]
293 impl gax::options::internal::RequestBuilder for Insert {
294 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
295 &mut self.0.options
296 }
297 }
298
299 #[derive(Clone, Debug)]
320 pub struct List(RequestBuilder<crate::model::SqlBackupRunsListRequest>);
321
322 impl List {
323 pub(crate) fn new(
324 stub: std::sync::Arc<dyn super::super::stub::dynamic::SqlBackupRunsService>,
325 ) -> Self {
326 Self(RequestBuilder::new(stub))
327 }
328
329 pub fn with_request<V: Into<crate::model::SqlBackupRunsListRequest>>(
331 mut self,
332 v: V,
333 ) -> Self {
334 self.0.request = v.into();
335 self
336 }
337
338 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
340 self.0.options = v.into();
341 self
342 }
343
344 pub async fn send(self) -> Result<crate::model::BackupRunsListResponse> {
346 (*self.0.stub)
347 .list(self.0.request, self.0.options)
348 .await
349 .map(gax::response::Response::into_body)
350 }
351
352 pub fn by_page(
354 self,
355 ) -> impl gax::paginator::Paginator<crate::model::BackupRunsListResponse, gax::error::Error>
356 {
357 use std::clone::Clone;
358 let token = self.0.request.page_token.clone();
359 let execute = move |token: String| {
360 let mut builder = self.clone();
361 builder.0.request = builder.0.request.set_page_token(token);
362 builder.send()
363 };
364 gax::paginator::internal::new_paginator(token, execute)
365 }
366
367 pub fn by_item(
369 self,
370 ) -> impl gax::paginator::ItemPaginator<crate::model::BackupRunsListResponse, gax::error::Error>
371 {
372 use gax::paginator::Paginator;
373 self.by_page().items()
374 }
375
376 pub fn set_instance<T: Into<std::string::String>>(mut self, v: T) -> Self {
378 self.0.request.instance = v.into();
379 self
380 }
381
382 pub fn set_max_results<T: Into<i32>>(mut self, v: T) -> Self {
384 self.0.request.max_results = v.into();
385 self
386 }
387
388 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
390 self.0.request.page_token = v.into();
391 self
392 }
393
394 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
396 self.0.request.project = v.into();
397 self
398 }
399 }
400
401 #[doc(hidden)]
402 impl gax::options::internal::RequestBuilder for List {
403 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
404 &mut self.0.options
405 }
406 }
407}
408
409pub mod sql_connect_service {
410 use crate::Result;
411
412 pub type ClientBuilder =
426 gax::client_builder::ClientBuilder<client::Factory, gaxi::options::Credentials>;
427
428 pub(crate) mod client {
429 use super::super::super::client::SqlConnectService;
430 pub struct Factory;
431 impl gax::client_builder::internal::ClientFactory for Factory {
432 type Client = SqlConnectService;
433 type Credentials = gaxi::options::Credentials;
434 async fn build(self, config: gaxi::options::ClientConfig) -> gax::Result<Self::Client> {
435 Self::Client::new(config).await
436 }
437 }
438 }
439
440 #[derive(Clone, Debug)]
442 pub(crate) struct RequestBuilder<R: std::default::Default> {
443 stub: std::sync::Arc<dyn super::super::stub::dynamic::SqlConnectService>,
444 request: R,
445 options: gax::options::RequestOptions,
446 }
447
448 impl<R> RequestBuilder<R>
449 where
450 R: std::default::Default,
451 {
452 pub(crate) fn new(
453 stub: std::sync::Arc<dyn super::super::stub::dynamic::SqlConnectService>,
454 ) -> Self {
455 Self {
456 stub,
457 request: R::default(),
458 options: gax::options::RequestOptions::default(),
459 }
460 }
461 }
462
463 #[derive(Clone, Debug)]
480 pub struct GetConnectSettings(RequestBuilder<crate::model::GetConnectSettingsRequest>);
481
482 impl GetConnectSettings {
483 pub(crate) fn new(
484 stub: std::sync::Arc<dyn super::super::stub::dynamic::SqlConnectService>,
485 ) -> Self {
486 Self(RequestBuilder::new(stub))
487 }
488
489 pub fn with_request<V: Into<crate::model::GetConnectSettingsRequest>>(
491 mut self,
492 v: V,
493 ) -> Self {
494 self.0.request = v.into();
495 self
496 }
497
498 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
500 self.0.options = v.into();
501 self
502 }
503
504 pub async fn send(self) -> Result<crate::model::ConnectSettings> {
506 (*self.0.stub)
507 .get_connect_settings(self.0.request, self.0.options)
508 .await
509 .map(gax::response::Response::into_body)
510 }
511
512 pub fn set_instance<T: Into<std::string::String>>(mut self, v: T) -> Self {
514 self.0.request.instance = v.into();
515 self
516 }
517
518 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
520 self.0.request.project = v.into();
521 self
522 }
523
524 pub fn set_read_time<T: Into<std::option::Option<wkt::Timestamp>>>(mut self, v: T) -> Self {
526 self.0.request.read_time = v.into();
527 self
528 }
529 }
530
531 #[doc(hidden)]
532 impl gax::options::internal::RequestBuilder for GetConnectSettings {
533 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
534 &mut self.0.options
535 }
536 }
537
538 #[derive(Clone, Debug)]
555 pub struct GenerateEphemeralCert(RequestBuilder<crate::model::GenerateEphemeralCertRequest>);
556
557 impl GenerateEphemeralCert {
558 pub(crate) fn new(
559 stub: std::sync::Arc<dyn super::super::stub::dynamic::SqlConnectService>,
560 ) -> Self {
561 Self(RequestBuilder::new(stub))
562 }
563
564 pub fn with_request<V: Into<crate::model::GenerateEphemeralCertRequest>>(
566 mut self,
567 v: V,
568 ) -> Self {
569 self.0.request = v.into();
570 self
571 }
572
573 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
575 self.0.options = v.into();
576 self
577 }
578
579 pub async fn send(self) -> Result<crate::model::GenerateEphemeralCertResponse> {
581 (*self.0.stub)
582 .generate_ephemeral_cert(self.0.request, self.0.options)
583 .await
584 .map(gax::response::Response::into_body)
585 }
586
587 pub fn set_instance<T: Into<std::string::String>>(mut self, v: T) -> Self {
589 self.0.request.instance = v.into();
590 self
591 }
592
593 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
595 self.0.request.project = v.into();
596 self
597 }
598
599 pub fn set_public_key<T: Into<std::string::String>>(mut self, v: T) -> Self {
601 self.0.request.public_key = v.into();
602 self
603 }
604
605 pub fn set_access_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
607 self.0.request.access_token = v.into();
608 self
609 }
610
611 pub fn set_read_time<T: Into<std::option::Option<wkt::Timestamp>>>(mut self, v: T) -> Self {
613 self.0.request.read_time = v.into();
614 self
615 }
616
617 pub fn set_valid_duration<T: Into<std::option::Option<wkt::Duration>>>(
619 mut self,
620 v: T,
621 ) -> Self {
622 self.0.request.valid_duration = v.into();
623 self
624 }
625 }
626
627 #[doc(hidden)]
628 impl gax::options::internal::RequestBuilder for GenerateEphemeralCert {
629 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
630 &mut self.0.options
631 }
632 }
633}
634
635pub mod sql_databases_service {
636 use crate::Result;
637
638 pub type ClientBuilder =
652 gax::client_builder::ClientBuilder<client::Factory, gaxi::options::Credentials>;
653
654 pub(crate) mod client {
655 use super::super::super::client::SqlDatabasesService;
656 pub struct Factory;
657 impl gax::client_builder::internal::ClientFactory for Factory {
658 type Client = SqlDatabasesService;
659 type Credentials = gaxi::options::Credentials;
660 async fn build(self, config: gaxi::options::ClientConfig) -> gax::Result<Self::Client> {
661 Self::Client::new(config).await
662 }
663 }
664 }
665
666 #[derive(Clone, Debug)]
668 pub(crate) struct RequestBuilder<R: std::default::Default> {
669 stub: std::sync::Arc<dyn super::super::stub::dynamic::SqlDatabasesService>,
670 request: R,
671 options: gax::options::RequestOptions,
672 }
673
674 impl<R> RequestBuilder<R>
675 where
676 R: std::default::Default,
677 {
678 pub(crate) fn new(
679 stub: std::sync::Arc<dyn super::super::stub::dynamic::SqlDatabasesService>,
680 ) -> Self {
681 Self {
682 stub,
683 request: R::default(),
684 options: gax::options::RequestOptions::default(),
685 }
686 }
687 }
688
689 #[derive(Clone, Debug)]
706 pub struct Delete(RequestBuilder<crate::model::SqlDatabasesDeleteRequest>);
707
708 impl Delete {
709 pub(crate) fn new(
710 stub: std::sync::Arc<dyn super::super::stub::dynamic::SqlDatabasesService>,
711 ) -> Self {
712 Self(RequestBuilder::new(stub))
713 }
714
715 pub fn with_request<V: Into<crate::model::SqlDatabasesDeleteRequest>>(
717 mut self,
718 v: V,
719 ) -> Self {
720 self.0.request = v.into();
721 self
722 }
723
724 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
726 self.0.options = v.into();
727 self
728 }
729
730 pub async fn send(self) -> Result<crate::model::Operation> {
732 (*self.0.stub)
733 .delete(self.0.request, self.0.options)
734 .await
735 .map(gax::response::Response::into_body)
736 }
737
738 pub fn set_database<T: Into<std::string::String>>(mut self, v: T) -> Self {
740 self.0.request.database = v.into();
741 self
742 }
743
744 pub fn set_instance<T: Into<std::string::String>>(mut self, v: T) -> Self {
746 self.0.request.instance = v.into();
747 self
748 }
749
750 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
752 self.0.request.project = v.into();
753 self
754 }
755 }
756
757 #[doc(hidden)]
758 impl gax::options::internal::RequestBuilder for Delete {
759 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
760 &mut self.0.options
761 }
762 }
763
764 #[derive(Clone, Debug)]
781 pub struct Get(RequestBuilder<crate::model::SqlDatabasesGetRequest>);
782
783 impl Get {
784 pub(crate) fn new(
785 stub: std::sync::Arc<dyn super::super::stub::dynamic::SqlDatabasesService>,
786 ) -> Self {
787 Self(RequestBuilder::new(stub))
788 }
789
790 pub fn with_request<V: Into<crate::model::SqlDatabasesGetRequest>>(mut self, v: V) -> Self {
792 self.0.request = v.into();
793 self
794 }
795
796 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
798 self.0.options = v.into();
799 self
800 }
801
802 pub async fn send(self) -> Result<crate::model::Database> {
804 (*self.0.stub)
805 .get(self.0.request, self.0.options)
806 .await
807 .map(gax::response::Response::into_body)
808 }
809
810 pub fn set_database<T: Into<std::string::String>>(mut self, v: T) -> Self {
812 self.0.request.database = v.into();
813 self
814 }
815
816 pub fn set_instance<T: Into<std::string::String>>(mut self, v: T) -> Self {
818 self.0.request.instance = v.into();
819 self
820 }
821
822 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
824 self.0.request.project = v.into();
825 self
826 }
827 }
828
829 #[doc(hidden)]
830 impl gax::options::internal::RequestBuilder for Get {
831 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
832 &mut self.0.options
833 }
834 }
835
836 #[derive(Clone, Debug)]
853 pub struct Insert(RequestBuilder<crate::model::SqlDatabasesInsertRequest>);
854
855 impl Insert {
856 pub(crate) fn new(
857 stub: std::sync::Arc<dyn super::super::stub::dynamic::SqlDatabasesService>,
858 ) -> Self {
859 Self(RequestBuilder::new(stub))
860 }
861
862 pub fn with_request<V: Into<crate::model::SqlDatabasesInsertRequest>>(
864 mut self,
865 v: V,
866 ) -> Self {
867 self.0.request = v.into();
868 self
869 }
870
871 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
873 self.0.options = v.into();
874 self
875 }
876
877 pub async fn send(self) -> Result<crate::model::Operation> {
879 (*self.0.stub)
880 .insert(self.0.request, self.0.options)
881 .await
882 .map(gax::response::Response::into_body)
883 }
884
885 pub fn set_instance<T: Into<std::string::String>>(mut self, v: T) -> Self {
887 self.0.request.instance = v.into();
888 self
889 }
890
891 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
893 self.0.request.project = v.into();
894 self
895 }
896
897 pub fn set_body<T: Into<std::option::Option<crate::model::Database>>>(
899 mut self,
900 v: T,
901 ) -> Self {
902 self.0.request.body = v.into();
903 self
904 }
905 }
906
907 #[doc(hidden)]
908 impl gax::options::internal::RequestBuilder for Insert {
909 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
910 &mut self.0.options
911 }
912 }
913
914 #[derive(Clone, Debug)]
931 pub struct List(RequestBuilder<crate::model::SqlDatabasesListRequest>);
932
933 impl List {
934 pub(crate) fn new(
935 stub: std::sync::Arc<dyn super::super::stub::dynamic::SqlDatabasesService>,
936 ) -> Self {
937 Self(RequestBuilder::new(stub))
938 }
939
940 pub fn with_request<V: Into<crate::model::SqlDatabasesListRequest>>(
942 mut self,
943 v: V,
944 ) -> Self {
945 self.0.request = v.into();
946 self
947 }
948
949 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
951 self.0.options = v.into();
952 self
953 }
954
955 pub async fn send(self) -> Result<crate::model::DatabasesListResponse> {
957 (*self.0.stub)
958 .list(self.0.request, self.0.options)
959 .await
960 .map(gax::response::Response::into_body)
961 }
962
963 pub fn set_instance<T: Into<std::string::String>>(mut self, v: T) -> Self {
965 self.0.request.instance = v.into();
966 self
967 }
968
969 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
971 self.0.request.project = v.into();
972 self
973 }
974 }
975
976 #[doc(hidden)]
977 impl gax::options::internal::RequestBuilder for List {
978 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
979 &mut self.0.options
980 }
981 }
982
983 #[derive(Clone, Debug)]
1000 pub struct Patch(RequestBuilder<crate::model::SqlDatabasesUpdateRequest>);
1001
1002 impl Patch {
1003 pub(crate) fn new(
1004 stub: std::sync::Arc<dyn super::super::stub::dynamic::SqlDatabasesService>,
1005 ) -> Self {
1006 Self(RequestBuilder::new(stub))
1007 }
1008
1009 pub fn with_request<V: Into<crate::model::SqlDatabasesUpdateRequest>>(
1011 mut self,
1012 v: V,
1013 ) -> Self {
1014 self.0.request = v.into();
1015 self
1016 }
1017
1018 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1020 self.0.options = v.into();
1021 self
1022 }
1023
1024 pub async fn send(self) -> Result<crate::model::Operation> {
1026 (*self.0.stub)
1027 .patch(self.0.request, self.0.options)
1028 .await
1029 .map(gax::response::Response::into_body)
1030 }
1031
1032 pub fn set_database<T: Into<std::string::String>>(mut self, v: T) -> Self {
1034 self.0.request.database = v.into();
1035 self
1036 }
1037
1038 pub fn set_instance<T: Into<std::string::String>>(mut self, v: T) -> Self {
1040 self.0.request.instance = v.into();
1041 self
1042 }
1043
1044 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
1046 self.0.request.project = v.into();
1047 self
1048 }
1049
1050 pub fn set_body<T: Into<std::option::Option<crate::model::Database>>>(
1052 mut self,
1053 v: T,
1054 ) -> Self {
1055 self.0.request.body = v.into();
1056 self
1057 }
1058 }
1059
1060 #[doc(hidden)]
1061 impl gax::options::internal::RequestBuilder for Patch {
1062 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1063 &mut self.0.options
1064 }
1065 }
1066
1067 #[derive(Clone, Debug)]
1084 pub struct Update(RequestBuilder<crate::model::SqlDatabasesUpdateRequest>);
1085
1086 impl Update {
1087 pub(crate) fn new(
1088 stub: std::sync::Arc<dyn super::super::stub::dynamic::SqlDatabasesService>,
1089 ) -> Self {
1090 Self(RequestBuilder::new(stub))
1091 }
1092
1093 pub fn with_request<V: Into<crate::model::SqlDatabasesUpdateRequest>>(
1095 mut self,
1096 v: V,
1097 ) -> Self {
1098 self.0.request = v.into();
1099 self
1100 }
1101
1102 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1104 self.0.options = v.into();
1105 self
1106 }
1107
1108 pub async fn send(self) -> Result<crate::model::Operation> {
1110 (*self.0.stub)
1111 .update(self.0.request, self.0.options)
1112 .await
1113 .map(gax::response::Response::into_body)
1114 }
1115
1116 pub fn set_database<T: Into<std::string::String>>(mut self, v: T) -> Self {
1118 self.0.request.database = v.into();
1119 self
1120 }
1121
1122 pub fn set_instance<T: Into<std::string::String>>(mut self, v: T) -> Self {
1124 self.0.request.instance = v.into();
1125 self
1126 }
1127
1128 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
1130 self.0.request.project = v.into();
1131 self
1132 }
1133
1134 pub fn set_body<T: Into<std::option::Option<crate::model::Database>>>(
1136 mut self,
1137 v: T,
1138 ) -> Self {
1139 self.0.request.body = v.into();
1140 self
1141 }
1142 }
1143
1144 #[doc(hidden)]
1145 impl gax::options::internal::RequestBuilder for Update {
1146 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1147 &mut self.0.options
1148 }
1149 }
1150}
1151
1152pub mod sql_flags_service {
1153 use crate::Result;
1154
1155 pub type ClientBuilder =
1169 gax::client_builder::ClientBuilder<client::Factory, gaxi::options::Credentials>;
1170
1171 pub(crate) mod client {
1172 use super::super::super::client::SqlFlagsService;
1173 pub struct Factory;
1174 impl gax::client_builder::internal::ClientFactory for Factory {
1175 type Client = SqlFlagsService;
1176 type Credentials = gaxi::options::Credentials;
1177 async fn build(self, config: gaxi::options::ClientConfig) -> gax::Result<Self::Client> {
1178 Self::Client::new(config).await
1179 }
1180 }
1181 }
1182
1183 #[derive(Clone, Debug)]
1185 pub(crate) struct RequestBuilder<R: std::default::Default> {
1186 stub: std::sync::Arc<dyn super::super::stub::dynamic::SqlFlagsService>,
1187 request: R,
1188 options: gax::options::RequestOptions,
1189 }
1190
1191 impl<R> RequestBuilder<R>
1192 where
1193 R: std::default::Default,
1194 {
1195 pub(crate) fn new(
1196 stub: std::sync::Arc<dyn super::super::stub::dynamic::SqlFlagsService>,
1197 ) -> Self {
1198 Self {
1199 stub,
1200 request: R::default(),
1201 options: gax::options::RequestOptions::default(),
1202 }
1203 }
1204 }
1205
1206 #[derive(Clone, Debug)]
1223 pub struct List(RequestBuilder<crate::model::SqlFlagsListRequest>);
1224
1225 impl List {
1226 pub(crate) fn new(
1227 stub: std::sync::Arc<dyn super::super::stub::dynamic::SqlFlagsService>,
1228 ) -> Self {
1229 Self(RequestBuilder::new(stub))
1230 }
1231
1232 pub fn with_request<V: Into<crate::model::SqlFlagsListRequest>>(mut self, v: V) -> Self {
1234 self.0.request = v.into();
1235 self
1236 }
1237
1238 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1240 self.0.options = v.into();
1241 self
1242 }
1243
1244 pub async fn send(self) -> Result<crate::model::FlagsListResponse> {
1246 (*self.0.stub)
1247 .list(self.0.request, self.0.options)
1248 .await
1249 .map(gax::response::Response::into_body)
1250 }
1251
1252 pub fn set_database_version<T: Into<std::string::String>>(mut self, v: T) -> Self {
1254 self.0.request.database_version = v.into();
1255 self
1256 }
1257 }
1258
1259 #[doc(hidden)]
1260 impl gax::options::internal::RequestBuilder for List {
1261 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1262 &mut self.0.options
1263 }
1264 }
1265}
1266
1267pub mod sql_instances_service {
1268 use crate::Result;
1269
1270 pub type ClientBuilder =
1284 gax::client_builder::ClientBuilder<client::Factory, gaxi::options::Credentials>;
1285
1286 pub(crate) mod client {
1287 use super::super::super::client::SqlInstancesService;
1288 pub struct Factory;
1289 impl gax::client_builder::internal::ClientFactory for Factory {
1290 type Client = SqlInstancesService;
1291 type Credentials = gaxi::options::Credentials;
1292 async fn build(self, config: gaxi::options::ClientConfig) -> gax::Result<Self::Client> {
1293 Self::Client::new(config).await
1294 }
1295 }
1296 }
1297
1298 #[derive(Clone, Debug)]
1300 pub(crate) struct RequestBuilder<R: std::default::Default> {
1301 stub: std::sync::Arc<dyn super::super::stub::dynamic::SqlInstancesService>,
1302 request: R,
1303 options: gax::options::RequestOptions,
1304 }
1305
1306 impl<R> RequestBuilder<R>
1307 where
1308 R: std::default::Default,
1309 {
1310 pub(crate) fn new(
1311 stub: std::sync::Arc<dyn super::super::stub::dynamic::SqlInstancesService>,
1312 ) -> Self {
1313 Self {
1314 stub,
1315 request: R::default(),
1316 options: gax::options::RequestOptions::default(),
1317 }
1318 }
1319 }
1320
1321 #[derive(Clone, Debug)]
1338 pub struct AddServerCa(RequestBuilder<crate::model::SqlInstancesAddServerCaRequest>);
1339
1340 impl AddServerCa {
1341 pub(crate) fn new(
1342 stub: std::sync::Arc<dyn super::super::stub::dynamic::SqlInstancesService>,
1343 ) -> Self {
1344 Self(RequestBuilder::new(stub))
1345 }
1346
1347 pub fn with_request<V: Into<crate::model::SqlInstancesAddServerCaRequest>>(
1349 mut self,
1350 v: V,
1351 ) -> Self {
1352 self.0.request = v.into();
1353 self
1354 }
1355
1356 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1358 self.0.options = v.into();
1359 self
1360 }
1361
1362 pub async fn send(self) -> Result<crate::model::Operation> {
1364 (*self.0.stub)
1365 .add_server_ca(self.0.request, self.0.options)
1366 .await
1367 .map(gax::response::Response::into_body)
1368 }
1369
1370 pub fn set_instance<T: Into<std::string::String>>(mut self, v: T) -> Self {
1372 self.0.request.instance = v.into();
1373 self
1374 }
1375
1376 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
1378 self.0.request.project = v.into();
1379 self
1380 }
1381 }
1382
1383 #[doc(hidden)]
1384 impl gax::options::internal::RequestBuilder for AddServerCa {
1385 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1386 &mut self.0.options
1387 }
1388 }
1389
1390 #[derive(Clone, Debug)]
1407 pub struct Clone(RequestBuilder<crate::model::SqlInstancesCloneRequest>);
1408
1409 impl Clone {
1410 pub(crate) fn new(
1411 stub: std::sync::Arc<dyn super::super::stub::dynamic::SqlInstancesService>,
1412 ) -> Self {
1413 Self(RequestBuilder::new(stub))
1414 }
1415
1416 pub fn with_request<V: Into<crate::model::SqlInstancesCloneRequest>>(
1418 mut self,
1419 v: V,
1420 ) -> Self {
1421 self.0.request = v.into();
1422 self
1423 }
1424
1425 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1427 self.0.options = v.into();
1428 self
1429 }
1430
1431 pub async fn send(self) -> Result<crate::model::Operation> {
1433 (*self.0.stub)
1434 .clone(self.0.request, self.0.options)
1435 .await
1436 .map(gax::response::Response::into_body)
1437 }
1438
1439 pub fn set_instance<T: Into<std::string::String>>(mut self, v: T) -> Self {
1441 self.0.request.instance = v.into();
1442 self
1443 }
1444
1445 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
1447 self.0.request.project = v.into();
1448 self
1449 }
1450
1451 pub fn set_body<T: Into<std::option::Option<crate::model::InstancesCloneRequest>>>(
1453 mut self,
1454 v: T,
1455 ) -> Self {
1456 self.0.request.body = v.into();
1457 self
1458 }
1459 }
1460
1461 #[doc(hidden)]
1462 impl gax::options::internal::RequestBuilder for Clone {
1463 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1464 &mut self.0.options
1465 }
1466 }
1467
1468 #[derive(Clone, Debug)]
1485 pub struct Delete(RequestBuilder<crate::model::SqlInstancesDeleteRequest>);
1486
1487 impl Delete {
1488 pub(crate) fn new(
1489 stub: std::sync::Arc<dyn super::super::stub::dynamic::SqlInstancesService>,
1490 ) -> Self {
1491 Self(RequestBuilder::new(stub))
1492 }
1493
1494 pub fn with_request<V: Into<crate::model::SqlInstancesDeleteRequest>>(
1496 mut self,
1497 v: V,
1498 ) -> Self {
1499 self.0.request = v.into();
1500 self
1501 }
1502
1503 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1505 self.0.options = v.into();
1506 self
1507 }
1508
1509 pub async fn send(self) -> Result<crate::model::Operation> {
1511 (*self.0.stub)
1512 .delete(self.0.request, self.0.options)
1513 .await
1514 .map(gax::response::Response::into_body)
1515 }
1516
1517 pub fn set_instance<T: Into<std::string::String>>(mut self, v: T) -> Self {
1519 self.0.request.instance = v.into();
1520 self
1521 }
1522
1523 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
1525 self.0.request.project = v.into();
1526 self
1527 }
1528 }
1529
1530 #[doc(hidden)]
1531 impl gax::options::internal::RequestBuilder for Delete {
1532 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1533 &mut self.0.options
1534 }
1535 }
1536
1537 #[derive(Clone, Debug)]
1554 pub struct DemoteMaster(RequestBuilder<crate::model::SqlInstancesDemoteMasterRequest>);
1555
1556 impl DemoteMaster {
1557 pub(crate) fn new(
1558 stub: std::sync::Arc<dyn super::super::stub::dynamic::SqlInstancesService>,
1559 ) -> Self {
1560 Self(RequestBuilder::new(stub))
1561 }
1562
1563 pub fn with_request<V: Into<crate::model::SqlInstancesDemoteMasterRequest>>(
1565 mut self,
1566 v: V,
1567 ) -> Self {
1568 self.0.request = v.into();
1569 self
1570 }
1571
1572 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1574 self.0.options = v.into();
1575 self
1576 }
1577
1578 pub async fn send(self) -> Result<crate::model::Operation> {
1580 (*self.0.stub)
1581 .demote_master(self.0.request, self.0.options)
1582 .await
1583 .map(gax::response::Response::into_body)
1584 }
1585
1586 pub fn set_instance<T: Into<std::string::String>>(mut self, v: T) -> Self {
1588 self.0.request.instance = v.into();
1589 self
1590 }
1591
1592 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
1594 self.0.request.project = v.into();
1595 self
1596 }
1597
1598 pub fn set_body<
1600 T: Into<std::option::Option<crate::model::InstancesDemoteMasterRequest>>,
1601 >(
1602 mut self,
1603 v: T,
1604 ) -> Self {
1605 self.0.request.body = v.into();
1606 self
1607 }
1608 }
1609
1610 #[doc(hidden)]
1611 impl gax::options::internal::RequestBuilder for DemoteMaster {
1612 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1613 &mut self.0.options
1614 }
1615 }
1616
1617 #[derive(Clone, Debug)]
1634 pub struct Demote(RequestBuilder<crate::model::SqlInstancesDemoteRequest>);
1635
1636 impl Demote {
1637 pub(crate) fn new(
1638 stub: std::sync::Arc<dyn super::super::stub::dynamic::SqlInstancesService>,
1639 ) -> Self {
1640 Self(RequestBuilder::new(stub))
1641 }
1642
1643 pub fn with_request<V: Into<crate::model::SqlInstancesDemoteRequest>>(
1645 mut self,
1646 v: V,
1647 ) -> Self {
1648 self.0.request = v.into();
1649 self
1650 }
1651
1652 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1654 self.0.options = v.into();
1655 self
1656 }
1657
1658 pub async fn send(self) -> Result<crate::model::Operation> {
1660 (*self.0.stub)
1661 .demote(self.0.request, self.0.options)
1662 .await
1663 .map(gax::response::Response::into_body)
1664 }
1665
1666 pub fn set_instance<T: Into<std::string::String>>(mut self, v: T) -> Self {
1670 self.0.request.instance = v.into();
1671 self
1672 }
1673
1674 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
1678 self.0.request.project = v.into();
1679 self
1680 }
1681
1682 pub fn set_body<T: Into<std::option::Option<crate::model::InstancesDemoteRequest>>>(
1686 mut self,
1687 v: T,
1688 ) -> Self {
1689 self.0.request.body = v.into();
1690 self
1691 }
1692 }
1693
1694 #[doc(hidden)]
1695 impl gax::options::internal::RequestBuilder for Demote {
1696 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1697 &mut self.0.options
1698 }
1699 }
1700
1701 #[derive(Clone, Debug)]
1718 pub struct Export(RequestBuilder<crate::model::SqlInstancesExportRequest>);
1719
1720 impl Export {
1721 pub(crate) fn new(
1722 stub: std::sync::Arc<dyn super::super::stub::dynamic::SqlInstancesService>,
1723 ) -> Self {
1724 Self(RequestBuilder::new(stub))
1725 }
1726
1727 pub fn with_request<V: Into<crate::model::SqlInstancesExportRequest>>(
1729 mut self,
1730 v: V,
1731 ) -> Self {
1732 self.0.request = v.into();
1733 self
1734 }
1735
1736 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1738 self.0.options = v.into();
1739 self
1740 }
1741
1742 pub async fn send(self) -> Result<crate::model::Operation> {
1744 (*self.0.stub)
1745 .export(self.0.request, self.0.options)
1746 .await
1747 .map(gax::response::Response::into_body)
1748 }
1749
1750 pub fn set_instance<T: Into<std::string::String>>(mut self, v: T) -> Self {
1752 self.0.request.instance = v.into();
1753 self
1754 }
1755
1756 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
1758 self.0.request.project = v.into();
1759 self
1760 }
1761
1762 pub fn set_body<T: Into<std::option::Option<crate::model::InstancesExportRequest>>>(
1764 mut self,
1765 v: T,
1766 ) -> Self {
1767 self.0.request.body = v.into();
1768 self
1769 }
1770 }
1771
1772 #[doc(hidden)]
1773 impl gax::options::internal::RequestBuilder for Export {
1774 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1775 &mut self.0.options
1776 }
1777 }
1778
1779 #[derive(Clone, Debug)]
1796 pub struct Failover(RequestBuilder<crate::model::SqlInstancesFailoverRequest>);
1797
1798 impl Failover {
1799 pub(crate) fn new(
1800 stub: std::sync::Arc<dyn super::super::stub::dynamic::SqlInstancesService>,
1801 ) -> Self {
1802 Self(RequestBuilder::new(stub))
1803 }
1804
1805 pub fn with_request<V: Into<crate::model::SqlInstancesFailoverRequest>>(
1807 mut self,
1808 v: V,
1809 ) -> Self {
1810 self.0.request = v.into();
1811 self
1812 }
1813
1814 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1816 self.0.options = v.into();
1817 self
1818 }
1819
1820 pub async fn send(self) -> Result<crate::model::Operation> {
1822 (*self.0.stub)
1823 .failover(self.0.request, self.0.options)
1824 .await
1825 .map(gax::response::Response::into_body)
1826 }
1827
1828 pub fn set_instance<T: Into<std::string::String>>(mut self, v: T) -> Self {
1830 self.0.request.instance = v.into();
1831 self
1832 }
1833
1834 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
1836 self.0.request.project = v.into();
1837 self
1838 }
1839
1840 pub fn set_body<T: Into<std::option::Option<crate::model::InstancesFailoverRequest>>>(
1842 mut self,
1843 v: T,
1844 ) -> Self {
1845 self.0.request.body = v.into();
1846 self
1847 }
1848 }
1849
1850 #[doc(hidden)]
1851 impl gax::options::internal::RequestBuilder for Failover {
1852 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1853 &mut self.0.options
1854 }
1855 }
1856
1857 #[derive(Clone, Debug)]
1874 pub struct Reencrypt(RequestBuilder<crate::model::SqlInstancesReencryptRequest>);
1875
1876 impl Reencrypt {
1877 pub(crate) fn new(
1878 stub: std::sync::Arc<dyn super::super::stub::dynamic::SqlInstancesService>,
1879 ) -> Self {
1880 Self(RequestBuilder::new(stub))
1881 }
1882
1883 pub fn with_request<V: Into<crate::model::SqlInstancesReencryptRequest>>(
1885 mut self,
1886 v: V,
1887 ) -> Self {
1888 self.0.request = v.into();
1889 self
1890 }
1891
1892 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1894 self.0.options = v.into();
1895 self
1896 }
1897
1898 pub async fn send(self) -> Result<crate::model::Operation> {
1900 (*self.0.stub)
1901 .reencrypt(self.0.request, self.0.options)
1902 .await
1903 .map(gax::response::Response::into_body)
1904 }
1905
1906 pub fn set_instance<T: Into<std::string::String>>(mut self, v: T) -> Self {
1908 self.0.request.instance = v.into();
1909 self
1910 }
1911
1912 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
1914 self.0.request.project = v.into();
1915 self
1916 }
1917
1918 pub fn set_body<T: Into<std::option::Option<crate::model::InstancesReencryptRequest>>>(
1920 mut self,
1921 v: T,
1922 ) -> Self {
1923 self.0.request.body = v.into();
1924 self
1925 }
1926 }
1927
1928 #[doc(hidden)]
1929 impl gax::options::internal::RequestBuilder for Reencrypt {
1930 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1931 &mut self.0.options
1932 }
1933 }
1934
1935 #[derive(Clone, Debug)]
1952 pub struct Get(RequestBuilder<crate::model::SqlInstancesGetRequest>);
1953
1954 impl Get {
1955 pub(crate) fn new(
1956 stub: std::sync::Arc<dyn super::super::stub::dynamic::SqlInstancesService>,
1957 ) -> Self {
1958 Self(RequestBuilder::new(stub))
1959 }
1960
1961 pub fn with_request<V: Into<crate::model::SqlInstancesGetRequest>>(mut self, v: V) -> Self {
1963 self.0.request = v.into();
1964 self
1965 }
1966
1967 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1969 self.0.options = v.into();
1970 self
1971 }
1972
1973 pub async fn send(self) -> Result<crate::model::DatabaseInstance> {
1975 (*self.0.stub)
1976 .get(self.0.request, self.0.options)
1977 .await
1978 .map(gax::response::Response::into_body)
1979 }
1980
1981 pub fn set_instance<T: Into<std::string::String>>(mut self, v: T) -> Self {
1983 self.0.request.instance = v.into();
1984 self
1985 }
1986
1987 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
1989 self.0.request.project = v.into();
1990 self
1991 }
1992 }
1993
1994 #[doc(hidden)]
1995 impl gax::options::internal::RequestBuilder for Get {
1996 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1997 &mut self.0.options
1998 }
1999 }
2000
2001 #[derive(Clone, Debug)]
2018 pub struct Import(RequestBuilder<crate::model::SqlInstancesImportRequest>);
2019
2020 impl Import {
2021 pub(crate) fn new(
2022 stub: std::sync::Arc<dyn super::super::stub::dynamic::SqlInstancesService>,
2023 ) -> Self {
2024 Self(RequestBuilder::new(stub))
2025 }
2026
2027 pub fn with_request<V: Into<crate::model::SqlInstancesImportRequest>>(
2029 mut self,
2030 v: V,
2031 ) -> Self {
2032 self.0.request = v.into();
2033 self
2034 }
2035
2036 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2038 self.0.options = v.into();
2039 self
2040 }
2041
2042 pub async fn send(self) -> Result<crate::model::Operation> {
2044 (*self.0.stub)
2045 .import(self.0.request, self.0.options)
2046 .await
2047 .map(gax::response::Response::into_body)
2048 }
2049
2050 pub fn set_instance<T: Into<std::string::String>>(mut self, v: T) -> Self {
2052 self.0.request.instance = v.into();
2053 self
2054 }
2055
2056 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
2058 self.0.request.project = v.into();
2059 self
2060 }
2061
2062 pub fn set_body<T: Into<std::option::Option<crate::model::InstancesImportRequest>>>(
2064 mut self,
2065 v: T,
2066 ) -> Self {
2067 self.0.request.body = v.into();
2068 self
2069 }
2070 }
2071
2072 #[doc(hidden)]
2073 impl gax::options::internal::RequestBuilder for Import {
2074 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2075 &mut self.0.options
2076 }
2077 }
2078
2079 #[derive(Clone, Debug)]
2096 pub struct Insert(RequestBuilder<crate::model::SqlInstancesInsertRequest>);
2097
2098 impl Insert {
2099 pub(crate) fn new(
2100 stub: std::sync::Arc<dyn super::super::stub::dynamic::SqlInstancesService>,
2101 ) -> Self {
2102 Self(RequestBuilder::new(stub))
2103 }
2104
2105 pub fn with_request<V: Into<crate::model::SqlInstancesInsertRequest>>(
2107 mut self,
2108 v: V,
2109 ) -> Self {
2110 self.0.request = v.into();
2111 self
2112 }
2113
2114 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2116 self.0.options = v.into();
2117 self
2118 }
2119
2120 pub async fn send(self) -> Result<crate::model::Operation> {
2122 (*self.0.stub)
2123 .insert(self.0.request, self.0.options)
2124 .await
2125 .map(gax::response::Response::into_body)
2126 }
2127
2128 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
2130 self.0.request.project = v.into();
2131 self
2132 }
2133
2134 pub fn set_body<T: Into<std::option::Option<crate::model::DatabaseInstance>>>(
2136 mut self,
2137 v: T,
2138 ) -> Self {
2139 self.0.request.body = v.into();
2140 self
2141 }
2142 }
2143
2144 #[doc(hidden)]
2145 impl gax::options::internal::RequestBuilder for Insert {
2146 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2147 &mut self.0.options
2148 }
2149 }
2150
2151 #[derive(Clone, Debug)]
2172 pub struct List(RequestBuilder<crate::model::SqlInstancesListRequest>);
2173
2174 impl List {
2175 pub(crate) fn new(
2176 stub: std::sync::Arc<dyn super::super::stub::dynamic::SqlInstancesService>,
2177 ) -> Self {
2178 Self(RequestBuilder::new(stub))
2179 }
2180
2181 pub fn with_request<V: Into<crate::model::SqlInstancesListRequest>>(
2183 mut self,
2184 v: V,
2185 ) -> Self {
2186 self.0.request = v.into();
2187 self
2188 }
2189
2190 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2192 self.0.options = v.into();
2193 self
2194 }
2195
2196 pub async fn send(self) -> Result<crate::model::InstancesListResponse> {
2198 (*self.0.stub)
2199 .list(self.0.request, self.0.options)
2200 .await
2201 .map(gax::response::Response::into_body)
2202 }
2203
2204 pub fn by_page(
2206 self,
2207 ) -> impl gax::paginator::Paginator<crate::model::InstancesListResponse, gax::error::Error>
2208 {
2209 use std::clone::Clone;
2210 let token = self.0.request.page_token.clone();
2211 let execute = move |token: String| {
2212 let mut builder = self.clone();
2213 builder.0.request = builder.0.request.set_page_token(token);
2214 builder.send()
2215 };
2216 gax::paginator::internal::new_paginator(token, execute)
2217 }
2218
2219 pub fn by_item(
2221 self,
2222 ) -> impl gax::paginator::ItemPaginator<crate::model::InstancesListResponse, gax::error::Error>
2223 {
2224 use gax::paginator::Paginator;
2225 self.by_page().items()
2226 }
2227
2228 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
2230 self.0.request.filter = v.into();
2231 self
2232 }
2233
2234 pub fn set_max_results<T: Into<u32>>(mut self, v: T) -> Self {
2236 self.0.request.max_results = v.into();
2237 self
2238 }
2239
2240 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2242 self.0.request.page_token = v.into();
2243 self
2244 }
2245
2246 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
2248 self.0.request.project = v.into();
2249 self
2250 }
2251 }
2252
2253 #[doc(hidden)]
2254 impl gax::options::internal::RequestBuilder for List {
2255 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2256 &mut self.0.options
2257 }
2258 }
2259
2260 #[derive(Clone, Debug)]
2277 pub struct ListServerCas(RequestBuilder<crate::model::SqlInstancesListServerCasRequest>);
2278
2279 impl ListServerCas {
2280 pub(crate) fn new(
2281 stub: std::sync::Arc<dyn super::super::stub::dynamic::SqlInstancesService>,
2282 ) -> Self {
2283 Self(RequestBuilder::new(stub))
2284 }
2285
2286 pub fn with_request<V: Into<crate::model::SqlInstancesListServerCasRequest>>(
2288 mut self,
2289 v: V,
2290 ) -> Self {
2291 self.0.request = v.into();
2292 self
2293 }
2294
2295 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2297 self.0.options = v.into();
2298 self
2299 }
2300
2301 pub async fn send(self) -> Result<crate::model::InstancesListServerCasResponse> {
2303 (*self.0.stub)
2304 .list_server_cas(self.0.request, self.0.options)
2305 .await
2306 .map(gax::response::Response::into_body)
2307 }
2308
2309 pub fn set_instance<T: Into<std::string::String>>(mut self, v: T) -> Self {
2311 self.0.request.instance = v.into();
2312 self
2313 }
2314
2315 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
2317 self.0.request.project = v.into();
2318 self
2319 }
2320 }
2321
2322 #[doc(hidden)]
2323 impl gax::options::internal::RequestBuilder for ListServerCas {
2324 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2325 &mut self.0.options
2326 }
2327 }
2328
2329 #[derive(Clone, Debug)]
2346 pub struct Patch(RequestBuilder<crate::model::SqlInstancesPatchRequest>);
2347
2348 impl Patch {
2349 pub(crate) fn new(
2350 stub: std::sync::Arc<dyn super::super::stub::dynamic::SqlInstancesService>,
2351 ) -> Self {
2352 Self(RequestBuilder::new(stub))
2353 }
2354
2355 pub fn with_request<V: Into<crate::model::SqlInstancesPatchRequest>>(
2357 mut self,
2358 v: V,
2359 ) -> Self {
2360 self.0.request = v.into();
2361 self
2362 }
2363
2364 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2366 self.0.options = v.into();
2367 self
2368 }
2369
2370 pub async fn send(self) -> Result<crate::model::Operation> {
2372 (*self.0.stub)
2373 .patch(self.0.request, self.0.options)
2374 .await
2375 .map(gax::response::Response::into_body)
2376 }
2377
2378 pub fn set_instance<T: Into<std::string::String>>(mut self, v: T) -> Self {
2380 self.0.request.instance = v.into();
2381 self
2382 }
2383
2384 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
2386 self.0.request.project = v.into();
2387 self
2388 }
2389
2390 pub fn set_body<T: Into<std::option::Option<crate::model::DatabaseInstance>>>(
2392 mut self,
2393 v: T,
2394 ) -> Self {
2395 self.0.request.body = v.into();
2396 self
2397 }
2398 }
2399
2400 #[doc(hidden)]
2401 impl gax::options::internal::RequestBuilder for Patch {
2402 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2403 &mut self.0.options
2404 }
2405 }
2406
2407 #[derive(Clone, Debug)]
2424 pub struct PromoteReplica(RequestBuilder<crate::model::SqlInstancesPromoteReplicaRequest>);
2425
2426 impl PromoteReplica {
2427 pub(crate) fn new(
2428 stub: std::sync::Arc<dyn super::super::stub::dynamic::SqlInstancesService>,
2429 ) -> Self {
2430 Self(RequestBuilder::new(stub))
2431 }
2432
2433 pub fn with_request<V: Into<crate::model::SqlInstancesPromoteReplicaRequest>>(
2435 mut self,
2436 v: V,
2437 ) -> Self {
2438 self.0.request = v.into();
2439 self
2440 }
2441
2442 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2444 self.0.options = v.into();
2445 self
2446 }
2447
2448 pub async fn send(self) -> Result<crate::model::Operation> {
2450 (*self.0.stub)
2451 .promote_replica(self.0.request, self.0.options)
2452 .await
2453 .map(gax::response::Response::into_body)
2454 }
2455
2456 pub fn set_instance<T: Into<std::string::String>>(mut self, v: T) -> Self {
2458 self.0.request.instance = v.into();
2459 self
2460 }
2461
2462 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
2464 self.0.request.project = v.into();
2465 self
2466 }
2467
2468 pub fn set_failover<T: Into<bool>>(mut self, v: T) -> Self {
2470 self.0.request.failover = v.into();
2471 self
2472 }
2473 }
2474
2475 #[doc(hidden)]
2476 impl gax::options::internal::RequestBuilder for PromoteReplica {
2477 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2478 &mut self.0.options
2479 }
2480 }
2481
2482 #[derive(Clone, Debug)]
2499 pub struct Switchover(RequestBuilder<crate::model::SqlInstancesSwitchoverRequest>);
2500
2501 impl Switchover {
2502 pub(crate) fn new(
2503 stub: std::sync::Arc<dyn super::super::stub::dynamic::SqlInstancesService>,
2504 ) -> Self {
2505 Self(RequestBuilder::new(stub))
2506 }
2507
2508 pub fn with_request<V: Into<crate::model::SqlInstancesSwitchoverRequest>>(
2510 mut self,
2511 v: V,
2512 ) -> Self {
2513 self.0.request = v.into();
2514 self
2515 }
2516
2517 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2519 self.0.options = v.into();
2520 self
2521 }
2522
2523 pub async fn send(self) -> Result<crate::model::Operation> {
2525 (*self.0.stub)
2526 .switchover(self.0.request, self.0.options)
2527 .await
2528 .map(gax::response::Response::into_body)
2529 }
2530
2531 pub fn set_instance<T: Into<std::string::String>>(mut self, v: T) -> Self {
2533 self.0.request.instance = v.into();
2534 self
2535 }
2536
2537 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
2539 self.0.request.project = v.into();
2540 self
2541 }
2542
2543 pub fn set_db_timeout<T: Into<std::option::Option<wkt::Duration>>>(mut self, v: T) -> Self {
2545 self.0.request.db_timeout = v.into();
2546 self
2547 }
2548 }
2549
2550 #[doc(hidden)]
2551 impl gax::options::internal::RequestBuilder for Switchover {
2552 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2553 &mut self.0.options
2554 }
2555 }
2556
2557 #[derive(Clone, Debug)]
2574 pub struct ResetSslConfig(RequestBuilder<crate::model::SqlInstancesResetSslConfigRequest>);
2575
2576 impl ResetSslConfig {
2577 pub(crate) fn new(
2578 stub: std::sync::Arc<dyn super::super::stub::dynamic::SqlInstancesService>,
2579 ) -> Self {
2580 Self(RequestBuilder::new(stub))
2581 }
2582
2583 pub fn with_request<V: Into<crate::model::SqlInstancesResetSslConfigRequest>>(
2585 mut self,
2586 v: V,
2587 ) -> Self {
2588 self.0.request = v.into();
2589 self
2590 }
2591
2592 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2594 self.0.options = v.into();
2595 self
2596 }
2597
2598 pub async fn send(self) -> Result<crate::model::Operation> {
2600 (*self.0.stub)
2601 .reset_ssl_config(self.0.request, self.0.options)
2602 .await
2603 .map(gax::response::Response::into_body)
2604 }
2605
2606 pub fn set_instance<T: Into<std::string::String>>(mut self, v: T) -> Self {
2608 self.0.request.instance = v.into();
2609 self
2610 }
2611
2612 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
2614 self.0.request.project = v.into();
2615 self
2616 }
2617 }
2618
2619 #[doc(hidden)]
2620 impl gax::options::internal::RequestBuilder for ResetSslConfig {
2621 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2622 &mut self.0.options
2623 }
2624 }
2625
2626 #[derive(Clone, Debug)]
2643 pub struct Restart(RequestBuilder<crate::model::SqlInstancesRestartRequest>);
2644
2645 impl Restart {
2646 pub(crate) fn new(
2647 stub: std::sync::Arc<dyn super::super::stub::dynamic::SqlInstancesService>,
2648 ) -> Self {
2649 Self(RequestBuilder::new(stub))
2650 }
2651
2652 pub fn with_request<V: Into<crate::model::SqlInstancesRestartRequest>>(
2654 mut self,
2655 v: V,
2656 ) -> Self {
2657 self.0.request = v.into();
2658 self
2659 }
2660
2661 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2663 self.0.options = v.into();
2664 self
2665 }
2666
2667 pub async fn send(self) -> Result<crate::model::Operation> {
2669 (*self.0.stub)
2670 .restart(self.0.request, self.0.options)
2671 .await
2672 .map(gax::response::Response::into_body)
2673 }
2674
2675 pub fn set_instance<T: Into<std::string::String>>(mut self, v: T) -> Self {
2677 self.0.request.instance = v.into();
2678 self
2679 }
2680
2681 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
2683 self.0.request.project = v.into();
2684 self
2685 }
2686 }
2687
2688 #[doc(hidden)]
2689 impl gax::options::internal::RequestBuilder for Restart {
2690 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2691 &mut self.0.options
2692 }
2693 }
2694
2695 #[derive(Clone, Debug)]
2712 pub struct RestoreBackup(RequestBuilder<crate::model::SqlInstancesRestoreBackupRequest>);
2713
2714 impl RestoreBackup {
2715 pub(crate) fn new(
2716 stub: std::sync::Arc<dyn super::super::stub::dynamic::SqlInstancesService>,
2717 ) -> Self {
2718 Self(RequestBuilder::new(stub))
2719 }
2720
2721 pub fn with_request<V: Into<crate::model::SqlInstancesRestoreBackupRequest>>(
2723 mut self,
2724 v: V,
2725 ) -> Self {
2726 self.0.request = v.into();
2727 self
2728 }
2729
2730 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2732 self.0.options = v.into();
2733 self
2734 }
2735
2736 pub async fn send(self) -> Result<crate::model::Operation> {
2738 (*self.0.stub)
2739 .restore_backup(self.0.request, self.0.options)
2740 .await
2741 .map(gax::response::Response::into_body)
2742 }
2743
2744 pub fn set_instance<T: Into<std::string::String>>(mut self, v: T) -> Self {
2746 self.0.request.instance = v.into();
2747 self
2748 }
2749
2750 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
2752 self.0.request.project = v.into();
2753 self
2754 }
2755
2756 pub fn set_body<
2758 T: Into<std::option::Option<crate::model::InstancesRestoreBackupRequest>>,
2759 >(
2760 mut self,
2761 v: T,
2762 ) -> Self {
2763 self.0.request.body = v.into();
2764 self
2765 }
2766 }
2767
2768 #[doc(hidden)]
2769 impl gax::options::internal::RequestBuilder for RestoreBackup {
2770 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2771 &mut self.0.options
2772 }
2773 }
2774
2775 #[derive(Clone, Debug)]
2792 pub struct RotateServerCa(RequestBuilder<crate::model::SqlInstancesRotateServerCaRequest>);
2793
2794 impl RotateServerCa {
2795 pub(crate) fn new(
2796 stub: std::sync::Arc<dyn super::super::stub::dynamic::SqlInstancesService>,
2797 ) -> Self {
2798 Self(RequestBuilder::new(stub))
2799 }
2800
2801 pub fn with_request<V: Into<crate::model::SqlInstancesRotateServerCaRequest>>(
2803 mut self,
2804 v: V,
2805 ) -> Self {
2806 self.0.request = v.into();
2807 self
2808 }
2809
2810 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2812 self.0.options = v.into();
2813 self
2814 }
2815
2816 pub async fn send(self) -> Result<crate::model::Operation> {
2818 (*self.0.stub)
2819 .rotate_server_ca(self.0.request, self.0.options)
2820 .await
2821 .map(gax::response::Response::into_body)
2822 }
2823
2824 pub fn set_instance<T: Into<std::string::String>>(mut self, v: T) -> Self {
2826 self.0.request.instance = v.into();
2827 self
2828 }
2829
2830 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
2832 self.0.request.project = v.into();
2833 self
2834 }
2835
2836 pub fn set_body<
2838 T: Into<std::option::Option<crate::model::InstancesRotateServerCaRequest>>,
2839 >(
2840 mut self,
2841 v: T,
2842 ) -> Self {
2843 self.0.request.body = v.into();
2844 self
2845 }
2846 }
2847
2848 #[doc(hidden)]
2849 impl gax::options::internal::RequestBuilder for RotateServerCa {
2850 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2851 &mut self.0.options
2852 }
2853 }
2854
2855 #[derive(Clone, Debug)]
2872 pub struct StartReplica(RequestBuilder<crate::model::SqlInstancesStartReplicaRequest>);
2873
2874 impl StartReplica {
2875 pub(crate) fn new(
2876 stub: std::sync::Arc<dyn super::super::stub::dynamic::SqlInstancesService>,
2877 ) -> Self {
2878 Self(RequestBuilder::new(stub))
2879 }
2880
2881 pub fn with_request<V: Into<crate::model::SqlInstancesStartReplicaRequest>>(
2883 mut self,
2884 v: V,
2885 ) -> Self {
2886 self.0.request = v.into();
2887 self
2888 }
2889
2890 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2892 self.0.options = v.into();
2893 self
2894 }
2895
2896 pub async fn send(self) -> Result<crate::model::Operation> {
2898 (*self.0.stub)
2899 .start_replica(self.0.request, self.0.options)
2900 .await
2901 .map(gax::response::Response::into_body)
2902 }
2903
2904 pub fn set_instance<T: Into<std::string::String>>(mut self, v: T) -> Self {
2906 self.0.request.instance = v.into();
2907 self
2908 }
2909
2910 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
2912 self.0.request.project = v.into();
2913 self
2914 }
2915 }
2916
2917 #[doc(hidden)]
2918 impl gax::options::internal::RequestBuilder for StartReplica {
2919 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2920 &mut self.0.options
2921 }
2922 }
2923
2924 #[derive(Clone, Debug)]
2941 pub struct StopReplica(RequestBuilder<crate::model::SqlInstancesStopReplicaRequest>);
2942
2943 impl StopReplica {
2944 pub(crate) fn new(
2945 stub: std::sync::Arc<dyn super::super::stub::dynamic::SqlInstancesService>,
2946 ) -> Self {
2947 Self(RequestBuilder::new(stub))
2948 }
2949
2950 pub fn with_request<V: Into<crate::model::SqlInstancesStopReplicaRequest>>(
2952 mut self,
2953 v: V,
2954 ) -> Self {
2955 self.0.request = v.into();
2956 self
2957 }
2958
2959 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2961 self.0.options = v.into();
2962 self
2963 }
2964
2965 pub async fn send(self) -> Result<crate::model::Operation> {
2967 (*self.0.stub)
2968 .stop_replica(self.0.request, self.0.options)
2969 .await
2970 .map(gax::response::Response::into_body)
2971 }
2972
2973 pub fn set_instance<T: Into<std::string::String>>(mut self, v: T) -> Self {
2975 self.0.request.instance = v.into();
2976 self
2977 }
2978
2979 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
2981 self.0.request.project = v.into();
2982 self
2983 }
2984 }
2985
2986 #[doc(hidden)]
2987 impl gax::options::internal::RequestBuilder for StopReplica {
2988 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2989 &mut self.0.options
2990 }
2991 }
2992
2993 #[derive(Clone, Debug)]
3010 pub struct TruncateLog(RequestBuilder<crate::model::SqlInstancesTruncateLogRequest>);
3011
3012 impl TruncateLog {
3013 pub(crate) fn new(
3014 stub: std::sync::Arc<dyn super::super::stub::dynamic::SqlInstancesService>,
3015 ) -> Self {
3016 Self(RequestBuilder::new(stub))
3017 }
3018
3019 pub fn with_request<V: Into<crate::model::SqlInstancesTruncateLogRequest>>(
3021 mut self,
3022 v: V,
3023 ) -> Self {
3024 self.0.request = v.into();
3025 self
3026 }
3027
3028 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3030 self.0.options = v.into();
3031 self
3032 }
3033
3034 pub async fn send(self) -> Result<crate::model::Operation> {
3036 (*self.0.stub)
3037 .truncate_log(self.0.request, self.0.options)
3038 .await
3039 .map(gax::response::Response::into_body)
3040 }
3041
3042 pub fn set_instance<T: Into<std::string::String>>(mut self, v: T) -> Self {
3044 self.0.request.instance = v.into();
3045 self
3046 }
3047
3048 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
3050 self.0.request.project = v.into();
3051 self
3052 }
3053
3054 pub fn set_body<T: Into<std::option::Option<crate::model::InstancesTruncateLogRequest>>>(
3056 mut self,
3057 v: T,
3058 ) -> Self {
3059 self.0.request.body = v.into();
3060 self
3061 }
3062 }
3063
3064 #[doc(hidden)]
3065 impl gax::options::internal::RequestBuilder for TruncateLog {
3066 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3067 &mut self.0.options
3068 }
3069 }
3070
3071 #[derive(Clone, Debug)]
3088 pub struct Update(RequestBuilder<crate::model::SqlInstancesUpdateRequest>);
3089
3090 impl Update {
3091 pub(crate) fn new(
3092 stub: std::sync::Arc<dyn super::super::stub::dynamic::SqlInstancesService>,
3093 ) -> Self {
3094 Self(RequestBuilder::new(stub))
3095 }
3096
3097 pub fn with_request<V: Into<crate::model::SqlInstancesUpdateRequest>>(
3099 mut self,
3100 v: V,
3101 ) -> Self {
3102 self.0.request = v.into();
3103 self
3104 }
3105
3106 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3108 self.0.options = v.into();
3109 self
3110 }
3111
3112 pub async fn send(self) -> Result<crate::model::Operation> {
3114 (*self.0.stub)
3115 .update(self.0.request, self.0.options)
3116 .await
3117 .map(gax::response::Response::into_body)
3118 }
3119
3120 pub fn set_instance<T: Into<std::string::String>>(mut self, v: T) -> Self {
3122 self.0.request.instance = v.into();
3123 self
3124 }
3125
3126 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
3128 self.0.request.project = v.into();
3129 self
3130 }
3131
3132 pub fn set_body<T: Into<std::option::Option<crate::model::DatabaseInstance>>>(
3134 mut self,
3135 v: T,
3136 ) -> Self {
3137 self.0.request.body = v.into();
3138 self
3139 }
3140 }
3141
3142 #[doc(hidden)]
3143 impl gax::options::internal::RequestBuilder for Update {
3144 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3145 &mut self.0.options
3146 }
3147 }
3148
3149 #[derive(Clone, Debug)]
3166 pub struct CreateEphemeral(
3167 RequestBuilder<crate::model::SqlInstancesCreateEphemeralCertRequest>,
3168 );
3169
3170 impl CreateEphemeral {
3171 pub(crate) fn new(
3172 stub: std::sync::Arc<dyn super::super::stub::dynamic::SqlInstancesService>,
3173 ) -> Self {
3174 Self(RequestBuilder::new(stub))
3175 }
3176
3177 pub fn with_request<V: Into<crate::model::SqlInstancesCreateEphemeralCertRequest>>(
3179 mut self,
3180 v: V,
3181 ) -> Self {
3182 self.0.request = v.into();
3183 self
3184 }
3185
3186 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3188 self.0.options = v.into();
3189 self
3190 }
3191
3192 pub async fn send(self) -> Result<crate::model::SslCert> {
3194 (*self.0.stub)
3195 .create_ephemeral(self.0.request, self.0.options)
3196 .await
3197 .map(gax::response::Response::into_body)
3198 }
3199
3200 pub fn set_instance<T: Into<std::string::String>>(mut self, v: T) -> Self {
3202 self.0.request.instance = v.into();
3203 self
3204 }
3205
3206 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
3208 self.0.request.project = v.into();
3209 self
3210 }
3211
3212 pub fn set_body<
3214 T: Into<std::option::Option<crate::model::SslCertsCreateEphemeralRequest>>,
3215 >(
3216 mut self,
3217 v: T,
3218 ) -> Self {
3219 self.0.request.body = v.into();
3220 self
3221 }
3222 }
3223
3224 #[doc(hidden)]
3225 impl gax::options::internal::RequestBuilder for CreateEphemeral {
3226 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3227 &mut self.0.options
3228 }
3229 }
3230
3231 #[derive(Clone, Debug)]
3248 pub struct RescheduleMaintenance(
3249 RequestBuilder<crate::model::SqlInstancesRescheduleMaintenanceRequest>,
3250 );
3251
3252 impl RescheduleMaintenance {
3253 pub(crate) fn new(
3254 stub: std::sync::Arc<dyn super::super::stub::dynamic::SqlInstancesService>,
3255 ) -> Self {
3256 Self(RequestBuilder::new(stub))
3257 }
3258
3259 pub fn with_request<V: Into<crate::model::SqlInstancesRescheduleMaintenanceRequest>>(
3261 mut self,
3262 v: V,
3263 ) -> Self {
3264 self.0.request = v.into();
3265 self
3266 }
3267
3268 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3270 self.0.options = v.into();
3271 self
3272 }
3273
3274 pub async fn send(self) -> Result<crate::model::Operation> {
3276 (*self.0.stub)
3277 .reschedule_maintenance(self.0.request, self.0.options)
3278 .await
3279 .map(gax::response::Response::into_body)
3280 }
3281
3282 pub fn set_instance<T: Into<std::string::String>>(mut self, v: T) -> Self {
3284 self.0.request.instance = v.into();
3285 self
3286 }
3287
3288 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
3290 self.0.request.project = v.into();
3291 self
3292 }
3293
3294 pub fn set_body<
3296 T: Into<std::option::Option<crate::model::SqlInstancesRescheduleMaintenanceRequestBody>>,
3297 >(
3298 mut self,
3299 v: T,
3300 ) -> Self {
3301 self.0.request.body = v.into();
3302 self
3303 }
3304 }
3305
3306 #[doc(hidden)]
3307 impl gax::options::internal::RequestBuilder for RescheduleMaintenance {
3308 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3309 &mut self.0.options
3310 }
3311 }
3312
3313 #[derive(Clone, Debug)]
3330 pub struct VerifyExternalSyncSettings(
3331 RequestBuilder<crate::model::SqlInstancesVerifyExternalSyncSettingsRequest>,
3332 );
3333
3334 impl VerifyExternalSyncSettings {
3335 pub(crate) fn new(
3336 stub: std::sync::Arc<dyn super::super::stub::dynamic::SqlInstancesService>,
3337 ) -> Self {
3338 Self(RequestBuilder::new(stub))
3339 }
3340
3341 pub fn with_request<
3343 V: Into<crate::model::SqlInstancesVerifyExternalSyncSettingsRequest>,
3344 >(
3345 mut self,
3346 v: V,
3347 ) -> Self {
3348 self.0.request = v.into();
3349 self
3350 }
3351
3352 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3354 self.0.options = v.into();
3355 self
3356 }
3357
3358 pub async fn send(
3360 self,
3361 ) -> Result<crate::model::SqlInstancesVerifyExternalSyncSettingsResponse> {
3362 (*self.0.stub)
3363 .verify_external_sync_settings(self.0.request, self.0.options)
3364 .await
3365 .map(gax::response::Response::into_body)
3366 }
3367
3368 pub fn set_instance<T: Into<std::string::String>>(mut self, v: T) -> Self {
3370 self.0.request.instance = v.into();
3371 self
3372 }
3373
3374 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
3376 self.0.request.project = v.into();
3377 self
3378 }
3379
3380 pub fn set_verify_connection_only<T: Into<bool>>(mut self, v: T) -> Self {
3382 self.0.request.verify_connection_only = v.into();
3383 self
3384 }
3385
3386 pub fn set_sync_mode<
3388 T: Into<
3389 crate::model::sql_instances_verify_external_sync_settings_request::ExternalSyncMode,
3390 >,
3391 >(
3392 mut self,
3393 v: T,
3394 ) -> Self {
3395 self.0.request.sync_mode = v.into();
3396 self
3397 }
3398
3399 pub fn set_verify_replication_only<T: Into<bool>>(mut self, v: T) -> Self {
3401 self.0.request.verify_replication_only = v.into();
3402 self
3403 }
3404
3405 pub fn set_migration_type<
3407 T: Into<crate::model::sql_instances_verify_external_sync_settings_request::MigrationType>,
3408 >(
3409 mut self,
3410 v: T,
3411 ) -> Self {
3412 self.0.request.migration_type = v.into();
3413 self
3414 }
3415
3416 pub fn set_sync_parallel_level<T: Into<crate::model::ExternalSyncParallelLevel>>(
3418 mut self,
3419 v: T,
3420 ) -> Self {
3421 self.0.request.sync_parallel_level = v.into();
3422 self
3423 }
3424
3425 pub fn set_sync_config<
3430 T: Into<
3431 Option<
3432 crate::model::sql_instances_verify_external_sync_settings_request::SyncConfig,
3433 >,
3434 >,
3435 >(
3436 mut self,
3437 v: T,
3438 ) -> Self {
3439 self.0.request.sync_config = v.into();
3440 self
3441 }
3442
3443 pub fn set_mysql_sync_config<
3449 T: std::convert::Into<std::boxed::Box<crate::model::MySqlSyncConfig>>,
3450 >(
3451 mut self,
3452 v: T,
3453 ) -> Self {
3454 self.0.request = self.0.request.set_mysql_sync_config(v);
3455 self
3456 }
3457 }
3458
3459 #[doc(hidden)]
3460 impl gax::options::internal::RequestBuilder for VerifyExternalSyncSettings {
3461 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3462 &mut self.0.options
3463 }
3464 }
3465
3466 #[derive(Clone, Debug)]
3483 pub struct StartExternalSync(
3484 RequestBuilder<crate::model::SqlInstancesStartExternalSyncRequest>,
3485 );
3486
3487 impl StartExternalSync {
3488 pub(crate) fn new(
3489 stub: std::sync::Arc<dyn super::super::stub::dynamic::SqlInstancesService>,
3490 ) -> Self {
3491 Self(RequestBuilder::new(stub))
3492 }
3493
3494 pub fn with_request<V: Into<crate::model::SqlInstancesStartExternalSyncRequest>>(
3496 mut self,
3497 v: V,
3498 ) -> Self {
3499 self.0.request = v.into();
3500 self
3501 }
3502
3503 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3505 self.0.options = v.into();
3506 self
3507 }
3508
3509 pub async fn send(self) -> Result<crate::model::Operation> {
3511 (*self.0.stub)
3512 .start_external_sync(self.0.request, self.0.options)
3513 .await
3514 .map(gax::response::Response::into_body)
3515 }
3516
3517 pub fn set_instance<T: Into<std::string::String>>(mut self, v: T) -> Self {
3519 self.0.request.instance = v.into();
3520 self
3521 }
3522
3523 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
3525 self.0.request.project = v.into();
3526 self
3527 }
3528
3529 pub fn set_sync_mode<
3531 T: Into<
3532 crate::model::sql_instances_verify_external_sync_settings_request::ExternalSyncMode,
3533 >,
3534 >(
3535 mut self,
3536 v: T,
3537 ) -> Self {
3538 self.0.request.sync_mode = v.into();
3539 self
3540 }
3541
3542 pub fn set_skip_verification<T: Into<bool>>(mut self, v: T) -> Self {
3544 self.0.request.skip_verification = v.into();
3545 self
3546 }
3547
3548 pub fn set_sync_parallel_level<T: Into<crate::model::ExternalSyncParallelLevel>>(
3550 mut self,
3551 v: T,
3552 ) -> Self {
3553 self.0.request.sync_parallel_level = v.into();
3554 self
3555 }
3556
3557 pub fn set_migration_type<
3559 T: Into<crate::model::sql_instances_verify_external_sync_settings_request::MigrationType>,
3560 >(
3561 mut self,
3562 v: T,
3563 ) -> Self {
3564 self.0.request.migration_type = v.into();
3565 self
3566 }
3567
3568 pub fn set_sync_config<
3573 T: Into<Option<crate::model::sql_instances_start_external_sync_request::SyncConfig>>,
3574 >(
3575 mut self,
3576 v: T,
3577 ) -> Self {
3578 self.0.request.sync_config = v.into();
3579 self
3580 }
3581
3582 pub fn set_mysql_sync_config<
3588 T: std::convert::Into<std::boxed::Box<crate::model::MySqlSyncConfig>>,
3589 >(
3590 mut self,
3591 v: T,
3592 ) -> Self {
3593 self.0.request = self.0.request.set_mysql_sync_config(v);
3594 self
3595 }
3596 }
3597
3598 #[doc(hidden)]
3599 impl gax::options::internal::RequestBuilder for StartExternalSync {
3600 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3601 &mut self.0.options
3602 }
3603 }
3604
3605 #[derive(Clone, Debug)]
3622 pub struct PerformDiskShrink(
3623 RequestBuilder<crate::model::SqlInstancesPerformDiskShrinkRequest>,
3624 );
3625
3626 impl PerformDiskShrink {
3627 pub(crate) fn new(
3628 stub: std::sync::Arc<dyn super::super::stub::dynamic::SqlInstancesService>,
3629 ) -> Self {
3630 Self(RequestBuilder::new(stub))
3631 }
3632
3633 pub fn with_request<V: Into<crate::model::SqlInstancesPerformDiskShrinkRequest>>(
3635 mut self,
3636 v: V,
3637 ) -> Self {
3638 self.0.request = v.into();
3639 self
3640 }
3641
3642 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3644 self.0.options = v.into();
3645 self
3646 }
3647
3648 pub async fn send(self) -> Result<crate::model::Operation> {
3650 (*self.0.stub)
3651 .perform_disk_shrink(self.0.request, self.0.options)
3652 .await
3653 .map(gax::response::Response::into_body)
3654 }
3655
3656 pub fn set_instance<T: Into<std::string::String>>(mut self, v: T) -> Self {
3658 self.0.request.instance = v.into();
3659 self
3660 }
3661
3662 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
3664 self.0.request.project = v.into();
3665 self
3666 }
3667
3668 pub fn set_body<T: Into<std::option::Option<crate::model::PerformDiskShrinkContext>>>(
3670 mut self,
3671 v: T,
3672 ) -> Self {
3673 self.0.request.body = v.into();
3674 self
3675 }
3676 }
3677
3678 #[doc(hidden)]
3679 impl gax::options::internal::RequestBuilder for PerformDiskShrink {
3680 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3681 &mut self.0.options
3682 }
3683 }
3684
3685 #[derive(Clone, Debug)]
3702 pub struct GetDiskShrinkConfig(
3703 RequestBuilder<crate::model::SqlInstancesGetDiskShrinkConfigRequest>,
3704 );
3705
3706 impl GetDiskShrinkConfig {
3707 pub(crate) fn new(
3708 stub: std::sync::Arc<dyn super::super::stub::dynamic::SqlInstancesService>,
3709 ) -> Self {
3710 Self(RequestBuilder::new(stub))
3711 }
3712
3713 pub fn with_request<V: Into<crate::model::SqlInstancesGetDiskShrinkConfigRequest>>(
3715 mut self,
3716 v: V,
3717 ) -> Self {
3718 self.0.request = v.into();
3719 self
3720 }
3721
3722 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3724 self.0.options = v.into();
3725 self
3726 }
3727
3728 pub async fn send(self) -> Result<crate::model::SqlInstancesGetDiskShrinkConfigResponse> {
3730 (*self.0.stub)
3731 .get_disk_shrink_config(self.0.request, self.0.options)
3732 .await
3733 .map(gax::response::Response::into_body)
3734 }
3735
3736 pub fn set_instance<T: Into<std::string::String>>(mut self, v: T) -> Self {
3738 self.0.request.instance = v.into();
3739 self
3740 }
3741
3742 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
3744 self.0.request.project = v.into();
3745 self
3746 }
3747 }
3748
3749 #[doc(hidden)]
3750 impl gax::options::internal::RequestBuilder for GetDiskShrinkConfig {
3751 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3752 &mut self.0.options
3753 }
3754 }
3755
3756 #[derive(Clone, Debug)]
3773 pub struct ResetReplicaSize(RequestBuilder<crate::model::SqlInstancesResetReplicaSizeRequest>);
3774
3775 impl ResetReplicaSize {
3776 pub(crate) fn new(
3777 stub: std::sync::Arc<dyn super::super::stub::dynamic::SqlInstancesService>,
3778 ) -> Self {
3779 Self(RequestBuilder::new(stub))
3780 }
3781
3782 pub fn with_request<V: Into<crate::model::SqlInstancesResetReplicaSizeRequest>>(
3784 mut self,
3785 v: V,
3786 ) -> Self {
3787 self.0.request = v.into();
3788 self
3789 }
3790
3791 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3793 self.0.options = v.into();
3794 self
3795 }
3796
3797 pub async fn send(self) -> Result<crate::model::Operation> {
3799 (*self.0.stub)
3800 .reset_replica_size(self.0.request, self.0.options)
3801 .await
3802 .map(gax::response::Response::into_body)
3803 }
3804
3805 pub fn set_instance<T: Into<std::string::String>>(mut self, v: T) -> Self {
3807 self.0.request.instance = v.into();
3808 self
3809 }
3810
3811 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
3813 self.0.request.project = v.into();
3814 self
3815 }
3816 }
3817
3818 #[doc(hidden)]
3819 impl gax::options::internal::RequestBuilder for ResetReplicaSize {
3820 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3821 &mut self.0.options
3822 }
3823 }
3824
3825 #[derive(Clone, Debug)]
3842 pub struct GetLatestRecoveryTime(
3843 RequestBuilder<crate::model::SqlInstancesGetLatestRecoveryTimeRequest>,
3844 );
3845
3846 impl GetLatestRecoveryTime {
3847 pub(crate) fn new(
3848 stub: std::sync::Arc<dyn super::super::stub::dynamic::SqlInstancesService>,
3849 ) -> Self {
3850 Self(RequestBuilder::new(stub))
3851 }
3852
3853 pub fn with_request<V: Into<crate::model::SqlInstancesGetLatestRecoveryTimeRequest>>(
3855 mut self,
3856 v: V,
3857 ) -> Self {
3858 self.0.request = v.into();
3859 self
3860 }
3861
3862 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3864 self.0.options = v.into();
3865 self
3866 }
3867
3868 pub async fn send(self) -> Result<crate::model::SqlInstancesGetLatestRecoveryTimeResponse> {
3870 (*self.0.stub)
3871 .get_latest_recovery_time(self.0.request, self.0.options)
3872 .await
3873 .map(gax::response::Response::into_body)
3874 }
3875
3876 pub fn set_instance<T: Into<std::string::String>>(mut self, v: T) -> Self {
3878 self.0.request.instance = v.into();
3879 self
3880 }
3881
3882 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
3884 self.0.request.project = v.into();
3885 self
3886 }
3887 }
3888
3889 #[doc(hidden)]
3890 impl gax::options::internal::RequestBuilder for GetLatestRecoveryTime {
3891 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3892 &mut self.0.options
3893 }
3894 }
3895
3896 #[derive(Clone, Debug)]
3913 pub struct AcquireSsrsLease(RequestBuilder<crate::model::SqlInstancesAcquireSsrsLeaseRequest>);
3914
3915 impl AcquireSsrsLease {
3916 pub(crate) fn new(
3917 stub: std::sync::Arc<dyn super::super::stub::dynamic::SqlInstancesService>,
3918 ) -> Self {
3919 Self(RequestBuilder::new(stub))
3920 }
3921
3922 pub fn with_request<V: Into<crate::model::SqlInstancesAcquireSsrsLeaseRequest>>(
3924 mut self,
3925 v: V,
3926 ) -> Self {
3927 self.0.request = v.into();
3928 self
3929 }
3930
3931 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3933 self.0.options = v.into();
3934 self
3935 }
3936
3937 pub async fn send(self) -> Result<crate::model::SqlInstancesAcquireSsrsLeaseResponse> {
3939 (*self.0.stub)
3940 .acquire_ssrs_lease(self.0.request, self.0.options)
3941 .await
3942 .map(gax::response::Response::into_body)
3943 }
3944
3945 pub fn set_instance<T: Into<std::string::String>>(mut self, v: T) -> Self {
3949 self.0.request.instance = v.into();
3950 self
3951 }
3952
3953 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
3957 self.0.request.project = v.into();
3958 self
3959 }
3960
3961 pub fn set_body<
3965 T: Into<std::option::Option<crate::model::InstancesAcquireSsrsLeaseRequest>>,
3966 >(
3967 mut self,
3968 v: T,
3969 ) -> Self {
3970 self.0.request.body = v.into();
3971 self
3972 }
3973 }
3974
3975 #[doc(hidden)]
3976 impl gax::options::internal::RequestBuilder for AcquireSsrsLease {
3977 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3978 &mut self.0.options
3979 }
3980 }
3981
3982 #[derive(Clone, Debug)]
3999 pub struct ReleaseSsrsLease(RequestBuilder<crate::model::SqlInstancesReleaseSsrsLeaseRequest>);
4000
4001 impl ReleaseSsrsLease {
4002 pub(crate) fn new(
4003 stub: std::sync::Arc<dyn super::super::stub::dynamic::SqlInstancesService>,
4004 ) -> Self {
4005 Self(RequestBuilder::new(stub))
4006 }
4007
4008 pub fn with_request<V: Into<crate::model::SqlInstancesReleaseSsrsLeaseRequest>>(
4010 mut self,
4011 v: V,
4012 ) -> Self {
4013 self.0.request = v.into();
4014 self
4015 }
4016
4017 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4019 self.0.options = v.into();
4020 self
4021 }
4022
4023 pub async fn send(self) -> Result<crate::model::SqlInstancesReleaseSsrsLeaseResponse> {
4025 (*self.0.stub)
4026 .release_ssrs_lease(self.0.request, self.0.options)
4027 .await
4028 .map(gax::response::Response::into_body)
4029 }
4030
4031 pub fn set_instance<T: Into<std::string::String>>(mut self, v: T) -> Self {
4035 self.0.request.instance = v.into();
4036 self
4037 }
4038
4039 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
4043 self.0.request.project = v.into();
4044 self
4045 }
4046 }
4047
4048 #[doc(hidden)]
4049 impl gax::options::internal::RequestBuilder for ReleaseSsrsLease {
4050 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4051 &mut self.0.options
4052 }
4053 }
4054}
4055
4056pub mod sql_operations_service {
4057 use crate::Result;
4058
4059 pub type ClientBuilder =
4073 gax::client_builder::ClientBuilder<client::Factory, gaxi::options::Credentials>;
4074
4075 pub(crate) mod client {
4076 use super::super::super::client::SqlOperationsService;
4077 pub struct Factory;
4078 impl gax::client_builder::internal::ClientFactory for Factory {
4079 type Client = SqlOperationsService;
4080 type Credentials = gaxi::options::Credentials;
4081 async fn build(self, config: gaxi::options::ClientConfig) -> gax::Result<Self::Client> {
4082 Self::Client::new(config).await
4083 }
4084 }
4085 }
4086
4087 #[derive(Clone, Debug)]
4089 pub(crate) struct RequestBuilder<R: std::default::Default> {
4090 stub: std::sync::Arc<dyn super::super::stub::dynamic::SqlOperationsService>,
4091 request: R,
4092 options: gax::options::RequestOptions,
4093 }
4094
4095 impl<R> RequestBuilder<R>
4096 where
4097 R: std::default::Default,
4098 {
4099 pub(crate) fn new(
4100 stub: std::sync::Arc<dyn super::super::stub::dynamic::SqlOperationsService>,
4101 ) -> Self {
4102 Self {
4103 stub,
4104 request: R::default(),
4105 options: gax::options::RequestOptions::default(),
4106 }
4107 }
4108 }
4109
4110 #[derive(Clone, Debug)]
4127 pub struct Get(RequestBuilder<crate::model::SqlOperationsGetRequest>);
4128
4129 impl Get {
4130 pub(crate) fn new(
4131 stub: std::sync::Arc<dyn super::super::stub::dynamic::SqlOperationsService>,
4132 ) -> Self {
4133 Self(RequestBuilder::new(stub))
4134 }
4135
4136 pub fn with_request<V: Into<crate::model::SqlOperationsGetRequest>>(
4138 mut self,
4139 v: V,
4140 ) -> Self {
4141 self.0.request = v.into();
4142 self
4143 }
4144
4145 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4147 self.0.options = v.into();
4148 self
4149 }
4150
4151 pub async fn send(self) -> Result<crate::model::Operation> {
4153 (*self.0.stub)
4154 .get(self.0.request, self.0.options)
4155 .await
4156 .map(gax::response::Response::into_body)
4157 }
4158
4159 pub fn set_operation<T: Into<std::string::String>>(mut self, v: T) -> Self {
4161 self.0.request.operation = v.into();
4162 self
4163 }
4164
4165 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
4167 self.0.request.project = v.into();
4168 self
4169 }
4170 }
4171
4172 #[doc(hidden)]
4173 impl gax::options::internal::RequestBuilder for Get {
4174 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4175 &mut self.0.options
4176 }
4177 }
4178
4179 #[derive(Clone, Debug)]
4200 pub struct List(RequestBuilder<crate::model::SqlOperationsListRequest>);
4201
4202 impl List {
4203 pub(crate) fn new(
4204 stub: std::sync::Arc<dyn super::super::stub::dynamic::SqlOperationsService>,
4205 ) -> Self {
4206 Self(RequestBuilder::new(stub))
4207 }
4208
4209 pub fn with_request<V: Into<crate::model::SqlOperationsListRequest>>(
4211 mut self,
4212 v: V,
4213 ) -> Self {
4214 self.0.request = v.into();
4215 self
4216 }
4217
4218 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4220 self.0.options = v.into();
4221 self
4222 }
4223
4224 pub async fn send(self) -> Result<crate::model::OperationsListResponse> {
4226 (*self.0.stub)
4227 .list(self.0.request, self.0.options)
4228 .await
4229 .map(gax::response::Response::into_body)
4230 }
4231
4232 pub fn by_page(
4234 self,
4235 ) -> impl gax::paginator::Paginator<crate::model::OperationsListResponse, gax::error::Error>
4236 {
4237 use std::clone::Clone;
4238 let token = self.0.request.page_token.clone();
4239 let execute = move |token: String| {
4240 let mut builder = self.clone();
4241 builder.0.request = builder.0.request.set_page_token(token);
4242 builder.send()
4243 };
4244 gax::paginator::internal::new_paginator(token, execute)
4245 }
4246
4247 pub fn by_item(
4249 self,
4250 ) -> impl gax::paginator::ItemPaginator<crate::model::OperationsListResponse, gax::error::Error>
4251 {
4252 use gax::paginator::Paginator;
4253 self.by_page().items()
4254 }
4255
4256 pub fn set_instance<T: Into<std::string::String>>(mut self, v: T) -> Self {
4258 self.0.request.instance = v.into();
4259 self
4260 }
4261
4262 pub fn set_max_results<T: Into<u32>>(mut self, v: T) -> Self {
4264 self.0.request.max_results = v.into();
4265 self
4266 }
4267
4268 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
4270 self.0.request.page_token = v.into();
4271 self
4272 }
4273
4274 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
4276 self.0.request.project = v.into();
4277 self
4278 }
4279 }
4280
4281 #[doc(hidden)]
4282 impl gax::options::internal::RequestBuilder for List {
4283 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4284 &mut self.0.options
4285 }
4286 }
4287
4288 #[derive(Clone, Debug)]
4305 pub struct Cancel(RequestBuilder<crate::model::SqlOperationsCancelRequest>);
4306
4307 impl Cancel {
4308 pub(crate) fn new(
4309 stub: std::sync::Arc<dyn super::super::stub::dynamic::SqlOperationsService>,
4310 ) -> Self {
4311 Self(RequestBuilder::new(stub))
4312 }
4313
4314 pub fn with_request<V: Into<crate::model::SqlOperationsCancelRequest>>(
4316 mut self,
4317 v: V,
4318 ) -> Self {
4319 self.0.request = v.into();
4320 self
4321 }
4322
4323 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4325 self.0.options = v.into();
4326 self
4327 }
4328
4329 pub async fn send(self) -> Result<()> {
4331 (*self.0.stub)
4332 .cancel(self.0.request, self.0.options)
4333 .await
4334 .map(gax::response::Response::into_body)
4335 }
4336
4337 pub fn set_operation<T: Into<std::string::String>>(mut self, v: T) -> Self {
4339 self.0.request.operation = v.into();
4340 self
4341 }
4342
4343 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
4345 self.0.request.project = v.into();
4346 self
4347 }
4348 }
4349
4350 #[doc(hidden)]
4351 impl gax::options::internal::RequestBuilder for Cancel {
4352 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4353 &mut self.0.options
4354 }
4355 }
4356}
4357
4358pub mod sql_ssl_certs_service {
4359 use crate::Result;
4360
4361 pub type ClientBuilder =
4375 gax::client_builder::ClientBuilder<client::Factory, gaxi::options::Credentials>;
4376
4377 pub(crate) mod client {
4378 use super::super::super::client::SqlSslCertsService;
4379 pub struct Factory;
4380 impl gax::client_builder::internal::ClientFactory for Factory {
4381 type Client = SqlSslCertsService;
4382 type Credentials = gaxi::options::Credentials;
4383 async fn build(self, config: gaxi::options::ClientConfig) -> gax::Result<Self::Client> {
4384 Self::Client::new(config).await
4385 }
4386 }
4387 }
4388
4389 #[derive(Clone, Debug)]
4391 pub(crate) struct RequestBuilder<R: std::default::Default> {
4392 stub: std::sync::Arc<dyn super::super::stub::dynamic::SqlSslCertsService>,
4393 request: R,
4394 options: gax::options::RequestOptions,
4395 }
4396
4397 impl<R> RequestBuilder<R>
4398 where
4399 R: std::default::Default,
4400 {
4401 pub(crate) fn new(
4402 stub: std::sync::Arc<dyn super::super::stub::dynamic::SqlSslCertsService>,
4403 ) -> Self {
4404 Self {
4405 stub,
4406 request: R::default(),
4407 options: gax::options::RequestOptions::default(),
4408 }
4409 }
4410 }
4411
4412 #[derive(Clone, Debug)]
4429 pub struct Delete(RequestBuilder<crate::model::SqlSslCertsDeleteRequest>);
4430
4431 impl Delete {
4432 pub(crate) fn new(
4433 stub: std::sync::Arc<dyn super::super::stub::dynamic::SqlSslCertsService>,
4434 ) -> Self {
4435 Self(RequestBuilder::new(stub))
4436 }
4437
4438 pub fn with_request<V: Into<crate::model::SqlSslCertsDeleteRequest>>(
4440 mut self,
4441 v: V,
4442 ) -> Self {
4443 self.0.request = v.into();
4444 self
4445 }
4446
4447 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4449 self.0.options = v.into();
4450 self
4451 }
4452
4453 pub async fn send(self) -> Result<crate::model::Operation> {
4455 (*self.0.stub)
4456 .delete(self.0.request, self.0.options)
4457 .await
4458 .map(gax::response::Response::into_body)
4459 }
4460
4461 pub fn set_instance<T: Into<std::string::String>>(mut self, v: T) -> Self {
4463 self.0.request.instance = v.into();
4464 self
4465 }
4466
4467 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
4469 self.0.request.project = v.into();
4470 self
4471 }
4472
4473 pub fn set_sha1_fingerprint<T: Into<std::string::String>>(mut self, v: T) -> Self {
4475 self.0.request.sha1_fingerprint = v.into();
4476 self
4477 }
4478 }
4479
4480 #[doc(hidden)]
4481 impl gax::options::internal::RequestBuilder for Delete {
4482 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4483 &mut self.0.options
4484 }
4485 }
4486
4487 #[derive(Clone, Debug)]
4504 pub struct Get(RequestBuilder<crate::model::SqlSslCertsGetRequest>);
4505
4506 impl Get {
4507 pub(crate) fn new(
4508 stub: std::sync::Arc<dyn super::super::stub::dynamic::SqlSslCertsService>,
4509 ) -> Self {
4510 Self(RequestBuilder::new(stub))
4511 }
4512
4513 pub fn with_request<V: Into<crate::model::SqlSslCertsGetRequest>>(mut self, v: V) -> Self {
4515 self.0.request = v.into();
4516 self
4517 }
4518
4519 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4521 self.0.options = v.into();
4522 self
4523 }
4524
4525 pub async fn send(self) -> Result<crate::model::SslCert> {
4527 (*self.0.stub)
4528 .get(self.0.request, self.0.options)
4529 .await
4530 .map(gax::response::Response::into_body)
4531 }
4532
4533 pub fn set_instance<T: Into<std::string::String>>(mut self, v: T) -> Self {
4535 self.0.request.instance = v.into();
4536 self
4537 }
4538
4539 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
4541 self.0.request.project = v.into();
4542 self
4543 }
4544
4545 pub fn set_sha1_fingerprint<T: Into<std::string::String>>(mut self, v: T) -> Self {
4547 self.0.request.sha1_fingerprint = v.into();
4548 self
4549 }
4550 }
4551
4552 #[doc(hidden)]
4553 impl gax::options::internal::RequestBuilder for Get {
4554 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4555 &mut self.0.options
4556 }
4557 }
4558
4559 #[derive(Clone, Debug)]
4576 pub struct Insert(RequestBuilder<crate::model::SqlSslCertsInsertRequest>);
4577
4578 impl Insert {
4579 pub(crate) fn new(
4580 stub: std::sync::Arc<dyn super::super::stub::dynamic::SqlSslCertsService>,
4581 ) -> Self {
4582 Self(RequestBuilder::new(stub))
4583 }
4584
4585 pub fn with_request<V: Into<crate::model::SqlSslCertsInsertRequest>>(
4587 mut self,
4588 v: V,
4589 ) -> Self {
4590 self.0.request = v.into();
4591 self
4592 }
4593
4594 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4596 self.0.options = v.into();
4597 self
4598 }
4599
4600 pub async fn send(self) -> Result<crate::model::SslCertsInsertResponse> {
4602 (*self.0.stub)
4603 .insert(self.0.request, self.0.options)
4604 .await
4605 .map(gax::response::Response::into_body)
4606 }
4607
4608 pub fn set_instance<T: Into<std::string::String>>(mut self, v: T) -> Self {
4610 self.0.request.instance = v.into();
4611 self
4612 }
4613
4614 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
4616 self.0.request.project = v.into();
4617 self
4618 }
4619
4620 pub fn set_body<T: Into<std::option::Option<crate::model::SslCertsInsertRequest>>>(
4622 mut self,
4623 v: T,
4624 ) -> Self {
4625 self.0.request.body = v.into();
4626 self
4627 }
4628 }
4629
4630 #[doc(hidden)]
4631 impl gax::options::internal::RequestBuilder for Insert {
4632 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4633 &mut self.0.options
4634 }
4635 }
4636
4637 #[derive(Clone, Debug)]
4654 pub struct List(RequestBuilder<crate::model::SqlSslCertsListRequest>);
4655
4656 impl List {
4657 pub(crate) fn new(
4658 stub: std::sync::Arc<dyn super::super::stub::dynamic::SqlSslCertsService>,
4659 ) -> Self {
4660 Self(RequestBuilder::new(stub))
4661 }
4662
4663 pub fn with_request<V: Into<crate::model::SqlSslCertsListRequest>>(mut self, v: V) -> Self {
4665 self.0.request = v.into();
4666 self
4667 }
4668
4669 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4671 self.0.options = v.into();
4672 self
4673 }
4674
4675 pub async fn send(self) -> Result<crate::model::SslCertsListResponse> {
4677 (*self.0.stub)
4678 .list(self.0.request, self.0.options)
4679 .await
4680 .map(gax::response::Response::into_body)
4681 }
4682
4683 pub fn set_instance<T: Into<std::string::String>>(mut self, v: T) -> Self {
4685 self.0.request.instance = v.into();
4686 self
4687 }
4688
4689 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
4691 self.0.request.project = v.into();
4692 self
4693 }
4694 }
4695
4696 #[doc(hidden)]
4697 impl gax::options::internal::RequestBuilder for List {
4698 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4699 &mut self.0.options
4700 }
4701 }
4702}
4703
4704pub mod sql_tiers_service {
4705 use crate::Result;
4706
4707 pub type ClientBuilder =
4721 gax::client_builder::ClientBuilder<client::Factory, gaxi::options::Credentials>;
4722
4723 pub(crate) mod client {
4724 use super::super::super::client::SqlTiersService;
4725 pub struct Factory;
4726 impl gax::client_builder::internal::ClientFactory for Factory {
4727 type Client = SqlTiersService;
4728 type Credentials = gaxi::options::Credentials;
4729 async fn build(self, config: gaxi::options::ClientConfig) -> gax::Result<Self::Client> {
4730 Self::Client::new(config).await
4731 }
4732 }
4733 }
4734
4735 #[derive(Clone, Debug)]
4737 pub(crate) struct RequestBuilder<R: std::default::Default> {
4738 stub: std::sync::Arc<dyn super::super::stub::dynamic::SqlTiersService>,
4739 request: R,
4740 options: gax::options::RequestOptions,
4741 }
4742
4743 impl<R> RequestBuilder<R>
4744 where
4745 R: std::default::Default,
4746 {
4747 pub(crate) fn new(
4748 stub: std::sync::Arc<dyn super::super::stub::dynamic::SqlTiersService>,
4749 ) -> Self {
4750 Self {
4751 stub,
4752 request: R::default(),
4753 options: gax::options::RequestOptions::default(),
4754 }
4755 }
4756 }
4757
4758 #[derive(Clone, Debug)]
4775 pub struct List(RequestBuilder<crate::model::SqlTiersListRequest>);
4776
4777 impl List {
4778 pub(crate) fn new(
4779 stub: std::sync::Arc<dyn super::super::stub::dynamic::SqlTiersService>,
4780 ) -> Self {
4781 Self(RequestBuilder::new(stub))
4782 }
4783
4784 pub fn with_request<V: Into<crate::model::SqlTiersListRequest>>(mut self, v: V) -> Self {
4786 self.0.request = v.into();
4787 self
4788 }
4789
4790 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4792 self.0.options = v.into();
4793 self
4794 }
4795
4796 pub async fn send(self) -> Result<crate::model::TiersListResponse> {
4798 (*self.0.stub)
4799 .list(self.0.request, self.0.options)
4800 .await
4801 .map(gax::response::Response::into_body)
4802 }
4803
4804 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
4806 self.0.request.project = v.into();
4807 self
4808 }
4809 }
4810
4811 #[doc(hidden)]
4812 impl gax::options::internal::RequestBuilder for List {
4813 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4814 &mut self.0.options
4815 }
4816 }
4817}
4818
4819pub mod sql_users_service {
4820 use crate::Result;
4821
4822 pub type ClientBuilder =
4836 gax::client_builder::ClientBuilder<client::Factory, gaxi::options::Credentials>;
4837
4838 pub(crate) mod client {
4839 use super::super::super::client::SqlUsersService;
4840 pub struct Factory;
4841 impl gax::client_builder::internal::ClientFactory for Factory {
4842 type Client = SqlUsersService;
4843 type Credentials = gaxi::options::Credentials;
4844 async fn build(self, config: gaxi::options::ClientConfig) -> gax::Result<Self::Client> {
4845 Self::Client::new(config).await
4846 }
4847 }
4848 }
4849
4850 #[derive(Clone, Debug)]
4852 pub(crate) struct RequestBuilder<R: std::default::Default> {
4853 stub: std::sync::Arc<dyn super::super::stub::dynamic::SqlUsersService>,
4854 request: R,
4855 options: gax::options::RequestOptions,
4856 }
4857
4858 impl<R> RequestBuilder<R>
4859 where
4860 R: std::default::Default,
4861 {
4862 pub(crate) fn new(
4863 stub: std::sync::Arc<dyn super::super::stub::dynamic::SqlUsersService>,
4864 ) -> Self {
4865 Self {
4866 stub,
4867 request: R::default(),
4868 options: gax::options::RequestOptions::default(),
4869 }
4870 }
4871 }
4872
4873 #[derive(Clone, Debug)]
4890 pub struct Delete(RequestBuilder<crate::model::SqlUsersDeleteRequest>);
4891
4892 impl Delete {
4893 pub(crate) fn new(
4894 stub: std::sync::Arc<dyn super::super::stub::dynamic::SqlUsersService>,
4895 ) -> Self {
4896 Self(RequestBuilder::new(stub))
4897 }
4898
4899 pub fn with_request<V: Into<crate::model::SqlUsersDeleteRequest>>(mut self, v: V) -> Self {
4901 self.0.request = v.into();
4902 self
4903 }
4904
4905 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4907 self.0.options = v.into();
4908 self
4909 }
4910
4911 pub async fn send(self) -> Result<crate::model::Operation> {
4913 (*self.0.stub)
4914 .delete(self.0.request, self.0.options)
4915 .await
4916 .map(gax::response::Response::into_body)
4917 }
4918
4919 pub fn set_host<T: Into<std::string::String>>(mut self, v: T) -> Self {
4921 self.0.request.host = v.into();
4922 self
4923 }
4924
4925 pub fn set_instance<T: Into<std::string::String>>(mut self, v: T) -> Self {
4927 self.0.request.instance = v.into();
4928 self
4929 }
4930
4931 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4933 self.0.request.name = v.into();
4934 self
4935 }
4936
4937 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
4939 self.0.request.project = v.into();
4940 self
4941 }
4942 }
4943
4944 #[doc(hidden)]
4945 impl gax::options::internal::RequestBuilder for Delete {
4946 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4947 &mut self.0.options
4948 }
4949 }
4950
4951 #[derive(Clone, Debug)]
4968 pub struct Get(RequestBuilder<crate::model::SqlUsersGetRequest>);
4969
4970 impl Get {
4971 pub(crate) fn new(
4972 stub: std::sync::Arc<dyn super::super::stub::dynamic::SqlUsersService>,
4973 ) -> Self {
4974 Self(RequestBuilder::new(stub))
4975 }
4976
4977 pub fn with_request<V: Into<crate::model::SqlUsersGetRequest>>(mut self, v: V) -> Self {
4979 self.0.request = v.into();
4980 self
4981 }
4982
4983 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4985 self.0.options = v.into();
4986 self
4987 }
4988
4989 pub async fn send(self) -> Result<crate::model::User> {
4991 (*self.0.stub)
4992 .get(self.0.request, self.0.options)
4993 .await
4994 .map(gax::response::Response::into_body)
4995 }
4996
4997 pub fn set_instance<T: Into<std::string::String>>(mut self, v: T) -> Self {
4999 self.0.request.instance = v.into();
5000 self
5001 }
5002
5003 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5005 self.0.request.name = v.into();
5006 self
5007 }
5008
5009 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
5011 self.0.request.project = v.into();
5012 self
5013 }
5014
5015 pub fn set_host<T: Into<std::string::String>>(mut self, v: T) -> Self {
5017 self.0.request.host = v.into();
5018 self
5019 }
5020 }
5021
5022 #[doc(hidden)]
5023 impl gax::options::internal::RequestBuilder for Get {
5024 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5025 &mut self.0.options
5026 }
5027 }
5028
5029 #[derive(Clone, Debug)]
5046 pub struct Insert(RequestBuilder<crate::model::SqlUsersInsertRequest>);
5047
5048 impl Insert {
5049 pub(crate) fn new(
5050 stub: std::sync::Arc<dyn super::super::stub::dynamic::SqlUsersService>,
5051 ) -> Self {
5052 Self(RequestBuilder::new(stub))
5053 }
5054
5055 pub fn with_request<V: Into<crate::model::SqlUsersInsertRequest>>(mut self, v: V) -> Self {
5057 self.0.request = v.into();
5058 self
5059 }
5060
5061 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5063 self.0.options = v.into();
5064 self
5065 }
5066
5067 pub async fn send(self) -> Result<crate::model::Operation> {
5069 (*self.0.stub)
5070 .insert(self.0.request, self.0.options)
5071 .await
5072 .map(gax::response::Response::into_body)
5073 }
5074
5075 pub fn set_instance<T: Into<std::string::String>>(mut self, v: T) -> Self {
5077 self.0.request.instance = v.into();
5078 self
5079 }
5080
5081 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
5083 self.0.request.project = v.into();
5084 self
5085 }
5086
5087 pub fn set_body<T: Into<std::option::Option<crate::model::User>>>(mut self, v: T) -> Self {
5089 self.0.request.body = v.into();
5090 self
5091 }
5092 }
5093
5094 #[doc(hidden)]
5095 impl gax::options::internal::RequestBuilder for Insert {
5096 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5097 &mut self.0.options
5098 }
5099 }
5100
5101 #[derive(Clone, Debug)]
5118 pub struct List(RequestBuilder<crate::model::SqlUsersListRequest>);
5119
5120 impl List {
5121 pub(crate) fn new(
5122 stub: std::sync::Arc<dyn super::super::stub::dynamic::SqlUsersService>,
5123 ) -> Self {
5124 Self(RequestBuilder::new(stub))
5125 }
5126
5127 pub fn with_request<V: Into<crate::model::SqlUsersListRequest>>(mut self, v: V) -> Self {
5129 self.0.request = v.into();
5130 self
5131 }
5132
5133 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5135 self.0.options = v.into();
5136 self
5137 }
5138
5139 pub async fn send(self) -> Result<crate::model::UsersListResponse> {
5141 (*self.0.stub)
5142 .list(self.0.request, self.0.options)
5143 .await
5144 .map(gax::response::Response::into_body)
5145 }
5146
5147 pub fn set_instance<T: Into<std::string::String>>(mut self, v: T) -> Self {
5149 self.0.request.instance = v.into();
5150 self
5151 }
5152
5153 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
5155 self.0.request.project = v.into();
5156 self
5157 }
5158 }
5159
5160 #[doc(hidden)]
5161 impl gax::options::internal::RequestBuilder for List {
5162 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5163 &mut self.0.options
5164 }
5165 }
5166
5167 #[derive(Clone, Debug)]
5184 pub struct Update(RequestBuilder<crate::model::SqlUsersUpdateRequest>);
5185
5186 impl Update {
5187 pub(crate) fn new(
5188 stub: std::sync::Arc<dyn super::super::stub::dynamic::SqlUsersService>,
5189 ) -> Self {
5190 Self(RequestBuilder::new(stub))
5191 }
5192
5193 pub fn with_request<V: Into<crate::model::SqlUsersUpdateRequest>>(mut self, v: V) -> Self {
5195 self.0.request = v.into();
5196 self
5197 }
5198
5199 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5201 self.0.options = v.into();
5202 self
5203 }
5204
5205 pub async fn send(self) -> Result<crate::model::Operation> {
5207 (*self.0.stub)
5208 .update(self.0.request, self.0.options)
5209 .await
5210 .map(gax::response::Response::into_body)
5211 }
5212
5213 pub fn set_host<T: Into<std::string::String>>(mut self, v: T) -> Self {
5215 self.0.request.host = v.into();
5216 self
5217 }
5218
5219 pub fn set_instance<T: Into<std::string::String>>(mut self, v: T) -> Self {
5221 self.0.request.instance = v.into();
5222 self
5223 }
5224
5225 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5227 self.0.request.name = v.into();
5228 self
5229 }
5230
5231 pub fn set_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
5233 self.0.request.project = v.into();
5234 self
5235 }
5236
5237 pub fn set_body<T: Into<std::option::Option<crate::model::User>>>(mut self, v: T) -> Self {
5239 self.0.request.body = v.into();
5240 self
5241 }
5242 }
5243
5244 #[doc(hidden)]
5245 impl gax::options::internal::RequestBuilder for Update {
5246 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5247 &mut self.0.options
5248 }
5249 }
5250}