1pub mod cloud_deploy {
19 use crate::Result;
20
21 pub type ClientBuilder = crate::ClientBuilder<client::Factory, gaxi::options::Credentials>;
35
36 pub(crate) mod client {
37 use super::super::super::client::CloudDeploy;
38 pub struct Factory;
39 impl crate::ClientFactory for Factory {
40 type Client = CloudDeploy;
41 type Credentials = gaxi::options::Credentials;
42 async fn build(
43 self,
44 config: gaxi::options::ClientConfig,
45 ) -> crate::ClientBuilderResult<Self::Client> {
46 Self::Client::new(config).await
47 }
48 }
49 }
50
51 #[derive(Clone, Debug)]
53 pub(crate) struct RequestBuilder<R: std::default::Default> {
54 stub: std::sync::Arc<dyn super::super::stub::dynamic::CloudDeploy>,
55 request: R,
56 options: crate::RequestOptions,
57 }
58
59 impl<R> RequestBuilder<R>
60 where
61 R: std::default::Default,
62 {
63 pub(crate) fn new(
64 stub: std::sync::Arc<dyn super::super::stub::dynamic::CloudDeploy>,
65 ) -> Self {
66 Self {
67 stub,
68 request: R::default(),
69 options: crate::RequestOptions::default(),
70 }
71 }
72 }
73
74 #[derive(Clone, Debug)]
95 pub struct ListDeliveryPipelines(RequestBuilder<crate::model::ListDeliveryPipelinesRequest>);
96
97 impl ListDeliveryPipelines {
98 pub(crate) fn new(
99 stub: std::sync::Arc<dyn super::super::stub::dynamic::CloudDeploy>,
100 ) -> Self {
101 Self(RequestBuilder::new(stub))
102 }
103
104 pub fn with_request<V: Into<crate::model::ListDeliveryPipelinesRequest>>(
106 mut self,
107 v: V,
108 ) -> Self {
109 self.0.request = v.into();
110 self
111 }
112
113 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
115 self.0.options = v.into();
116 self
117 }
118
119 pub async fn send(self) -> Result<crate::model::ListDeliveryPipelinesResponse> {
121 (*self.0.stub)
122 .list_delivery_pipelines(self.0.request, self.0.options)
123 .await
124 .map(crate::Response::into_body)
125 }
126
127 pub fn by_page(
129 self,
130 ) -> impl google_cloud_gax::paginator::Paginator<
131 crate::model::ListDeliveryPipelinesResponse,
132 crate::Error,
133 > {
134 use std::clone::Clone;
135 let token = self.0.request.page_token.clone();
136 let execute = move |token: String| {
137 let mut builder = self.clone();
138 builder.0.request = builder.0.request.set_page_token(token);
139 builder.send()
140 };
141 google_cloud_gax::paginator::internal::new_paginator(token, execute)
142 }
143
144 pub fn by_item(
146 self,
147 ) -> impl google_cloud_gax::paginator::ItemPaginator<
148 crate::model::ListDeliveryPipelinesResponse,
149 crate::Error,
150 > {
151 use google_cloud_gax::paginator::Paginator;
152 self.by_page().items()
153 }
154
155 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
159 self.0.request.parent = v.into();
160 self
161 }
162
163 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
165 self.0.request.page_size = v.into();
166 self
167 }
168
169 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
171 self.0.request.page_token = v.into();
172 self
173 }
174
175 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
177 self.0.request.filter = v.into();
178 self
179 }
180
181 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
183 self.0.request.order_by = v.into();
184 self
185 }
186 }
187
188 #[doc(hidden)]
189 impl crate::RequestBuilder for ListDeliveryPipelines {
190 fn request_options(&mut self) -> &mut crate::RequestOptions {
191 &mut self.0.options
192 }
193 }
194
195 #[derive(Clone, Debug)]
212 pub struct GetDeliveryPipeline(RequestBuilder<crate::model::GetDeliveryPipelineRequest>);
213
214 impl GetDeliveryPipeline {
215 pub(crate) fn new(
216 stub: std::sync::Arc<dyn super::super::stub::dynamic::CloudDeploy>,
217 ) -> Self {
218 Self(RequestBuilder::new(stub))
219 }
220
221 pub fn with_request<V: Into<crate::model::GetDeliveryPipelineRequest>>(
223 mut self,
224 v: V,
225 ) -> Self {
226 self.0.request = v.into();
227 self
228 }
229
230 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
232 self.0.options = v.into();
233 self
234 }
235
236 pub async fn send(self) -> Result<crate::model::DeliveryPipeline> {
238 (*self.0.stub)
239 .get_delivery_pipeline(self.0.request, self.0.options)
240 .await
241 .map(crate::Response::into_body)
242 }
243
244 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
248 self.0.request.name = v.into();
249 self
250 }
251 }
252
253 #[doc(hidden)]
254 impl crate::RequestBuilder for GetDeliveryPipeline {
255 fn request_options(&mut self) -> &mut crate::RequestOptions {
256 &mut self.0.options
257 }
258 }
259
260 #[derive(Clone, Debug)]
278 pub struct CreateDeliveryPipeline(RequestBuilder<crate::model::CreateDeliveryPipelineRequest>);
279
280 impl CreateDeliveryPipeline {
281 pub(crate) fn new(
282 stub: std::sync::Arc<dyn super::super::stub::dynamic::CloudDeploy>,
283 ) -> Self {
284 Self(RequestBuilder::new(stub))
285 }
286
287 pub fn with_request<V: Into<crate::model::CreateDeliveryPipelineRequest>>(
289 mut self,
290 v: V,
291 ) -> Self {
292 self.0.request = v.into();
293 self
294 }
295
296 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
298 self.0.options = v.into();
299 self
300 }
301
302 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
309 (*self.0.stub)
310 .create_delivery_pipeline(self.0.request, self.0.options)
311 .await
312 .map(crate::Response::into_body)
313 }
314
315 pub fn poller(
317 self,
318 ) -> impl google_cloud_lro::Poller<crate::model::DeliveryPipeline, crate::model::OperationMetadata>
319 {
320 type Operation = google_cloud_lro::internal::Operation<
321 crate::model::DeliveryPipeline,
322 crate::model::OperationMetadata,
323 >;
324 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
325 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
326 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
327 if let Some(ref mut details) = poller_options.tracing {
328 details.method_name = "google_cloud_deploy_v1::client::CloudDeploy::create_delivery_pipeline::until_done";
329 }
330
331 let stub = self.0.stub.clone();
332 let mut options = self.0.options.clone();
333 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
334 let query = move |name| {
335 let stub = stub.clone();
336 let options = options.clone();
337 async {
338 let op = GetOperation::new(stub)
339 .set_name(name)
340 .with_options(options)
341 .send()
342 .await?;
343 Ok(Operation::new(op))
344 }
345 };
346
347 let start = move || async {
348 let op = self.send().await?;
349 Ok(Operation::new(op))
350 };
351
352 use google_cloud_lro::internal::PollerExt;
353 {
354 google_cloud_lro::internal::new_poller(
355 polling_error_policy,
356 polling_backoff_policy,
357 start,
358 query,
359 )
360 }
361 .with_options(poller_options)
362 }
363
364 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
368 self.0.request.parent = v.into();
369 self
370 }
371
372 pub fn set_delivery_pipeline_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
376 self.0.request.delivery_pipeline_id = v.into();
377 self
378 }
379
380 pub fn set_delivery_pipeline<T>(mut self, v: T) -> Self
384 where
385 T: std::convert::Into<crate::model::DeliveryPipeline>,
386 {
387 self.0.request.delivery_pipeline = std::option::Option::Some(v.into());
388 self
389 }
390
391 pub fn set_or_clear_delivery_pipeline<T>(mut self, v: std::option::Option<T>) -> Self
395 where
396 T: std::convert::Into<crate::model::DeliveryPipeline>,
397 {
398 self.0.request.delivery_pipeline = v.map(|x| x.into());
399 self
400 }
401
402 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
404 self.0.request.request_id = v.into();
405 self
406 }
407
408 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
410 self.0.request.validate_only = v.into();
411 self
412 }
413 }
414
415 #[doc(hidden)]
416 impl crate::RequestBuilder for CreateDeliveryPipeline {
417 fn request_options(&mut self) -> &mut crate::RequestOptions {
418 &mut self.0.options
419 }
420 }
421
422 #[derive(Clone, Debug)]
440 pub struct UpdateDeliveryPipeline(RequestBuilder<crate::model::UpdateDeliveryPipelineRequest>);
441
442 impl UpdateDeliveryPipeline {
443 pub(crate) fn new(
444 stub: std::sync::Arc<dyn super::super::stub::dynamic::CloudDeploy>,
445 ) -> Self {
446 Self(RequestBuilder::new(stub))
447 }
448
449 pub fn with_request<V: Into<crate::model::UpdateDeliveryPipelineRequest>>(
451 mut self,
452 v: V,
453 ) -> Self {
454 self.0.request = v.into();
455 self
456 }
457
458 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
460 self.0.options = v.into();
461 self
462 }
463
464 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
471 (*self.0.stub)
472 .update_delivery_pipeline(self.0.request, self.0.options)
473 .await
474 .map(crate::Response::into_body)
475 }
476
477 pub fn poller(
479 self,
480 ) -> impl google_cloud_lro::Poller<crate::model::DeliveryPipeline, crate::model::OperationMetadata>
481 {
482 type Operation = google_cloud_lro::internal::Operation<
483 crate::model::DeliveryPipeline,
484 crate::model::OperationMetadata,
485 >;
486 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
487 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
488 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
489 if let Some(ref mut details) = poller_options.tracing {
490 details.method_name = "google_cloud_deploy_v1::client::CloudDeploy::update_delivery_pipeline::until_done";
491 }
492
493 let stub = self.0.stub.clone();
494 let mut options = self.0.options.clone();
495 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
496 let query = move |name| {
497 let stub = stub.clone();
498 let options = options.clone();
499 async {
500 let op = GetOperation::new(stub)
501 .set_name(name)
502 .with_options(options)
503 .send()
504 .await?;
505 Ok(Operation::new(op))
506 }
507 };
508
509 let start = move || async {
510 let op = self.send().await?;
511 Ok(Operation::new(op))
512 };
513
514 use google_cloud_lro::internal::PollerExt;
515 {
516 google_cloud_lro::internal::new_poller(
517 polling_error_policy,
518 polling_backoff_policy,
519 start,
520 query,
521 )
522 }
523 .with_options(poller_options)
524 }
525
526 pub fn set_update_mask<T>(mut self, v: T) -> Self
530 where
531 T: std::convert::Into<wkt::FieldMask>,
532 {
533 self.0.request.update_mask = std::option::Option::Some(v.into());
534 self
535 }
536
537 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
541 where
542 T: std::convert::Into<wkt::FieldMask>,
543 {
544 self.0.request.update_mask = v.map(|x| x.into());
545 self
546 }
547
548 pub fn set_delivery_pipeline<T>(mut self, v: T) -> Self
552 where
553 T: std::convert::Into<crate::model::DeliveryPipeline>,
554 {
555 self.0.request.delivery_pipeline = std::option::Option::Some(v.into());
556 self
557 }
558
559 pub fn set_or_clear_delivery_pipeline<T>(mut self, v: std::option::Option<T>) -> Self
563 where
564 T: std::convert::Into<crate::model::DeliveryPipeline>,
565 {
566 self.0.request.delivery_pipeline = v.map(|x| x.into());
567 self
568 }
569
570 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
572 self.0.request.request_id = v.into();
573 self
574 }
575
576 pub fn set_allow_missing<T: Into<bool>>(mut self, v: T) -> Self {
578 self.0.request.allow_missing = v.into();
579 self
580 }
581
582 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
584 self.0.request.validate_only = v.into();
585 self
586 }
587 }
588
589 #[doc(hidden)]
590 impl crate::RequestBuilder for UpdateDeliveryPipeline {
591 fn request_options(&mut self) -> &mut crate::RequestOptions {
592 &mut self.0.options
593 }
594 }
595
596 #[derive(Clone, Debug)]
614 pub struct DeleteDeliveryPipeline(RequestBuilder<crate::model::DeleteDeliveryPipelineRequest>);
615
616 impl DeleteDeliveryPipeline {
617 pub(crate) fn new(
618 stub: std::sync::Arc<dyn super::super::stub::dynamic::CloudDeploy>,
619 ) -> Self {
620 Self(RequestBuilder::new(stub))
621 }
622
623 pub fn with_request<V: Into<crate::model::DeleteDeliveryPipelineRequest>>(
625 mut self,
626 v: V,
627 ) -> Self {
628 self.0.request = v.into();
629 self
630 }
631
632 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
634 self.0.options = v.into();
635 self
636 }
637
638 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
645 (*self.0.stub)
646 .delete_delivery_pipeline(self.0.request, self.0.options)
647 .await
648 .map(crate::Response::into_body)
649 }
650
651 pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
653 type Operation =
654 google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
655 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
656 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
657 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
658 if let Some(ref mut details) = poller_options.tracing {
659 details.method_name = "google_cloud_deploy_v1::client::CloudDeploy::delete_delivery_pipeline::until_done";
660 }
661
662 let stub = self.0.stub.clone();
663 let mut options = self.0.options.clone();
664 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
665 let query = move |name| {
666 let stub = stub.clone();
667 let options = options.clone();
668 async {
669 let op = GetOperation::new(stub)
670 .set_name(name)
671 .with_options(options)
672 .send()
673 .await?;
674 Ok(Operation::new(op))
675 }
676 };
677
678 let start = move || async {
679 let op = self.send().await?;
680 Ok(Operation::new(op))
681 };
682
683 use google_cloud_lro::internal::PollerExt;
684 {
685 google_cloud_lro::internal::new_unit_response_poller(
686 polling_error_policy,
687 polling_backoff_policy,
688 start,
689 query,
690 )
691 }
692 .with_options(poller_options)
693 }
694
695 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
699 self.0.request.name = v.into();
700 self
701 }
702
703 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
705 self.0.request.request_id = v.into();
706 self
707 }
708
709 pub fn set_allow_missing<T: Into<bool>>(mut self, v: T) -> Self {
711 self.0.request.allow_missing = v.into();
712 self
713 }
714
715 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
717 self.0.request.validate_only = v.into();
718 self
719 }
720
721 pub fn set_force<T: Into<bool>>(mut self, v: T) -> Self {
723 self.0.request.force = v.into();
724 self
725 }
726
727 pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
729 self.0.request.etag = v.into();
730 self
731 }
732 }
733
734 #[doc(hidden)]
735 impl crate::RequestBuilder for DeleteDeliveryPipeline {
736 fn request_options(&mut self) -> &mut crate::RequestOptions {
737 &mut self.0.options
738 }
739 }
740
741 #[derive(Clone, Debug)]
762 pub struct ListTargets(RequestBuilder<crate::model::ListTargetsRequest>);
763
764 impl ListTargets {
765 pub(crate) fn new(
766 stub: std::sync::Arc<dyn super::super::stub::dynamic::CloudDeploy>,
767 ) -> Self {
768 Self(RequestBuilder::new(stub))
769 }
770
771 pub fn with_request<V: Into<crate::model::ListTargetsRequest>>(mut self, v: V) -> Self {
773 self.0.request = v.into();
774 self
775 }
776
777 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
779 self.0.options = v.into();
780 self
781 }
782
783 pub async fn send(self) -> Result<crate::model::ListTargetsResponse> {
785 (*self.0.stub)
786 .list_targets(self.0.request, self.0.options)
787 .await
788 .map(crate::Response::into_body)
789 }
790
791 pub fn by_page(
793 self,
794 ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListTargetsResponse, crate::Error>
795 {
796 use std::clone::Clone;
797 let token = self.0.request.page_token.clone();
798 let execute = move |token: String| {
799 let mut builder = self.clone();
800 builder.0.request = builder.0.request.set_page_token(token);
801 builder.send()
802 };
803 google_cloud_gax::paginator::internal::new_paginator(token, execute)
804 }
805
806 pub fn by_item(
808 self,
809 ) -> impl google_cloud_gax::paginator::ItemPaginator<
810 crate::model::ListTargetsResponse,
811 crate::Error,
812 > {
813 use google_cloud_gax::paginator::Paginator;
814 self.by_page().items()
815 }
816
817 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
821 self.0.request.parent = v.into();
822 self
823 }
824
825 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
827 self.0.request.page_size = v.into();
828 self
829 }
830
831 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
833 self.0.request.page_token = v.into();
834 self
835 }
836
837 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
839 self.0.request.filter = v.into();
840 self
841 }
842
843 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
845 self.0.request.order_by = v.into();
846 self
847 }
848 }
849
850 #[doc(hidden)]
851 impl crate::RequestBuilder for ListTargets {
852 fn request_options(&mut self) -> &mut crate::RequestOptions {
853 &mut self.0.options
854 }
855 }
856
857 #[derive(Clone, Debug)]
874 pub struct RollbackTarget(RequestBuilder<crate::model::RollbackTargetRequest>);
875
876 impl RollbackTarget {
877 pub(crate) fn new(
878 stub: std::sync::Arc<dyn super::super::stub::dynamic::CloudDeploy>,
879 ) -> Self {
880 Self(RequestBuilder::new(stub))
881 }
882
883 pub fn with_request<V: Into<crate::model::RollbackTargetRequest>>(mut self, v: V) -> Self {
885 self.0.request = v.into();
886 self
887 }
888
889 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
891 self.0.options = v.into();
892 self
893 }
894
895 pub async fn send(self) -> Result<crate::model::RollbackTargetResponse> {
897 (*self.0.stub)
898 .rollback_target(self.0.request, self.0.options)
899 .await
900 .map(crate::Response::into_body)
901 }
902
903 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
907 self.0.request.name = v.into();
908 self
909 }
910
911 pub fn set_target_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
915 self.0.request.target_id = v.into();
916 self
917 }
918
919 pub fn set_rollout_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
923 self.0.request.rollout_id = v.into();
924 self
925 }
926
927 pub fn set_release_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
929 self.0.request.release_id = v.into();
930 self
931 }
932
933 pub fn set_rollout_to_roll_back<T: Into<std::string::String>>(mut self, v: T) -> Self {
935 self.0.request.rollout_to_roll_back = v.into();
936 self
937 }
938
939 pub fn set_rollback_config<T>(mut self, v: T) -> Self
941 where
942 T: std::convert::Into<crate::model::RollbackTargetConfig>,
943 {
944 self.0.request.rollback_config = std::option::Option::Some(v.into());
945 self
946 }
947
948 pub fn set_or_clear_rollback_config<T>(mut self, v: std::option::Option<T>) -> Self
950 where
951 T: std::convert::Into<crate::model::RollbackTargetConfig>,
952 {
953 self.0.request.rollback_config = v.map(|x| x.into());
954 self
955 }
956
957 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
959 self.0.request.validate_only = v.into();
960 self
961 }
962
963 pub fn set_override_deploy_policy<T, V>(mut self, v: T) -> Self
965 where
966 T: std::iter::IntoIterator<Item = V>,
967 V: std::convert::Into<std::string::String>,
968 {
969 use std::iter::Iterator;
970 self.0.request.override_deploy_policy = v.into_iter().map(|i| i.into()).collect();
971 self
972 }
973 }
974
975 #[doc(hidden)]
976 impl crate::RequestBuilder for RollbackTarget {
977 fn request_options(&mut self) -> &mut crate::RequestOptions {
978 &mut self.0.options
979 }
980 }
981
982 #[derive(Clone, Debug)]
999 pub struct GetTarget(RequestBuilder<crate::model::GetTargetRequest>);
1000
1001 impl GetTarget {
1002 pub(crate) fn new(
1003 stub: std::sync::Arc<dyn super::super::stub::dynamic::CloudDeploy>,
1004 ) -> Self {
1005 Self(RequestBuilder::new(stub))
1006 }
1007
1008 pub fn with_request<V: Into<crate::model::GetTargetRequest>>(mut self, v: V) -> Self {
1010 self.0.request = v.into();
1011 self
1012 }
1013
1014 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1016 self.0.options = v.into();
1017 self
1018 }
1019
1020 pub async fn send(self) -> Result<crate::model::Target> {
1022 (*self.0.stub)
1023 .get_target(self.0.request, self.0.options)
1024 .await
1025 .map(crate::Response::into_body)
1026 }
1027
1028 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1032 self.0.request.name = v.into();
1033 self
1034 }
1035 }
1036
1037 #[doc(hidden)]
1038 impl crate::RequestBuilder for GetTarget {
1039 fn request_options(&mut self) -> &mut crate::RequestOptions {
1040 &mut self.0.options
1041 }
1042 }
1043
1044 #[derive(Clone, Debug)]
1062 pub struct CreateTarget(RequestBuilder<crate::model::CreateTargetRequest>);
1063
1064 impl CreateTarget {
1065 pub(crate) fn new(
1066 stub: std::sync::Arc<dyn super::super::stub::dynamic::CloudDeploy>,
1067 ) -> Self {
1068 Self(RequestBuilder::new(stub))
1069 }
1070
1071 pub fn with_request<V: Into<crate::model::CreateTargetRequest>>(mut self, v: V) -> Self {
1073 self.0.request = v.into();
1074 self
1075 }
1076
1077 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1079 self.0.options = v.into();
1080 self
1081 }
1082
1083 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
1090 (*self.0.stub)
1091 .create_target(self.0.request, self.0.options)
1092 .await
1093 .map(crate::Response::into_body)
1094 }
1095
1096 pub fn poller(
1098 self,
1099 ) -> impl google_cloud_lro::Poller<crate::model::Target, crate::model::OperationMetadata>
1100 {
1101 type Operation = google_cloud_lro::internal::Operation<
1102 crate::model::Target,
1103 crate::model::OperationMetadata,
1104 >;
1105 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1106 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1107 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
1108 if let Some(ref mut details) = poller_options.tracing {
1109 details.method_name =
1110 "google_cloud_deploy_v1::client::CloudDeploy::create_target::until_done";
1111 }
1112
1113 let stub = self.0.stub.clone();
1114 let mut options = self.0.options.clone();
1115 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
1116 let query = move |name| {
1117 let stub = stub.clone();
1118 let options = options.clone();
1119 async {
1120 let op = GetOperation::new(stub)
1121 .set_name(name)
1122 .with_options(options)
1123 .send()
1124 .await?;
1125 Ok(Operation::new(op))
1126 }
1127 };
1128
1129 let start = move || async {
1130 let op = self.send().await?;
1131 Ok(Operation::new(op))
1132 };
1133
1134 use google_cloud_lro::internal::PollerExt;
1135 {
1136 google_cloud_lro::internal::new_poller(
1137 polling_error_policy,
1138 polling_backoff_policy,
1139 start,
1140 query,
1141 )
1142 }
1143 .with_options(poller_options)
1144 }
1145
1146 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1150 self.0.request.parent = v.into();
1151 self
1152 }
1153
1154 pub fn set_target_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1158 self.0.request.target_id = v.into();
1159 self
1160 }
1161
1162 pub fn set_target<T>(mut self, v: T) -> Self
1166 where
1167 T: std::convert::Into<crate::model::Target>,
1168 {
1169 self.0.request.target = std::option::Option::Some(v.into());
1170 self
1171 }
1172
1173 pub fn set_or_clear_target<T>(mut self, v: std::option::Option<T>) -> Self
1177 where
1178 T: std::convert::Into<crate::model::Target>,
1179 {
1180 self.0.request.target = v.map(|x| x.into());
1181 self
1182 }
1183
1184 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1186 self.0.request.request_id = v.into();
1187 self
1188 }
1189
1190 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
1192 self.0.request.validate_only = v.into();
1193 self
1194 }
1195 }
1196
1197 #[doc(hidden)]
1198 impl crate::RequestBuilder for CreateTarget {
1199 fn request_options(&mut self) -> &mut crate::RequestOptions {
1200 &mut self.0.options
1201 }
1202 }
1203
1204 #[derive(Clone, Debug)]
1222 pub struct UpdateTarget(RequestBuilder<crate::model::UpdateTargetRequest>);
1223
1224 impl UpdateTarget {
1225 pub(crate) fn new(
1226 stub: std::sync::Arc<dyn super::super::stub::dynamic::CloudDeploy>,
1227 ) -> Self {
1228 Self(RequestBuilder::new(stub))
1229 }
1230
1231 pub fn with_request<V: Into<crate::model::UpdateTargetRequest>>(mut self, v: V) -> Self {
1233 self.0.request = v.into();
1234 self
1235 }
1236
1237 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1239 self.0.options = v.into();
1240 self
1241 }
1242
1243 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
1250 (*self.0.stub)
1251 .update_target(self.0.request, self.0.options)
1252 .await
1253 .map(crate::Response::into_body)
1254 }
1255
1256 pub fn poller(
1258 self,
1259 ) -> impl google_cloud_lro::Poller<crate::model::Target, crate::model::OperationMetadata>
1260 {
1261 type Operation = google_cloud_lro::internal::Operation<
1262 crate::model::Target,
1263 crate::model::OperationMetadata,
1264 >;
1265 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1266 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1267 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
1268 if let Some(ref mut details) = poller_options.tracing {
1269 details.method_name =
1270 "google_cloud_deploy_v1::client::CloudDeploy::update_target::until_done";
1271 }
1272
1273 let stub = self.0.stub.clone();
1274 let mut options = self.0.options.clone();
1275 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
1276 let query = move |name| {
1277 let stub = stub.clone();
1278 let options = options.clone();
1279 async {
1280 let op = GetOperation::new(stub)
1281 .set_name(name)
1282 .with_options(options)
1283 .send()
1284 .await?;
1285 Ok(Operation::new(op))
1286 }
1287 };
1288
1289 let start = move || async {
1290 let op = self.send().await?;
1291 Ok(Operation::new(op))
1292 };
1293
1294 use google_cloud_lro::internal::PollerExt;
1295 {
1296 google_cloud_lro::internal::new_poller(
1297 polling_error_policy,
1298 polling_backoff_policy,
1299 start,
1300 query,
1301 )
1302 }
1303 .with_options(poller_options)
1304 }
1305
1306 pub fn set_update_mask<T>(mut self, v: T) -> Self
1310 where
1311 T: std::convert::Into<wkt::FieldMask>,
1312 {
1313 self.0.request.update_mask = std::option::Option::Some(v.into());
1314 self
1315 }
1316
1317 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
1321 where
1322 T: std::convert::Into<wkt::FieldMask>,
1323 {
1324 self.0.request.update_mask = v.map(|x| x.into());
1325 self
1326 }
1327
1328 pub fn set_target<T>(mut self, v: T) -> Self
1332 where
1333 T: std::convert::Into<crate::model::Target>,
1334 {
1335 self.0.request.target = std::option::Option::Some(v.into());
1336 self
1337 }
1338
1339 pub fn set_or_clear_target<T>(mut self, v: std::option::Option<T>) -> Self
1343 where
1344 T: std::convert::Into<crate::model::Target>,
1345 {
1346 self.0.request.target = v.map(|x| x.into());
1347 self
1348 }
1349
1350 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1352 self.0.request.request_id = v.into();
1353 self
1354 }
1355
1356 pub fn set_allow_missing<T: Into<bool>>(mut self, v: T) -> Self {
1358 self.0.request.allow_missing = v.into();
1359 self
1360 }
1361
1362 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
1364 self.0.request.validate_only = v.into();
1365 self
1366 }
1367 }
1368
1369 #[doc(hidden)]
1370 impl crate::RequestBuilder for UpdateTarget {
1371 fn request_options(&mut self) -> &mut crate::RequestOptions {
1372 &mut self.0.options
1373 }
1374 }
1375
1376 #[derive(Clone, Debug)]
1394 pub struct DeleteTarget(RequestBuilder<crate::model::DeleteTargetRequest>);
1395
1396 impl DeleteTarget {
1397 pub(crate) fn new(
1398 stub: std::sync::Arc<dyn super::super::stub::dynamic::CloudDeploy>,
1399 ) -> Self {
1400 Self(RequestBuilder::new(stub))
1401 }
1402
1403 pub fn with_request<V: Into<crate::model::DeleteTargetRequest>>(mut self, v: V) -> Self {
1405 self.0.request = v.into();
1406 self
1407 }
1408
1409 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1411 self.0.options = v.into();
1412 self
1413 }
1414
1415 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
1422 (*self.0.stub)
1423 .delete_target(self.0.request, self.0.options)
1424 .await
1425 .map(crate::Response::into_body)
1426 }
1427
1428 pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
1430 type Operation =
1431 google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
1432 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1433 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1434 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
1435 if let Some(ref mut details) = poller_options.tracing {
1436 details.method_name =
1437 "google_cloud_deploy_v1::client::CloudDeploy::delete_target::until_done";
1438 }
1439
1440 let stub = self.0.stub.clone();
1441 let mut options = self.0.options.clone();
1442 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
1443 let query = move |name| {
1444 let stub = stub.clone();
1445 let options = options.clone();
1446 async {
1447 let op = GetOperation::new(stub)
1448 .set_name(name)
1449 .with_options(options)
1450 .send()
1451 .await?;
1452 Ok(Operation::new(op))
1453 }
1454 };
1455
1456 let start = move || async {
1457 let op = self.send().await?;
1458 Ok(Operation::new(op))
1459 };
1460
1461 use google_cloud_lro::internal::PollerExt;
1462 {
1463 google_cloud_lro::internal::new_unit_response_poller(
1464 polling_error_policy,
1465 polling_backoff_policy,
1466 start,
1467 query,
1468 )
1469 }
1470 .with_options(poller_options)
1471 }
1472
1473 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1477 self.0.request.name = v.into();
1478 self
1479 }
1480
1481 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1483 self.0.request.request_id = v.into();
1484 self
1485 }
1486
1487 pub fn set_allow_missing<T: Into<bool>>(mut self, v: T) -> Self {
1489 self.0.request.allow_missing = v.into();
1490 self
1491 }
1492
1493 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
1495 self.0.request.validate_only = v.into();
1496 self
1497 }
1498
1499 pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
1501 self.0.request.etag = v.into();
1502 self
1503 }
1504 }
1505
1506 #[doc(hidden)]
1507 impl crate::RequestBuilder for DeleteTarget {
1508 fn request_options(&mut self) -> &mut crate::RequestOptions {
1509 &mut self.0.options
1510 }
1511 }
1512
1513 #[derive(Clone, Debug)]
1534 pub struct ListCustomTargetTypes(RequestBuilder<crate::model::ListCustomTargetTypesRequest>);
1535
1536 impl ListCustomTargetTypes {
1537 pub(crate) fn new(
1538 stub: std::sync::Arc<dyn super::super::stub::dynamic::CloudDeploy>,
1539 ) -> Self {
1540 Self(RequestBuilder::new(stub))
1541 }
1542
1543 pub fn with_request<V: Into<crate::model::ListCustomTargetTypesRequest>>(
1545 mut self,
1546 v: V,
1547 ) -> Self {
1548 self.0.request = v.into();
1549 self
1550 }
1551
1552 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1554 self.0.options = v.into();
1555 self
1556 }
1557
1558 pub async fn send(self) -> Result<crate::model::ListCustomTargetTypesResponse> {
1560 (*self.0.stub)
1561 .list_custom_target_types(self.0.request, self.0.options)
1562 .await
1563 .map(crate::Response::into_body)
1564 }
1565
1566 pub fn by_page(
1568 self,
1569 ) -> impl google_cloud_gax::paginator::Paginator<
1570 crate::model::ListCustomTargetTypesResponse,
1571 crate::Error,
1572 > {
1573 use std::clone::Clone;
1574 let token = self.0.request.page_token.clone();
1575 let execute = move |token: String| {
1576 let mut builder = self.clone();
1577 builder.0.request = builder.0.request.set_page_token(token);
1578 builder.send()
1579 };
1580 google_cloud_gax::paginator::internal::new_paginator(token, execute)
1581 }
1582
1583 pub fn by_item(
1585 self,
1586 ) -> impl google_cloud_gax::paginator::ItemPaginator<
1587 crate::model::ListCustomTargetTypesResponse,
1588 crate::Error,
1589 > {
1590 use google_cloud_gax::paginator::Paginator;
1591 self.by_page().items()
1592 }
1593
1594 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1598 self.0.request.parent = v.into();
1599 self
1600 }
1601
1602 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1604 self.0.request.page_size = v.into();
1605 self
1606 }
1607
1608 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1610 self.0.request.page_token = v.into();
1611 self
1612 }
1613
1614 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
1616 self.0.request.filter = v.into();
1617 self
1618 }
1619
1620 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
1622 self.0.request.order_by = v.into();
1623 self
1624 }
1625 }
1626
1627 #[doc(hidden)]
1628 impl crate::RequestBuilder for ListCustomTargetTypes {
1629 fn request_options(&mut self) -> &mut crate::RequestOptions {
1630 &mut self.0.options
1631 }
1632 }
1633
1634 #[derive(Clone, Debug)]
1651 pub struct GetCustomTargetType(RequestBuilder<crate::model::GetCustomTargetTypeRequest>);
1652
1653 impl GetCustomTargetType {
1654 pub(crate) fn new(
1655 stub: std::sync::Arc<dyn super::super::stub::dynamic::CloudDeploy>,
1656 ) -> Self {
1657 Self(RequestBuilder::new(stub))
1658 }
1659
1660 pub fn with_request<V: Into<crate::model::GetCustomTargetTypeRequest>>(
1662 mut self,
1663 v: V,
1664 ) -> Self {
1665 self.0.request = v.into();
1666 self
1667 }
1668
1669 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1671 self.0.options = v.into();
1672 self
1673 }
1674
1675 pub async fn send(self) -> Result<crate::model::CustomTargetType> {
1677 (*self.0.stub)
1678 .get_custom_target_type(self.0.request, self.0.options)
1679 .await
1680 .map(crate::Response::into_body)
1681 }
1682
1683 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1687 self.0.request.name = v.into();
1688 self
1689 }
1690 }
1691
1692 #[doc(hidden)]
1693 impl crate::RequestBuilder for GetCustomTargetType {
1694 fn request_options(&mut self) -> &mut crate::RequestOptions {
1695 &mut self.0.options
1696 }
1697 }
1698
1699 #[derive(Clone, Debug)]
1717 pub struct CreateCustomTargetType(RequestBuilder<crate::model::CreateCustomTargetTypeRequest>);
1718
1719 impl CreateCustomTargetType {
1720 pub(crate) fn new(
1721 stub: std::sync::Arc<dyn super::super::stub::dynamic::CloudDeploy>,
1722 ) -> Self {
1723 Self(RequestBuilder::new(stub))
1724 }
1725
1726 pub fn with_request<V: Into<crate::model::CreateCustomTargetTypeRequest>>(
1728 mut self,
1729 v: V,
1730 ) -> Self {
1731 self.0.request = v.into();
1732 self
1733 }
1734
1735 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1737 self.0.options = v.into();
1738 self
1739 }
1740
1741 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
1748 (*self.0.stub)
1749 .create_custom_target_type(self.0.request, self.0.options)
1750 .await
1751 .map(crate::Response::into_body)
1752 }
1753
1754 pub fn poller(
1756 self,
1757 ) -> impl google_cloud_lro::Poller<crate::model::CustomTargetType, crate::model::OperationMetadata>
1758 {
1759 type Operation = google_cloud_lro::internal::Operation<
1760 crate::model::CustomTargetType,
1761 crate::model::OperationMetadata,
1762 >;
1763 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1764 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1765 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
1766 if let Some(ref mut details) = poller_options.tracing {
1767 details.method_name = "google_cloud_deploy_v1::client::CloudDeploy::create_custom_target_type::until_done";
1768 }
1769
1770 let stub = self.0.stub.clone();
1771 let mut options = self.0.options.clone();
1772 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
1773 let query = move |name| {
1774 let stub = stub.clone();
1775 let options = options.clone();
1776 async {
1777 let op = GetOperation::new(stub)
1778 .set_name(name)
1779 .with_options(options)
1780 .send()
1781 .await?;
1782 Ok(Operation::new(op))
1783 }
1784 };
1785
1786 let start = move || async {
1787 let op = self.send().await?;
1788 Ok(Operation::new(op))
1789 };
1790
1791 use google_cloud_lro::internal::PollerExt;
1792 {
1793 google_cloud_lro::internal::new_poller(
1794 polling_error_policy,
1795 polling_backoff_policy,
1796 start,
1797 query,
1798 )
1799 }
1800 .with_options(poller_options)
1801 }
1802
1803 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1807 self.0.request.parent = v.into();
1808 self
1809 }
1810
1811 pub fn set_custom_target_type_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1815 self.0.request.custom_target_type_id = v.into();
1816 self
1817 }
1818
1819 pub fn set_custom_target_type<T>(mut self, v: T) -> Self
1823 where
1824 T: std::convert::Into<crate::model::CustomTargetType>,
1825 {
1826 self.0.request.custom_target_type = std::option::Option::Some(v.into());
1827 self
1828 }
1829
1830 pub fn set_or_clear_custom_target_type<T>(mut self, v: std::option::Option<T>) -> Self
1834 where
1835 T: std::convert::Into<crate::model::CustomTargetType>,
1836 {
1837 self.0.request.custom_target_type = v.map(|x| x.into());
1838 self
1839 }
1840
1841 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1843 self.0.request.request_id = v.into();
1844 self
1845 }
1846
1847 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
1849 self.0.request.validate_only = v.into();
1850 self
1851 }
1852 }
1853
1854 #[doc(hidden)]
1855 impl crate::RequestBuilder for CreateCustomTargetType {
1856 fn request_options(&mut self) -> &mut crate::RequestOptions {
1857 &mut self.0.options
1858 }
1859 }
1860
1861 #[derive(Clone, Debug)]
1879 pub struct UpdateCustomTargetType(RequestBuilder<crate::model::UpdateCustomTargetTypeRequest>);
1880
1881 impl UpdateCustomTargetType {
1882 pub(crate) fn new(
1883 stub: std::sync::Arc<dyn super::super::stub::dynamic::CloudDeploy>,
1884 ) -> Self {
1885 Self(RequestBuilder::new(stub))
1886 }
1887
1888 pub fn with_request<V: Into<crate::model::UpdateCustomTargetTypeRequest>>(
1890 mut self,
1891 v: V,
1892 ) -> Self {
1893 self.0.request = v.into();
1894 self
1895 }
1896
1897 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1899 self.0.options = v.into();
1900 self
1901 }
1902
1903 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
1910 (*self.0.stub)
1911 .update_custom_target_type(self.0.request, self.0.options)
1912 .await
1913 .map(crate::Response::into_body)
1914 }
1915
1916 pub fn poller(
1918 self,
1919 ) -> impl google_cloud_lro::Poller<crate::model::CustomTargetType, crate::model::OperationMetadata>
1920 {
1921 type Operation = google_cloud_lro::internal::Operation<
1922 crate::model::CustomTargetType,
1923 crate::model::OperationMetadata,
1924 >;
1925 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1926 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1927 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
1928 if let Some(ref mut details) = poller_options.tracing {
1929 details.method_name = "google_cloud_deploy_v1::client::CloudDeploy::update_custom_target_type::until_done";
1930 }
1931
1932 let stub = self.0.stub.clone();
1933 let mut options = self.0.options.clone();
1934 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
1935 let query = move |name| {
1936 let stub = stub.clone();
1937 let options = options.clone();
1938 async {
1939 let op = GetOperation::new(stub)
1940 .set_name(name)
1941 .with_options(options)
1942 .send()
1943 .await?;
1944 Ok(Operation::new(op))
1945 }
1946 };
1947
1948 let start = move || async {
1949 let op = self.send().await?;
1950 Ok(Operation::new(op))
1951 };
1952
1953 use google_cloud_lro::internal::PollerExt;
1954 {
1955 google_cloud_lro::internal::new_poller(
1956 polling_error_policy,
1957 polling_backoff_policy,
1958 start,
1959 query,
1960 )
1961 }
1962 .with_options(poller_options)
1963 }
1964
1965 pub fn set_update_mask<T>(mut self, v: T) -> Self
1969 where
1970 T: std::convert::Into<wkt::FieldMask>,
1971 {
1972 self.0.request.update_mask = std::option::Option::Some(v.into());
1973 self
1974 }
1975
1976 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
1980 where
1981 T: std::convert::Into<wkt::FieldMask>,
1982 {
1983 self.0.request.update_mask = v.map(|x| x.into());
1984 self
1985 }
1986
1987 pub fn set_custom_target_type<T>(mut self, v: T) -> Self
1991 where
1992 T: std::convert::Into<crate::model::CustomTargetType>,
1993 {
1994 self.0.request.custom_target_type = std::option::Option::Some(v.into());
1995 self
1996 }
1997
1998 pub fn set_or_clear_custom_target_type<T>(mut self, v: std::option::Option<T>) -> Self
2002 where
2003 T: std::convert::Into<crate::model::CustomTargetType>,
2004 {
2005 self.0.request.custom_target_type = v.map(|x| x.into());
2006 self
2007 }
2008
2009 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2011 self.0.request.request_id = v.into();
2012 self
2013 }
2014
2015 pub fn set_allow_missing<T: Into<bool>>(mut self, v: T) -> Self {
2017 self.0.request.allow_missing = v.into();
2018 self
2019 }
2020
2021 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
2023 self.0.request.validate_only = v.into();
2024 self
2025 }
2026 }
2027
2028 #[doc(hidden)]
2029 impl crate::RequestBuilder for UpdateCustomTargetType {
2030 fn request_options(&mut self) -> &mut crate::RequestOptions {
2031 &mut self.0.options
2032 }
2033 }
2034
2035 #[derive(Clone, Debug)]
2053 pub struct DeleteCustomTargetType(RequestBuilder<crate::model::DeleteCustomTargetTypeRequest>);
2054
2055 impl DeleteCustomTargetType {
2056 pub(crate) fn new(
2057 stub: std::sync::Arc<dyn super::super::stub::dynamic::CloudDeploy>,
2058 ) -> Self {
2059 Self(RequestBuilder::new(stub))
2060 }
2061
2062 pub fn with_request<V: Into<crate::model::DeleteCustomTargetTypeRequest>>(
2064 mut self,
2065 v: V,
2066 ) -> Self {
2067 self.0.request = v.into();
2068 self
2069 }
2070
2071 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2073 self.0.options = v.into();
2074 self
2075 }
2076
2077 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
2084 (*self.0.stub)
2085 .delete_custom_target_type(self.0.request, self.0.options)
2086 .await
2087 .map(crate::Response::into_body)
2088 }
2089
2090 pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
2092 type Operation =
2093 google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
2094 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2095 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2096 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
2097 if let Some(ref mut details) = poller_options.tracing {
2098 details.method_name = "google_cloud_deploy_v1::client::CloudDeploy::delete_custom_target_type::until_done";
2099 }
2100
2101 let stub = self.0.stub.clone();
2102 let mut options = self.0.options.clone();
2103 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
2104 let query = move |name| {
2105 let stub = stub.clone();
2106 let options = options.clone();
2107 async {
2108 let op = GetOperation::new(stub)
2109 .set_name(name)
2110 .with_options(options)
2111 .send()
2112 .await?;
2113 Ok(Operation::new(op))
2114 }
2115 };
2116
2117 let start = move || async {
2118 let op = self.send().await?;
2119 Ok(Operation::new(op))
2120 };
2121
2122 use google_cloud_lro::internal::PollerExt;
2123 {
2124 google_cloud_lro::internal::new_unit_response_poller(
2125 polling_error_policy,
2126 polling_backoff_policy,
2127 start,
2128 query,
2129 )
2130 }
2131 .with_options(poller_options)
2132 }
2133
2134 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2138 self.0.request.name = v.into();
2139 self
2140 }
2141
2142 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2144 self.0.request.request_id = v.into();
2145 self
2146 }
2147
2148 pub fn set_allow_missing<T: Into<bool>>(mut self, v: T) -> Self {
2150 self.0.request.allow_missing = v.into();
2151 self
2152 }
2153
2154 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
2156 self.0.request.validate_only = v.into();
2157 self
2158 }
2159
2160 pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
2162 self.0.request.etag = v.into();
2163 self
2164 }
2165 }
2166
2167 #[doc(hidden)]
2168 impl crate::RequestBuilder for DeleteCustomTargetType {
2169 fn request_options(&mut self) -> &mut crate::RequestOptions {
2170 &mut self.0.options
2171 }
2172 }
2173
2174 #[derive(Clone, Debug)]
2195 pub struct ListReleases(RequestBuilder<crate::model::ListReleasesRequest>);
2196
2197 impl ListReleases {
2198 pub(crate) fn new(
2199 stub: std::sync::Arc<dyn super::super::stub::dynamic::CloudDeploy>,
2200 ) -> Self {
2201 Self(RequestBuilder::new(stub))
2202 }
2203
2204 pub fn with_request<V: Into<crate::model::ListReleasesRequest>>(mut self, v: V) -> Self {
2206 self.0.request = v.into();
2207 self
2208 }
2209
2210 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2212 self.0.options = v.into();
2213 self
2214 }
2215
2216 pub async fn send(self) -> Result<crate::model::ListReleasesResponse> {
2218 (*self.0.stub)
2219 .list_releases(self.0.request, self.0.options)
2220 .await
2221 .map(crate::Response::into_body)
2222 }
2223
2224 pub fn by_page(
2226 self,
2227 ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListReleasesResponse, crate::Error>
2228 {
2229 use std::clone::Clone;
2230 let token = self.0.request.page_token.clone();
2231 let execute = move |token: String| {
2232 let mut builder = self.clone();
2233 builder.0.request = builder.0.request.set_page_token(token);
2234 builder.send()
2235 };
2236 google_cloud_gax::paginator::internal::new_paginator(token, execute)
2237 }
2238
2239 pub fn by_item(
2241 self,
2242 ) -> impl google_cloud_gax::paginator::ItemPaginator<
2243 crate::model::ListReleasesResponse,
2244 crate::Error,
2245 > {
2246 use google_cloud_gax::paginator::Paginator;
2247 self.by_page().items()
2248 }
2249
2250 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2254 self.0.request.parent = v.into();
2255 self
2256 }
2257
2258 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2260 self.0.request.page_size = v.into();
2261 self
2262 }
2263
2264 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2266 self.0.request.page_token = v.into();
2267 self
2268 }
2269
2270 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
2272 self.0.request.filter = v.into();
2273 self
2274 }
2275
2276 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
2278 self.0.request.order_by = v.into();
2279 self
2280 }
2281 }
2282
2283 #[doc(hidden)]
2284 impl crate::RequestBuilder for ListReleases {
2285 fn request_options(&mut self) -> &mut crate::RequestOptions {
2286 &mut self.0.options
2287 }
2288 }
2289
2290 #[derive(Clone, Debug)]
2307 pub struct GetRelease(RequestBuilder<crate::model::GetReleaseRequest>);
2308
2309 impl GetRelease {
2310 pub(crate) fn new(
2311 stub: std::sync::Arc<dyn super::super::stub::dynamic::CloudDeploy>,
2312 ) -> Self {
2313 Self(RequestBuilder::new(stub))
2314 }
2315
2316 pub fn with_request<V: Into<crate::model::GetReleaseRequest>>(mut self, v: V) -> Self {
2318 self.0.request = v.into();
2319 self
2320 }
2321
2322 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2324 self.0.options = v.into();
2325 self
2326 }
2327
2328 pub async fn send(self) -> Result<crate::model::Release> {
2330 (*self.0.stub)
2331 .get_release(self.0.request, self.0.options)
2332 .await
2333 .map(crate::Response::into_body)
2334 }
2335
2336 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2340 self.0.request.name = v.into();
2341 self
2342 }
2343 }
2344
2345 #[doc(hidden)]
2346 impl crate::RequestBuilder for GetRelease {
2347 fn request_options(&mut self) -> &mut crate::RequestOptions {
2348 &mut self.0.options
2349 }
2350 }
2351
2352 #[derive(Clone, Debug)]
2370 pub struct CreateRelease(RequestBuilder<crate::model::CreateReleaseRequest>);
2371
2372 impl CreateRelease {
2373 pub(crate) fn new(
2374 stub: std::sync::Arc<dyn super::super::stub::dynamic::CloudDeploy>,
2375 ) -> Self {
2376 Self(RequestBuilder::new(stub))
2377 }
2378
2379 pub fn with_request<V: Into<crate::model::CreateReleaseRequest>>(mut self, v: V) -> Self {
2381 self.0.request = v.into();
2382 self
2383 }
2384
2385 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2387 self.0.options = v.into();
2388 self
2389 }
2390
2391 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
2398 (*self.0.stub)
2399 .create_release(self.0.request, self.0.options)
2400 .await
2401 .map(crate::Response::into_body)
2402 }
2403
2404 pub fn poller(
2406 self,
2407 ) -> impl google_cloud_lro::Poller<crate::model::Release, crate::model::OperationMetadata>
2408 {
2409 type Operation = google_cloud_lro::internal::Operation<
2410 crate::model::Release,
2411 crate::model::OperationMetadata,
2412 >;
2413 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2414 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2415 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
2416 if let Some(ref mut details) = poller_options.tracing {
2417 details.method_name =
2418 "google_cloud_deploy_v1::client::CloudDeploy::create_release::until_done";
2419 }
2420
2421 let stub = self.0.stub.clone();
2422 let mut options = self.0.options.clone();
2423 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
2424 let query = move |name| {
2425 let stub = stub.clone();
2426 let options = options.clone();
2427 async {
2428 let op = GetOperation::new(stub)
2429 .set_name(name)
2430 .with_options(options)
2431 .send()
2432 .await?;
2433 Ok(Operation::new(op))
2434 }
2435 };
2436
2437 let start = move || async {
2438 let op = self.send().await?;
2439 Ok(Operation::new(op))
2440 };
2441
2442 use google_cloud_lro::internal::PollerExt;
2443 {
2444 google_cloud_lro::internal::new_poller(
2445 polling_error_policy,
2446 polling_backoff_policy,
2447 start,
2448 query,
2449 )
2450 }
2451 .with_options(poller_options)
2452 }
2453
2454 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2458 self.0.request.parent = v.into();
2459 self
2460 }
2461
2462 pub fn set_release_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2466 self.0.request.release_id = v.into();
2467 self
2468 }
2469
2470 pub fn set_release<T>(mut self, v: T) -> Self
2474 where
2475 T: std::convert::Into<crate::model::Release>,
2476 {
2477 self.0.request.release = std::option::Option::Some(v.into());
2478 self
2479 }
2480
2481 pub fn set_or_clear_release<T>(mut self, v: std::option::Option<T>) -> Self
2485 where
2486 T: std::convert::Into<crate::model::Release>,
2487 {
2488 self.0.request.release = v.map(|x| x.into());
2489 self
2490 }
2491
2492 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2494 self.0.request.request_id = v.into();
2495 self
2496 }
2497
2498 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
2500 self.0.request.validate_only = v.into();
2501 self
2502 }
2503
2504 pub fn set_override_deploy_policy<T, V>(mut self, v: T) -> Self
2506 where
2507 T: std::iter::IntoIterator<Item = V>,
2508 V: std::convert::Into<std::string::String>,
2509 {
2510 use std::iter::Iterator;
2511 self.0.request.override_deploy_policy = v.into_iter().map(|i| i.into()).collect();
2512 self
2513 }
2514 }
2515
2516 #[doc(hidden)]
2517 impl crate::RequestBuilder for CreateRelease {
2518 fn request_options(&mut self) -> &mut crate::RequestOptions {
2519 &mut self.0.options
2520 }
2521 }
2522
2523 #[derive(Clone, Debug)]
2540 pub struct AbandonRelease(RequestBuilder<crate::model::AbandonReleaseRequest>);
2541
2542 impl AbandonRelease {
2543 pub(crate) fn new(
2544 stub: std::sync::Arc<dyn super::super::stub::dynamic::CloudDeploy>,
2545 ) -> Self {
2546 Self(RequestBuilder::new(stub))
2547 }
2548
2549 pub fn with_request<V: Into<crate::model::AbandonReleaseRequest>>(mut self, v: V) -> Self {
2551 self.0.request = v.into();
2552 self
2553 }
2554
2555 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2557 self.0.options = v.into();
2558 self
2559 }
2560
2561 pub async fn send(self) -> Result<crate::model::AbandonReleaseResponse> {
2563 (*self.0.stub)
2564 .abandon_release(self.0.request, self.0.options)
2565 .await
2566 .map(crate::Response::into_body)
2567 }
2568
2569 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2573 self.0.request.name = v.into();
2574 self
2575 }
2576 }
2577
2578 #[doc(hidden)]
2579 impl crate::RequestBuilder for AbandonRelease {
2580 fn request_options(&mut self) -> &mut crate::RequestOptions {
2581 &mut self.0.options
2582 }
2583 }
2584
2585 #[derive(Clone, Debug)]
2603 pub struct CreateDeployPolicy(RequestBuilder<crate::model::CreateDeployPolicyRequest>);
2604
2605 impl CreateDeployPolicy {
2606 pub(crate) fn new(
2607 stub: std::sync::Arc<dyn super::super::stub::dynamic::CloudDeploy>,
2608 ) -> Self {
2609 Self(RequestBuilder::new(stub))
2610 }
2611
2612 pub fn with_request<V: Into<crate::model::CreateDeployPolicyRequest>>(
2614 mut self,
2615 v: V,
2616 ) -> Self {
2617 self.0.request = v.into();
2618 self
2619 }
2620
2621 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2623 self.0.options = v.into();
2624 self
2625 }
2626
2627 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
2634 (*self.0.stub)
2635 .create_deploy_policy(self.0.request, self.0.options)
2636 .await
2637 .map(crate::Response::into_body)
2638 }
2639
2640 pub fn poller(
2642 self,
2643 ) -> impl google_cloud_lro::Poller<crate::model::DeployPolicy, crate::model::OperationMetadata>
2644 {
2645 type Operation = google_cloud_lro::internal::Operation<
2646 crate::model::DeployPolicy,
2647 crate::model::OperationMetadata,
2648 >;
2649 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2650 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2651 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
2652 if let Some(ref mut details) = poller_options.tracing {
2653 details.method_name =
2654 "google_cloud_deploy_v1::client::CloudDeploy::create_deploy_policy::until_done";
2655 }
2656
2657 let stub = self.0.stub.clone();
2658 let mut options = self.0.options.clone();
2659 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
2660 let query = move |name| {
2661 let stub = stub.clone();
2662 let options = options.clone();
2663 async {
2664 let op = GetOperation::new(stub)
2665 .set_name(name)
2666 .with_options(options)
2667 .send()
2668 .await?;
2669 Ok(Operation::new(op))
2670 }
2671 };
2672
2673 let start = move || async {
2674 let op = self.send().await?;
2675 Ok(Operation::new(op))
2676 };
2677
2678 use google_cloud_lro::internal::PollerExt;
2679 {
2680 google_cloud_lro::internal::new_poller(
2681 polling_error_policy,
2682 polling_backoff_policy,
2683 start,
2684 query,
2685 )
2686 }
2687 .with_options(poller_options)
2688 }
2689
2690 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2694 self.0.request.parent = v.into();
2695 self
2696 }
2697
2698 pub fn set_deploy_policy_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2702 self.0.request.deploy_policy_id = v.into();
2703 self
2704 }
2705
2706 pub fn set_deploy_policy<T>(mut self, v: T) -> Self
2710 where
2711 T: std::convert::Into<crate::model::DeployPolicy>,
2712 {
2713 self.0.request.deploy_policy = std::option::Option::Some(v.into());
2714 self
2715 }
2716
2717 pub fn set_or_clear_deploy_policy<T>(mut self, v: std::option::Option<T>) -> Self
2721 where
2722 T: std::convert::Into<crate::model::DeployPolicy>,
2723 {
2724 self.0.request.deploy_policy = v.map(|x| x.into());
2725 self
2726 }
2727
2728 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2730 self.0.request.request_id = v.into();
2731 self
2732 }
2733
2734 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
2736 self.0.request.validate_only = v.into();
2737 self
2738 }
2739 }
2740
2741 #[doc(hidden)]
2742 impl crate::RequestBuilder for CreateDeployPolicy {
2743 fn request_options(&mut self) -> &mut crate::RequestOptions {
2744 &mut self.0.options
2745 }
2746 }
2747
2748 #[derive(Clone, Debug)]
2766 pub struct UpdateDeployPolicy(RequestBuilder<crate::model::UpdateDeployPolicyRequest>);
2767
2768 impl UpdateDeployPolicy {
2769 pub(crate) fn new(
2770 stub: std::sync::Arc<dyn super::super::stub::dynamic::CloudDeploy>,
2771 ) -> Self {
2772 Self(RequestBuilder::new(stub))
2773 }
2774
2775 pub fn with_request<V: Into<crate::model::UpdateDeployPolicyRequest>>(
2777 mut self,
2778 v: V,
2779 ) -> Self {
2780 self.0.request = v.into();
2781 self
2782 }
2783
2784 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2786 self.0.options = v.into();
2787 self
2788 }
2789
2790 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
2797 (*self.0.stub)
2798 .update_deploy_policy(self.0.request, self.0.options)
2799 .await
2800 .map(crate::Response::into_body)
2801 }
2802
2803 pub fn poller(
2805 self,
2806 ) -> impl google_cloud_lro::Poller<crate::model::DeployPolicy, crate::model::OperationMetadata>
2807 {
2808 type Operation = google_cloud_lro::internal::Operation<
2809 crate::model::DeployPolicy,
2810 crate::model::OperationMetadata,
2811 >;
2812 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2813 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2814 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
2815 if let Some(ref mut details) = poller_options.tracing {
2816 details.method_name =
2817 "google_cloud_deploy_v1::client::CloudDeploy::update_deploy_policy::until_done";
2818 }
2819
2820 let stub = self.0.stub.clone();
2821 let mut options = self.0.options.clone();
2822 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
2823 let query = move |name| {
2824 let stub = stub.clone();
2825 let options = options.clone();
2826 async {
2827 let op = GetOperation::new(stub)
2828 .set_name(name)
2829 .with_options(options)
2830 .send()
2831 .await?;
2832 Ok(Operation::new(op))
2833 }
2834 };
2835
2836 let start = move || async {
2837 let op = self.send().await?;
2838 Ok(Operation::new(op))
2839 };
2840
2841 use google_cloud_lro::internal::PollerExt;
2842 {
2843 google_cloud_lro::internal::new_poller(
2844 polling_error_policy,
2845 polling_backoff_policy,
2846 start,
2847 query,
2848 )
2849 }
2850 .with_options(poller_options)
2851 }
2852
2853 pub fn set_update_mask<T>(mut self, v: T) -> Self
2857 where
2858 T: std::convert::Into<wkt::FieldMask>,
2859 {
2860 self.0.request.update_mask = std::option::Option::Some(v.into());
2861 self
2862 }
2863
2864 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
2868 where
2869 T: std::convert::Into<wkt::FieldMask>,
2870 {
2871 self.0.request.update_mask = v.map(|x| x.into());
2872 self
2873 }
2874
2875 pub fn set_deploy_policy<T>(mut self, v: T) -> Self
2879 where
2880 T: std::convert::Into<crate::model::DeployPolicy>,
2881 {
2882 self.0.request.deploy_policy = std::option::Option::Some(v.into());
2883 self
2884 }
2885
2886 pub fn set_or_clear_deploy_policy<T>(mut self, v: std::option::Option<T>) -> Self
2890 where
2891 T: std::convert::Into<crate::model::DeployPolicy>,
2892 {
2893 self.0.request.deploy_policy = v.map(|x| x.into());
2894 self
2895 }
2896
2897 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2899 self.0.request.request_id = v.into();
2900 self
2901 }
2902
2903 pub fn set_allow_missing<T: Into<bool>>(mut self, v: T) -> Self {
2905 self.0.request.allow_missing = v.into();
2906 self
2907 }
2908
2909 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
2911 self.0.request.validate_only = v.into();
2912 self
2913 }
2914 }
2915
2916 #[doc(hidden)]
2917 impl crate::RequestBuilder for UpdateDeployPolicy {
2918 fn request_options(&mut self) -> &mut crate::RequestOptions {
2919 &mut self.0.options
2920 }
2921 }
2922
2923 #[derive(Clone, Debug)]
2941 pub struct DeleteDeployPolicy(RequestBuilder<crate::model::DeleteDeployPolicyRequest>);
2942
2943 impl DeleteDeployPolicy {
2944 pub(crate) fn new(
2945 stub: std::sync::Arc<dyn super::super::stub::dynamic::CloudDeploy>,
2946 ) -> Self {
2947 Self(RequestBuilder::new(stub))
2948 }
2949
2950 pub fn with_request<V: Into<crate::model::DeleteDeployPolicyRequest>>(
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<crate::RequestOptions>>(mut self, v: V) -> Self {
2961 self.0.options = v.into();
2962 self
2963 }
2964
2965 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
2972 (*self.0.stub)
2973 .delete_deploy_policy(self.0.request, self.0.options)
2974 .await
2975 .map(crate::Response::into_body)
2976 }
2977
2978 pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
2980 type Operation =
2981 google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
2982 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2983 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2984 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
2985 if let Some(ref mut details) = poller_options.tracing {
2986 details.method_name =
2987 "google_cloud_deploy_v1::client::CloudDeploy::delete_deploy_policy::until_done";
2988 }
2989
2990 let stub = self.0.stub.clone();
2991 let mut options = self.0.options.clone();
2992 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
2993 let query = move |name| {
2994 let stub = stub.clone();
2995 let options = options.clone();
2996 async {
2997 let op = GetOperation::new(stub)
2998 .set_name(name)
2999 .with_options(options)
3000 .send()
3001 .await?;
3002 Ok(Operation::new(op))
3003 }
3004 };
3005
3006 let start = move || async {
3007 let op = self.send().await?;
3008 Ok(Operation::new(op))
3009 };
3010
3011 use google_cloud_lro::internal::PollerExt;
3012 {
3013 google_cloud_lro::internal::new_unit_response_poller(
3014 polling_error_policy,
3015 polling_backoff_policy,
3016 start,
3017 query,
3018 )
3019 }
3020 .with_options(poller_options)
3021 }
3022
3023 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3027 self.0.request.name = v.into();
3028 self
3029 }
3030
3031 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3033 self.0.request.request_id = v.into();
3034 self
3035 }
3036
3037 pub fn set_allow_missing<T: Into<bool>>(mut self, v: T) -> Self {
3039 self.0.request.allow_missing = v.into();
3040 self
3041 }
3042
3043 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
3045 self.0.request.validate_only = v.into();
3046 self
3047 }
3048
3049 pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
3051 self.0.request.etag = v.into();
3052 self
3053 }
3054 }
3055
3056 #[doc(hidden)]
3057 impl crate::RequestBuilder for DeleteDeployPolicy {
3058 fn request_options(&mut self) -> &mut crate::RequestOptions {
3059 &mut self.0.options
3060 }
3061 }
3062
3063 #[derive(Clone, Debug)]
3084 pub struct ListDeployPolicies(RequestBuilder<crate::model::ListDeployPoliciesRequest>);
3085
3086 impl ListDeployPolicies {
3087 pub(crate) fn new(
3088 stub: std::sync::Arc<dyn super::super::stub::dynamic::CloudDeploy>,
3089 ) -> Self {
3090 Self(RequestBuilder::new(stub))
3091 }
3092
3093 pub fn with_request<V: Into<crate::model::ListDeployPoliciesRequest>>(
3095 mut self,
3096 v: V,
3097 ) -> Self {
3098 self.0.request = v.into();
3099 self
3100 }
3101
3102 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3104 self.0.options = v.into();
3105 self
3106 }
3107
3108 pub async fn send(self) -> Result<crate::model::ListDeployPoliciesResponse> {
3110 (*self.0.stub)
3111 .list_deploy_policies(self.0.request, self.0.options)
3112 .await
3113 .map(crate::Response::into_body)
3114 }
3115
3116 pub fn by_page(
3118 self,
3119 ) -> impl google_cloud_gax::paginator::Paginator<
3120 crate::model::ListDeployPoliciesResponse,
3121 crate::Error,
3122 > {
3123 use std::clone::Clone;
3124 let token = self.0.request.page_token.clone();
3125 let execute = move |token: String| {
3126 let mut builder = self.clone();
3127 builder.0.request = builder.0.request.set_page_token(token);
3128 builder.send()
3129 };
3130 google_cloud_gax::paginator::internal::new_paginator(token, execute)
3131 }
3132
3133 pub fn by_item(
3135 self,
3136 ) -> impl google_cloud_gax::paginator::ItemPaginator<
3137 crate::model::ListDeployPoliciesResponse,
3138 crate::Error,
3139 > {
3140 use google_cloud_gax::paginator::Paginator;
3141 self.by_page().items()
3142 }
3143
3144 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3148 self.0.request.parent = v.into();
3149 self
3150 }
3151
3152 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
3154 self.0.request.page_size = v.into();
3155 self
3156 }
3157
3158 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
3160 self.0.request.page_token = v.into();
3161 self
3162 }
3163
3164 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
3166 self.0.request.filter = v.into();
3167 self
3168 }
3169
3170 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
3172 self.0.request.order_by = v.into();
3173 self
3174 }
3175 }
3176
3177 #[doc(hidden)]
3178 impl crate::RequestBuilder for ListDeployPolicies {
3179 fn request_options(&mut self) -> &mut crate::RequestOptions {
3180 &mut self.0.options
3181 }
3182 }
3183
3184 #[derive(Clone, Debug)]
3201 pub struct GetDeployPolicy(RequestBuilder<crate::model::GetDeployPolicyRequest>);
3202
3203 impl GetDeployPolicy {
3204 pub(crate) fn new(
3205 stub: std::sync::Arc<dyn super::super::stub::dynamic::CloudDeploy>,
3206 ) -> Self {
3207 Self(RequestBuilder::new(stub))
3208 }
3209
3210 pub fn with_request<V: Into<crate::model::GetDeployPolicyRequest>>(mut self, v: V) -> Self {
3212 self.0.request = v.into();
3213 self
3214 }
3215
3216 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3218 self.0.options = v.into();
3219 self
3220 }
3221
3222 pub async fn send(self) -> Result<crate::model::DeployPolicy> {
3224 (*self.0.stub)
3225 .get_deploy_policy(self.0.request, self.0.options)
3226 .await
3227 .map(crate::Response::into_body)
3228 }
3229
3230 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3234 self.0.request.name = v.into();
3235 self
3236 }
3237 }
3238
3239 #[doc(hidden)]
3240 impl crate::RequestBuilder for GetDeployPolicy {
3241 fn request_options(&mut self) -> &mut crate::RequestOptions {
3242 &mut self.0.options
3243 }
3244 }
3245
3246 #[derive(Clone, Debug)]
3263 pub struct ApproveRollout(RequestBuilder<crate::model::ApproveRolloutRequest>);
3264
3265 impl ApproveRollout {
3266 pub(crate) fn new(
3267 stub: std::sync::Arc<dyn super::super::stub::dynamic::CloudDeploy>,
3268 ) -> Self {
3269 Self(RequestBuilder::new(stub))
3270 }
3271
3272 pub fn with_request<V: Into<crate::model::ApproveRolloutRequest>>(mut self, v: V) -> Self {
3274 self.0.request = v.into();
3275 self
3276 }
3277
3278 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3280 self.0.options = v.into();
3281 self
3282 }
3283
3284 pub async fn send(self) -> Result<crate::model::ApproveRolloutResponse> {
3286 (*self.0.stub)
3287 .approve_rollout(self.0.request, self.0.options)
3288 .await
3289 .map(crate::Response::into_body)
3290 }
3291
3292 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3296 self.0.request.name = v.into();
3297 self
3298 }
3299
3300 pub fn set_approved<T: Into<bool>>(mut self, v: T) -> Self {
3304 self.0.request.approved = v.into();
3305 self
3306 }
3307
3308 pub fn set_override_deploy_policy<T, V>(mut self, v: T) -> Self
3310 where
3311 T: std::iter::IntoIterator<Item = V>,
3312 V: std::convert::Into<std::string::String>,
3313 {
3314 use std::iter::Iterator;
3315 self.0.request.override_deploy_policy = v.into_iter().map(|i| i.into()).collect();
3316 self
3317 }
3318 }
3319
3320 #[doc(hidden)]
3321 impl crate::RequestBuilder for ApproveRollout {
3322 fn request_options(&mut self) -> &mut crate::RequestOptions {
3323 &mut self.0.options
3324 }
3325 }
3326
3327 #[derive(Clone, Debug)]
3344 pub struct AdvanceRollout(RequestBuilder<crate::model::AdvanceRolloutRequest>);
3345
3346 impl AdvanceRollout {
3347 pub(crate) fn new(
3348 stub: std::sync::Arc<dyn super::super::stub::dynamic::CloudDeploy>,
3349 ) -> Self {
3350 Self(RequestBuilder::new(stub))
3351 }
3352
3353 pub fn with_request<V: Into<crate::model::AdvanceRolloutRequest>>(mut self, v: V) -> Self {
3355 self.0.request = v.into();
3356 self
3357 }
3358
3359 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3361 self.0.options = v.into();
3362 self
3363 }
3364
3365 pub async fn send(self) -> Result<crate::model::AdvanceRolloutResponse> {
3367 (*self.0.stub)
3368 .advance_rollout(self.0.request, self.0.options)
3369 .await
3370 .map(crate::Response::into_body)
3371 }
3372
3373 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3377 self.0.request.name = v.into();
3378 self
3379 }
3380
3381 pub fn set_phase_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3385 self.0.request.phase_id = v.into();
3386 self
3387 }
3388
3389 pub fn set_override_deploy_policy<T, V>(mut self, v: T) -> Self
3391 where
3392 T: std::iter::IntoIterator<Item = V>,
3393 V: std::convert::Into<std::string::String>,
3394 {
3395 use std::iter::Iterator;
3396 self.0.request.override_deploy_policy = v.into_iter().map(|i| i.into()).collect();
3397 self
3398 }
3399 }
3400
3401 #[doc(hidden)]
3402 impl crate::RequestBuilder for AdvanceRollout {
3403 fn request_options(&mut self) -> &mut crate::RequestOptions {
3404 &mut self.0.options
3405 }
3406 }
3407
3408 #[derive(Clone, Debug)]
3425 pub struct CancelRollout(RequestBuilder<crate::model::CancelRolloutRequest>);
3426
3427 impl CancelRollout {
3428 pub(crate) fn new(
3429 stub: std::sync::Arc<dyn super::super::stub::dynamic::CloudDeploy>,
3430 ) -> Self {
3431 Self(RequestBuilder::new(stub))
3432 }
3433
3434 pub fn with_request<V: Into<crate::model::CancelRolloutRequest>>(mut self, v: V) -> Self {
3436 self.0.request = v.into();
3437 self
3438 }
3439
3440 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3442 self.0.options = v.into();
3443 self
3444 }
3445
3446 pub async fn send(self) -> Result<crate::model::CancelRolloutResponse> {
3448 (*self.0.stub)
3449 .cancel_rollout(self.0.request, self.0.options)
3450 .await
3451 .map(crate::Response::into_body)
3452 }
3453
3454 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3458 self.0.request.name = v.into();
3459 self
3460 }
3461
3462 pub fn set_override_deploy_policy<T, V>(mut self, v: T) -> Self
3464 where
3465 T: std::iter::IntoIterator<Item = V>,
3466 V: std::convert::Into<std::string::String>,
3467 {
3468 use std::iter::Iterator;
3469 self.0.request.override_deploy_policy = v.into_iter().map(|i| i.into()).collect();
3470 self
3471 }
3472 }
3473
3474 #[doc(hidden)]
3475 impl crate::RequestBuilder for CancelRollout {
3476 fn request_options(&mut self) -> &mut crate::RequestOptions {
3477 &mut self.0.options
3478 }
3479 }
3480
3481 #[derive(Clone, Debug)]
3502 pub struct ListRollouts(RequestBuilder<crate::model::ListRolloutsRequest>);
3503
3504 impl ListRollouts {
3505 pub(crate) fn new(
3506 stub: std::sync::Arc<dyn super::super::stub::dynamic::CloudDeploy>,
3507 ) -> Self {
3508 Self(RequestBuilder::new(stub))
3509 }
3510
3511 pub fn with_request<V: Into<crate::model::ListRolloutsRequest>>(mut self, v: V) -> Self {
3513 self.0.request = v.into();
3514 self
3515 }
3516
3517 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3519 self.0.options = v.into();
3520 self
3521 }
3522
3523 pub async fn send(self) -> Result<crate::model::ListRolloutsResponse> {
3525 (*self.0.stub)
3526 .list_rollouts(self.0.request, self.0.options)
3527 .await
3528 .map(crate::Response::into_body)
3529 }
3530
3531 pub fn by_page(
3533 self,
3534 ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListRolloutsResponse, crate::Error>
3535 {
3536 use std::clone::Clone;
3537 let token = self.0.request.page_token.clone();
3538 let execute = move |token: String| {
3539 let mut builder = self.clone();
3540 builder.0.request = builder.0.request.set_page_token(token);
3541 builder.send()
3542 };
3543 google_cloud_gax::paginator::internal::new_paginator(token, execute)
3544 }
3545
3546 pub fn by_item(
3548 self,
3549 ) -> impl google_cloud_gax::paginator::ItemPaginator<
3550 crate::model::ListRolloutsResponse,
3551 crate::Error,
3552 > {
3553 use google_cloud_gax::paginator::Paginator;
3554 self.by_page().items()
3555 }
3556
3557 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3561 self.0.request.parent = v.into();
3562 self
3563 }
3564
3565 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
3567 self.0.request.page_size = v.into();
3568 self
3569 }
3570
3571 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
3573 self.0.request.page_token = v.into();
3574 self
3575 }
3576
3577 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
3579 self.0.request.filter = v.into();
3580 self
3581 }
3582
3583 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
3585 self.0.request.order_by = v.into();
3586 self
3587 }
3588 }
3589
3590 #[doc(hidden)]
3591 impl crate::RequestBuilder for ListRollouts {
3592 fn request_options(&mut self) -> &mut crate::RequestOptions {
3593 &mut self.0.options
3594 }
3595 }
3596
3597 #[derive(Clone, Debug)]
3614 pub struct GetRollout(RequestBuilder<crate::model::GetRolloutRequest>);
3615
3616 impl GetRollout {
3617 pub(crate) fn new(
3618 stub: std::sync::Arc<dyn super::super::stub::dynamic::CloudDeploy>,
3619 ) -> Self {
3620 Self(RequestBuilder::new(stub))
3621 }
3622
3623 pub fn with_request<V: Into<crate::model::GetRolloutRequest>>(mut self, v: V) -> Self {
3625 self.0.request = v.into();
3626 self
3627 }
3628
3629 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3631 self.0.options = v.into();
3632 self
3633 }
3634
3635 pub async fn send(self) -> Result<crate::model::Rollout> {
3637 (*self.0.stub)
3638 .get_rollout(self.0.request, self.0.options)
3639 .await
3640 .map(crate::Response::into_body)
3641 }
3642
3643 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3647 self.0.request.name = v.into();
3648 self
3649 }
3650 }
3651
3652 #[doc(hidden)]
3653 impl crate::RequestBuilder for GetRollout {
3654 fn request_options(&mut self) -> &mut crate::RequestOptions {
3655 &mut self.0.options
3656 }
3657 }
3658
3659 #[derive(Clone, Debug)]
3677 pub struct CreateRollout(RequestBuilder<crate::model::CreateRolloutRequest>);
3678
3679 impl CreateRollout {
3680 pub(crate) fn new(
3681 stub: std::sync::Arc<dyn super::super::stub::dynamic::CloudDeploy>,
3682 ) -> Self {
3683 Self(RequestBuilder::new(stub))
3684 }
3685
3686 pub fn with_request<V: Into<crate::model::CreateRolloutRequest>>(mut self, v: V) -> Self {
3688 self.0.request = v.into();
3689 self
3690 }
3691
3692 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3694 self.0.options = v.into();
3695 self
3696 }
3697
3698 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
3705 (*self.0.stub)
3706 .create_rollout(self.0.request, self.0.options)
3707 .await
3708 .map(crate::Response::into_body)
3709 }
3710
3711 pub fn poller(
3713 self,
3714 ) -> impl google_cloud_lro::Poller<crate::model::Rollout, crate::model::OperationMetadata>
3715 {
3716 type Operation = google_cloud_lro::internal::Operation<
3717 crate::model::Rollout,
3718 crate::model::OperationMetadata,
3719 >;
3720 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3721 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3722 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
3723 if let Some(ref mut details) = poller_options.tracing {
3724 details.method_name =
3725 "google_cloud_deploy_v1::client::CloudDeploy::create_rollout::until_done";
3726 }
3727
3728 let stub = self.0.stub.clone();
3729 let mut options = self.0.options.clone();
3730 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
3731 let query = move |name| {
3732 let stub = stub.clone();
3733 let options = options.clone();
3734 async {
3735 let op = GetOperation::new(stub)
3736 .set_name(name)
3737 .with_options(options)
3738 .send()
3739 .await?;
3740 Ok(Operation::new(op))
3741 }
3742 };
3743
3744 let start = move || async {
3745 let op = self.send().await?;
3746 Ok(Operation::new(op))
3747 };
3748
3749 use google_cloud_lro::internal::PollerExt;
3750 {
3751 google_cloud_lro::internal::new_poller(
3752 polling_error_policy,
3753 polling_backoff_policy,
3754 start,
3755 query,
3756 )
3757 }
3758 .with_options(poller_options)
3759 }
3760
3761 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3765 self.0.request.parent = v.into();
3766 self
3767 }
3768
3769 pub fn set_rollout_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3773 self.0.request.rollout_id = v.into();
3774 self
3775 }
3776
3777 pub fn set_rollout<T>(mut self, v: T) -> Self
3781 where
3782 T: std::convert::Into<crate::model::Rollout>,
3783 {
3784 self.0.request.rollout = std::option::Option::Some(v.into());
3785 self
3786 }
3787
3788 pub fn set_or_clear_rollout<T>(mut self, v: std::option::Option<T>) -> Self
3792 where
3793 T: std::convert::Into<crate::model::Rollout>,
3794 {
3795 self.0.request.rollout = v.map(|x| x.into());
3796 self
3797 }
3798
3799 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3801 self.0.request.request_id = v.into();
3802 self
3803 }
3804
3805 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
3807 self.0.request.validate_only = v.into();
3808 self
3809 }
3810
3811 pub fn set_override_deploy_policy<T, V>(mut self, v: T) -> Self
3813 where
3814 T: std::iter::IntoIterator<Item = V>,
3815 V: std::convert::Into<std::string::String>,
3816 {
3817 use std::iter::Iterator;
3818 self.0.request.override_deploy_policy = v.into_iter().map(|i| i.into()).collect();
3819 self
3820 }
3821
3822 pub fn set_starting_phase_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3824 self.0.request.starting_phase_id = v.into();
3825 self
3826 }
3827 }
3828
3829 #[doc(hidden)]
3830 impl crate::RequestBuilder for CreateRollout {
3831 fn request_options(&mut self) -> &mut crate::RequestOptions {
3832 &mut self.0.options
3833 }
3834 }
3835
3836 #[derive(Clone, Debug)]
3853 pub struct IgnoreJob(RequestBuilder<crate::model::IgnoreJobRequest>);
3854
3855 impl IgnoreJob {
3856 pub(crate) fn new(
3857 stub: std::sync::Arc<dyn super::super::stub::dynamic::CloudDeploy>,
3858 ) -> Self {
3859 Self(RequestBuilder::new(stub))
3860 }
3861
3862 pub fn with_request<V: Into<crate::model::IgnoreJobRequest>>(mut self, v: V) -> Self {
3864 self.0.request = v.into();
3865 self
3866 }
3867
3868 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3870 self.0.options = v.into();
3871 self
3872 }
3873
3874 pub async fn send(self) -> Result<crate::model::IgnoreJobResponse> {
3876 (*self.0.stub)
3877 .ignore_job(self.0.request, self.0.options)
3878 .await
3879 .map(crate::Response::into_body)
3880 }
3881
3882 pub fn set_rollout<T: Into<std::string::String>>(mut self, v: T) -> Self {
3886 self.0.request.rollout = v.into();
3887 self
3888 }
3889
3890 pub fn set_phase_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3894 self.0.request.phase_id = v.into();
3895 self
3896 }
3897
3898 pub fn set_job_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3902 self.0.request.job_id = v.into();
3903 self
3904 }
3905
3906 pub fn set_override_deploy_policy<T, V>(mut self, v: T) -> Self
3908 where
3909 T: std::iter::IntoIterator<Item = V>,
3910 V: std::convert::Into<std::string::String>,
3911 {
3912 use std::iter::Iterator;
3913 self.0.request.override_deploy_policy = v.into_iter().map(|i| i.into()).collect();
3914 self
3915 }
3916 }
3917
3918 #[doc(hidden)]
3919 impl crate::RequestBuilder for IgnoreJob {
3920 fn request_options(&mut self) -> &mut crate::RequestOptions {
3921 &mut self.0.options
3922 }
3923 }
3924
3925 #[derive(Clone, Debug)]
3942 pub struct RetryJob(RequestBuilder<crate::model::RetryJobRequest>);
3943
3944 impl RetryJob {
3945 pub(crate) fn new(
3946 stub: std::sync::Arc<dyn super::super::stub::dynamic::CloudDeploy>,
3947 ) -> Self {
3948 Self(RequestBuilder::new(stub))
3949 }
3950
3951 pub fn with_request<V: Into<crate::model::RetryJobRequest>>(mut self, v: V) -> Self {
3953 self.0.request = v.into();
3954 self
3955 }
3956
3957 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3959 self.0.options = v.into();
3960 self
3961 }
3962
3963 pub async fn send(self) -> Result<crate::model::RetryJobResponse> {
3965 (*self.0.stub)
3966 .retry_job(self.0.request, self.0.options)
3967 .await
3968 .map(crate::Response::into_body)
3969 }
3970
3971 pub fn set_rollout<T: Into<std::string::String>>(mut self, v: T) -> Self {
3975 self.0.request.rollout = v.into();
3976 self
3977 }
3978
3979 pub fn set_phase_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3983 self.0.request.phase_id = v.into();
3984 self
3985 }
3986
3987 pub fn set_job_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3991 self.0.request.job_id = v.into();
3992 self
3993 }
3994
3995 pub fn set_override_deploy_policy<T, V>(mut self, v: T) -> Self
3997 where
3998 T: std::iter::IntoIterator<Item = V>,
3999 V: std::convert::Into<std::string::String>,
4000 {
4001 use std::iter::Iterator;
4002 self.0.request.override_deploy_policy = v.into_iter().map(|i| i.into()).collect();
4003 self
4004 }
4005 }
4006
4007 #[doc(hidden)]
4008 impl crate::RequestBuilder for RetryJob {
4009 fn request_options(&mut self) -> &mut crate::RequestOptions {
4010 &mut self.0.options
4011 }
4012 }
4013
4014 #[derive(Clone, Debug)]
4035 pub struct ListJobRuns(RequestBuilder<crate::model::ListJobRunsRequest>);
4036
4037 impl ListJobRuns {
4038 pub(crate) fn new(
4039 stub: std::sync::Arc<dyn super::super::stub::dynamic::CloudDeploy>,
4040 ) -> Self {
4041 Self(RequestBuilder::new(stub))
4042 }
4043
4044 pub fn with_request<V: Into<crate::model::ListJobRunsRequest>>(mut self, v: V) -> Self {
4046 self.0.request = v.into();
4047 self
4048 }
4049
4050 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4052 self.0.options = v.into();
4053 self
4054 }
4055
4056 pub async fn send(self) -> Result<crate::model::ListJobRunsResponse> {
4058 (*self.0.stub)
4059 .list_job_runs(self.0.request, self.0.options)
4060 .await
4061 .map(crate::Response::into_body)
4062 }
4063
4064 pub fn by_page(
4066 self,
4067 ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListJobRunsResponse, crate::Error>
4068 {
4069 use std::clone::Clone;
4070 let token = self.0.request.page_token.clone();
4071 let execute = move |token: String| {
4072 let mut builder = self.clone();
4073 builder.0.request = builder.0.request.set_page_token(token);
4074 builder.send()
4075 };
4076 google_cloud_gax::paginator::internal::new_paginator(token, execute)
4077 }
4078
4079 pub fn by_item(
4081 self,
4082 ) -> impl google_cloud_gax::paginator::ItemPaginator<
4083 crate::model::ListJobRunsResponse,
4084 crate::Error,
4085 > {
4086 use google_cloud_gax::paginator::Paginator;
4087 self.by_page().items()
4088 }
4089
4090 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
4094 self.0.request.parent = v.into();
4095 self
4096 }
4097
4098 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
4100 self.0.request.page_size = v.into();
4101 self
4102 }
4103
4104 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
4106 self.0.request.page_token = v.into();
4107 self
4108 }
4109
4110 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
4112 self.0.request.filter = v.into();
4113 self
4114 }
4115
4116 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
4118 self.0.request.order_by = v.into();
4119 self
4120 }
4121 }
4122
4123 #[doc(hidden)]
4124 impl crate::RequestBuilder for ListJobRuns {
4125 fn request_options(&mut self) -> &mut crate::RequestOptions {
4126 &mut self.0.options
4127 }
4128 }
4129
4130 #[derive(Clone, Debug)]
4147 pub struct GetJobRun(RequestBuilder<crate::model::GetJobRunRequest>);
4148
4149 impl GetJobRun {
4150 pub(crate) fn new(
4151 stub: std::sync::Arc<dyn super::super::stub::dynamic::CloudDeploy>,
4152 ) -> Self {
4153 Self(RequestBuilder::new(stub))
4154 }
4155
4156 pub fn with_request<V: Into<crate::model::GetJobRunRequest>>(mut self, v: V) -> Self {
4158 self.0.request = v.into();
4159 self
4160 }
4161
4162 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4164 self.0.options = v.into();
4165 self
4166 }
4167
4168 pub async fn send(self) -> Result<crate::model::JobRun> {
4170 (*self.0.stub)
4171 .get_job_run(self.0.request, self.0.options)
4172 .await
4173 .map(crate::Response::into_body)
4174 }
4175
4176 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4180 self.0.request.name = v.into();
4181 self
4182 }
4183 }
4184
4185 #[doc(hidden)]
4186 impl crate::RequestBuilder for GetJobRun {
4187 fn request_options(&mut self) -> &mut crate::RequestOptions {
4188 &mut self.0.options
4189 }
4190 }
4191
4192 #[derive(Clone, Debug)]
4209 pub struct TerminateJobRun(RequestBuilder<crate::model::TerminateJobRunRequest>);
4210
4211 impl TerminateJobRun {
4212 pub(crate) fn new(
4213 stub: std::sync::Arc<dyn super::super::stub::dynamic::CloudDeploy>,
4214 ) -> Self {
4215 Self(RequestBuilder::new(stub))
4216 }
4217
4218 pub fn with_request<V: Into<crate::model::TerminateJobRunRequest>>(mut self, v: V) -> Self {
4220 self.0.request = v.into();
4221 self
4222 }
4223
4224 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4226 self.0.options = v.into();
4227 self
4228 }
4229
4230 pub async fn send(self) -> Result<crate::model::TerminateJobRunResponse> {
4232 (*self.0.stub)
4233 .terminate_job_run(self.0.request, self.0.options)
4234 .await
4235 .map(crate::Response::into_body)
4236 }
4237
4238 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4242 self.0.request.name = v.into();
4243 self
4244 }
4245
4246 pub fn set_override_deploy_policy<T, V>(mut self, v: T) -> Self
4248 where
4249 T: std::iter::IntoIterator<Item = V>,
4250 V: std::convert::Into<std::string::String>,
4251 {
4252 use std::iter::Iterator;
4253 self.0.request.override_deploy_policy = v.into_iter().map(|i| i.into()).collect();
4254 self
4255 }
4256 }
4257
4258 #[doc(hidden)]
4259 impl crate::RequestBuilder for TerminateJobRun {
4260 fn request_options(&mut self) -> &mut crate::RequestOptions {
4261 &mut self.0.options
4262 }
4263 }
4264
4265 #[derive(Clone, Debug)]
4282 pub struct GetConfig(RequestBuilder<crate::model::GetConfigRequest>);
4283
4284 impl GetConfig {
4285 pub(crate) fn new(
4286 stub: std::sync::Arc<dyn super::super::stub::dynamic::CloudDeploy>,
4287 ) -> Self {
4288 Self(RequestBuilder::new(stub))
4289 }
4290
4291 pub fn with_request<V: Into<crate::model::GetConfigRequest>>(mut self, v: V) -> Self {
4293 self.0.request = v.into();
4294 self
4295 }
4296
4297 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4299 self.0.options = v.into();
4300 self
4301 }
4302
4303 pub async fn send(self) -> Result<crate::model::Config> {
4305 (*self.0.stub)
4306 .get_config(self.0.request, self.0.options)
4307 .await
4308 .map(crate::Response::into_body)
4309 }
4310
4311 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4315 self.0.request.name = v.into();
4316 self
4317 }
4318 }
4319
4320 #[doc(hidden)]
4321 impl crate::RequestBuilder for GetConfig {
4322 fn request_options(&mut self) -> &mut crate::RequestOptions {
4323 &mut self.0.options
4324 }
4325 }
4326
4327 #[derive(Clone, Debug)]
4345 pub struct CreateAutomation(RequestBuilder<crate::model::CreateAutomationRequest>);
4346
4347 impl CreateAutomation {
4348 pub(crate) fn new(
4349 stub: std::sync::Arc<dyn super::super::stub::dynamic::CloudDeploy>,
4350 ) -> Self {
4351 Self(RequestBuilder::new(stub))
4352 }
4353
4354 pub fn with_request<V: Into<crate::model::CreateAutomationRequest>>(
4356 mut self,
4357 v: V,
4358 ) -> Self {
4359 self.0.request = v.into();
4360 self
4361 }
4362
4363 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4365 self.0.options = v.into();
4366 self
4367 }
4368
4369 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
4376 (*self.0.stub)
4377 .create_automation(self.0.request, self.0.options)
4378 .await
4379 .map(crate::Response::into_body)
4380 }
4381
4382 pub fn poller(
4384 self,
4385 ) -> impl google_cloud_lro::Poller<crate::model::Automation, crate::model::OperationMetadata>
4386 {
4387 type Operation = google_cloud_lro::internal::Operation<
4388 crate::model::Automation,
4389 crate::model::OperationMetadata,
4390 >;
4391 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4392 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4393 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
4394 if let Some(ref mut details) = poller_options.tracing {
4395 details.method_name =
4396 "google_cloud_deploy_v1::client::CloudDeploy::create_automation::until_done";
4397 }
4398
4399 let stub = self.0.stub.clone();
4400 let mut options = self.0.options.clone();
4401 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
4402 let query = move |name| {
4403 let stub = stub.clone();
4404 let options = options.clone();
4405 async {
4406 let op = GetOperation::new(stub)
4407 .set_name(name)
4408 .with_options(options)
4409 .send()
4410 .await?;
4411 Ok(Operation::new(op))
4412 }
4413 };
4414
4415 let start = move || async {
4416 let op = self.send().await?;
4417 Ok(Operation::new(op))
4418 };
4419
4420 use google_cloud_lro::internal::PollerExt;
4421 {
4422 google_cloud_lro::internal::new_poller(
4423 polling_error_policy,
4424 polling_backoff_policy,
4425 start,
4426 query,
4427 )
4428 }
4429 .with_options(poller_options)
4430 }
4431
4432 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
4436 self.0.request.parent = v.into();
4437 self
4438 }
4439
4440 pub fn set_automation_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
4444 self.0.request.automation_id = v.into();
4445 self
4446 }
4447
4448 pub fn set_automation<T>(mut self, v: T) -> Self
4452 where
4453 T: std::convert::Into<crate::model::Automation>,
4454 {
4455 self.0.request.automation = std::option::Option::Some(v.into());
4456 self
4457 }
4458
4459 pub fn set_or_clear_automation<T>(mut self, v: std::option::Option<T>) -> Self
4463 where
4464 T: std::convert::Into<crate::model::Automation>,
4465 {
4466 self.0.request.automation = v.map(|x| x.into());
4467 self
4468 }
4469
4470 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
4472 self.0.request.request_id = v.into();
4473 self
4474 }
4475
4476 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
4478 self.0.request.validate_only = v.into();
4479 self
4480 }
4481 }
4482
4483 #[doc(hidden)]
4484 impl crate::RequestBuilder for CreateAutomation {
4485 fn request_options(&mut self) -> &mut crate::RequestOptions {
4486 &mut self.0.options
4487 }
4488 }
4489
4490 #[derive(Clone, Debug)]
4508 pub struct UpdateAutomation(RequestBuilder<crate::model::UpdateAutomationRequest>);
4509
4510 impl UpdateAutomation {
4511 pub(crate) fn new(
4512 stub: std::sync::Arc<dyn super::super::stub::dynamic::CloudDeploy>,
4513 ) -> Self {
4514 Self(RequestBuilder::new(stub))
4515 }
4516
4517 pub fn with_request<V: Into<crate::model::UpdateAutomationRequest>>(
4519 mut self,
4520 v: V,
4521 ) -> Self {
4522 self.0.request = v.into();
4523 self
4524 }
4525
4526 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4528 self.0.options = v.into();
4529 self
4530 }
4531
4532 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
4539 (*self.0.stub)
4540 .update_automation(self.0.request, self.0.options)
4541 .await
4542 .map(crate::Response::into_body)
4543 }
4544
4545 pub fn poller(
4547 self,
4548 ) -> impl google_cloud_lro::Poller<crate::model::Automation, crate::model::OperationMetadata>
4549 {
4550 type Operation = google_cloud_lro::internal::Operation<
4551 crate::model::Automation,
4552 crate::model::OperationMetadata,
4553 >;
4554 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4555 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4556 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
4557 if let Some(ref mut details) = poller_options.tracing {
4558 details.method_name =
4559 "google_cloud_deploy_v1::client::CloudDeploy::update_automation::until_done";
4560 }
4561
4562 let stub = self.0.stub.clone();
4563 let mut options = self.0.options.clone();
4564 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
4565 let query = move |name| {
4566 let stub = stub.clone();
4567 let options = options.clone();
4568 async {
4569 let op = GetOperation::new(stub)
4570 .set_name(name)
4571 .with_options(options)
4572 .send()
4573 .await?;
4574 Ok(Operation::new(op))
4575 }
4576 };
4577
4578 let start = move || async {
4579 let op = self.send().await?;
4580 Ok(Operation::new(op))
4581 };
4582
4583 use google_cloud_lro::internal::PollerExt;
4584 {
4585 google_cloud_lro::internal::new_poller(
4586 polling_error_policy,
4587 polling_backoff_policy,
4588 start,
4589 query,
4590 )
4591 }
4592 .with_options(poller_options)
4593 }
4594
4595 pub fn set_update_mask<T>(mut self, v: T) -> Self
4599 where
4600 T: std::convert::Into<wkt::FieldMask>,
4601 {
4602 self.0.request.update_mask = std::option::Option::Some(v.into());
4603 self
4604 }
4605
4606 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
4610 where
4611 T: std::convert::Into<wkt::FieldMask>,
4612 {
4613 self.0.request.update_mask = v.map(|x| x.into());
4614 self
4615 }
4616
4617 pub fn set_automation<T>(mut self, v: T) -> Self
4621 where
4622 T: std::convert::Into<crate::model::Automation>,
4623 {
4624 self.0.request.automation = std::option::Option::Some(v.into());
4625 self
4626 }
4627
4628 pub fn set_or_clear_automation<T>(mut self, v: std::option::Option<T>) -> Self
4632 where
4633 T: std::convert::Into<crate::model::Automation>,
4634 {
4635 self.0.request.automation = v.map(|x| x.into());
4636 self
4637 }
4638
4639 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
4641 self.0.request.request_id = v.into();
4642 self
4643 }
4644
4645 pub fn set_allow_missing<T: Into<bool>>(mut self, v: T) -> Self {
4647 self.0.request.allow_missing = v.into();
4648 self
4649 }
4650
4651 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
4653 self.0.request.validate_only = v.into();
4654 self
4655 }
4656 }
4657
4658 #[doc(hidden)]
4659 impl crate::RequestBuilder for UpdateAutomation {
4660 fn request_options(&mut self) -> &mut crate::RequestOptions {
4661 &mut self.0.options
4662 }
4663 }
4664
4665 #[derive(Clone, Debug)]
4683 pub struct DeleteAutomation(RequestBuilder<crate::model::DeleteAutomationRequest>);
4684
4685 impl DeleteAutomation {
4686 pub(crate) fn new(
4687 stub: std::sync::Arc<dyn super::super::stub::dynamic::CloudDeploy>,
4688 ) -> Self {
4689 Self(RequestBuilder::new(stub))
4690 }
4691
4692 pub fn with_request<V: Into<crate::model::DeleteAutomationRequest>>(
4694 mut self,
4695 v: V,
4696 ) -> Self {
4697 self.0.request = v.into();
4698 self
4699 }
4700
4701 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4703 self.0.options = v.into();
4704 self
4705 }
4706
4707 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
4714 (*self.0.stub)
4715 .delete_automation(self.0.request, self.0.options)
4716 .await
4717 .map(crate::Response::into_body)
4718 }
4719
4720 pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
4722 type Operation =
4723 google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
4724 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4725 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4726 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
4727 if let Some(ref mut details) = poller_options.tracing {
4728 details.method_name =
4729 "google_cloud_deploy_v1::client::CloudDeploy::delete_automation::until_done";
4730 }
4731
4732 let stub = self.0.stub.clone();
4733 let mut options = self.0.options.clone();
4734 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
4735 let query = move |name| {
4736 let stub = stub.clone();
4737 let options = options.clone();
4738 async {
4739 let op = GetOperation::new(stub)
4740 .set_name(name)
4741 .with_options(options)
4742 .send()
4743 .await?;
4744 Ok(Operation::new(op))
4745 }
4746 };
4747
4748 let start = move || async {
4749 let op = self.send().await?;
4750 Ok(Operation::new(op))
4751 };
4752
4753 use google_cloud_lro::internal::PollerExt;
4754 {
4755 google_cloud_lro::internal::new_unit_response_poller(
4756 polling_error_policy,
4757 polling_backoff_policy,
4758 start,
4759 query,
4760 )
4761 }
4762 .with_options(poller_options)
4763 }
4764
4765 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4769 self.0.request.name = v.into();
4770 self
4771 }
4772
4773 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
4775 self.0.request.request_id = v.into();
4776 self
4777 }
4778
4779 pub fn set_allow_missing<T: Into<bool>>(mut self, v: T) -> Self {
4781 self.0.request.allow_missing = v.into();
4782 self
4783 }
4784
4785 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
4787 self.0.request.validate_only = v.into();
4788 self
4789 }
4790
4791 pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
4793 self.0.request.etag = v.into();
4794 self
4795 }
4796 }
4797
4798 #[doc(hidden)]
4799 impl crate::RequestBuilder for DeleteAutomation {
4800 fn request_options(&mut self) -> &mut crate::RequestOptions {
4801 &mut self.0.options
4802 }
4803 }
4804
4805 #[derive(Clone, Debug)]
4822 pub struct GetAutomation(RequestBuilder<crate::model::GetAutomationRequest>);
4823
4824 impl GetAutomation {
4825 pub(crate) fn new(
4826 stub: std::sync::Arc<dyn super::super::stub::dynamic::CloudDeploy>,
4827 ) -> Self {
4828 Self(RequestBuilder::new(stub))
4829 }
4830
4831 pub fn with_request<V: Into<crate::model::GetAutomationRequest>>(mut self, v: V) -> Self {
4833 self.0.request = v.into();
4834 self
4835 }
4836
4837 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4839 self.0.options = v.into();
4840 self
4841 }
4842
4843 pub async fn send(self) -> Result<crate::model::Automation> {
4845 (*self.0.stub)
4846 .get_automation(self.0.request, self.0.options)
4847 .await
4848 .map(crate::Response::into_body)
4849 }
4850
4851 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4855 self.0.request.name = v.into();
4856 self
4857 }
4858 }
4859
4860 #[doc(hidden)]
4861 impl crate::RequestBuilder for GetAutomation {
4862 fn request_options(&mut self) -> &mut crate::RequestOptions {
4863 &mut self.0.options
4864 }
4865 }
4866
4867 #[derive(Clone, Debug)]
4888 pub struct ListAutomations(RequestBuilder<crate::model::ListAutomationsRequest>);
4889
4890 impl ListAutomations {
4891 pub(crate) fn new(
4892 stub: std::sync::Arc<dyn super::super::stub::dynamic::CloudDeploy>,
4893 ) -> Self {
4894 Self(RequestBuilder::new(stub))
4895 }
4896
4897 pub fn with_request<V: Into<crate::model::ListAutomationsRequest>>(mut self, v: V) -> Self {
4899 self.0.request = v.into();
4900 self
4901 }
4902
4903 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4905 self.0.options = v.into();
4906 self
4907 }
4908
4909 pub async fn send(self) -> Result<crate::model::ListAutomationsResponse> {
4911 (*self.0.stub)
4912 .list_automations(self.0.request, self.0.options)
4913 .await
4914 .map(crate::Response::into_body)
4915 }
4916
4917 pub fn by_page(
4919 self,
4920 ) -> impl google_cloud_gax::paginator::Paginator<
4921 crate::model::ListAutomationsResponse,
4922 crate::Error,
4923 > {
4924 use std::clone::Clone;
4925 let token = self.0.request.page_token.clone();
4926 let execute = move |token: String| {
4927 let mut builder = self.clone();
4928 builder.0.request = builder.0.request.set_page_token(token);
4929 builder.send()
4930 };
4931 google_cloud_gax::paginator::internal::new_paginator(token, execute)
4932 }
4933
4934 pub fn by_item(
4936 self,
4937 ) -> impl google_cloud_gax::paginator::ItemPaginator<
4938 crate::model::ListAutomationsResponse,
4939 crate::Error,
4940 > {
4941 use google_cloud_gax::paginator::Paginator;
4942 self.by_page().items()
4943 }
4944
4945 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
4949 self.0.request.parent = v.into();
4950 self
4951 }
4952
4953 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
4955 self.0.request.page_size = v.into();
4956 self
4957 }
4958
4959 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
4961 self.0.request.page_token = v.into();
4962 self
4963 }
4964
4965 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
4967 self.0.request.filter = v.into();
4968 self
4969 }
4970
4971 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
4973 self.0.request.order_by = v.into();
4974 self
4975 }
4976 }
4977
4978 #[doc(hidden)]
4979 impl crate::RequestBuilder for ListAutomations {
4980 fn request_options(&mut self) -> &mut crate::RequestOptions {
4981 &mut self.0.options
4982 }
4983 }
4984
4985 #[derive(Clone, Debug)]
5002 pub struct GetAutomationRun(RequestBuilder<crate::model::GetAutomationRunRequest>);
5003
5004 impl GetAutomationRun {
5005 pub(crate) fn new(
5006 stub: std::sync::Arc<dyn super::super::stub::dynamic::CloudDeploy>,
5007 ) -> Self {
5008 Self(RequestBuilder::new(stub))
5009 }
5010
5011 pub fn with_request<V: Into<crate::model::GetAutomationRunRequest>>(
5013 mut self,
5014 v: V,
5015 ) -> Self {
5016 self.0.request = v.into();
5017 self
5018 }
5019
5020 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5022 self.0.options = v.into();
5023 self
5024 }
5025
5026 pub async fn send(self) -> Result<crate::model::AutomationRun> {
5028 (*self.0.stub)
5029 .get_automation_run(self.0.request, self.0.options)
5030 .await
5031 .map(crate::Response::into_body)
5032 }
5033
5034 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5038 self.0.request.name = v.into();
5039 self
5040 }
5041 }
5042
5043 #[doc(hidden)]
5044 impl crate::RequestBuilder for GetAutomationRun {
5045 fn request_options(&mut self) -> &mut crate::RequestOptions {
5046 &mut self.0.options
5047 }
5048 }
5049
5050 #[derive(Clone, Debug)]
5071 pub struct ListAutomationRuns(RequestBuilder<crate::model::ListAutomationRunsRequest>);
5072
5073 impl ListAutomationRuns {
5074 pub(crate) fn new(
5075 stub: std::sync::Arc<dyn super::super::stub::dynamic::CloudDeploy>,
5076 ) -> Self {
5077 Self(RequestBuilder::new(stub))
5078 }
5079
5080 pub fn with_request<V: Into<crate::model::ListAutomationRunsRequest>>(
5082 mut self,
5083 v: V,
5084 ) -> Self {
5085 self.0.request = v.into();
5086 self
5087 }
5088
5089 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5091 self.0.options = v.into();
5092 self
5093 }
5094
5095 pub async fn send(self) -> Result<crate::model::ListAutomationRunsResponse> {
5097 (*self.0.stub)
5098 .list_automation_runs(self.0.request, self.0.options)
5099 .await
5100 .map(crate::Response::into_body)
5101 }
5102
5103 pub fn by_page(
5105 self,
5106 ) -> impl google_cloud_gax::paginator::Paginator<
5107 crate::model::ListAutomationRunsResponse,
5108 crate::Error,
5109 > {
5110 use std::clone::Clone;
5111 let token = self.0.request.page_token.clone();
5112 let execute = move |token: String| {
5113 let mut builder = self.clone();
5114 builder.0.request = builder.0.request.set_page_token(token);
5115 builder.send()
5116 };
5117 google_cloud_gax::paginator::internal::new_paginator(token, execute)
5118 }
5119
5120 pub fn by_item(
5122 self,
5123 ) -> impl google_cloud_gax::paginator::ItemPaginator<
5124 crate::model::ListAutomationRunsResponse,
5125 crate::Error,
5126 > {
5127 use google_cloud_gax::paginator::Paginator;
5128 self.by_page().items()
5129 }
5130
5131 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5135 self.0.request.parent = v.into();
5136 self
5137 }
5138
5139 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
5141 self.0.request.page_size = v.into();
5142 self
5143 }
5144
5145 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
5147 self.0.request.page_token = v.into();
5148 self
5149 }
5150
5151 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
5153 self.0.request.filter = v.into();
5154 self
5155 }
5156
5157 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
5159 self.0.request.order_by = v.into();
5160 self
5161 }
5162 }
5163
5164 #[doc(hidden)]
5165 impl crate::RequestBuilder for ListAutomationRuns {
5166 fn request_options(&mut self) -> &mut crate::RequestOptions {
5167 &mut self.0.options
5168 }
5169 }
5170
5171 #[derive(Clone, Debug)]
5188 pub struct CancelAutomationRun(RequestBuilder<crate::model::CancelAutomationRunRequest>);
5189
5190 impl CancelAutomationRun {
5191 pub(crate) fn new(
5192 stub: std::sync::Arc<dyn super::super::stub::dynamic::CloudDeploy>,
5193 ) -> Self {
5194 Self(RequestBuilder::new(stub))
5195 }
5196
5197 pub fn with_request<V: Into<crate::model::CancelAutomationRunRequest>>(
5199 mut self,
5200 v: V,
5201 ) -> Self {
5202 self.0.request = v.into();
5203 self
5204 }
5205
5206 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5208 self.0.options = v.into();
5209 self
5210 }
5211
5212 pub async fn send(self) -> Result<crate::model::CancelAutomationRunResponse> {
5214 (*self.0.stub)
5215 .cancel_automation_run(self.0.request, self.0.options)
5216 .await
5217 .map(crate::Response::into_body)
5218 }
5219
5220 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5224 self.0.request.name = v.into();
5225 self
5226 }
5227 }
5228
5229 #[doc(hidden)]
5230 impl crate::RequestBuilder for CancelAutomationRun {
5231 fn request_options(&mut self) -> &mut crate::RequestOptions {
5232 &mut self.0.options
5233 }
5234 }
5235
5236 #[derive(Clone, Debug)]
5257 pub struct ListLocations(RequestBuilder<google_cloud_location::model::ListLocationsRequest>);
5258
5259 impl ListLocations {
5260 pub(crate) fn new(
5261 stub: std::sync::Arc<dyn super::super::stub::dynamic::CloudDeploy>,
5262 ) -> Self {
5263 Self(RequestBuilder::new(stub))
5264 }
5265
5266 pub fn with_request<V: Into<google_cloud_location::model::ListLocationsRequest>>(
5268 mut self,
5269 v: V,
5270 ) -> Self {
5271 self.0.request = v.into();
5272 self
5273 }
5274
5275 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5277 self.0.options = v.into();
5278 self
5279 }
5280
5281 pub async fn send(self) -> Result<google_cloud_location::model::ListLocationsResponse> {
5283 (*self.0.stub)
5284 .list_locations(self.0.request, self.0.options)
5285 .await
5286 .map(crate::Response::into_body)
5287 }
5288
5289 pub fn by_page(
5291 self,
5292 ) -> impl google_cloud_gax::paginator::Paginator<
5293 google_cloud_location::model::ListLocationsResponse,
5294 crate::Error,
5295 > {
5296 use std::clone::Clone;
5297 let token = self.0.request.page_token.clone();
5298 let execute = move |token: String| {
5299 let mut builder = self.clone();
5300 builder.0.request = builder.0.request.set_page_token(token);
5301 builder.send()
5302 };
5303 google_cloud_gax::paginator::internal::new_paginator(token, execute)
5304 }
5305
5306 pub fn by_item(
5308 self,
5309 ) -> impl google_cloud_gax::paginator::ItemPaginator<
5310 google_cloud_location::model::ListLocationsResponse,
5311 crate::Error,
5312 > {
5313 use google_cloud_gax::paginator::Paginator;
5314 self.by_page().items()
5315 }
5316
5317 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5319 self.0.request.name = v.into();
5320 self
5321 }
5322
5323 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
5325 self.0.request.filter = v.into();
5326 self
5327 }
5328
5329 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
5331 self.0.request.page_size = v.into();
5332 self
5333 }
5334
5335 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
5337 self.0.request.page_token = v.into();
5338 self
5339 }
5340 }
5341
5342 #[doc(hidden)]
5343 impl crate::RequestBuilder for ListLocations {
5344 fn request_options(&mut self) -> &mut crate::RequestOptions {
5345 &mut self.0.options
5346 }
5347 }
5348
5349 #[derive(Clone, Debug)]
5366 pub struct GetLocation(RequestBuilder<google_cloud_location::model::GetLocationRequest>);
5367
5368 impl GetLocation {
5369 pub(crate) fn new(
5370 stub: std::sync::Arc<dyn super::super::stub::dynamic::CloudDeploy>,
5371 ) -> Self {
5372 Self(RequestBuilder::new(stub))
5373 }
5374
5375 pub fn with_request<V: Into<google_cloud_location::model::GetLocationRequest>>(
5377 mut self,
5378 v: V,
5379 ) -> Self {
5380 self.0.request = v.into();
5381 self
5382 }
5383
5384 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5386 self.0.options = v.into();
5387 self
5388 }
5389
5390 pub async fn send(self) -> Result<google_cloud_location::model::Location> {
5392 (*self.0.stub)
5393 .get_location(self.0.request, self.0.options)
5394 .await
5395 .map(crate::Response::into_body)
5396 }
5397
5398 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5400 self.0.request.name = v.into();
5401 self
5402 }
5403 }
5404
5405 #[doc(hidden)]
5406 impl crate::RequestBuilder for GetLocation {
5407 fn request_options(&mut self) -> &mut crate::RequestOptions {
5408 &mut self.0.options
5409 }
5410 }
5411
5412 #[derive(Clone, Debug)]
5429 pub struct SetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::SetIamPolicyRequest>);
5430
5431 impl SetIamPolicy {
5432 pub(crate) fn new(
5433 stub: std::sync::Arc<dyn super::super::stub::dynamic::CloudDeploy>,
5434 ) -> Self {
5435 Self(RequestBuilder::new(stub))
5436 }
5437
5438 pub fn with_request<V: Into<google_cloud_iam_v1::model::SetIamPolicyRequest>>(
5440 mut self,
5441 v: V,
5442 ) -> Self {
5443 self.0.request = v.into();
5444 self
5445 }
5446
5447 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5449 self.0.options = v.into();
5450 self
5451 }
5452
5453 pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
5455 (*self.0.stub)
5456 .set_iam_policy(self.0.request, self.0.options)
5457 .await
5458 .map(crate::Response::into_body)
5459 }
5460
5461 pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
5465 self.0.request.resource = v.into();
5466 self
5467 }
5468
5469 pub fn set_policy<T>(mut self, v: T) -> Self
5473 where
5474 T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
5475 {
5476 self.0.request.policy = std::option::Option::Some(v.into());
5477 self
5478 }
5479
5480 pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
5484 where
5485 T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
5486 {
5487 self.0.request.policy = v.map(|x| x.into());
5488 self
5489 }
5490
5491 pub fn set_update_mask<T>(mut self, v: T) -> Self
5493 where
5494 T: std::convert::Into<wkt::FieldMask>,
5495 {
5496 self.0.request.update_mask = std::option::Option::Some(v.into());
5497 self
5498 }
5499
5500 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
5502 where
5503 T: std::convert::Into<wkt::FieldMask>,
5504 {
5505 self.0.request.update_mask = v.map(|x| x.into());
5506 self
5507 }
5508 }
5509
5510 #[doc(hidden)]
5511 impl crate::RequestBuilder for SetIamPolicy {
5512 fn request_options(&mut self) -> &mut crate::RequestOptions {
5513 &mut self.0.options
5514 }
5515 }
5516
5517 #[derive(Clone, Debug)]
5534 pub struct GetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::GetIamPolicyRequest>);
5535
5536 impl GetIamPolicy {
5537 pub(crate) fn new(
5538 stub: std::sync::Arc<dyn super::super::stub::dynamic::CloudDeploy>,
5539 ) -> Self {
5540 Self(RequestBuilder::new(stub))
5541 }
5542
5543 pub fn with_request<V: Into<google_cloud_iam_v1::model::GetIamPolicyRequest>>(
5545 mut self,
5546 v: V,
5547 ) -> Self {
5548 self.0.request = v.into();
5549 self
5550 }
5551
5552 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5554 self.0.options = v.into();
5555 self
5556 }
5557
5558 pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
5560 (*self.0.stub)
5561 .get_iam_policy(self.0.request, self.0.options)
5562 .await
5563 .map(crate::Response::into_body)
5564 }
5565
5566 pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
5570 self.0.request.resource = v.into();
5571 self
5572 }
5573
5574 pub fn set_options<T>(mut self, v: T) -> Self
5576 where
5577 T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
5578 {
5579 self.0.request.options = std::option::Option::Some(v.into());
5580 self
5581 }
5582
5583 pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
5585 where
5586 T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
5587 {
5588 self.0.request.options = v.map(|x| x.into());
5589 self
5590 }
5591 }
5592
5593 #[doc(hidden)]
5594 impl crate::RequestBuilder for GetIamPolicy {
5595 fn request_options(&mut self) -> &mut crate::RequestOptions {
5596 &mut self.0.options
5597 }
5598 }
5599
5600 #[derive(Clone, Debug)]
5617 pub struct TestIamPermissions(
5618 RequestBuilder<google_cloud_iam_v1::model::TestIamPermissionsRequest>,
5619 );
5620
5621 impl TestIamPermissions {
5622 pub(crate) fn new(
5623 stub: std::sync::Arc<dyn super::super::stub::dynamic::CloudDeploy>,
5624 ) -> Self {
5625 Self(RequestBuilder::new(stub))
5626 }
5627
5628 pub fn with_request<V: Into<google_cloud_iam_v1::model::TestIamPermissionsRequest>>(
5630 mut self,
5631 v: V,
5632 ) -> Self {
5633 self.0.request = v.into();
5634 self
5635 }
5636
5637 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5639 self.0.options = v.into();
5640 self
5641 }
5642
5643 pub async fn send(self) -> Result<google_cloud_iam_v1::model::TestIamPermissionsResponse> {
5645 (*self.0.stub)
5646 .test_iam_permissions(self.0.request, self.0.options)
5647 .await
5648 .map(crate::Response::into_body)
5649 }
5650
5651 pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
5655 self.0.request.resource = v.into();
5656 self
5657 }
5658
5659 pub fn set_permissions<T, V>(mut self, v: T) -> Self
5663 where
5664 T: std::iter::IntoIterator<Item = V>,
5665 V: std::convert::Into<std::string::String>,
5666 {
5667 use std::iter::Iterator;
5668 self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
5669 self
5670 }
5671 }
5672
5673 #[doc(hidden)]
5674 impl crate::RequestBuilder for TestIamPermissions {
5675 fn request_options(&mut self) -> &mut crate::RequestOptions {
5676 &mut self.0.options
5677 }
5678 }
5679
5680 #[derive(Clone, Debug)]
5701 pub struct ListOperations(
5702 RequestBuilder<google_cloud_longrunning::model::ListOperationsRequest>,
5703 );
5704
5705 impl ListOperations {
5706 pub(crate) fn new(
5707 stub: std::sync::Arc<dyn super::super::stub::dynamic::CloudDeploy>,
5708 ) -> Self {
5709 Self(RequestBuilder::new(stub))
5710 }
5711
5712 pub fn with_request<V: Into<google_cloud_longrunning::model::ListOperationsRequest>>(
5714 mut self,
5715 v: V,
5716 ) -> Self {
5717 self.0.request = v.into();
5718 self
5719 }
5720
5721 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5723 self.0.options = v.into();
5724 self
5725 }
5726
5727 pub async fn send(self) -> Result<google_cloud_longrunning::model::ListOperationsResponse> {
5729 (*self.0.stub)
5730 .list_operations(self.0.request, self.0.options)
5731 .await
5732 .map(crate::Response::into_body)
5733 }
5734
5735 pub fn by_page(
5737 self,
5738 ) -> impl google_cloud_gax::paginator::Paginator<
5739 google_cloud_longrunning::model::ListOperationsResponse,
5740 crate::Error,
5741 > {
5742 use std::clone::Clone;
5743 let token = self.0.request.page_token.clone();
5744 let execute = move |token: String| {
5745 let mut builder = self.clone();
5746 builder.0.request = builder.0.request.set_page_token(token);
5747 builder.send()
5748 };
5749 google_cloud_gax::paginator::internal::new_paginator(token, execute)
5750 }
5751
5752 pub fn by_item(
5754 self,
5755 ) -> impl google_cloud_gax::paginator::ItemPaginator<
5756 google_cloud_longrunning::model::ListOperationsResponse,
5757 crate::Error,
5758 > {
5759 use google_cloud_gax::paginator::Paginator;
5760 self.by_page().items()
5761 }
5762
5763 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5765 self.0.request.name = v.into();
5766 self
5767 }
5768
5769 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
5771 self.0.request.filter = v.into();
5772 self
5773 }
5774
5775 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
5777 self.0.request.page_size = v.into();
5778 self
5779 }
5780
5781 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
5783 self.0.request.page_token = v.into();
5784 self
5785 }
5786
5787 pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
5789 self.0.request.return_partial_success = v.into();
5790 self
5791 }
5792 }
5793
5794 #[doc(hidden)]
5795 impl crate::RequestBuilder for ListOperations {
5796 fn request_options(&mut self) -> &mut crate::RequestOptions {
5797 &mut self.0.options
5798 }
5799 }
5800
5801 #[derive(Clone, Debug)]
5818 pub struct GetOperation(RequestBuilder<google_cloud_longrunning::model::GetOperationRequest>);
5819
5820 impl GetOperation {
5821 pub(crate) fn new(
5822 stub: std::sync::Arc<dyn super::super::stub::dynamic::CloudDeploy>,
5823 ) -> Self {
5824 Self(RequestBuilder::new(stub))
5825 }
5826
5827 pub fn with_request<V: Into<google_cloud_longrunning::model::GetOperationRequest>>(
5829 mut self,
5830 v: V,
5831 ) -> Self {
5832 self.0.request = v.into();
5833 self
5834 }
5835
5836 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5838 self.0.options = v.into();
5839 self
5840 }
5841
5842 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
5844 (*self.0.stub)
5845 .get_operation(self.0.request, self.0.options)
5846 .await
5847 .map(crate::Response::into_body)
5848 }
5849
5850 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5852 self.0.request.name = v.into();
5853 self
5854 }
5855 }
5856
5857 #[doc(hidden)]
5858 impl crate::RequestBuilder for GetOperation {
5859 fn request_options(&mut self) -> &mut crate::RequestOptions {
5860 &mut self.0.options
5861 }
5862 }
5863
5864 #[derive(Clone, Debug)]
5881 pub struct DeleteOperation(
5882 RequestBuilder<google_cloud_longrunning::model::DeleteOperationRequest>,
5883 );
5884
5885 impl DeleteOperation {
5886 pub(crate) fn new(
5887 stub: std::sync::Arc<dyn super::super::stub::dynamic::CloudDeploy>,
5888 ) -> Self {
5889 Self(RequestBuilder::new(stub))
5890 }
5891
5892 pub fn with_request<V: Into<google_cloud_longrunning::model::DeleteOperationRequest>>(
5894 mut self,
5895 v: V,
5896 ) -> Self {
5897 self.0.request = v.into();
5898 self
5899 }
5900
5901 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5903 self.0.options = v.into();
5904 self
5905 }
5906
5907 pub async fn send(self) -> Result<()> {
5909 (*self.0.stub)
5910 .delete_operation(self.0.request, self.0.options)
5911 .await
5912 .map(crate::Response::into_body)
5913 }
5914
5915 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5917 self.0.request.name = v.into();
5918 self
5919 }
5920 }
5921
5922 #[doc(hidden)]
5923 impl crate::RequestBuilder for DeleteOperation {
5924 fn request_options(&mut self) -> &mut crate::RequestOptions {
5925 &mut self.0.options
5926 }
5927 }
5928
5929 #[derive(Clone, Debug)]
5946 pub struct CancelOperation(
5947 RequestBuilder<google_cloud_longrunning::model::CancelOperationRequest>,
5948 );
5949
5950 impl CancelOperation {
5951 pub(crate) fn new(
5952 stub: std::sync::Arc<dyn super::super::stub::dynamic::CloudDeploy>,
5953 ) -> Self {
5954 Self(RequestBuilder::new(stub))
5955 }
5956
5957 pub fn with_request<V: Into<google_cloud_longrunning::model::CancelOperationRequest>>(
5959 mut self,
5960 v: V,
5961 ) -> Self {
5962 self.0.request = v.into();
5963 self
5964 }
5965
5966 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5968 self.0.options = v.into();
5969 self
5970 }
5971
5972 pub async fn send(self) -> Result<()> {
5974 (*self.0.stub)
5975 .cancel_operation(self.0.request, self.0.options)
5976 .await
5977 .map(crate::Response::into_body)
5978 }
5979
5980 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5982 self.0.request.name = v.into();
5983 self
5984 }
5985 }
5986
5987 #[doc(hidden)]
5988 impl crate::RequestBuilder for CancelOperation {
5989 fn request_options(&mut self) -> &mut crate::RequestOptions {
5990 &mut self.0.options
5991 }
5992 }
5993}