1#![allow(rustdoc::redundant_explicit_links)]
18#![allow(rustdoc::broken_intra_doc_links)]
19#![no_implicit_prelude]
20extern crate async_trait;
21extern crate bytes;
22extern crate gax;
23extern crate gaxi;
24extern crate gtype;
25extern crate iam_v1;
26extern crate lazy_static;
27extern crate location;
28extern crate longrunning;
29extern crate lro;
30extern crate reqwest;
31extern crate serde;
32extern crate serde_json;
33extern crate serde_with;
34extern crate std;
35extern crate tracing;
36extern crate wkt;
37
38mod debug;
39mod deserialize;
40mod serialize;
41
42#[derive(Clone, Default, PartialEq)]
45#[non_exhaustive]
46pub struct AutomationEvent {
47 pub message: std::string::String,
50
51 pub automation: std::string::String,
53
54 pub pipeline_uid: std::string::String,
56
57 pub r#type: crate::model::Type,
59
60 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
61}
62
63impl AutomationEvent {
64 pub fn new() -> Self {
65 std::default::Default::default()
66 }
67
68 pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
70 self.message = v.into();
71 self
72 }
73
74 pub fn set_automation<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
76 self.automation = v.into();
77 self
78 }
79
80 pub fn set_pipeline_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
82 self.pipeline_uid = v.into();
83 self
84 }
85
86 pub fn set_type<T: std::convert::Into<crate::model::Type>>(mut self, v: T) -> Self {
88 self.r#type = v.into();
89 self
90 }
91}
92
93impl wkt::message::Message for AutomationEvent {
94 fn typename() -> &'static str {
95 "type.googleapis.com/google.cloud.deploy.v1.AutomationEvent"
96 }
97}
98
99#[derive(Clone, Default, PartialEq)]
102#[non_exhaustive]
103pub struct AutomationRunEvent {
104 pub message: std::string::String,
107
108 pub automation_run: std::string::String,
110
111 pub pipeline_uid: std::string::String,
113
114 pub automation_id: std::string::String,
116
117 pub rule_id: std::string::String,
119
120 pub destination_target_id: std::string::String,
122
123 pub r#type: crate::model::Type,
125
126 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
127}
128
129impl AutomationRunEvent {
130 pub fn new() -> Self {
131 std::default::Default::default()
132 }
133
134 pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
136 self.message = v.into();
137 self
138 }
139
140 pub fn set_automation_run<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
142 self.automation_run = v.into();
143 self
144 }
145
146 pub fn set_pipeline_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
148 self.pipeline_uid = v.into();
149 self
150 }
151
152 pub fn set_automation_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
154 self.automation_id = v.into();
155 self
156 }
157
158 pub fn set_rule_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
160 self.rule_id = v.into();
161 self
162 }
163
164 pub fn set_destination_target_id<T: std::convert::Into<std::string::String>>(
166 mut self,
167 v: T,
168 ) -> Self {
169 self.destination_target_id = v.into();
170 self
171 }
172
173 pub fn set_type<T: std::convert::Into<crate::model::Type>>(mut self, v: T) -> Self {
175 self.r#type = v.into();
176 self
177 }
178}
179
180impl wkt::message::Message for AutomationRunEvent {
181 fn typename() -> &'static str {
182 "type.googleapis.com/google.cloud.deploy.v1.AutomationRunEvent"
183 }
184}
185
186#[derive(Clone, Default, PartialEq)]
191#[non_exhaustive]
192pub struct DeliveryPipeline {
193 pub name: std::string::String,
198
199 pub uid: std::string::String,
201
202 pub description: std::string::String,
205
206 pub annotations: std::collections::HashMap<std::string::String, std::string::String>,
209
210 pub labels: std::collections::HashMap<std::string::String, std::string::String>,
222
223 pub create_time: std::option::Option<wkt::Timestamp>,
225
226 pub update_time: std::option::Option<wkt::Timestamp>,
228
229 pub condition: std::option::Option<crate::model::PipelineCondition>,
231
232 pub etag: std::string::String,
236
237 pub suspended: bool,
240
241 pub pipeline: std::option::Option<crate::model::delivery_pipeline::Pipeline>,
243
244 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
245}
246
247impl DeliveryPipeline {
248 pub fn new() -> Self {
249 std::default::Default::default()
250 }
251
252 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
254 self.name = v.into();
255 self
256 }
257
258 pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
260 self.uid = v.into();
261 self
262 }
263
264 pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
266 self.description = v.into();
267 self
268 }
269
270 pub fn set_annotations<T, K, V>(mut self, v: T) -> Self
272 where
273 T: std::iter::IntoIterator<Item = (K, V)>,
274 K: std::convert::Into<std::string::String>,
275 V: std::convert::Into<std::string::String>,
276 {
277 use std::iter::Iterator;
278 self.annotations = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
279 self
280 }
281
282 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
284 where
285 T: std::iter::IntoIterator<Item = (K, V)>,
286 K: std::convert::Into<std::string::String>,
287 V: std::convert::Into<std::string::String>,
288 {
289 use std::iter::Iterator;
290 self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
291 self
292 }
293
294 pub fn set_create_time<T>(mut self, v: T) -> Self
296 where
297 T: std::convert::Into<wkt::Timestamp>,
298 {
299 self.create_time = std::option::Option::Some(v.into());
300 self
301 }
302
303 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
305 where
306 T: std::convert::Into<wkt::Timestamp>,
307 {
308 self.create_time = v.map(|x| x.into());
309 self
310 }
311
312 pub fn set_update_time<T>(mut self, v: T) -> Self
314 where
315 T: std::convert::Into<wkt::Timestamp>,
316 {
317 self.update_time = std::option::Option::Some(v.into());
318 self
319 }
320
321 pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
323 where
324 T: std::convert::Into<wkt::Timestamp>,
325 {
326 self.update_time = v.map(|x| x.into());
327 self
328 }
329
330 pub fn set_condition<T>(mut self, v: T) -> Self
332 where
333 T: std::convert::Into<crate::model::PipelineCondition>,
334 {
335 self.condition = std::option::Option::Some(v.into());
336 self
337 }
338
339 pub fn set_or_clear_condition<T>(mut self, v: std::option::Option<T>) -> Self
341 where
342 T: std::convert::Into<crate::model::PipelineCondition>,
343 {
344 self.condition = v.map(|x| x.into());
345 self
346 }
347
348 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
350 self.etag = v.into();
351 self
352 }
353
354 pub fn set_suspended<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
356 self.suspended = v.into();
357 self
358 }
359
360 pub fn set_pipeline<
365 T: std::convert::Into<std::option::Option<crate::model::delivery_pipeline::Pipeline>>,
366 >(
367 mut self,
368 v: T,
369 ) -> Self {
370 self.pipeline = v.into();
371 self
372 }
373
374 pub fn serial_pipeline(
378 &self,
379 ) -> std::option::Option<&std::boxed::Box<crate::model::SerialPipeline>> {
380 #[allow(unreachable_patterns)]
381 self.pipeline.as_ref().and_then(|v| match v {
382 crate::model::delivery_pipeline::Pipeline::SerialPipeline(v) => {
383 std::option::Option::Some(v)
384 }
385 _ => std::option::Option::None,
386 })
387 }
388
389 pub fn set_serial_pipeline<
395 T: std::convert::Into<std::boxed::Box<crate::model::SerialPipeline>>,
396 >(
397 mut self,
398 v: T,
399 ) -> Self {
400 self.pipeline = std::option::Option::Some(
401 crate::model::delivery_pipeline::Pipeline::SerialPipeline(v.into()),
402 );
403 self
404 }
405}
406
407impl wkt::message::Message for DeliveryPipeline {
408 fn typename() -> &'static str {
409 "type.googleapis.com/google.cloud.deploy.v1.DeliveryPipeline"
410 }
411}
412
413pub mod delivery_pipeline {
415 #[allow(unused_imports)]
416 use super::*;
417
418 #[derive(Clone, Debug, PartialEq)]
420 #[non_exhaustive]
421 pub enum Pipeline {
422 SerialPipeline(std::boxed::Box<crate::model::SerialPipeline>),
425 }
426}
427
428#[derive(Clone, Default, PartialEq)]
430#[non_exhaustive]
431pub struct SerialPipeline {
432 pub stages: std::vec::Vec<crate::model::Stage>,
435
436 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
437}
438
439impl SerialPipeline {
440 pub fn new() -> Self {
441 std::default::Default::default()
442 }
443
444 pub fn set_stages<T, V>(mut self, v: T) -> Self
446 where
447 T: std::iter::IntoIterator<Item = V>,
448 V: std::convert::Into<crate::model::Stage>,
449 {
450 use std::iter::Iterator;
451 self.stages = v.into_iter().map(|i| i.into()).collect();
452 self
453 }
454}
455
456impl wkt::message::Message for SerialPipeline {
457 fn typename() -> &'static str {
458 "type.googleapis.com/google.cloud.deploy.v1.SerialPipeline"
459 }
460}
461
462#[derive(Clone, Default, PartialEq)]
464#[non_exhaustive]
465pub struct Stage {
466 pub target_id: std::string::String,
473
474 pub profiles: std::vec::Vec<std::string::String>,
477
478 pub strategy: std::option::Option<crate::model::Strategy>,
480
481 pub deploy_parameters: std::vec::Vec<crate::model::DeployParameters>,
483
484 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
485}
486
487impl Stage {
488 pub fn new() -> Self {
489 std::default::Default::default()
490 }
491
492 pub fn set_target_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
494 self.target_id = v.into();
495 self
496 }
497
498 pub fn set_profiles<T, V>(mut self, v: T) -> Self
500 where
501 T: std::iter::IntoIterator<Item = V>,
502 V: std::convert::Into<std::string::String>,
503 {
504 use std::iter::Iterator;
505 self.profiles = v.into_iter().map(|i| i.into()).collect();
506 self
507 }
508
509 pub fn set_strategy<T>(mut self, v: T) -> Self
511 where
512 T: std::convert::Into<crate::model::Strategy>,
513 {
514 self.strategy = std::option::Option::Some(v.into());
515 self
516 }
517
518 pub fn set_or_clear_strategy<T>(mut self, v: std::option::Option<T>) -> Self
520 where
521 T: std::convert::Into<crate::model::Strategy>,
522 {
523 self.strategy = v.map(|x| x.into());
524 self
525 }
526
527 pub fn set_deploy_parameters<T, V>(mut self, v: T) -> Self
529 where
530 T: std::iter::IntoIterator<Item = V>,
531 V: std::convert::Into<crate::model::DeployParameters>,
532 {
533 use std::iter::Iterator;
534 self.deploy_parameters = v.into_iter().map(|i| i.into()).collect();
535 self
536 }
537}
538
539impl wkt::message::Message for Stage {
540 fn typename() -> &'static str {
541 "type.googleapis.com/google.cloud.deploy.v1.Stage"
542 }
543}
544
545#[derive(Clone, Default, PartialEq)]
547#[non_exhaustive]
548pub struct DeployParameters {
549 pub values: std::collections::HashMap<std::string::String, std::string::String>,
551
552 pub match_target_labels: std::collections::HashMap<std::string::String, std::string::String>,
556
557 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
558}
559
560impl DeployParameters {
561 pub fn new() -> Self {
562 std::default::Default::default()
563 }
564
565 pub fn set_values<T, K, V>(mut self, v: T) -> Self
567 where
568 T: std::iter::IntoIterator<Item = (K, V)>,
569 K: std::convert::Into<std::string::String>,
570 V: std::convert::Into<std::string::String>,
571 {
572 use std::iter::Iterator;
573 self.values = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
574 self
575 }
576
577 pub fn set_match_target_labels<T, K, V>(mut self, v: T) -> Self
579 where
580 T: std::iter::IntoIterator<Item = (K, V)>,
581 K: std::convert::Into<std::string::String>,
582 V: std::convert::Into<std::string::String>,
583 {
584 use std::iter::Iterator;
585 self.match_target_labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
586 self
587 }
588}
589
590impl wkt::message::Message for DeployParameters {
591 fn typename() -> &'static str {
592 "type.googleapis.com/google.cloud.deploy.v1.DeployParameters"
593 }
594}
595
596#[derive(Clone, Default, PartialEq)]
598#[non_exhaustive]
599pub struct Strategy {
600 pub deployment_strategy: std::option::Option<crate::model::strategy::DeploymentStrategy>,
602
603 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
604}
605
606impl Strategy {
607 pub fn new() -> Self {
608 std::default::Default::default()
609 }
610
611 pub fn set_deployment_strategy<
616 T: std::convert::Into<std::option::Option<crate::model::strategy::DeploymentStrategy>>,
617 >(
618 mut self,
619 v: T,
620 ) -> Self {
621 self.deployment_strategy = v.into();
622 self
623 }
624
625 pub fn standard(&self) -> std::option::Option<&std::boxed::Box<crate::model::Standard>> {
629 #[allow(unreachable_patterns)]
630 self.deployment_strategy.as_ref().and_then(|v| match v {
631 crate::model::strategy::DeploymentStrategy::Standard(v) => std::option::Option::Some(v),
632 _ => std::option::Option::None,
633 })
634 }
635
636 pub fn set_standard<T: std::convert::Into<std::boxed::Box<crate::model::Standard>>>(
642 mut self,
643 v: T,
644 ) -> Self {
645 self.deployment_strategy = std::option::Option::Some(
646 crate::model::strategy::DeploymentStrategy::Standard(v.into()),
647 );
648 self
649 }
650
651 pub fn canary(&self) -> std::option::Option<&std::boxed::Box<crate::model::Canary>> {
655 #[allow(unreachable_patterns)]
656 self.deployment_strategy.as_ref().and_then(|v| match v {
657 crate::model::strategy::DeploymentStrategy::Canary(v) => std::option::Option::Some(v),
658 _ => std::option::Option::None,
659 })
660 }
661
662 pub fn set_canary<T: std::convert::Into<std::boxed::Box<crate::model::Canary>>>(
668 mut self,
669 v: T,
670 ) -> Self {
671 self.deployment_strategy =
672 std::option::Option::Some(crate::model::strategy::DeploymentStrategy::Canary(v.into()));
673 self
674 }
675}
676
677impl wkt::message::Message for Strategy {
678 fn typename() -> &'static str {
679 "type.googleapis.com/google.cloud.deploy.v1.Strategy"
680 }
681}
682
683pub mod strategy {
685 #[allow(unused_imports)]
686 use super::*;
687
688 #[derive(Clone, Debug, PartialEq)]
690 #[non_exhaustive]
691 pub enum DeploymentStrategy {
692 Standard(std::boxed::Box<crate::model::Standard>),
695 Canary(std::boxed::Box<crate::model::Canary>),
698 }
699}
700
701#[derive(Clone, Default, PartialEq)]
703#[non_exhaustive]
704pub struct Predeploy {
705 pub actions: std::vec::Vec<std::string::String>,
708
709 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
710}
711
712impl Predeploy {
713 pub fn new() -> Self {
714 std::default::Default::default()
715 }
716
717 pub fn set_actions<T, V>(mut self, v: T) -> Self
719 where
720 T: std::iter::IntoIterator<Item = V>,
721 V: std::convert::Into<std::string::String>,
722 {
723 use std::iter::Iterator;
724 self.actions = v.into_iter().map(|i| i.into()).collect();
725 self
726 }
727}
728
729impl wkt::message::Message for Predeploy {
730 fn typename() -> &'static str {
731 "type.googleapis.com/google.cloud.deploy.v1.Predeploy"
732 }
733}
734
735#[derive(Clone, Default, PartialEq)]
737#[non_exhaustive]
738pub struct Postdeploy {
739 pub actions: std::vec::Vec<std::string::String>,
742
743 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
744}
745
746impl Postdeploy {
747 pub fn new() -> Self {
748 std::default::Default::default()
749 }
750
751 pub fn set_actions<T, V>(mut self, v: T) -> Self
753 where
754 T: std::iter::IntoIterator<Item = V>,
755 V: std::convert::Into<std::string::String>,
756 {
757 use std::iter::Iterator;
758 self.actions = v.into_iter().map(|i| i.into()).collect();
759 self
760 }
761}
762
763impl wkt::message::Message for Postdeploy {
764 fn typename() -> &'static str {
765 "type.googleapis.com/google.cloud.deploy.v1.Postdeploy"
766 }
767}
768
769#[derive(Clone, Default, PartialEq)]
771#[non_exhaustive]
772pub struct Standard {
773 pub verify: bool,
775
776 pub predeploy: std::option::Option<crate::model::Predeploy>,
779
780 pub postdeploy: std::option::Option<crate::model::Postdeploy>,
783
784 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
785}
786
787impl Standard {
788 pub fn new() -> Self {
789 std::default::Default::default()
790 }
791
792 pub fn set_verify<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
794 self.verify = v.into();
795 self
796 }
797
798 pub fn set_predeploy<T>(mut self, v: T) -> Self
800 where
801 T: std::convert::Into<crate::model::Predeploy>,
802 {
803 self.predeploy = std::option::Option::Some(v.into());
804 self
805 }
806
807 pub fn set_or_clear_predeploy<T>(mut self, v: std::option::Option<T>) -> Self
809 where
810 T: std::convert::Into<crate::model::Predeploy>,
811 {
812 self.predeploy = v.map(|x| x.into());
813 self
814 }
815
816 pub fn set_postdeploy<T>(mut self, v: T) -> Self
818 where
819 T: std::convert::Into<crate::model::Postdeploy>,
820 {
821 self.postdeploy = std::option::Option::Some(v.into());
822 self
823 }
824
825 pub fn set_or_clear_postdeploy<T>(mut self, v: std::option::Option<T>) -> Self
827 where
828 T: std::convert::Into<crate::model::Postdeploy>,
829 {
830 self.postdeploy = v.map(|x| x.into());
831 self
832 }
833}
834
835impl wkt::message::Message for Standard {
836 fn typename() -> &'static str {
837 "type.googleapis.com/google.cloud.deploy.v1.Standard"
838 }
839}
840
841#[derive(Clone, Default, PartialEq)]
843#[non_exhaustive]
844pub struct Canary {
845 pub runtime_config: std::option::Option<crate::model::RuntimeConfig>,
849
850 pub mode: std::option::Option<crate::model::canary::Mode>,
852
853 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
854}
855
856impl Canary {
857 pub fn new() -> Self {
858 std::default::Default::default()
859 }
860
861 pub fn set_runtime_config<T>(mut self, v: T) -> Self
863 where
864 T: std::convert::Into<crate::model::RuntimeConfig>,
865 {
866 self.runtime_config = std::option::Option::Some(v.into());
867 self
868 }
869
870 pub fn set_or_clear_runtime_config<T>(mut self, v: std::option::Option<T>) -> Self
872 where
873 T: std::convert::Into<crate::model::RuntimeConfig>,
874 {
875 self.runtime_config = v.map(|x| x.into());
876 self
877 }
878
879 pub fn set_mode<T: std::convert::Into<std::option::Option<crate::model::canary::Mode>>>(
884 mut self,
885 v: T,
886 ) -> Self {
887 self.mode = v.into();
888 self
889 }
890
891 pub fn canary_deployment(
895 &self,
896 ) -> std::option::Option<&std::boxed::Box<crate::model::CanaryDeployment>> {
897 #[allow(unreachable_patterns)]
898 self.mode.as_ref().and_then(|v| match v {
899 crate::model::canary::Mode::CanaryDeployment(v) => std::option::Option::Some(v),
900 _ => std::option::Option::None,
901 })
902 }
903
904 pub fn set_canary_deployment<
910 T: std::convert::Into<std::boxed::Box<crate::model::CanaryDeployment>>,
911 >(
912 mut self,
913 v: T,
914 ) -> Self {
915 self.mode =
916 std::option::Option::Some(crate::model::canary::Mode::CanaryDeployment(v.into()));
917 self
918 }
919
920 pub fn custom_canary_deployment(
924 &self,
925 ) -> std::option::Option<&std::boxed::Box<crate::model::CustomCanaryDeployment>> {
926 #[allow(unreachable_patterns)]
927 self.mode.as_ref().and_then(|v| match v {
928 crate::model::canary::Mode::CustomCanaryDeployment(v) => std::option::Option::Some(v),
929 _ => std::option::Option::None,
930 })
931 }
932
933 pub fn set_custom_canary_deployment<
939 T: std::convert::Into<std::boxed::Box<crate::model::CustomCanaryDeployment>>,
940 >(
941 mut self,
942 v: T,
943 ) -> Self {
944 self.mode =
945 std::option::Option::Some(crate::model::canary::Mode::CustomCanaryDeployment(v.into()));
946 self
947 }
948}
949
950impl wkt::message::Message for Canary {
951 fn typename() -> &'static str {
952 "type.googleapis.com/google.cloud.deploy.v1.Canary"
953 }
954}
955
956pub mod canary {
958 #[allow(unused_imports)]
959 use super::*;
960
961 #[derive(Clone, Debug, PartialEq)]
963 #[non_exhaustive]
964 pub enum Mode {
965 CanaryDeployment(std::boxed::Box<crate::model::CanaryDeployment>),
967 CustomCanaryDeployment(std::boxed::Box<crate::model::CustomCanaryDeployment>),
971 }
972}
973
974#[derive(Clone, Default, PartialEq)]
976#[non_exhaustive]
977pub struct CanaryDeployment {
978 pub percentages: std::vec::Vec<i32>,
984
985 pub verify: bool,
988
989 pub predeploy: std::option::Option<crate::model::Predeploy>,
992
993 pub postdeploy: std::option::Option<crate::model::Postdeploy>,
996
997 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
998}
999
1000impl CanaryDeployment {
1001 pub fn new() -> Self {
1002 std::default::Default::default()
1003 }
1004
1005 pub fn set_percentages<T, V>(mut self, v: T) -> Self
1007 where
1008 T: std::iter::IntoIterator<Item = V>,
1009 V: std::convert::Into<i32>,
1010 {
1011 use std::iter::Iterator;
1012 self.percentages = v.into_iter().map(|i| i.into()).collect();
1013 self
1014 }
1015
1016 pub fn set_verify<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1018 self.verify = v.into();
1019 self
1020 }
1021
1022 pub fn set_predeploy<T>(mut self, v: T) -> Self
1024 where
1025 T: std::convert::Into<crate::model::Predeploy>,
1026 {
1027 self.predeploy = std::option::Option::Some(v.into());
1028 self
1029 }
1030
1031 pub fn set_or_clear_predeploy<T>(mut self, v: std::option::Option<T>) -> Self
1033 where
1034 T: std::convert::Into<crate::model::Predeploy>,
1035 {
1036 self.predeploy = v.map(|x| x.into());
1037 self
1038 }
1039
1040 pub fn set_postdeploy<T>(mut self, v: T) -> Self
1042 where
1043 T: std::convert::Into<crate::model::Postdeploy>,
1044 {
1045 self.postdeploy = std::option::Option::Some(v.into());
1046 self
1047 }
1048
1049 pub fn set_or_clear_postdeploy<T>(mut self, v: std::option::Option<T>) -> Self
1051 where
1052 T: std::convert::Into<crate::model::Postdeploy>,
1053 {
1054 self.postdeploy = v.map(|x| x.into());
1055 self
1056 }
1057}
1058
1059impl wkt::message::Message for CanaryDeployment {
1060 fn typename() -> &'static str {
1061 "type.googleapis.com/google.cloud.deploy.v1.CanaryDeployment"
1062 }
1063}
1064
1065#[derive(Clone, Default, PartialEq)]
1068#[non_exhaustive]
1069pub struct CustomCanaryDeployment {
1070 pub phase_configs: std::vec::Vec<crate::model::custom_canary_deployment::PhaseConfig>,
1073
1074 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1075}
1076
1077impl CustomCanaryDeployment {
1078 pub fn new() -> Self {
1079 std::default::Default::default()
1080 }
1081
1082 pub fn set_phase_configs<T, V>(mut self, v: T) -> Self
1084 where
1085 T: std::iter::IntoIterator<Item = V>,
1086 V: std::convert::Into<crate::model::custom_canary_deployment::PhaseConfig>,
1087 {
1088 use std::iter::Iterator;
1089 self.phase_configs = v.into_iter().map(|i| i.into()).collect();
1090 self
1091 }
1092}
1093
1094impl wkt::message::Message for CustomCanaryDeployment {
1095 fn typename() -> &'static str {
1096 "type.googleapis.com/google.cloud.deploy.v1.CustomCanaryDeployment"
1097 }
1098}
1099
1100pub mod custom_canary_deployment {
1102 #[allow(unused_imports)]
1103 use super::*;
1104
1105 #[derive(Clone, Default, PartialEq)]
1108 #[non_exhaustive]
1109 pub struct PhaseConfig {
1110 pub phase_id: std::string::String,
1116
1117 pub percentage: i32,
1119
1120 pub profiles: std::vec::Vec<std::string::String>,
1124
1125 pub verify: bool,
1128
1129 pub predeploy: std::option::Option<crate::model::Predeploy>,
1132
1133 pub postdeploy: std::option::Option<crate::model::Postdeploy>,
1136
1137 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1138 }
1139
1140 impl PhaseConfig {
1141 pub fn new() -> Self {
1142 std::default::Default::default()
1143 }
1144
1145 pub fn set_phase_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1147 self.phase_id = v.into();
1148 self
1149 }
1150
1151 pub fn set_percentage<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1153 self.percentage = v.into();
1154 self
1155 }
1156
1157 pub fn set_profiles<T, V>(mut self, v: T) -> Self
1159 where
1160 T: std::iter::IntoIterator<Item = V>,
1161 V: std::convert::Into<std::string::String>,
1162 {
1163 use std::iter::Iterator;
1164 self.profiles = v.into_iter().map(|i| i.into()).collect();
1165 self
1166 }
1167
1168 pub fn set_verify<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1170 self.verify = v.into();
1171 self
1172 }
1173
1174 pub fn set_predeploy<T>(mut self, v: T) -> Self
1176 where
1177 T: std::convert::Into<crate::model::Predeploy>,
1178 {
1179 self.predeploy = std::option::Option::Some(v.into());
1180 self
1181 }
1182
1183 pub fn set_or_clear_predeploy<T>(mut self, v: std::option::Option<T>) -> Self
1185 where
1186 T: std::convert::Into<crate::model::Predeploy>,
1187 {
1188 self.predeploy = v.map(|x| x.into());
1189 self
1190 }
1191
1192 pub fn set_postdeploy<T>(mut self, v: T) -> Self
1194 where
1195 T: std::convert::Into<crate::model::Postdeploy>,
1196 {
1197 self.postdeploy = std::option::Option::Some(v.into());
1198 self
1199 }
1200
1201 pub fn set_or_clear_postdeploy<T>(mut self, v: std::option::Option<T>) -> Self
1203 where
1204 T: std::convert::Into<crate::model::Postdeploy>,
1205 {
1206 self.postdeploy = v.map(|x| x.into());
1207 self
1208 }
1209 }
1210
1211 impl wkt::message::Message for PhaseConfig {
1212 fn typename() -> &'static str {
1213 "type.googleapis.com/google.cloud.deploy.v1.CustomCanaryDeployment.PhaseConfig"
1214 }
1215 }
1216}
1217
1218#[derive(Clone, Default, PartialEq)]
1220#[non_exhaustive]
1221pub struct KubernetesConfig {
1222 pub service_definition: std::option::Option<crate::model::kubernetes_config::ServiceDefinition>,
1224
1225 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1226}
1227
1228impl KubernetesConfig {
1229 pub fn new() -> Self {
1230 std::default::Default::default()
1231 }
1232
1233 pub fn set_service_definition<
1238 T: std::convert::Into<std::option::Option<crate::model::kubernetes_config::ServiceDefinition>>,
1239 >(
1240 mut self,
1241 v: T,
1242 ) -> Self {
1243 self.service_definition = v.into();
1244 self
1245 }
1246
1247 pub fn gateway_service_mesh(
1251 &self,
1252 ) -> std::option::Option<&std::boxed::Box<crate::model::kubernetes_config::GatewayServiceMesh>>
1253 {
1254 #[allow(unreachable_patterns)]
1255 self.service_definition.as_ref().and_then(|v| match v {
1256 crate::model::kubernetes_config::ServiceDefinition::GatewayServiceMesh(v) => {
1257 std::option::Option::Some(v)
1258 }
1259 _ => std::option::Option::None,
1260 })
1261 }
1262
1263 pub fn set_gateway_service_mesh<
1269 T: std::convert::Into<std::boxed::Box<crate::model::kubernetes_config::GatewayServiceMesh>>,
1270 >(
1271 mut self,
1272 v: T,
1273 ) -> Self {
1274 self.service_definition = std::option::Option::Some(
1275 crate::model::kubernetes_config::ServiceDefinition::GatewayServiceMesh(v.into()),
1276 );
1277 self
1278 }
1279
1280 pub fn service_networking(
1284 &self,
1285 ) -> std::option::Option<&std::boxed::Box<crate::model::kubernetes_config::ServiceNetworking>>
1286 {
1287 #[allow(unreachable_patterns)]
1288 self.service_definition.as_ref().and_then(|v| match v {
1289 crate::model::kubernetes_config::ServiceDefinition::ServiceNetworking(v) => {
1290 std::option::Option::Some(v)
1291 }
1292 _ => std::option::Option::None,
1293 })
1294 }
1295
1296 pub fn set_service_networking<
1302 T: std::convert::Into<std::boxed::Box<crate::model::kubernetes_config::ServiceNetworking>>,
1303 >(
1304 mut self,
1305 v: T,
1306 ) -> Self {
1307 self.service_definition = std::option::Option::Some(
1308 crate::model::kubernetes_config::ServiceDefinition::ServiceNetworking(v.into()),
1309 );
1310 self
1311 }
1312}
1313
1314impl wkt::message::Message for KubernetesConfig {
1315 fn typename() -> &'static str {
1316 "type.googleapis.com/google.cloud.deploy.v1.KubernetesConfig"
1317 }
1318}
1319
1320pub mod kubernetes_config {
1322 #[allow(unused_imports)]
1323 use super::*;
1324
1325 #[derive(Clone, Default, PartialEq)]
1327 #[non_exhaustive]
1328 pub struct GatewayServiceMesh {
1329 pub http_route: std::string::String,
1331
1332 pub service: std::string::String,
1334
1335 pub deployment: std::string::String,
1338
1339 pub route_update_wait_time: std::option::Option<wkt::Duration>,
1343
1344 pub stable_cutback_duration: std::option::Option<wkt::Duration>,
1349
1350 pub pod_selector_label: std::string::String,
1353
1354 pub route_destinations: std::option::Option<
1360 crate::model::kubernetes_config::gateway_service_mesh::RouteDestinations,
1361 >,
1362
1363 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1364 }
1365
1366 impl GatewayServiceMesh {
1367 pub fn new() -> Self {
1368 std::default::Default::default()
1369 }
1370
1371 pub fn set_http_route<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1373 self.http_route = v.into();
1374 self
1375 }
1376
1377 pub fn set_service<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1379 self.service = v.into();
1380 self
1381 }
1382
1383 pub fn set_deployment<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1385 self.deployment = v.into();
1386 self
1387 }
1388
1389 pub fn set_route_update_wait_time<T>(mut self, v: T) -> Self
1391 where
1392 T: std::convert::Into<wkt::Duration>,
1393 {
1394 self.route_update_wait_time = std::option::Option::Some(v.into());
1395 self
1396 }
1397
1398 pub fn set_or_clear_route_update_wait_time<T>(mut self, v: std::option::Option<T>) -> Self
1400 where
1401 T: std::convert::Into<wkt::Duration>,
1402 {
1403 self.route_update_wait_time = v.map(|x| x.into());
1404 self
1405 }
1406
1407 pub fn set_stable_cutback_duration<T>(mut self, v: T) -> Self
1409 where
1410 T: std::convert::Into<wkt::Duration>,
1411 {
1412 self.stable_cutback_duration = std::option::Option::Some(v.into());
1413 self
1414 }
1415
1416 pub fn set_or_clear_stable_cutback_duration<T>(mut self, v: std::option::Option<T>) -> Self
1418 where
1419 T: std::convert::Into<wkt::Duration>,
1420 {
1421 self.stable_cutback_duration = v.map(|x| x.into());
1422 self
1423 }
1424
1425 pub fn set_pod_selector_label<T: std::convert::Into<std::string::String>>(
1427 mut self,
1428 v: T,
1429 ) -> Self {
1430 self.pod_selector_label = v.into();
1431 self
1432 }
1433
1434 pub fn set_route_destinations<T>(mut self, v: T) -> Self
1436 where
1437 T: std::convert::Into<
1438 crate::model::kubernetes_config::gateway_service_mesh::RouteDestinations,
1439 >,
1440 {
1441 self.route_destinations = std::option::Option::Some(v.into());
1442 self
1443 }
1444
1445 pub fn set_or_clear_route_destinations<T>(mut self, v: std::option::Option<T>) -> Self
1447 where
1448 T: std::convert::Into<
1449 crate::model::kubernetes_config::gateway_service_mesh::RouteDestinations,
1450 >,
1451 {
1452 self.route_destinations = v.map(|x| x.into());
1453 self
1454 }
1455 }
1456
1457 impl wkt::message::Message for GatewayServiceMesh {
1458 fn typename() -> &'static str {
1459 "type.googleapis.com/google.cloud.deploy.v1.KubernetesConfig.GatewayServiceMesh"
1460 }
1461 }
1462
1463 pub mod gateway_service_mesh {
1465 #[allow(unused_imports)]
1466 use super::*;
1467
1468 #[derive(Clone, Default, PartialEq)]
1470 #[non_exhaustive]
1471 pub struct RouteDestinations {
1472 pub destination_ids: std::vec::Vec<std::string::String>,
1477
1478 pub propagate_service: bool,
1484
1485 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1486 }
1487
1488 impl RouteDestinations {
1489 pub fn new() -> Self {
1490 std::default::Default::default()
1491 }
1492
1493 pub fn set_destination_ids<T, V>(mut self, v: T) -> Self
1495 where
1496 T: std::iter::IntoIterator<Item = V>,
1497 V: std::convert::Into<std::string::String>,
1498 {
1499 use std::iter::Iterator;
1500 self.destination_ids = v.into_iter().map(|i| i.into()).collect();
1501 self
1502 }
1503
1504 pub fn set_propagate_service<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1506 self.propagate_service = v.into();
1507 self
1508 }
1509 }
1510
1511 impl wkt::message::Message for RouteDestinations {
1512 fn typename() -> &'static str {
1513 "type.googleapis.com/google.cloud.deploy.v1.KubernetesConfig.GatewayServiceMesh.RouteDestinations"
1514 }
1515 }
1516 }
1517
1518 #[derive(Clone, Default, PartialEq)]
1520 #[non_exhaustive]
1521 pub struct ServiceNetworking {
1522 pub service: std::string::String,
1524
1525 pub deployment: std::string::String,
1528
1529 pub disable_pod_overprovisioning: bool,
1534
1535 pub pod_selector_label: std::string::String,
1538
1539 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1540 }
1541
1542 impl ServiceNetworking {
1543 pub fn new() -> Self {
1544 std::default::Default::default()
1545 }
1546
1547 pub fn set_service<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1549 self.service = v.into();
1550 self
1551 }
1552
1553 pub fn set_deployment<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1555 self.deployment = v.into();
1556 self
1557 }
1558
1559 pub fn set_disable_pod_overprovisioning<T: std::convert::Into<bool>>(
1561 mut self,
1562 v: T,
1563 ) -> Self {
1564 self.disable_pod_overprovisioning = v.into();
1565 self
1566 }
1567
1568 pub fn set_pod_selector_label<T: std::convert::Into<std::string::String>>(
1570 mut self,
1571 v: T,
1572 ) -> Self {
1573 self.pod_selector_label = v.into();
1574 self
1575 }
1576 }
1577
1578 impl wkt::message::Message for ServiceNetworking {
1579 fn typename() -> &'static str {
1580 "type.googleapis.com/google.cloud.deploy.v1.KubernetesConfig.ServiceNetworking"
1581 }
1582 }
1583
1584 #[derive(Clone, Debug, PartialEq)]
1586 #[non_exhaustive]
1587 pub enum ServiceDefinition {
1588 GatewayServiceMesh(std::boxed::Box<crate::model::kubernetes_config::GatewayServiceMesh>),
1590 ServiceNetworking(std::boxed::Box<crate::model::kubernetes_config::ServiceNetworking>),
1592 }
1593}
1594
1595#[derive(Clone, Default, PartialEq)]
1597#[non_exhaustive]
1598pub struct CloudRunConfig {
1599 pub automatic_traffic_control: bool,
1604
1605 pub canary_revision_tags: std::vec::Vec<std::string::String>,
1608
1609 pub prior_revision_tags: std::vec::Vec<std::string::String>,
1612
1613 pub stable_revision_tags: std::vec::Vec<std::string::String>,
1616
1617 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1618}
1619
1620impl CloudRunConfig {
1621 pub fn new() -> Self {
1622 std::default::Default::default()
1623 }
1624
1625 pub fn set_automatic_traffic_control<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1627 self.automatic_traffic_control = v.into();
1628 self
1629 }
1630
1631 pub fn set_canary_revision_tags<T, V>(mut self, v: T) -> Self
1633 where
1634 T: std::iter::IntoIterator<Item = V>,
1635 V: std::convert::Into<std::string::String>,
1636 {
1637 use std::iter::Iterator;
1638 self.canary_revision_tags = v.into_iter().map(|i| i.into()).collect();
1639 self
1640 }
1641
1642 pub fn set_prior_revision_tags<T, V>(mut self, v: T) -> Self
1644 where
1645 T: std::iter::IntoIterator<Item = V>,
1646 V: std::convert::Into<std::string::String>,
1647 {
1648 use std::iter::Iterator;
1649 self.prior_revision_tags = v.into_iter().map(|i| i.into()).collect();
1650 self
1651 }
1652
1653 pub fn set_stable_revision_tags<T, V>(mut self, v: T) -> Self
1655 where
1656 T: std::iter::IntoIterator<Item = V>,
1657 V: std::convert::Into<std::string::String>,
1658 {
1659 use std::iter::Iterator;
1660 self.stable_revision_tags = v.into_iter().map(|i| i.into()).collect();
1661 self
1662 }
1663}
1664
1665impl wkt::message::Message for CloudRunConfig {
1666 fn typename() -> &'static str {
1667 "type.googleapis.com/google.cloud.deploy.v1.CloudRunConfig"
1668 }
1669}
1670
1671#[derive(Clone, Default, PartialEq)]
1674#[non_exhaustive]
1675pub struct RuntimeConfig {
1676 pub runtime_config: std::option::Option<crate::model::runtime_config::RuntimeConfig>,
1678
1679 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1680}
1681
1682impl RuntimeConfig {
1683 pub fn new() -> Self {
1684 std::default::Default::default()
1685 }
1686
1687 pub fn set_runtime_config<
1692 T: std::convert::Into<std::option::Option<crate::model::runtime_config::RuntimeConfig>>,
1693 >(
1694 mut self,
1695 v: T,
1696 ) -> Self {
1697 self.runtime_config = v.into();
1698 self
1699 }
1700
1701 pub fn kubernetes(
1705 &self,
1706 ) -> std::option::Option<&std::boxed::Box<crate::model::KubernetesConfig>> {
1707 #[allow(unreachable_patterns)]
1708 self.runtime_config.as_ref().and_then(|v| match v {
1709 crate::model::runtime_config::RuntimeConfig::Kubernetes(v) => {
1710 std::option::Option::Some(v)
1711 }
1712 _ => std::option::Option::None,
1713 })
1714 }
1715
1716 pub fn set_kubernetes<
1722 T: std::convert::Into<std::boxed::Box<crate::model::KubernetesConfig>>,
1723 >(
1724 mut self,
1725 v: T,
1726 ) -> Self {
1727 self.runtime_config = std::option::Option::Some(
1728 crate::model::runtime_config::RuntimeConfig::Kubernetes(v.into()),
1729 );
1730 self
1731 }
1732
1733 pub fn cloud_run(&self) -> std::option::Option<&std::boxed::Box<crate::model::CloudRunConfig>> {
1737 #[allow(unreachable_patterns)]
1738 self.runtime_config.as_ref().and_then(|v| match v {
1739 crate::model::runtime_config::RuntimeConfig::CloudRun(v) => {
1740 std::option::Option::Some(v)
1741 }
1742 _ => std::option::Option::None,
1743 })
1744 }
1745
1746 pub fn set_cloud_run<T: std::convert::Into<std::boxed::Box<crate::model::CloudRunConfig>>>(
1752 mut self,
1753 v: T,
1754 ) -> Self {
1755 self.runtime_config = std::option::Option::Some(
1756 crate::model::runtime_config::RuntimeConfig::CloudRun(v.into()),
1757 );
1758 self
1759 }
1760}
1761
1762impl wkt::message::Message for RuntimeConfig {
1763 fn typename() -> &'static str {
1764 "type.googleapis.com/google.cloud.deploy.v1.RuntimeConfig"
1765 }
1766}
1767
1768pub mod runtime_config {
1770 #[allow(unused_imports)]
1771 use super::*;
1772
1773 #[derive(Clone, Debug, PartialEq)]
1775 #[non_exhaustive]
1776 pub enum RuntimeConfig {
1777 Kubernetes(std::boxed::Box<crate::model::KubernetesConfig>),
1779 CloudRun(std::boxed::Box<crate::model::CloudRunConfig>),
1781 }
1782}
1783
1784#[derive(Clone, Default, PartialEq)]
1787#[non_exhaustive]
1788pub struct PipelineReadyCondition {
1789 pub status: bool,
1794
1795 pub update_time: std::option::Option<wkt::Timestamp>,
1797
1798 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1799}
1800
1801impl PipelineReadyCondition {
1802 pub fn new() -> Self {
1803 std::default::Default::default()
1804 }
1805
1806 pub fn set_status<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1808 self.status = v.into();
1809 self
1810 }
1811
1812 pub fn set_update_time<T>(mut self, v: T) -> Self
1814 where
1815 T: std::convert::Into<wkt::Timestamp>,
1816 {
1817 self.update_time = std::option::Option::Some(v.into());
1818 self
1819 }
1820
1821 pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
1823 where
1824 T: std::convert::Into<wkt::Timestamp>,
1825 {
1826 self.update_time = v.map(|x| x.into());
1827 self
1828 }
1829}
1830
1831impl wkt::message::Message for PipelineReadyCondition {
1832 fn typename() -> &'static str {
1833 "type.googleapis.com/google.cloud.deploy.v1.PipelineReadyCondition"
1834 }
1835}
1836
1837#[derive(Clone, Default, PartialEq)]
1840#[non_exhaustive]
1841pub struct TargetsPresentCondition {
1842 pub status: bool,
1844
1845 pub missing_targets: std::vec::Vec<std::string::String>,
1848
1849 pub update_time: std::option::Option<wkt::Timestamp>,
1851
1852 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1853}
1854
1855impl TargetsPresentCondition {
1856 pub fn new() -> Self {
1857 std::default::Default::default()
1858 }
1859
1860 pub fn set_status<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1862 self.status = v.into();
1863 self
1864 }
1865
1866 pub fn set_missing_targets<T, V>(mut self, v: T) -> Self
1868 where
1869 T: std::iter::IntoIterator<Item = V>,
1870 V: std::convert::Into<std::string::String>,
1871 {
1872 use std::iter::Iterator;
1873 self.missing_targets = v.into_iter().map(|i| i.into()).collect();
1874 self
1875 }
1876
1877 pub fn set_update_time<T>(mut self, v: T) -> Self
1879 where
1880 T: std::convert::Into<wkt::Timestamp>,
1881 {
1882 self.update_time = std::option::Option::Some(v.into());
1883 self
1884 }
1885
1886 pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
1888 where
1889 T: std::convert::Into<wkt::Timestamp>,
1890 {
1891 self.update_time = v.map(|x| x.into());
1892 self
1893 }
1894}
1895
1896impl wkt::message::Message for TargetsPresentCondition {
1897 fn typename() -> &'static str {
1898 "type.googleapis.com/google.cloud.deploy.v1.TargetsPresentCondition"
1899 }
1900}
1901
1902#[derive(Clone, Default, PartialEq)]
1905#[non_exhaustive]
1906pub struct TargetsTypeCondition {
1907 pub status: bool,
1911
1912 pub error_details: std::string::String,
1914
1915 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1916}
1917
1918impl TargetsTypeCondition {
1919 pub fn new() -> Self {
1920 std::default::Default::default()
1921 }
1922
1923 pub fn set_status<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1925 self.status = v.into();
1926 self
1927 }
1928
1929 pub fn set_error_details<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1931 self.error_details = v.into();
1932 self
1933 }
1934}
1935
1936impl wkt::message::Message for TargetsTypeCondition {
1937 fn typename() -> &'static str {
1938 "type.googleapis.com/google.cloud.deploy.v1.TargetsTypeCondition"
1939 }
1940}
1941
1942#[derive(Clone, Default, PartialEq)]
1944#[non_exhaustive]
1945pub struct PipelineCondition {
1946 pub pipeline_ready_condition: std::option::Option<crate::model::PipelineReadyCondition>,
1948
1949 pub targets_present_condition: std::option::Option<crate::model::TargetsPresentCondition>,
1951
1952 pub targets_type_condition: std::option::Option<crate::model::TargetsTypeCondition>,
1955
1956 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1957}
1958
1959impl PipelineCondition {
1960 pub fn new() -> Self {
1961 std::default::Default::default()
1962 }
1963
1964 pub fn set_pipeline_ready_condition<T>(mut self, v: T) -> Self
1966 where
1967 T: std::convert::Into<crate::model::PipelineReadyCondition>,
1968 {
1969 self.pipeline_ready_condition = std::option::Option::Some(v.into());
1970 self
1971 }
1972
1973 pub fn set_or_clear_pipeline_ready_condition<T>(mut self, v: std::option::Option<T>) -> Self
1975 where
1976 T: std::convert::Into<crate::model::PipelineReadyCondition>,
1977 {
1978 self.pipeline_ready_condition = v.map(|x| x.into());
1979 self
1980 }
1981
1982 pub fn set_targets_present_condition<T>(mut self, v: T) -> Self
1984 where
1985 T: std::convert::Into<crate::model::TargetsPresentCondition>,
1986 {
1987 self.targets_present_condition = std::option::Option::Some(v.into());
1988 self
1989 }
1990
1991 pub fn set_or_clear_targets_present_condition<T>(mut self, v: std::option::Option<T>) -> Self
1993 where
1994 T: std::convert::Into<crate::model::TargetsPresentCondition>,
1995 {
1996 self.targets_present_condition = v.map(|x| x.into());
1997 self
1998 }
1999
2000 pub fn set_targets_type_condition<T>(mut self, v: T) -> Self
2002 where
2003 T: std::convert::Into<crate::model::TargetsTypeCondition>,
2004 {
2005 self.targets_type_condition = std::option::Option::Some(v.into());
2006 self
2007 }
2008
2009 pub fn set_or_clear_targets_type_condition<T>(mut self, v: std::option::Option<T>) -> Self
2011 where
2012 T: std::convert::Into<crate::model::TargetsTypeCondition>,
2013 {
2014 self.targets_type_condition = v.map(|x| x.into());
2015 self
2016 }
2017}
2018
2019impl wkt::message::Message for PipelineCondition {
2020 fn typename() -> &'static str {
2021 "type.googleapis.com/google.cloud.deploy.v1.PipelineCondition"
2022 }
2023}
2024
2025#[derive(Clone, Default, PartialEq)]
2027#[non_exhaustive]
2028pub struct ListDeliveryPipelinesRequest {
2029 pub parent: std::string::String,
2032
2033 pub page_size: i32,
2038
2039 pub page_token: std::string::String,
2045
2046 pub filter: std::string::String,
2049
2050 pub order_by: std::string::String,
2052
2053 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2054}
2055
2056impl ListDeliveryPipelinesRequest {
2057 pub fn new() -> Self {
2058 std::default::Default::default()
2059 }
2060
2061 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2063 self.parent = v.into();
2064 self
2065 }
2066
2067 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2069 self.page_size = v.into();
2070 self
2071 }
2072
2073 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2075 self.page_token = v.into();
2076 self
2077 }
2078
2079 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2081 self.filter = v.into();
2082 self
2083 }
2084
2085 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2087 self.order_by = v.into();
2088 self
2089 }
2090}
2091
2092impl wkt::message::Message for ListDeliveryPipelinesRequest {
2093 fn typename() -> &'static str {
2094 "type.googleapis.com/google.cloud.deploy.v1.ListDeliveryPipelinesRequest"
2095 }
2096}
2097
2098#[derive(Clone, Default, PartialEq)]
2100#[non_exhaustive]
2101pub struct ListDeliveryPipelinesResponse {
2102 pub delivery_pipelines: std::vec::Vec<crate::model::DeliveryPipeline>,
2104
2105 pub next_page_token: std::string::String,
2108
2109 pub unreachable: std::vec::Vec<std::string::String>,
2111
2112 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2113}
2114
2115impl ListDeliveryPipelinesResponse {
2116 pub fn new() -> Self {
2117 std::default::Default::default()
2118 }
2119
2120 pub fn set_delivery_pipelines<T, V>(mut self, v: T) -> Self
2122 where
2123 T: std::iter::IntoIterator<Item = V>,
2124 V: std::convert::Into<crate::model::DeliveryPipeline>,
2125 {
2126 use std::iter::Iterator;
2127 self.delivery_pipelines = v.into_iter().map(|i| i.into()).collect();
2128 self
2129 }
2130
2131 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2133 self.next_page_token = v.into();
2134 self
2135 }
2136
2137 pub fn set_unreachable<T, V>(mut self, v: T) -> Self
2139 where
2140 T: std::iter::IntoIterator<Item = V>,
2141 V: std::convert::Into<std::string::String>,
2142 {
2143 use std::iter::Iterator;
2144 self.unreachable = v.into_iter().map(|i| i.into()).collect();
2145 self
2146 }
2147}
2148
2149impl wkt::message::Message for ListDeliveryPipelinesResponse {
2150 fn typename() -> &'static str {
2151 "type.googleapis.com/google.cloud.deploy.v1.ListDeliveryPipelinesResponse"
2152 }
2153}
2154
2155#[doc(hidden)]
2156impl gax::paginator::internal::PageableResponse for ListDeliveryPipelinesResponse {
2157 type PageItem = crate::model::DeliveryPipeline;
2158
2159 fn items(self) -> std::vec::Vec<Self::PageItem> {
2160 self.delivery_pipelines
2161 }
2162
2163 fn next_page_token(&self) -> std::string::String {
2164 use std::clone::Clone;
2165 self.next_page_token.clone()
2166 }
2167}
2168
2169#[derive(Clone, Default, PartialEq)]
2171#[non_exhaustive]
2172pub struct GetDeliveryPipelineRequest {
2173 pub name: std::string::String,
2176
2177 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2178}
2179
2180impl GetDeliveryPipelineRequest {
2181 pub fn new() -> Self {
2182 std::default::Default::default()
2183 }
2184
2185 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2187 self.name = v.into();
2188 self
2189 }
2190}
2191
2192impl wkt::message::Message for GetDeliveryPipelineRequest {
2193 fn typename() -> &'static str {
2194 "type.googleapis.com/google.cloud.deploy.v1.GetDeliveryPipelineRequest"
2195 }
2196}
2197
2198#[derive(Clone, Default, PartialEq)]
2200#[non_exhaustive]
2201pub struct CreateDeliveryPipelineRequest {
2202 pub parent: std::string::String,
2205
2206 pub delivery_pipeline_id: std::string::String,
2208
2209 pub delivery_pipeline: std::option::Option<crate::model::DeliveryPipeline>,
2211
2212 pub request_id: std::string::String,
2226
2227 pub validate_only: bool,
2230
2231 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2232}
2233
2234impl CreateDeliveryPipelineRequest {
2235 pub fn new() -> Self {
2236 std::default::Default::default()
2237 }
2238
2239 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2241 self.parent = v.into();
2242 self
2243 }
2244
2245 pub fn set_delivery_pipeline_id<T: std::convert::Into<std::string::String>>(
2247 mut self,
2248 v: T,
2249 ) -> Self {
2250 self.delivery_pipeline_id = v.into();
2251 self
2252 }
2253
2254 pub fn set_delivery_pipeline<T>(mut self, v: T) -> Self
2256 where
2257 T: std::convert::Into<crate::model::DeliveryPipeline>,
2258 {
2259 self.delivery_pipeline = std::option::Option::Some(v.into());
2260 self
2261 }
2262
2263 pub fn set_or_clear_delivery_pipeline<T>(mut self, v: std::option::Option<T>) -> Self
2265 where
2266 T: std::convert::Into<crate::model::DeliveryPipeline>,
2267 {
2268 self.delivery_pipeline = v.map(|x| x.into());
2269 self
2270 }
2271
2272 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2274 self.request_id = v.into();
2275 self
2276 }
2277
2278 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2280 self.validate_only = v.into();
2281 self
2282 }
2283}
2284
2285impl wkt::message::Message for CreateDeliveryPipelineRequest {
2286 fn typename() -> &'static str {
2287 "type.googleapis.com/google.cloud.deploy.v1.CreateDeliveryPipelineRequest"
2288 }
2289}
2290
2291#[derive(Clone, Default, PartialEq)]
2293#[non_exhaustive]
2294pub struct UpdateDeliveryPipelineRequest {
2295 pub update_mask: std::option::Option<wkt::FieldMask>,
2301
2302 pub delivery_pipeline: std::option::Option<crate::model::DeliveryPipeline>,
2304
2305 pub request_id: std::string::String,
2319
2320 pub allow_missing: bool,
2323
2324 pub validate_only: bool,
2327
2328 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2329}
2330
2331impl UpdateDeliveryPipelineRequest {
2332 pub fn new() -> Self {
2333 std::default::Default::default()
2334 }
2335
2336 pub fn set_update_mask<T>(mut self, v: T) -> Self
2338 where
2339 T: std::convert::Into<wkt::FieldMask>,
2340 {
2341 self.update_mask = std::option::Option::Some(v.into());
2342 self
2343 }
2344
2345 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
2347 where
2348 T: std::convert::Into<wkt::FieldMask>,
2349 {
2350 self.update_mask = v.map(|x| x.into());
2351 self
2352 }
2353
2354 pub fn set_delivery_pipeline<T>(mut self, v: T) -> Self
2356 where
2357 T: std::convert::Into<crate::model::DeliveryPipeline>,
2358 {
2359 self.delivery_pipeline = std::option::Option::Some(v.into());
2360 self
2361 }
2362
2363 pub fn set_or_clear_delivery_pipeline<T>(mut self, v: std::option::Option<T>) -> Self
2365 where
2366 T: std::convert::Into<crate::model::DeliveryPipeline>,
2367 {
2368 self.delivery_pipeline = v.map(|x| x.into());
2369 self
2370 }
2371
2372 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2374 self.request_id = v.into();
2375 self
2376 }
2377
2378 pub fn set_allow_missing<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2380 self.allow_missing = v.into();
2381 self
2382 }
2383
2384 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2386 self.validate_only = v.into();
2387 self
2388 }
2389}
2390
2391impl wkt::message::Message for UpdateDeliveryPipelineRequest {
2392 fn typename() -> &'static str {
2393 "type.googleapis.com/google.cloud.deploy.v1.UpdateDeliveryPipelineRequest"
2394 }
2395}
2396
2397#[derive(Clone, Default, PartialEq)]
2399#[non_exhaustive]
2400pub struct DeleteDeliveryPipelineRequest {
2401 pub name: std::string::String,
2404
2405 pub request_id: std::string::String,
2419
2420 pub allow_missing: bool,
2423
2424 pub validate_only: bool,
2427
2428 pub force: bool,
2432
2433 pub etag: std::string::String,
2437
2438 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2439}
2440
2441impl DeleteDeliveryPipelineRequest {
2442 pub fn new() -> Self {
2443 std::default::Default::default()
2444 }
2445
2446 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2448 self.name = v.into();
2449 self
2450 }
2451
2452 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2454 self.request_id = v.into();
2455 self
2456 }
2457
2458 pub fn set_allow_missing<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2460 self.allow_missing = v.into();
2461 self
2462 }
2463
2464 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2466 self.validate_only = v.into();
2467 self
2468 }
2469
2470 pub fn set_force<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2472 self.force = v.into();
2473 self
2474 }
2475
2476 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2478 self.etag = v.into();
2479 self
2480 }
2481}
2482
2483impl wkt::message::Message for DeleteDeliveryPipelineRequest {
2484 fn typename() -> &'static str {
2485 "type.googleapis.com/google.cloud.deploy.v1.DeleteDeliveryPipelineRequest"
2486 }
2487}
2488
2489#[derive(Clone, Default, PartialEq)]
2491#[non_exhaustive]
2492pub struct RollbackTargetConfig {
2493 pub rollout: std::option::Option<crate::model::Rollout>,
2495
2496 pub starting_phase_id: std::string::String,
2499
2500 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2501}
2502
2503impl RollbackTargetConfig {
2504 pub fn new() -> Self {
2505 std::default::Default::default()
2506 }
2507
2508 pub fn set_rollout<T>(mut self, v: T) -> Self
2510 where
2511 T: std::convert::Into<crate::model::Rollout>,
2512 {
2513 self.rollout = std::option::Option::Some(v.into());
2514 self
2515 }
2516
2517 pub fn set_or_clear_rollout<T>(mut self, v: std::option::Option<T>) -> Self
2519 where
2520 T: std::convert::Into<crate::model::Rollout>,
2521 {
2522 self.rollout = v.map(|x| x.into());
2523 self
2524 }
2525
2526 pub fn set_starting_phase_id<T: std::convert::Into<std::string::String>>(
2528 mut self,
2529 v: T,
2530 ) -> Self {
2531 self.starting_phase_id = v.into();
2532 self
2533 }
2534}
2535
2536impl wkt::message::Message for RollbackTargetConfig {
2537 fn typename() -> &'static str {
2538 "type.googleapis.com/google.cloud.deploy.v1.RollbackTargetConfig"
2539 }
2540}
2541
2542#[derive(Clone, Default, PartialEq)]
2544#[non_exhaustive]
2545pub struct RollbackTargetRequest {
2546 pub name: std::string::String,
2550
2551 pub target_id: std::string::String,
2553
2554 pub rollout_id: std::string::String,
2556
2557 pub release_id: std::string::String,
2561
2562 pub rollout_to_roll_back: std::string::String,
2565
2566 pub rollback_config: std::option::Option<crate::model::RollbackTargetConfig>,
2568
2569 pub validate_only: bool,
2572
2573 pub override_deploy_policy: std::vec::Vec<std::string::String>,
2576
2577 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2578}
2579
2580impl RollbackTargetRequest {
2581 pub fn new() -> Self {
2582 std::default::Default::default()
2583 }
2584
2585 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2587 self.name = v.into();
2588 self
2589 }
2590
2591 pub fn set_target_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2593 self.target_id = v.into();
2594 self
2595 }
2596
2597 pub fn set_rollout_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2599 self.rollout_id = v.into();
2600 self
2601 }
2602
2603 pub fn set_release_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2605 self.release_id = v.into();
2606 self
2607 }
2608
2609 pub fn set_rollout_to_roll_back<T: std::convert::Into<std::string::String>>(
2611 mut self,
2612 v: T,
2613 ) -> Self {
2614 self.rollout_to_roll_back = v.into();
2615 self
2616 }
2617
2618 pub fn set_rollback_config<T>(mut self, v: T) -> Self
2620 where
2621 T: std::convert::Into<crate::model::RollbackTargetConfig>,
2622 {
2623 self.rollback_config = std::option::Option::Some(v.into());
2624 self
2625 }
2626
2627 pub fn set_or_clear_rollback_config<T>(mut self, v: std::option::Option<T>) -> Self
2629 where
2630 T: std::convert::Into<crate::model::RollbackTargetConfig>,
2631 {
2632 self.rollback_config = v.map(|x| x.into());
2633 self
2634 }
2635
2636 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2638 self.validate_only = v.into();
2639 self
2640 }
2641
2642 pub fn set_override_deploy_policy<T, V>(mut self, v: T) -> Self
2644 where
2645 T: std::iter::IntoIterator<Item = V>,
2646 V: std::convert::Into<std::string::String>,
2647 {
2648 use std::iter::Iterator;
2649 self.override_deploy_policy = v.into_iter().map(|i| i.into()).collect();
2650 self
2651 }
2652}
2653
2654impl wkt::message::Message for RollbackTargetRequest {
2655 fn typename() -> &'static str {
2656 "type.googleapis.com/google.cloud.deploy.v1.RollbackTargetRequest"
2657 }
2658}
2659
2660#[derive(Clone, Default, PartialEq)]
2662#[non_exhaustive]
2663pub struct RollbackTargetResponse {
2664 pub rollback_config: std::option::Option<crate::model::RollbackTargetConfig>,
2666
2667 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2668}
2669
2670impl RollbackTargetResponse {
2671 pub fn new() -> Self {
2672 std::default::Default::default()
2673 }
2674
2675 pub fn set_rollback_config<T>(mut self, v: T) -> Self
2677 where
2678 T: std::convert::Into<crate::model::RollbackTargetConfig>,
2679 {
2680 self.rollback_config = std::option::Option::Some(v.into());
2681 self
2682 }
2683
2684 pub fn set_or_clear_rollback_config<T>(mut self, v: std::option::Option<T>) -> Self
2686 where
2687 T: std::convert::Into<crate::model::RollbackTargetConfig>,
2688 {
2689 self.rollback_config = v.map(|x| x.into());
2690 self
2691 }
2692}
2693
2694impl wkt::message::Message for RollbackTargetResponse {
2695 fn typename() -> &'static str {
2696 "type.googleapis.com/google.cloud.deploy.v1.RollbackTargetResponse"
2697 }
2698}
2699
2700#[derive(Clone, Default, PartialEq)]
2705#[non_exhaustive]
2706pub struct Target {
2707 pub name: std::string::String,
2711
2712 pub target_id: std::string::String,
2714
2715 pub uid: std::string::String,
2717
2718 pub description: std::string::String,
2720
2721 pub annotations: std::collections::HashMap<std::string::String, std::string::String>,
2726
2727 pub labels: std::collections::HashMap<std::string::String, std::string::String>,
2739
2740 pub require_approval: bool,
2742
2743 pub create_time: std::option::Option<wkt::Timestamp>,
2745
2746 pub update_time: std::option::Option<wkt::Timestamp>,
2748
2749 pub associated_entities:
2758 std::collections::HashMap<std::string::String, crate::model::AssociatedEntities>,
2759
2760 pub etag: std::string::String,
2764
2765 pub execution_configs: std::vec::Vec<crate::model::ExecutionConfig>,
2773
2774 pub deploy_parameters: std::collections::HashMap<std::string::String, std::string::String>,
2776
2777 pub deployment_target: std::option::Option<crate::model::target::DeploymentTarget>,
2780
2781 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2782}
2783
2784impl Target {
2785 pub fn new() -> Self {
2786 std::default::Default::default()
2787 }
2788
2789 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2791 self.name = v.into();
2792 self
2793 }
2794
2795 pub fn set_target_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2797 self.target_id = v.into();
2798 self
2799 }
2800
2801 pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2803 self.uid = v.into();
2804 self
2805 }
2806
2807 pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2809 self.description = v.into();
2810 self
2811 }
2812
2813 pub fn set_annotations<T, K, V>(mut self, v: T) -> Self
2815 where
2816 T: std::iter::IntoIterator<Item = (K, V)>,
2817 K: std::convert::Into<std::string::String>,
2818 V: std::convert::Into<std::string::String>,
2819 {
2820 use std::iter::Iterator;
2821 self.annotations = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
2822 self
2823 }
2824
2825 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
2827 where
2828 T: std::iter::IntoIterator<Item = (K, V)>,
2829 K: std::convert::Into<std::string::String>,
2830 V: std::convert::Into<std::string::String>,
2831 {
2832 use std::iter::Iterator;
2833 self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
2834 self
2835 }
2836
2837 pub fn set_require_approval<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2839 self.require_approval = v.into();
2840 self
2841 }
2842
2843 pub fn set_create_time<T>(mut self, v: T) -> Self
2845 where
2846 T: std::convert::Into<wkt::Timestamp>,
2847 {
2848 self.create_time = std::option::Option::Some(v.into());
2849 self
2850 }
2851
2852 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
2854 where
2855 T: std::convert::Into<wkt::Timestamp>,
2856 {
2857 self.create_time = v.map(|x| x.into());
2858 self
2859 }
2860
2861 pub fn set_update_time<T>(mut self, v: T) -> Self
2863 where
2864 T: std::convert::Into<wkt::Timestamp>,
2865 {
2866 self.update_time = std::option::Option::Some(v.into());
2867 self
2868 }
2869
2870 pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
2872 where
2873 T: std::convert::Into<wkt::Timestamp>,
2874 {
2875 self.update_time = v.map(|x| x.into());
2876 self
2877 }
2878
2879 pub fn set_associated_entities<T, K, V>(mut self, v: T) -> Self
2881 where
2882 T: std::iter::IntoIterator<Item = (K, V)>,
2883 K: std::convert::Into<std::string::String>,
2884 V: std::convert::Into<crate::model::AssociatedEntities>,
2885 {
2886 use std::iter::Iterator;
2887 self.associated_entities = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
2888 self
2889 }
2890
2891 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2893 self.etag = v.into();
2894 self
2895 }
2896
2897 pub fn set_execution_configs<T, V>(mut self, v: T) -> Self
2899 where
2900 T: std::iter::IntoIterator<Item = V>,
2901 V: std::convert::Into<crate::model::ExecutionConfig>,
2902 {
2903 use std::iter::Iterator;
2904 self.execution_configs = v.into_iter().map(|i| i.into()).collect();
2905 self
2906 }
2907
2908 pub fn set_deploy_parameters<T, K, V>(mut self, v: T) -> Self
2910 where
2911 T: std::iter::IntoIterator<Item = (K, V)>,
2912 K: std::convert::Into<std::string::String>,
2913 V: std::convert::Into<std::string::String>,
2914 {
2915 use std::iter::Iterator;
2916 self.deploy_parameters = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
2917 self
2918 }
2919
2920 pub fn set_deployment_target<
2925 T: std::convert::Into<std::option::Option<crate::model::target::DeploymentTarget>>,
2926 >(
2927 mut self,
2928 v: T,
2929 ) -> Self {
2930 self.deployment_target = v.into();
2931 self
2932 }
2933
2934 pub fn gke(&self) -> std::option::Option<&std::boxed::Box<crate::model::GkeCluster>> {
2938 #[allow(unreachable_patterns)]
2939 self.deployment_target.as_ref().and_then(|v| match v {
2940 crate::model::target::DeploymentTarget::Gke(v) => std::option::Option::Some(v),
2941 _ => std::option::Option::None,
2942 })
2943 }
2944
2945 pub fn set_gke<T: std::convert::Into<std::boxed::Box<crate::model::GkeCluster>>>(
2951 mut self,
2952 v: T,
2953 ) -> Self {
2954 self.deployment_target =
2955 std::option::Option::Some(crate::model::target::DeploymentTarget::Gke(v.into()));
2956 self
2957 }
2958
2959 pub fn anthos_cluster(
2963 &self,
2964 ) -> std::option::Option<&std::boxed::Box<crate::model::AnthosCluster>> {
2965 #[allow(unreachable_patterns)]
2966 self.deployment_target.as_ref().and_then(|v| match v {
2967 crate::model::target::DeploymentTarget::AnthosCluster(v) => {
2968 std::option::Option::Some(v)
2969 }
2970 _ => std::option::Option::None,
2971 })
2972 }
2973
2974 pub fn set_anthos_cluster<
2980 T: std::convert::Into<std::boxed::Box<crate::model::AnthosCluster>>,
2981 >(
2982 mut self,
2983 v: T,
2984 ) -> Self {
2985 self.deployment_target = std::option::Option::Some(
2986 crate::model::target::DeploymentTarget::AnthosCluster(v.into()),
2987 );
2988 self
2989 }
2990
2991 pub fn run(&self) -> std::option::Option<&std::boxed::Box<crate::model::CloudRunLocation>> {
2995 #[allow(unreachable_patterns)]
2996 self.deployment_target.as_ref().and_then(|v| match v {
2997 crate::model::target::DeploymentTarget::Run(v) => std::option::Option::Some(v),
2998 _ => std::option::Option::None,
2999 })
3000 }
3001
3002 pub fn set_run<T: std::convert::Into<std::boxed::Box<crate::model::CloudRunLocation>>>(
3008 mut self,
3009 v: T,
3010 ) -> Self {
3011 self.deployment_target =
3012 std::option::Option::Some(crate::model::target::DeploymentTarget::Run(v.into()));
3013 self
3014 }
3015
3016 pub fn multi_target(&self) -> std::option::Option<&std::boxed::Box<crate::model::MultiTarget>> {
3020 #[allow(unreachable_patterns)]
3021 self.deployment_target.as_ref().and_then(|v| match v {
3022 crate::model::target::DeploymentTarget::MultiTarget(v) => std::option::Option::Some(v),
3023 _ => std::option::Option::None,
3024 })
3025 }
3026
3027 pub fn set_multi_target<T: std::convert::Into<std::boxed::Box<crate::model::MultiTarget>>>(
3033 mut self,
3034 v: T,
3035 ) -> Self {
3036 self.deployment_target = std::option::Option::Some(
3037 crate::model::target::DeploymentTarget::MultiTarget(v.into()),
3038 );
3039 self
3040 }
3041
3042 pub fn custom_target(
3046 &self,
3047 ) -> std::option::Option<&std::boxed::Box<crate::model::CustomTarget>> {
3048 #[allow(unreachable_patterns)]
3049 self.deployment_target.as_ref().and_then(|v| match v {
3050 crate::model::target::DeploymentTarget::CustomTarget(v) => std::option::Option::Some(v),
3051 _ => std::option::Option::None,
3052 })
3053 }
3054
3055 pub fn set_custom_target<T: std::convert::Into<std::boxed::Box<crate::model::CustomTarget>>>(
3061 mut self,
3062 v: T,
3063 ) -> Self {
3064 self.deployment_target = std::option::Option::Some(
3065 crate::model::target::DeploymentTarget::CustomTarget(v.into()),
3066 );
3067 self
3068 }
3069}
3070
3071impl wkt::message::Message for Target {
3072 fn typename() -> &'static str {
3073 "type.googleapis.com/google.cloud.deploy.v1.Target"
3074 }
3075}
3076
3077pub mod target {
3079 #[allow(unused_imports)]
3080 use super::*;
3081
3082 #[derive(Clone, Debug, PartialEq)]
3085 #[non_exhaustive]
3086 pub enum DeploymentTarget {
3087 Gke(std::boxed::Box<crate::model::GkeCluster>),
3089 AnthosCluster(std::boxed::Box<crate::model::AnthosCluster>),
3091 Run(std::boxed::Box<crate::model::CloudRunLocation>),
3093 MultiTarget(std::boxed::Box<crate::model::MultiTarget>),
3095 CustomTarget(std::boxed::Box<crate::model::CustomTarget>),
3097 }
3098}
3099
3100#[derive(Clone, Default, PartialEq)]
3102#[non_exhaustive]
3103pub struct ExecutionConfig {
3104 pub usages: std::vec::Vec<crate::model::execution_config::ExecutionEnvironmentUsage>,
3106
3107 pub worker_pool: std::string::String,
3112
3113 pub service_account: std::string::String,
3117
3118 pub artifact_storage: std::string::String,
3123
3124 pub execution_timeout: std::option::Option<wkt::Duration>,
3128
3129 pub verbose: bool,
3132
3133 pub execution_environment:
3135 std::option::Option<crate::model::execution_config::ExecutionEnvironment>,
3136
3137 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3138}
3139
3140impl ExecutionConfig {
3141 pub fn new() -> Self {
3142 std::default::Default::default()
3143 }
3144
3145 pub fn set_usages<T, V>(mut self, v: T) -> Self
3147 where
3148 T: std::iter::IntoIterator<Item = V>,
3149 V: std::convert::Into<crate::model::execution_config::ExecutionEnvironmentUsage>,
3150 {
3151 use std::iter::Iterator;
3152 self.usages = v.into_iter().map(|i| i.into()).collect();
3153 self
3154 }
3155
3156 pub fn set_worker_pool<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3158 self.worker_pool = v.into();
3159 self
3160 }
3161
3162 pub fn set_service_account<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3164 self.service_account = v.into();
3165 self
3166 }
3167
3168 pub fn set_artifact_storage<T: std::convert::Into<std::string::String>>(
3170 mut self,
3171 v: T,
3172 ) -> Self {
3173 self.artifact_storage = v.into();
3174 self
3175 }
3176
3177 pub fn set_execution_timeout<T>(mut self, v: T) -> Self
3179 where
3180 T: std::convert::Into<wkt::Duration>,
3181 {
3182 self.execution_timeout = std::option::Option::Some(v.into());
3183 self
3184 }
3185
3186 pub fn set_or_clear_execution_timeout<T>(mut self, v: std::option::Option<T>) -> Self
3188 where
3189 T: std::convert::Into<wkt::Duration>,
3190 {
3191 self.execution_timeout = v.map(|x| x.into());
3192 self
3193 }
3194
3195 pub fn set_verbose<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
3197 self.verbose = v.into();
3198 self
3199 }
3200
3201 pub fn set_execution_environment<
3206 T: std::convert::Into<
3207 std::option::Option<crate::model::execution_config::ExecutionEnvironment>,
3208 >,
3209 >(
3210 mut self,
3211 v: T,
3212 ) -> Self {
3213 self.execution_environment = v.into();
3214 self
3215 }
3216
3217 pub fn default_pool(&self) -> std::option::Option<&std::boxed::Box<crate::model::DefaultPool>> {
3221 #[allow(unreachable_patterns)]
3222 self.execution_environment.as_ref().and_then(|v| match v {
3223 crate::model::execution_config::ExecutionEnvironment::DefaultPool(v) => {
3224 std::option::Option::Some(v)
3225 }
3226 _ => std::option::Option::None,
3227 })
3228 }
3229
3230 pub fn set_default_pool<T: std::convert::Into<std::boxed::Box<crate::model::DefaultPool>>>(
3236 mut self,
3237 v: T,
3238 ) -> Self {
3239 self.execution_environment = std::option::Option::Some(
3240 crate::model::execution_config::ExecutionEnvironment::DefaultPool(v.into()),
3241 );
3242 self
3243 }
3244
3245 pub fn private_pool(&self) -> std::option::Option<&std::boxed::Box<crate::model::PrivatePool>> {
3249 #[allow(unreachable_patterns)]
3250 self.execution_environment.as_ref().and_then(|v| match v {
3251 crate::model::execution_config::ExecutionEnvironment::PrivatePool(v) => {
3252 std::option::Option::Some(v)
3253 }
3254 _ => std::option::Option::None,
3255 })
3256 }
3257
3258 pub fn set_private_pool<T: std::convert::Into<std::boxed::Box<crate::model::PrivatePool>>>(
3264 mut self,
3265 v: T,
3266 ) -> Self {
3267 self.execution_environment = std::option::Option::Some(
3268 crate::model::execution_config::ExecutionEnvironment::PrivatePool(v.into()),
3269 );
3270 self
3271 }
3272}
3273
3274impl wkt::message::Message for ExecutionConfig {
3275 fn typename() -> &'static str {
3276 "type.googleapis.com/google.cloud.deploy.v1.ExecutionConfig"
3277 }
3278}
3279
3280pub mod execution_config {
3282 #[allow(unused_imports)]
3283 use super::*;
3284
3285 #[derive(Clone, Debug, PartialEq)]
3301 #[non_exhaustive]
3302 pub enum ExecutionEnvironmentUsage {
3303 Unspecified,
3305 Render,
3307 Deploy,
3309 Verify,
3311 Predeploy,
3313 Postdeploy,
3315 UnknownValue(execution_environment_usage::UnknownValue),
3320 }
3321
3322 #[doc(hidden)]
3323 pub mod execution_environment_usage {
3324 #[allow(unused_imports)]
3325 use super::*;
3326 #[derive(Clone, Debug, PartialEq)]
3327 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
3328 }
3329
3330 impl ExecutionEnvironmentUsage {
3331 pub fn value(&self) -> std::option::Option<i32> {
3336 match self {
3337 Self::Unspecified => std::option::Option::Some(0),
3338 Self::Render => std::option::Option::Some(1),
3339 Self::Deploy => std::option::Option::Some(2),
3340 Self::Verify => std::option::Option::Some(3),
3341 Self::Predeploy => std::option::Option::Some(4),
3342 Self::Postdeploy => std::option::Option::Some(5),
3343 Self::UnknownValue(u) => u.0.value(),
3344 }
3345 }
3346
3347 pub fn name(&self) -> std::option::Option<&str> {
3352 match self {
3353 Self::Unspecified => {
3354 std::option::Option::Some("EXECUTION_ENVIRONMENT_USAGE_UNSPECIFIED")
3355 }
3356 Self::Render => std::option::Option::Some("RENDER"),
3357 Self::Deploy => std::option::Option::Some("DEPLOY"),
3358 Self::Verify => std::option::Option::Some("VERIFY"),
3359 Self::Predeploy => std::option::Option::Some("PREDEPLOY"),
3360 Self::Postdeploy => std::option::Option::Some("POSTDEPLOY"),
3361 Self::UnknownValue(u) => u.0.name(),
3362 }
3363 }
3364 }
3365
3366 impl std::default::Default for ExecutionEnvironmentUsage {
3367 fn default() -> Self {
3368 use std::convert::From;
3369 Self::from(0)
3370 }
3371 }
3372
3373 impl std::fmt::Display for ExecutionEnvironmentUsage {
3374 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
3375 wkt::internal::display_enum(f, self.name(), self.value())
3376 }
3377 }
3378
3379 impl std::convert::From<i32> for ExecutionEnvironmentUsage {
3380 fn from(value: i32) -> Self {
3381 match value {
3382 0 => Self::Unspecified,
3383 1 => Self::Render,
3384 2 => Self::Deploy,
3385 3 => Self::Verify,
3386 4 => Self::Predeploy,
3387 5 => Self::Postdeploy,
3388 _ => Self::UnknownValue(execution_environment_usage::UnknownValue(
3389 wkt::internal::UnknownEnumValue::Integer(value),
3390 )),
3391 }
3392 }
3393 }
3394
3395 impl std::convert::From<&str> for ExecutionEnvironmentUsage {
3396 fn from(value: &str) -> Self {
3397 use std::string::ToString;
3398 match value {
3399 "EXECUTION_ENVIRONMENT_USAGE_UNSPECIFIED" => Self::Unspecified,
3400 "RENDER" => Self::Render,
3401 "DEPLOY" => Self::Deploy,
3402 "VERIFY" => Self::Verify,
3403 "PREDEPLOY" => Self::Predeploy,
3404 "POSTDEPLOY" => Self::Postdeploy,
3405 _ => Self::UnknownValue(execution_environment_usage::UnknownValue(
3406 wkt::internal::UnknownEnumValue::String(value.to_string()),
3407 )),
3408 }
3409 }
3410 }
3411
3412 impl serde::ser::Serialize for ExecutionEnvironmentUsage {
3413 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3414 where
3415 S: serde::Serializer,
3416 {
3417 match self {
3418 Self::Unspecified => serializer.serialize_i32(0),
3419 Self::Render => serializer.serialize_i32(1),
3420 Self::Deploy => serializer.serialize_i32(2),
3421 Self::Verify => serializer.serialize_i32(3),
3422 Self::Predeploy => serializer.serialize_i32(4),
3423 Self::Postdeploy => serializer.serialize_i32(5),
3424 Self::UnknownValue(u) => u.0.serialize(serializer),
3425 }
3426 }
3427 }
3428
3429 impl<'de> serde::de::Deserialize<'de> for ExecutionEnvironmentUsage {
3430 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3431 where
3432 D: serde::Deserializer<'de>,
3433 {
3434 deserializer.deserialize_any(
3435 wkt::internal::EnumVisitor::<ExecutionEnvironmentUsage>::new(
3436 ".google.cloud.deploy.v1.ExecutionConfig.ExecutionEnvironmentUsage",
3437 ),
3438 )
3439 }
3440 }
3441
3442 #[derive(Clone, Debug, PartialEq)]
3444 #[non_exhaustive]
3445 pub enum ExecutionEnvironment {
3446 DefaultPool(std::boxed::Box<crate::model::DefaultPool>),
3448 PrivatePool(std::boxed::Box<crate::model::PrivatePool>),
3450 }
3451}
3452
3453#[derive(Clone, Default, PartialEq)]
3455#[non_exhaustive]
3456pub struct DefaultPool {
3457 pub service_account: std::string::String,
3461
3462 pub artifact_storage: std::string::String,
3467
3468 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3469}
3470
3471impl DefaultPool {
3472 pub fn new() -> Self {
3473 std::default::Default::default()
3474 }
3475
3476 pub fn set_service_account<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3478 self.service_account = v.into();
3479 self
3480 }
3481
3482 pub fn set_artifact_storage<T: std::convert::Into<std::string::String>>(
3484 mut self,
3485 v: T,
3486 ) -> Self {
3487 self.artifact_storage = v.into();
3488 self
3489 }
3490}
3491
3492impl wkt::message::Message for DefaultPool {
3493 fn typename() -> &'static str {
3494 "type.googleapis.com/google.cloud.deploy.v1.DefaultPool"
3495 }
3496}
3497
3498#[derive(Clone, Default, PartialEq)]
3500#[non_exhaustive]
3501pub struct PrivatePool {
3502 pub worker_pool: std::string::String,
3505
3506 pub service_account: std::string::String,
3510
3511 pub artifact_storage: std::string::String,
3516
3517 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3518}
3519
3520impl PrivatePool {
3521 pub fn new() -> Self {
3522 std::default::Default::default()
3523 }
3524
3525 pub fn set_worker_pool<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3527 self.worker_pool = v.into();
3528 self
3529 }
3530
3531 pub fn set_service_account<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3533 self.service_account = v.into();
3534 self
3535 }
3536
3537 pub fn set_artifact_storage<T: std::convert::Into<std::string::String>>(
3539 mut self,
3540 v: T,
3541 ) -> Self {
3542 self.artifact_storage = v.into();
3543 self
3544 }
3545}
3546
3547impl wkt::message::Message for PrivatePool {
3548 fn typename() -> &'static str {
3549 "type.googleapis.com/google.cloud.deploy.v1.PrivatePool"
3550 }
3551}
3552
3553#[derive(Clone, Default, PartialEq)]
3555#[non_exhaustive]
3556pub struct GkeCluster {
3557 pub cluster: std::string::String,
3560
3561 pub internal_ip: bool,
3571
3572 pub proxy_url: std::string::String,
3576
3577 pub dns_endpoint: bool,
3580
3581 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3582}
3583
3584impl GkeCluster {
3585 pub fn new() -> Self {
3586 std::default::Default::default()
3587 }
3588
3589 pub fn set_cluster<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3591 self.cluster = v.into();
3592 self
3593 }
3594
3595 pub fn set_internal_ip<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
3597 self.internal_ip = v.into();
3598 self
3599 }
3600
3601 pub fn set_proxy_url<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3603 self.proxy_url = v.into();
3604 self
3605 }
3606
3607 pub fn set_dns_endpoint<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
3609 self.dns_endpoint = v.into();
3610 self
3611 }
3612}
3613
3614impl wkt::message::Message for GkeCluster {
3615 fn typename() -> &'static str {
3616 "type.googleapis.com/google.cloud.deploy.v1.GkeCluster"
3617 }
3618}
3619
3620#[derive(Clone, Default, PartialEq)]
3622#[non_exhaustive]
3623pub struct AnthosCluster {
3624 pub membership: std::string::String,
3628
3629 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3630}
3631
3632impl AnthosCluster {
3633 pub fn new() -> Self {
3634 std::default::Default::default()
3635 }
3636
3637 pub fn set_membership<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3639 self.membership = v.into();
3640 self
3641 }
3642}
3643
3644impl wkt::message::Message for AnthosCluster {
3645 fn typename() -> &'static str {
3646 "type.googleapis.com/google.cloud.deploy.v1.AnthosCluster"
3647 }
3648}
3649
3650#[derive(Clone, Default, PartialEq)]
3652#[non_exhaustive]
3653pub struct CloudRunLocation {
3654 pub location: std::string::String,
3657
3658 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3659}
3660
3661impl CloudRunLocation {
3662 pub fn new() -> Self {
3663 std::default::Default::default()
3664 }
3665
3666 pub fn set_location<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3668 self.location = v.into();
3669 self
3670 }
3671}
3672
3673impl wkt::message::Message for CloudRunLocation {
3674 fn typename() -> &'static str {
3675 "type.googleapis.com/google.cloud.deploy.v1.CloudRunLocation"
3676 }
3677}
3678
3679#[derive(Clone, Default, PartialEq)]
3681#[non_exhaustive]
3682pub struct MultiTarget {
3683 pub target_ids: std::vec::Vec<std::string::String>,
3685
3686 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3687}
3688
3689impl MultiTarget {
3690 pub fn new() -> Self {
3691 std::default::Default::default()
3692 }
3693
3694 pub fn set_target_ids<T, V>(mut self, v: T) -> Self
3696 where
3697 T: std::iter::IntoIterator<Item = V>,
3698 V: std::convert::Into<std::string::String>,
3699 {
3700 use std::iter::Iterator;
3701 self.target_ids = v.into_iter().map(|i| i.into()).collect();
3702 self
3703 }
3704}
3705
3706impl wkt::message::Message for MultiTarget {
3707 fn typename() -> &'static str {
3708 "type.googleapis.com/google.cloud.deploy.v1.MultiTarget"
3709 }
3710}
3711
3712#[derive(Clone, Default, PartialEq)]
3714#[non_exhaustive]
3715pub struct CustomTarget {
3716 pub custom_target_type: std::string::String,
3719
3720 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3721}
3722
3723impl CustomTarget {
3724 pub fn new() -> Self {
3725 std::default::Default::default()
3726 }
3727
3728 pub fn set_custom_target_type<T: std::convert::Into<std::string::String>>(
3730 mut self,
3731 v: T,
3732 ) -> Self {
3733 self.custom_target_type = v.into();
3734 self
3735 }
3736}
3737
3738impl wkt::message::Message for CustomTarget {
3739 fn typename() -> &'static str {
3740 "type.googleapis.com/google.cloud.deploy.v1.CustomTarget"
3741 }
3742}
3743
3744#[derive(Clone, Default, PartialEq)]
3746#[non_exhaustive]
3747pub struct AssociatedEntities {
3748 pub gke_clusters: std::vec::Vec<crate::model::GkeCluster>,
3750
3751 pub anthos_clusters: std::vec::Vec<crate::model::AnthosCluster>,
3753
3754 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3755}
3756
3757impl AssociatedEntities {
3758 pub fn new() -> Self {
3759 std::default::Default::default()
3760 }
3761
3762 pub fn set_gke_clusters<T, V>(mut self, v: T) -> Self
3764 where
3765 T: std::iter::IntoIterator<Item = V>,
3766 V: std::convert::Into<crate::model::GkeCluster>,
3767 {
3768 use std::iter::Iterator;
3769 self.gke_clusters = v.into_iter().map(|i| i.into()).collect();
3770 self
3771 }
3772
3773 pub fn set_anthos_clusters<T, V>(mut self, v: T) -> Self
3775 where
3776 T: std::iter::IntoIterator<Item = V>,
3777 V: std::convert::Into<crate::model::AnthosCluster>,
3778 {
3779 use std::iter::Iterator;
3780 self.anthos_clusters = v.into_iter().map(|i| i.into()).collect();
3781 self
3782 }
3783}
3784
3785impl wkt::message::Message for AssociatedEntities {
3786 fn typename() -> &'static str {
3787 "type.googleapis.com/google.cloud.deploy.v1.AssociatedEntities"
3788 }
3789}
3790
3791#[derive(Clone, Default, PartialEq)]
3793#[non_exhaustive]
3794pub struct ListTargetsRequest {
3795 pub parent: std::string::String,
3798
3799 pub page_size: i32,
3804
3805 pub page_token: std::string::String,
3811
3812 pub filter: std::string::String,
3815
3816 pub order_by: std::string::String,
3819
3820 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3821}
3822
3823impl ListTargetsRequest {
3824 pub fn new() -> Self {
3825 std::default::Default::default()
3826 }
3827
3828 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3830 self.parent = v.into();
3831 self
3832 }
3833
3834 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3836 self.page_size = v.into();
3837 self
3838 }
3839
3840 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3842 self.page_token = v.into();
3843 self
3844 }
3845
3846 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3848 self.filter = v.into();
3849 self
3850 }
3851
3852 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3854 self.order_by = v.into();
3855 self
3856 }
3857}
3858
3859impl wkt::message::Message for ListTargetsRequest {
3860 fn typename() -> &'static str {
3861 "type.googleapis.com/google.cloud.deploy.v1.ListTargetsRequest"
3862 }
3863}
3864
3865#[derive(Clone, Default, PartialEq)]
3867#[non_exhaustive]
3868pub struct ListTargetsResponse {
3869 pub targets: std::vec::Vec<crate::model::Target>,
3871
3872 pub next_page_token: std::string::String,
3875
3876 pub unreachable: std::vec::Vec<std::string::String>,
3878
3879 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3880}
3881
3882impl ListTargetsResponse {
3883 pub fn new() -> Self {
3884 std::default::Default::default()
3885 }
3886
3887 pub fn set_targets<T, V>(mut self, v: T) -> Self
3889 where
3890 T: std::iter::IntoIterator<Item = V>,
3891 V: std::convert::Into<crate::model::Target>,
3892 {
3893 use std::iter::Iterator;
3894 self.targets = v.into_iter().map(|i| i.into()).collect();
3895 self
3896 }
3897
3898 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3900 self.next_page_token = v.into();
3901 self
3902 }
3903
3904 pub fn set_unreachable<T, V>(mut self, v: T) -> Self
3906 where
3907 T: std::iter::IntoIterator<Item = V>,
3908 V: std::convert::Into<std::string::String>,
3909 {
3910 use std::iter::Iterator;
3911 self.unreachable = v.into_iter().map(|i| i.into()).collect();
3912 self
3913 }
3914}
3915
3916impl wkt::message::Message for ListTargetsResponse {
3917 fn typename() -> &'static str {
3918 "type.googleapis.com/google.cloud.deploy.v1.ListTargetsResponse"
3919 }
3920}
3921
3922#[doc(hidden)]
3923impl gax::paginator::internal::PageableResponse for ListTargetsResponse {
3924 type PageItem = crate::model::Target;
3925
3926 fn items(self) -> std::vec::Vec<Self::PageItem> {
3927 self.targets
3928 }
3929
3930 fn next_page_token(&self) -> std::string::String {
3931 use std::clone::Clone;
3932 self.next_page_token.clone()
3933 }
3934}
3935
3936#[derive(Clone, Default, PartialEq)]
3938#[non_exhaustive]
3939pub struct GetTargetRequest {
3940 pub name: std::string::String,
3943
3944 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3945}
3946
3947impl GetTargetRequest {
3948 pub fn new() -> Self {
3949 std::default::Default::default()
3950 }
3951
3952 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3954 self.name = v.into();
3955 self
3956 }
3957}
3958
3959impl wkt::message::Message for GetTargetRequest {
3960 fn typename() -> &'static str {
3961 "type.googleapis.com/google.cloud.deploy.v1.GetTargetRequest"
3962 }
3963}
3964
3965#[derive(Clone, Default, PartialEq)]
3967#[non_exhaustive]
3968pub struct CreateTargetRequest {
3969 pub parent: std::string::String,
3973
3974 pub target_id: std::string::String,
3976
3977 pub target: std::option::Option<crate::model::Target>,
3979
3980 pub request_id: std::string::String,
3994
3995 pub validate_only: bool,
3998
3999 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4000}
4001
4002impl CreateTargetRequest {
4003 pub fn new() -> Self {
4004 std::default::Default::default()
4005 }
4006
4007 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4009 self.parent = v.into();
4010 self
4011 }
4012
4013 pub fn set_target_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4015 self.target_id = v.into();
4016 self
4017 }
4018
4019 pub fn set_target<T>(mut self, v: T) -> Self
4021 where
4022 T: std::convert::Into<crate::model::Target>,
4023 {
4024 self.target = std::option::Option::Some(v.into());
4025 self
4026 }
4027
4028 pub fn set_or_clear_target<T>(mut self, v: std::option::Option<T>) -> Self
4030 where
4031 T: std::convert::Into<crate::model::Target>,
4032 {
4033 self.target = v.map(|x| x.into());
4034 self
4035 }
4036
4037 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4039 self.request_id = v.into();
4040 self
4041 }
4042
4043 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4045 self.validate_only = v.into();
4046 self
4047 }
4048}
4049
4050impl wkt::message::Message for CreateTargetRequest {
4051 fn typename() -> &'static str {
4052 "type.googleapis.com/google.cloud.deploy.v1.CreateTargetRequest"
4053 }
4054}
4055
4056#[derive(Clone, Default, PartialEq)]
4058#[non_exhaustive]
4059pub struct UpdateTargetRequest {
4060 pub update_mask: std::option::Option<wkt::FieldMask>,
4066
4067 pub target: std::option::Option<crate::model::Target>,
4069
4070 pub request_id: std::string::String,
4084
4085 pub allow_missing: bool,
4088
4089 pub validate_only: bool,
4092
4093 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4094}
4095
4096impl UpdateTargetRequest {
4097 pub fn new() -> Self {
4098 std::default::Default::default()
4099 }
4100
4101 pub fn set_update_mask<T>(mut self, v: T) -> Self
4103 where
4104 T: std::convert::Into<wkt::FieldMask>,
4105 {
4106 self.update_mask = std::option::Option::Some(v.into());
4107 self
4108 }
4109
4110 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
4112 where
4113 T: std::convert::Into<wkt::FieldMask>,
4114 {
4115 self.update_mask = v.map(|x| x.into());
4116 self
4117 }
4118
4119 pub fn set_target<T>(mut self, v: T) -> Self
4121 where
4122 T: std::convert::Into<crate::model::Target>,
4123 {
4124 self.target = std::option::Option::Some(v.into());
4125 self
4126 }
4127
4128 pub fn set_or_clear_target<T>(mut self, v: std::option::Option<T>) -> Self
4130 where
4131 T: std::convert::Into<crate::model::Target>,
4132 {
4133 self.target = v.map(|x| x.into());
4134 self
4135 }
4136
4137 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4139 self.request_id = v.into();
4140 self
4141 }
4142
4143 pub fn set_allow_missing<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4145 self.allow_missing = v.into();
4146 self
4147 }
4148
4149 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4151 self.validate_only = v.into();
4152 self
4153 }
4154}
4155
4156impl wkt::message::Message for UpdateTargetRequest {
4157 fn typename() -> &'static str {
4158 "type.googleapis.com/google.cloud.deploy.v1.UpdateTargetRequest"
4159 }
4160}
4161
4162#[derive(Clone, Default, PartialEq)]
4164#[non_exhaustive]
4165pub struct DeleteTargetRequest {
4166 pub name: std::string::String,
4169
4170 pub request_id: std::string::String,
4184
4185 pub allow_missing: bool,
4188
4189 pub validate_only: bool,
4192
4193 pub etag: std::string::String,
4197
4198 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4199}
4200
4201impl DeleteTargetRequest {
4202 pub fn new() -> Self {
4203 std::default::Default::default()
4204 }
4205
4206 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4208 self.name = v.into();
4209 self
4210 }
4211
4212 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4214 self.request_id = v.into();
4215 self
4216 }
4217
4218 pub fn set_allow_missing<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4220 self.allow_missing = v.into();
4221 self
4222 }
4223
4224 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4226 self.validate_only = v.into();
4227 self
4228 }
4229
4230 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4232 self.etag = v.into();
4233 self
4234 }
4235}
4236
4237impl wkt::message::Message for DeleteTargetRequest {
4238 fn typename() -> &'static str {
4239 "type.googleapis.com/google.cloud.deploy.v1.DeleteTargetRequest"
4240 }
4241}
4242
4243#[derive(Clone, Default, PartialEq)]
4249#[non_exhaustive]
4250pub struct CustomTargetType {
4251 pub name: std::string::String,
4256
4257 pub custom_target_type_id: std::string::String,
4259
4260 pub uid: std::string::String,
4262
4263 pub description: std::string::String,
4266
4267 pub annotations: std::collections::HashMap<std::string::String, std::string::String>,
4272
4273 pub labels: std::collections::HashMap<std::string::String, std::string::String>,
4285
4286 pub create_time: std::option::Option<wkt::Timestamp>,
4288
4289 pub update_time: std::option::Option<wkt::Timestamp>,
4291
4292 pub etag: std::string::String,
4296
4297 pub definition: std::option::Option<crate::model::custom_target_type::Definition>,
4299
4300 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4301}
4302
4303impl CustomTargetType {
4304 pub fn new() -> Self {
4305 std::default::Default::default()
4306 }
4307
4308 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4310 self.name = v.into();
4311 self
4312 }
4313
4314 pub fn set_custom_target_type_id<T: std::convert::Into<std::string::String>>(
4316 mut self,
4317 v: T,
4318 ) -> Self {
4319 self.custom_target_type_id = v.into();
4320 self
4321 }
4322
4323 pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4325 self.uid = v.into();
4326 self
4327 }
4328
4329 pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4331 self.description = v.into();
4332 self
4333 }
4334
4335 pub fn set_annotations<T, K, V>(mut self, v: T) -> Self
4337 where
4338 T: std::iter::IntoIterator<Item = (K, V)>,
4339 K: std::convert::Into<std::string::String>,
4340 V: std::convert::Into<std::string::String>,
4341 {
4342 use std::iter::Iterator;
4343 self.annotations = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
4344 self
4345 }
4346
4347 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
4349 where
4350 T: std::iter::IntoIterator<Item = (K, V)>,
4351 K: std::convert::Into<std::string::String>,
4352 V: std::convert::Into<std::string::String>,
4353 {
4354 use std::iter::Iterator;
4355 self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
4356 self
4357 }
4358
4359 pub fn set_create_time<T>(mut self, v: T) -> Self
4361 where
4362 T: std::convert::Into<wkt::Timestamp>,
4363 {
4364 self.create_time = std::option::Option::Some(v.into());
4365 self
4366 }
4367
4368 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
4370 where
4371 T: std::convert::Into<wkt::Timestamp>,
4372 {
4373 self.create_time = v.map(|x| x.into());
4374 self
4375 }
4376
4377 pub fn set_update_time<T>(mut self, v: T) -> Self
4379 where
4380 T: std::convert::Into<wkt::Timestamp>,
4381 {
4382 self.update_time = std::option::Option::Some(v.into());
4383 self
4384 }
4385
4386 pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
4388 where
4389 T: std::convert::Into<wkt::Timestamp>,
4390 {
4391 self.update_time = v.map(|x| x.into());
4392 self
4393 }
4394
4395 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4397 self.etag = v.into();
4398 self
4399 }
4400
4401 pub fn set_definition<
4406 T: std::convert::Into<std::option::Option<crate::model::custom_target_type::Definition>>,
4407 >(
4408 mut self,
4409 v: T,
4410 ) -> Self {
4411 self.definition = v.into();
4412 self
4413 }
4414
4415 pub fn custom_actions(
4419 &self,
4420 ) -> std::option::Option<&std::boxed::Box<crate::model::CustomTargetSkaffoldActions>> {
4421 #[allow(unreachable_patterns)]
4422 self.definition.as_ref().and_then(|v| match v {
4423 crate::model::custom_target_type::Definition::CustomActions(v) => {
4424 std::option::Option::Some(v)
4425 }
4426 _ => std::option::Option::None,
4427 })
4428 }
4429
4430 pub fn set_custom_actions<
4436 T: std::convert::Into<std::boxed::Box<crate::model::CustomTargetSkaffoldActions>>,
4437 >(
4438 mut self,
4439 v: T,
4440 ) -> Self {
4441 self.definition = std::option::Option::Some(
4442 crate::model::custom_target_type::Definition::CustomActions(v.into()),
4443 );
4444 self
4445 }
4446}
4447
4448impl wkt::message::Message for CustomTargetType {
4449 fn typename() -> &'static str {
4450 "type.googleapis.com/google.cloud.deploy.v1.CustomTargetType"
4451 }
4452}
4453
4454pub mod custom_target_type {
4456 #[allow(unused_imports)]
4457 use super::*;
4458
4459 #[derive(Clone, Debug, PartialEq)]
4461 #[non_exhaustive]
4462 pub enum Definition {
4463 CustomActions(std::boxed::Box<crate::model::CustomTargetSkaffoldActions>),
4466 }
4467}
4468
4469#[derive(Clone, Default, PartialEq)]
4472#[non_exhaustive]
4473pub struct CustomTargetSkaffoldActions {
4474 pub render_action: std::string::String,
4478
4479 pub deploy_action: std::string::String,
4481
4482 pub include_skaffold_modules: std::vec::Vec<crate::model::SkaffoldModules>,
4485
4486 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4487}
4488
4489impl CustomTargetSkaffoldActions {
4490 pub fn new() -> Self {
4491 std::default::Default::default()
4492 }
4493
4494 pub fn set_render_action<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4496 self.render_action = v.into();
4497 self
4498 }
4499
4500 pub fn set_deploy_action<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4502 self.deploy_action = v.into();
4503 self
4504 }
4505
4506 pub fn set_include_skaffold_modules<T, V>(mut self, v: T) -> Self
4508 where
4509 T: std::iter::IntoIterator<Item = V>,
4510 V: std::convert::Into<crate::model::SkaffoldModules>,
4511 {
4512 use std::iter::Iterator;
4513 self.include_skaffold_modules = v.into_iter().map(|i| i.into()).collect();
4514 self
4515 }
4516}
4517
4518impl wkt::message::Message for CustomTargetSkaffoldActions {
4519 fn typename() -> &'static str {
4520 "type.googleapis.com/google.cloud.deploy.v1.CustomTargetSkaffoldActions"
4521 }
4522}
4523
4524#[derive(Clone, Default, PartialEq)]
4526#[non_exhaustive]
4527pub struct SkaffoldModules {
4528 pub configs: std::vec::Vec<std::string::String>,
4530
4531 pub source: std::option::Option<crate::model::skaffold_modules::Source>,
4533
4534 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4535}
4536
4537impl SkaffoldModules {
4538 pub fn new() -> Self {
4539 std::default::Default::default()
4540 }
4541
4542 pub fn set_configs<T, V>(mut self, v: T) -> Self
4544 where
4545 T: std::iter::IntoIterator<Item = V>,
4546 V: std::convert::Into<std::string::String>,
4547 {
4548 use std::iter::Iterator;
4549 self.configs = v.into_iter().map(|i| i.into()).collect();
4550 self
4551 }
4552
4553 pub fn set_source<
4558 T: std::convert::Into<std::option::Option<crate::model::skaffold_modules::Source>>,
4559 >(
4560 mut self,
4561 v: T,
4562 ) -> Self {
4563 self.source = v.into();
4564 self
4565 }
4566
4567 pub fn git(
4571 &self,
4572 ) -> std::option::Option<&std::boxed::Box<crate::model::skaffold_modules::SkaffoldGitSource>>
4573 {
4574 #[allow(unreachable_patterns)]
4575 self.source.as_ref().and_then(|v| match v {
4576 crate::model::skaffold_modules::Source::Git(v) => std::option::Option::Some(v),
4577 _ => std::option::Option::None,
4578 })
4579 }
4580
4581 pub fn set_git<
4587 T: std::convert::Into<std::boxed::Box<crate::model::skaffold_modules::SkaffoldGitSource>>,
4588 >(
4589 mut self,
4590 v: T,
4591 ) -> Self {
4592 self.source =
4593 std::option::Option::Some(crate::model::skaffold_modules::Source::Git(v.into()));
4594 self
4595 }
4596
4597 pub fn google_cloud_storage(
4601 &self,
4602 ) -> std::option::Option<&std::boxed::Box<crate::model::skaffold_modules::SkaffoldGCSSource>>
4603 {
4604 #[allow(unreachable_patterns)]
4605 self.source.as_ref().and_then(|v| match v {
4606 crate::model::skaffold_modules::Source::GoogleCloudStorage(v) => {
4607 std::option::Option::Some(v)
4608 }
4609 _ => std::option::Option::None,
4610 })
4611 }
4612
4613 pub fn set_google_cloud_storage<
4619 T: std::convert::Into<std::boxed::Box<crate::model::skaffold_modules::SkaffoldGCSSource>>,
4620 >(
4621 mut self,
4622 v: T,
4623 ) -> Self {
4624 self.source = std::option::Option::Some(
4625 crate::model::skaffold_modules::Source::GoogleCloudStorage(v.into()),
4626 );
4627 self
4628 }
4629
4630 pub fn google_cloud_build_repo(
4634 &self,
4635 ) -> std::option::Option<&std::boxed::Box<crate::model::skaffold_modules::SkaffoldGCBRepoSource>>
4636 {
4637 #[allow(unreachable_patterns)]
4638 self.source.as_ref().and_then(|v| match v {
4639 crate::model::skaffold_modules::Source::GoogleCloudBuildRepo(v) => {
4640 std::option::Option::Some(v)
4641 }
4642 _ => std::option::Option::None,
4643 })
4644 }
4645
4646 pub fn set_google_cloud_build_repo<
4652 T: std::convert::Into<std::boxed::Box<crate::model::skaffold_modules::SkaffoldGCBRepoSource>>,
4653 >(
4654 mut self,
4655 v: T,
4656 ) -> Self {
4657 self.source = std::option::Option::Some(
4658 crate::model::skaffold_modules::Source::GoogleCloudBuildRepo(v.into()),
4659 );
4660 self
4661 }
4662}
4663
4664impl wkt::message::Message for SkaffoldModules {
4665 fn typename() -> &'static str {
4666 "type.googleapis.com/google.cloud.deploy.v1.SkaffoldModules"
4667 }
4668}
4669
4670pub mod skaffold_modules {
4672 #[allow(unused_imports)]
4673 use super::*;
4674
4675 #[derive(Clone, Default, PartialEq)]
4677 #[non_exhaustive]
4678 pub struct SkaffoldGitSource {
4679 pub repo: std::string::String,
4681
4682 pub path: std::string::String,
4684
4685 pub r#ref: std::string::String,
4687
4688 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4689 }
4690
4691 impl SkaffoldGitSource {
4692 pub fn new() -> Self {
4693 std::default::Default::default()
4694 }
4695
4696 pub fn set_repo<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4698 self.repo = v.into();
4699 self
4700 }
4701
4702 pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4704 self.path = v.into();
4705 self
4706 }
4707
4708 pub fn set_ref<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4710 self.r#ref = v.into();
4711 self
4712 }
4713 }
4714
4715 impl wkt::message::Message for SkaffoldGitSource {
4716 fn typename() -> &'static str {
4717 "type.googleapis.com/google.cloud.deploy.v1.SkaffoldModules.SkaffoldGitSource"
4718 }
4719 }
4720
4721 #[derive(Clone, Default, PartialEq)]
4723 #[non_exhaustive]
4724 pub struct SkaffoldGCSSource {
4725 pub source: std::string::String,
4729
4730 pub path: std::string::String,
4732
4733 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4734 }
4735
4736 impl SkaffoldGCSSource {
4737 pub fn new() -> Self {
4738 std::default::Default::default()
4739 }
4740
4741 pub fn set_source<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4743 self.source = v.into();
4744 self
4745 }
4746
4747 pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4749 self.path = v.into();
4750 self
4751 }
4752 }
4753
4754 impl wkt::message::Message for SkaffoldGCSSource {
4755 fn typename() -> &'static str {
4756 "type.googleapis.com/google.cloud.deploy.v1.SkaffoldModules.SkaffoldGCSSource"
4757 }
4758 }
4759
4760 #[derive(Clone, Default, PartialEq)]
4762 #[non_exhaustive]
4763 pub struct SkaffoldGCBRepoSource {
4764 pub repository: std::string::String,
4768
4769 pub path: std::string::String,
4772
4773 pub r#ref: std::string::String,
4775
4776 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4777 }
4778
4779 impl SkaffoldGCBRepoSource {
4780 pub fn new() -> Self {
4781 std::default::Default::default()
4782 }
4783
4784 pub fn set_repository<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4786 self.repository = v.into();
4787 self
4788 }
4789
4790 pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4792 self.path = v.into();
4793 self
4794 }
4795
4796 pub fn set_ref<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4798 self.r#ref = v.into();
4799 self
4800 }
4801 }
4802
4803 impl wkt::message::Message for SkaffoldGCBRepoSource {
4804 fn typename() -> &'static str {
4805 "type.googleapis.com/google.cloud.deploy.v1.SkaffoldModules.SkaffoldGCBRepoSource"
4806 }
4807 }
4808
4809 #[derive(Clone, Debug, PartialEq)]
4811 #[non_exhaustive]
4812 pub enum Source {
4813 Git(std::boxed::Box<crate::model::skaffold_modules::SkaffoldGitSource>),
4815 GoogleCloudStorage(std::boxed::Box<crate::model::skaffold_modules::SkaffoldGCSSource>),
4817 GoogleCloudBuildRepo(
4820 std::boxed::Box<crate::model::skaffold_modules::SkaffoldGCBRepoSource>,
4821 ),
4822 }
4823}
4824
4825#[derive(Clone, Default, PartialEq)]
4827#[non_exhaustive]
4828pub struct ListCustomTargetTypesRequest {
4829 pub parent: std::string::String,
4832
4833 pub page_size: i32,
4838
4839 pub page_token: std::string::String,
4845
4846 pub filter: std::string::String,
4849
4850 pub order_by: std::string::String,
4853
4854 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4855}
4856
4857impl ListCustomTargetTypesRequest {
4858 pub fn new() -> Self {
4859 std::default::Default::default()
4860 }
4861
4862 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4864 self.parent = v.into();
4865 self
4866 }
4867
4868 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4870 self.page_size = v.into();
4871 self
4872 }
4873
4874 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4876 self.page_token = v.into();
4877 self
4878 }
4879
4880 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4882 self.filter = v.into();
4883 self
4884 }
4885
4886 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4888 self.order_by = v.into();
4889 self
4890 }
4891}
4892
4893impl wkt::message::Message for ListCustomTargetTypesRequest {
4894 fn typename() -> &'static str {
4895 "type.googleapis.com/google.cloud.deploy.v1.ListCustomTargetTypesRequest"
4896 }
4897}
4898
4899#[derive(Clone, Default, PartialEq)]
4901#[non_exhaustive]
4902pub struct ListCustomTargetTypesResponse {
4903 pub custom_target_types: std::vec::Vec<crate::model::CustomTargetType>,
4905
4906 pub next_page_token: std::string::String,
4909
4910 pub unreachable: std::vec::Vec<std::string::String>,
4912
4913 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4914}
4915
4916impl ListCustomTargetTypesResponse {
4917 pub fn new() -> Self {
4918 std::default::Default::default()
4919 }
4920
4921 pub fn set_custom_target_types<T, V>(mut self, v: T) -> Self
4923 where
4924 T: std::iter::IntoIterator<Item = V>,
4925 V: std::convert::Into<crate::model::CustomTargetType>,
4926 {
4927 use std::iter::Iterator;
4928 self.custom_target_types = v.into_iter().map(|i| i.into()).collect();
4929 self
4930 }
4931
4932 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4934 self.next_page_token = v.into();
4935 self
4936 }
4937
4938 pub fn set_unreachable<T, V>(mut self, v: T) -> Self
4940 where
4941 T: std::iter::IntoIterator<Item = V>,
4942 V: std::convert::Into<std::string::String>,
4943 {
4944 use std::iter::Iterator;
4945 self.unreachable = v.into_iter().map(|i| i.into()).collect();
4946 self
4947 }
4948}
4949
4950impl wkt::message::Message for ListCustomTargetTypesResponse {
4951 fn typename() -> &'static str {
4952 "type.googleapis.com/google.cloud.deploy.v1.ListCustomTargetTypesResponse"
4953 }
4954}
4955
4956#[doc(hidden)]
4957impl gax::paginator::internal::PageableResponse for ListCustomTargetTypesResponse {
4958 type PageItem = crate::model::CustomTargetType;
4959
4960 fn items(self) -> std::vec::Vec<Self::PageItem> {
4961 self.custom_target_types
4962 }
4963
4964 fn next_page_token(&self) -> std::string::String {
4965 use std::clone::Clone;
4966 self.next_page_token.clone()
4967 }
4968}
4969
4970#[derive(Clone, Default, PartialEq)]
4972#[non_exhaustive]
4973pub struct GetCustomTargetTypeRequest {
4974 pub name: std::string::String,
4977
4978 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4979}
4980
4981impl GetCustomTargetTypeRequest {
4982 pub fn new() -> Self {
4983 std::default::Default::default()
4984 }
4985
4986 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4988 self.name = v.into();
4989 self
4990 }
4991}
4992
4993impl wkt::message::Message for GetCustomTargetTypeRequest {
4994 fn typename() -> &'static str {
4995 "type.googleapis.com/google.cloud.deploy.v1.GetCustomTargetTypeRequest"
4996 }
4997}
4998
4999#[derive(Clone, Default, PartialEq)]
5001#[non_exhaustive]
5002pub struct CreateCustomTargetTypeRequest {
5003 pub parent: std::string::String,
5006
5007 pub custom_target_type_id: std::string::String,
5009
5010 pub custom_target_type: std::option::Option<crate::model::CustomTargetType>,
5012
5013 pub request_id: std::string::String,
5027
5028 pub validate_only: bool,
5031
5032 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5033}
5034
5035impl CreateCustomTargetTypeRequest {
5036 pub fn new() -> Self {
5037 std::default::Default::default()
5038 }
5039
5040 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5042 self.parent = v.into();
5043 self
5044 }
5045
5046 pub fn set_custom_target_type_id<T: std::convert::Into<std::string::String>>(
5048 mut self,
5049 v: T,
5050 ) -> Self {
5051 self.custom_target_type_id = v.into();
5052 self
5053 }
5054
5055 pub fn set_custom_target_type<T>(mut self, v: T) -> Self
5057 where
5058 T: std::convert::Into<crate::model::CustomTargetType>,
5059 {
5060 self.custom_target_type = std::option::Option::Some(v.into());
5061 self
5062 }
5063
5064 pub fn set_or_clear_custom_target_type<T>(mut self, v: std::option::Option<T>) -> Self
5066 where
5067 T: std::convert::Into<crate::model::CustomTargetType>,
5068 {
5069 self.custom_target_type = v.map(|x| x.into());
5070 self
5071 }
5072
5073 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5075 self.request_id = v.into();
5076 self
5077 }
5078
5079 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5081 self.validate_only = v.into();
5082 self
5083 }
5084}
5085
5086impl wkt::message::Message for CreateCustomTargetTypeRequest {
5087 fn typename() -> &'static str {
5088 "type.googleapis.com/google.cloud.deploy.v1.CreateCustomTargetTypeRequest"
5089 }
5090}
5091
5092#[derive(Clone, Default, PartialEq)]
5094#[non_exhaustive]
5095pub struct UpdateCustomTargetTypeRequest {
5096 pub update_mask: std::option::Option<wkt::FieldMask>,
5102
5103 pub custom_target_type: std::option::Option<crate::model::CustomTargetType>,
5105
5106 pub request_id: std::string::String,
5120
5121 pub allow_missing: bool,
5124
5125 pub validate_only: bool,
5128
5129 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5130}
5131
5132impl UpdateCustomTargetTypeRequest {
5133 pub fn new() -> Self {
5134 std::default::Default::default()
5135 }
5136
5137 pub fn set_update_mask<T>(mut self, v: T) -> Self
5139 where
5140 T: std::convert::Into<wkt::FieldMask>,
5141 {
5142 self.update_mask = std::option::Option::Some(v.into());
5143 self
5144 }
5145
5146 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
5148 where
5149 T: std::convert::Into<wkt::FieldMask>,
5150 {
5151 self.update_mask = v.map(|x| x.into());
5152 self
5153 }
5154
5155 pub fn set_custom_target_type<T>(mut self, v: T) -> Self
5157 where
5158 T: std::convert::Into<crate::model::CustomTargetType>,
5159 {
5160 self.custom_target_type = std::option::Option::Some(v.into());
5161 self
5162 }
5163
5164 pub fn set_or_clear_custom_target_type<T>(mut self, v: std::option::Option<T>) -> Self
5166 where
5167 T: std::convert::Into<crate::model::CustomTargetType>,
5168 {
5169 self.custom_target_type = v.map(|x| x.into());
5170 self
5171 }
5172
5173 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5175 self.request_id = v.into();
5176 self
5177 }
5178
5179 pub fn set_allow_missing<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5181 self.allow_missing = v.into();
5182 self
5183 }
5184
5185 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5187 self.validate_only = v.into();
5188 self
5189 }
5190}
5191
5192impl wkt::message::Message for UpdateCustomTargetTypeRequest {
5193 fn typename() -> &'static str {
5194 "type.googleapis.com/google.cloud.deploy.v1.UpdateCustomTargetTypeRequest"
5195 }
5196}
5197
5198#[derive(Clone, Default, PartialEq)]
5200#[non_exhaustive]
5201pub struct DeleteCustomTargetTypeRequest {
5202 pub name: std::string::String,
5205
5206 pub request_id: std::string::String,
5220
5221 pub allow_missing: bool,
5224
5225 pub validate_only: bool,
5228
5229 pub etag: std::string::String,
5233
5234 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5235}
5236
5237impl DeleteCustomTargetTypeRequest {
5238 pub fn new() -> Self {
5239 std::default::Default::default()
5240 }
5241
5242 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5244 self.name = v.into();
5245 self
5246 }
5247
5248 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5250 self.request_id = v.into();
5251 self
5252 }
5253
5254 pub fn set_allow_missing<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5256 self.allow_missing = v.into();
5257 self
5258 }
5259
5260 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5262 self.validate_only = v.into();
5263 self
5264 }
5265
5266 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5268 self.etag = v.into();
5269 self
5270 }
5271}
5272
5273impl wkt::message::Message for DeleteCustomTargetTypeRequest {
5274 fn typename() -> &'static str {
5275 "type.googleapis.com/google.cloud.deploy.v1.DeleteCustomTargetTypeRequest"
5276 }
5277}
5278
5279#[derive(Clone, Default, PartialEq)]
5284#[non_exhaustive]
5285pub struct DeployPolicy {
5286 pub name: std::string::String,
5290
5291 pub uid: std::string::String,
5293
5294 pub description: std::string::String,
5296
5297 pub annotations: std::collections::HashMap<std::string::String, std::string::String>,
5315
5316 pub labels: std::collections::HashMap<std::string::String, std::string::String>,
5328
5329 pub create_time: std::option::Option<wkt::Timestamp>,
5331
5332 pub update_time: std::option::Option<wkt::Timestamp>,
5334
5335 pub suspended: bool,
5338
5339 pub selectors: std::vec::Vec<crate::model::DeployPolicyResourceSelector>,
5344
5345 pub rules: std::vec::Vec<crate::model::PolicyRule>,
5347
5348 pub etag: std::string::String,
5353
5354 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5355}
5356
5357impl DeployPolicy {
5358 pub fn new() -> Self {
5359 std::default::Default::default()
5360 }
5361
5362 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5364 self.name = v.into();
5365 self
5366 }
5367
5368 pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5370 self.uid = v.into();
5371 self
5372 }
5373
5374 pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5376 self.description = v.into();
5377 self
5378 }
5379
5380 pub fn set_annotations<T, K, V>(mut self, v: T) -> Self
5382 where
5383 T: std::iter::IntoIterator<Item = (K, V)>,
5384 K: std::convert::Into<std::string::String>,
5385 V: std::convert::Into<std::string::String>,
5386 {
5387 use std::iter::Iterator;
5388 self.annotations = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
5389 self
5390 }
5391
5392 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
5394 where
5395 T: std::iter::IntoIterator<Item = (K, V)>,
5396 K: std::convert::Into<std::string::String>,
5397 V: std::convert::Into<std::string::String>,
5398 {
5399 use std::iter::Iterator;
5400 self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
5401 self
5402 }
5403
5404 pub fn set_create_time<T>(mut self, v: T) -> Self
5406 where
5407 T: std::convert::Into<wkt::Timestamp>,
5408 {
5409 self.create_time = std::option::Option::Some(v.into());
5410 self
5411 }
5412
5413 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
5415 where
5416 T: std::convert::Into<wkt::Timestamp>,
5417 {
5418 self.create_time = v.map(|x| x.into());
5419 self
5420 }
5421
5422 pub fn set_update_time<T>(mut self, v: T) -> Self
5424 where
5425 T: std::convert::Into<wkt::Timestamp>,
5426 {
5427 self.update_time = std::option::Option::Some(v.into());
5428 self
5429 }
5430
5431 pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
5433 where
5434 T: std::convert::Into<wkt::Timestamp>,
5435 {
5436 self.update_time = v.map(|x| x.into());
5437 self
5438 }
5439
5440 pub fn set_suspended<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5442 self.suspended = v.into();
5443 self
5444 }
5445
5446 pub fn set_selectors<T, V>(mut self, v: T) -> Self
5448 where
5449 T: std::iter::IntoIterator<Item = V>,
5450 V: std::convert::Into<crate::model::DeployPolicyResourceSelector>,
5451 {
5452 use std::iter::Iterator;
5453 self.selectors = v.into_iter().map(|i| i.into()).collect();
5454 self
5455 }
5456
5457 pub fn set_rules<T, V>(mut self, v: T) -> Self
5459 where
5460 T: std::iter::IntoIterator<Item = V>,
5461 V: std::convert::Into<crate::model::PolicyRule>,
5462 {
5463 use std::iter::Iterator;
5464 self.rules = v.into_iter().map(|i| i.into()).collect();
5465 self
5466 }
5467
5468 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5470 self.etag = v.into();
5471 self
5472 }
5473}
5474
5475impl wkt::message::Message for DeployPolicy {
5476 fn typename() -> &'static str {
5477 "type.googleapis.com/google.cloud.deploy.v1.DeployPolicy"
5478 }
5479}
5480
5481pub mod deploy_policy {
5483 #[allow(unused_imports)]
5484 use super::*;
5485
5486 #[derive(Clone, Debug, PartialEq)]
5503 #[non_exhaustive]
5504 pub enum Invoker {
5505 Unspecified,
5507 User,
5510 DeployAutomation,
5512 UnknownValue(invoker::UnknownValue),
5517 }
5518
5519 #[doc(hidden)]
5520 pub mod invoker {
5521 #[allow(unused_imports)]
5522 use super::*;
5523 #[derive(Clone, Debug, PartialEq)]
5524 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
5525 }
5526
5527 impl Invoker {
5528 pub fn value(&self) -> std::option::Option<i32> {
5533 match self {
5534 Self::Unspecified => std::option::Option::Some(0),
5535 Self::User => std::option::Option::Some(1),
5536 Self::DeployAutomation => std::option::Option::Some(2),
5537 Self::UnknownValue(u) => u.0.value(),
5538 }
5539 }
5540
5541 pub fn name(&self) -> std::option::Option<&str> {
5546 match self {
5547 Self::Unspecified => std::option::Option::Some("INVOKER_UNSPECIFIED"),
5548 Self::User => std::option::Option::Some("USER"),
5549 Self::DeployAutomation => std::option::Option::Some("DEPLOY_AUTOMATION"),
5550 Self::UnknownValue(u) => u.0.name(),
5551 }
5552 }
5553 }
5554
5555 impl std::default::Default for Invoker {
5556 fn default() -> Self {
5557 use std::convert::From;
5558 Self::from(0)
5559 }
5560 }
5561
5562 impl std::fmt::Display for Invoker {
5563 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
5564 wkt::internal::display_enum(f, self.name(), self.value())
5565 }
5566 }
5567
5568 impl std::convert::From<i32> for Invoker {
5569 fn from(value: i32) -> Self {
5570 match value {
5571 0 => Self::Unspecified,
5572 1 => Self::User,
5573 2 => Self::DeployAutomation,
5574 _ => Self::UnknownValue(invoker::UnknownValue(
5575 wkt::internal::UnknownEnumValue::Integer(value),
5576 )),
5577 }
5578 }
5579 }
5580
5581 impl std::convert::From<&str> for Invoker {
5582 fn from(value: &str) -> Self {
5583 use std::string::ToString;
5584 match value {
5585 "INVOKER_UNSPECIFIED" => Self::Unspecified,
5586 "USER" => Self::User,
5587 "DEPLOY_AUTOMATION" => Self::DeployAutomation,
5588 _ => Self::UnknownValue(invoker::UnknownValue(
5589 wkt::internal::UnknownEnumValue::String(value.to_string()),
5590 )),
5591 }
5592 }
5593 }
5594
5595 impl serde::ser::Serialize for Invoker {
5596 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
5597 where
5598 S: serde::Serializer,
5599 {
5600 match self {
5601 Self::Unspecified => serializer.serialize_i32(0),
5602 Self::User => serializer.serialize_i32(1),
5603 Self::DeployAutomation => serializer.serialize_i32(2),
5604 Self::UnknownValue(u) => u.0.serialize(serializer),
5605 }
5606 }
5607 }
5608
5609 impl<'de> serde::de::Deserialize<'de> for Invoker {
5610 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
5611 where
5612 D: serde::Deserializer<'de>,
5613 {
5614 deserializer.deserialize_any(wkt::internal::EnumVisitor::<Invoker>::new(
5615 ".google.cloud.deploy.v1.DeployPolicy.Invoker",
5616 ))
5617 }
5618 }
5619}
5620
5621#[derive(Clone, Default, PartialEq)]
5627#[non_exhaustive]
5628pub struct DeployPolicyResourceSelector {
5629 pub delivery_pipeline: std::option::Option<crate::model::DeliveryPipelineAttribute>,
5631
5632 pub target: std::option::Option<crate::model::TargetAttribute>,
5634
5635 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5636}
5637
5638impl DeployPolicyResourceSelector {
5639 pub fn new() -> Self {
5640 std::default::Default::default()
5641 }
5642
5643 pub fn set_delivery_pipeline<T>(mut self, v: T) -> Self
5645 where
5646 T: std::convert::Into<crate::model::DeliveryPipelineAttribute>,
5647 {
5648 self.delivery_pipeline = std::option::Option::Some(v.into());
5649 self
5650 }
5651
5652 pub fn set_or_clear_delivery_pipeline<T>(mut self, v: std::option::Option<T>) -> Self
5654 where
5655 T: std::convert::Into<crate::model::DeliveryPipelineAttribute>,
5656 {
5657 self.delivery_pipeline = v.map(|x| x.into());
5658 self
5659 }
5660
5661 pub fn set_target<T>(mut self, v: T) -> Self
5663 where
5664 T: std::convert::Into<crate::model::TargetAttribute>,
5665 {
5666 self.target = std::option::Option::Some(v.into());
5667 self
5668 }
5669
5670 pub fn set_or_clear_target<T>(mut self, v: std::option::Option<T>) -> Self
5672 where
5673 T: std::convert::Into<crate::model::TargetAttribute>,
5674 {
5675 self.target = v.map(|x| x.into());
5676 self
5677 }
5678}
5679
5680impl wkt::message::Message for DeployPolicyResourceSelector {
5681 fn typename() -> &'static str {
5682 "type.googleapis.com/google.cloud.deploy.v1.DeployPolicyResourceSelector"
5683 }
5684}
5685
5686#[derive(Clone, Default, PartialEq)]
5688#[non_exhaustive]
5689pub struct DeliveryPipelineAttribute {
5690 pub id: std::string::String,
5696
5697 pub labels: std::collections::HashMap<std::string::String, std::string::String>,
5699
5700 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5701}
5702
5703impl DeliveryPipelineAttribute {
5704 pub fn new() -> Self {
5705 std::default::Default::default()
5706 }
5707
5708 pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5710 self.id = v.into();
5711 self
5712 }
5713
5714 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
5716 where
5717 T: std::iter::IntoIterator<Item = (K, V)>,
5718 K: std::convert::Into<std::string::String>,
5719 V: std::convert::Into<std::string::String>,
5720 {
5721 use std::iter::Iterator;
5722 self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
5723 self
5724 }
5725}
5726
5727impl wkt::message::Message for DeliveryPipelineAttribute {
5728 fn typename() -> &'static str {
5729 "type.googleapis.com/google.cloud.deploy.v1.DeliveryPipelineAttribute"
5730 }
5731}
5732
5733#[derive(Clone, Default, PartialEq)]
5736#[non_exhaustive]
5737pub struct TargetAttribute {
5738 pub id: std::string::String,
5744
5745 pub labels: std::collections::HashMap<std::string::String, std::string::String>,
5747
5748 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5749}
5750
5751impl TargetAttribute {
5752 pub fn new() -> Self {
5753 std::default::Default::default()
5754 }
5755
5756 pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5758 self.id = v.into();
5759 self
5760 }
5761
5762 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
5764 where
5765 T: std::iter::IntoIterator<Item = (K, V)>,
5766 K: std::convert::Into<std::string::String>,
5767 V: std::convert::Into<std::string::String>,
5768 {
5769 use std::iter::Iterator;
5770 self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
5771 self
5772 }
5773}
5774
5775impl wkt::message::Message for TargetAttribute {
5776 fn typename() -> &'static str {
5777 "type.googleapis.com/google.cloud.deploy.v1.TargetAttribute"
5778 }
5779}
5780
5781#[derive(Clone, Default, PartialEq)]
5783#[non_exhaustive]
5784pub struct PolicyRule {
5785 pub rule: std::option::Option<crate::model::policy_rule::Rule>,
5786
5787 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5788}
5789
5790impl PolicyRule {
5791 pub fn new() -> Self {
5792 std::default::Default::default()
5793 }
5794
5795 pub fn set_rule<T: std::convert::Into<std::option::Option<crate::model::policy_rule::Rule>>>(
5800 mut self,
5801 v: T,
5802 ) -> Self {
5803 self.rule = v.into();
5804 self
5805 }
5806
5807 pub fn rollout_restriction(
5811 &self,
5812 ) -> std::option::Option<&std::boxed::Box<crate::model::RolloutRestriction>> {
5813 #[allow(unreachable_patterns)]
5814 self.rule.as_ref().and_then(|v| match v {
5815 crate::model::policy_rule::Rule::RolloutRestriction(v) => std::option::Option::Some(v),
5816 _ => std::option::Option::None,
5817 })
5818 }
5819
5820 pub fn set_rollout_restriction<
5826 T: std::convert::Into<std::boxed::Box<crate::model::RolloutRestriction>>,
5827 >(
5828 mut self,
5829 v: T,
5830 ) -> Self {
5831 self.rule = std::option::Option::Some(crate::model::policy_rule::Rule::RolloutRestriction(
5832 v.into(),
5833 ));
5834 self
5835 }
5836}
5837
5838impl wkt::message::Message for PolicyRule {
5839 fn typename() -> &'static str {
5840 "type.googleapis.com/google.cloud.deploy.v1.PolicyRule"
5841 }
5842}
5843
5844pub mod policy_rule {
5846 #[allow(unused_imports)]
5847 use super::*;
5848
5849 #[derive(Clone, Debug, PartialEq)]
5850 #[non_exhaustive]
5851 pub enum Rule {
5852 RolloutRestriction(std::boxed::Box<crate::model::RolloutRestriction>),
5854 }
5855}
5856
5857#[derive(Clone, Default, PartialEq)]
5859#[non_exhaustive]
5860pub struct RolloutRestriction {
5861 pub id: std::string::String,
5864
5865 pub invokers: std::vec::Vec<crate::model::deploy_policy::Invoker>,
5868
5869 pub actions: std::vec::Vec<crate::model::rollout_restriction::RolloutActions>,
5872
5873 pub time_windows: std::option::Option<crate::model::TimeWindows>,
5875
5876 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5877}
5878
5879impl RolloutRestriction {
5880 pub fn new() -> Self {
5881 std::default::Default::default()
5882 }
5883
5884 pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5886 self.id = v.into();
5887 self
5888 }
5889
5890 pub fn set_invokers<T, V>(mut self, v: T) -> Self
5892 where
5893 T: std::iter::IntoIterator<Item = V>,
5894 V: std::convert::Into<crate::model::deploy_policy::Invoker>,
5895 {
5896 use std::iter::Iterator;
5897 self.invokers = v.into_iter().map(|i| i.into()).collect();
5898 self
5899 }
5900
5901 pub fn set_actions<T, V>(mut self, v: T) -> Self
5903 where
5904 T: std::iter::IntoIterator<Item = V>,
5905 V: std::convert::Into<crate::model::rollout_restriction::RolloutActions>,
5906 {
5907 use std::iter::Iterator;
5908 self.actions = v.into_iter().map(|i| i.into()).collect();
5909 self
5910 }
5911
5912 pub fn set_time_windows<T>(mut self, v: T) -> Self
5914 where
5915 T: std::convert::Into<crate::model::TimeWindows>,
5916 {
5917 self.time_windows = std::option::Option::Some(v.into());
5918 self
5919 }
5920
5921 pub fn set_or_clear_time_windows<T>(mut self, v: std::option::Option<T>) -> Self
5923 where
5924 T: std::convert::Into<crate::model::TimeWindows>,
5925 {
5926 self.time_windows = v.map(|x| x.into());
5927 self
5928 }
5929}
5930
5931impl wkt::message::Message for RolloutRestriction {
5932 fn typename() -> &'static str {
5933 "type.googleapis.com/google.cloud.deploy.v1.RolloutRestriction"
5934 }
5935}
5936
5937pub mod rollout_restriction {
5939 #[allow(unused_imports)]
5940 use super::*;
5941
5942 #[derive(Clone, Debug, PartialEq)]
5958 #[non_exhaustive]
5959 pub enum RolloutActions {
5960 Unspecified,
5962 Advance,
5964 Approve,
5966 Cancel,
5968 Create,
5970 IgnoreJob,
5972 RetryJob,
5974 Rollback,
5976 TerminateJobrun,
5978 UnknownValue(rollout_actions::UnknownValue),
5983 }
5984
5985 #[doc(hidden)]
5986 pub mod rollout_actions {
5987 #[allow(unused_imports)]
5988 use super::*;
5989 #[derive(Clone, Debug, PartialEq)]
5990 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
5991 }
5992
5993 impl RolloutActions {
5994 pub fn value(&self) -> std::option::Option<i32> {
5999 match self {
6000 Self::Unspecified => std::option::Option::Some(0),
6001 Self::Advance => std::option::Option::Some(1),
6002 Self::Approve => std::option::Option::Some(2),
6003 Self::Cancel => std::option::Option::Some(3),
6004 Self::Create => std::option::Option::Some(4),
6005 Self::IgnoreJob => std::option::Option::Some(5),
6006 Self::RetryJob => std::option::Option::Some(6),
6007 Self::Rollback => std::option::Option::Some(7),
6008 Self::TerminateJobrun => std::option::Option::Some(8),
6009 Self::UnknownValue(u) => u.0.value(),
6010 }
6011 }
6012
6013 pub fn name(&self) -> std::option::Option<&str> {
6018 match self {
6019 Self::Unspecified => std::option::Option::Some("ROLLOUT_ACTIONS_UNSPECIFIED"),
6020 Self::Advance => std::option::Option::Some("ADVANCE"),
6021 Self::Approve => std::option::Option::Some("APPROVE"),
6022 Self::Cancel => std::option::Option::Some("CANCEL"),
6023 Self::Create => std::option::Option::Some("CREATE"),
6024 Self::IgnoreJob => std::option::Option::Some("IGNORE_JOB"),
6025 Self::RetryJob => std::option::Option::Some("RETRY_JOB"),
6026 Self::Rollback => std::option::Option::Some("ROLLBACK"),
6027 Self::TerminateJobrun => std::option::Option::Some("TERMINATE_JOBRUN"),
6028 Self::UnknownValue(u) => u.0.name(),
6029 }
6030 }
6031 }
6032
6033 impl std::default::Default for RolloutActions {
6034 fn default() -> Self {
6035 use std::convert::From;
6036 Self::from(0)
6037 }
6038 }
6039
6040 impl std::fmt::Display for RolloutActions {
6041 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
6042 wkt::internal::display_enum(f, self.name(), self.value())
6043 }
6044 }
6045
6046 impl std::convert::From<i32> for RolloutActions {
6047 fn from(value: i32) -> Self {
6048 match value {
6049 0 => Self::Unspecified,
6050 1 => Self::Advance,
6051 2 => Self::Approve,
6052 3 => Self::Cancel,
6053 4 => Self::Create,
6054 5 => Self::IgnoreJob,
6055 6 => Self::RetryJob,
6056 7 => Self::Rollback,
6057 8 => Self::TerminateJobrun,
6058 _ => Self::UnknownValue(rollout_actions::UnknownValue(
6059 wkt::internal::UnknownEnumValue::Integer(value),
6060 )),
6061 }
6062 }
6063 }
6064
6065 impl std::convert::From<&str> for RolloutActions {
6066 fn from(value: &str) -> Self {
6067 use std::string::ToString;
6068 match value {
6069 "ROLLOUT_ACTIONS_UNSPECIFIED" => Self::Unspecified,
6070 "ADVANCE" => Self::Advance,
6071 "APPROVE" => Self::Approve,
6072 "CANCEL" => Self::Cancel,
6073 "CREATE" => Self::Create,
6074 "IGNORE_JOB" => Self::IgnoreJob,
6075 "RETRY_JOB" => Self::RetryJob,
6076 "ROLLBACK" => Self::Rollback,
6077 "TERMINATE_JOBRUN" => Self::TerminateJobrun,
6078 _ => Self::UnknownValue(rollout_actions::UnknownValue(
6079 wkt::internal::UnknownEnumValue::String(value.to_string()),
6080 )),
6081 }
6082 }
6083 }
6084
6085 impl serde::ser::Serialize for RolloutActions {
6086 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
6087 where
6088 S: serde::Serializer,
6089 {
6090 match self {
6091 Self::Unspecified => serializer.serialize_i32(0),
6092 Self::Advance => serializer.serialize_i32(1),
6093 Self::Approve => serializer.serialize_i32(2),
6094 Self::Cancel => serializer.serialize_i32(3),
6095 Self::Create => serializer.serialize_i32(4),
6096 Self::IgnoreJob => serializer.serialize_i32(5),
6097 Self::RetryJob => serializer.serialize_i32(6),
6098 Self::Rollback => serializer.serialize_i32(7),
6099 Self::TerminateJobrun => serializer.serialize_i32(8),
6100 Self::UnknownValue(u) => u.0.serialize(serializer),
6101 }
6102 }
6103 }
6104
6105 impl<'de> serde::de::Deserialize<'de> for RolloutActions {
6106 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6107 where
6108 D: serde::Deserializer<'de>,
6109 {
6110 deserializer.deserialize_any(wkt::internal::EnumVisitor::<RolloutActions>::new(
6111 ".google.cloud.deploy.v1.RolloutRestriction.RolloutActions",
6112 ))
6113 }
6114 }
6115}
6116
6117#[derive(Clone, Default, PartialEq)]
6121#[non_exhaustive]
6122pub struct TimeWindows {
6123 pub time_zone: std::string::String,
6126
6127 pub one_time_windows: std::vec::Vec<crate::model::OneTimeWindow>,
6129
6130 pub weekly_windows: std::vec::Vec<crate::model::WeeklyWindow>,
6132
6133 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6134}
6135
6136impl TimeWindows {
6137 pub fn new() -> Self {
6138 std::default::Default::default()
6139 }
6140
6141 pub fn set_time_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6143 self.time_zone = v.into();
6144 self
6145 }
6146
6147 pub fn set_one_time_windows<T, V>(mut self, v: T) -> Self
6149 where
6150 T: std::iter::IntoIterator<Item = V>,
6151 V: std::convert::Into<crate::model::OneTimeWindow>,
6152 {
6153 use std::iter::Iterator;
6154 self.one_time_windows = v.into_iter().map(|i| i.into()).collect();
6155 self
6156 }
6157
6158 pub fn set_weekly_windows<T, V>(mut self, v: T) -> Self
6160 where
6161 T: std::iter::IntoIterator<Item = V>,
6162 V: std::convert::Into<crate::model::WeeklyWindow>,
6163 {
6164 use std::iter::Iterator;
6165 self.weekly_windows = v.into_iter().map(|i| i.into()).collect();
6166 self
6167 }
6168}
6169
6170impl wkt::message::Message for TimeWindows {
6171 fn typename() -> &'static str {
6172 "type.googleapis.com/google.cloud.deploy.v1.TimeWindows"
6173 }
6174}
6175
6176#[derive(Clone, Default, PartialEq)]
6179#[non_exhaustive]
6180pub struct OneTimeWindow {
6181 pub start_date: std::option::Option<gtype::model::Date>,
6183
6184 pub start_time: std::option::Option<gtype::model::TimeOfDay>,
6186
6187 pub end_date: std::option::Option<gtype::model::Date>,
6189
6190 pub end_time: std::option::Option<gtype::model::TimeOfDay>,
6192
6193 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6194}
6195
6196impl OneTimeWindow {
6197 pub fn new() -> Self {
6198 std::default::Default::default()
6199 }
6200
6201 pub fn set_start_date<T>(mut self, v: T) -> Self
6203 where
6204 T: std::convert::Into<gtype::model::Date>,
6205 {
6206 self.start_date = std::option::Option::Some(v.into());
6207 self
6208 }
6209
6210 pub fn set_or_clear_start_date<T>(mut self, v: std::option::Option<T>) -> Self
6212 where
6213 T: std::convert::Into<gtype::model::Date>,
6214 {
6215 self.start_date = v.map(|x| x.into());
6216 self
6217 }
6218
6219 pub fn set_start_time<T>(mut self, v: T) -> Self
6221 where
6222 T: std::convert::Into<gtype::model::TimeOfDay>,
6223 {
6224 self.start_time = std::option::Option::Some(v.into());
6225 self
6226 }
6227
6228 pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
6230 where
6231 T: std::convert::Into<gtype::model::TimeOfDay>,
6232 {
6233 self.start_time = v.map(|x| x.into());
6234 self
6235 }
6236
6237 pub fn set_end_date<T>(mut self, v: T) -> Self
6239 where
6240 T: std::convert::Into<gtype::model::Date>,
6241 {
6242 self.end_date = std::option::Option::Some(v.into());
6243 self
6244 }
6245
6246 pub fn set_or_clear_end_date<T>(mut self, v: std::option::Option<T>) -> Self
6248 where
6249 T: std::convert::Into<gtype::model::Date>,
6250 {
6251 self.end_date = v.map(|x| x.into());
6252 self
6253 }
6254
6255 pub fn set_end_time<T>(mut self, v: T) -> Self
6257 where
6258 T: std::convert::Into<gtype::model::TimeOfDay>,
6259 {
6260 self.end_time = std::option::Option::Some(v.into());
6261 self
6262 }
6263
6264 pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
6266 where
6267 T: std::convert::Into<gtype::model::TimeOfDay>,
6268 {
6269 self.end_time = v.map(|x| x.into());
6270 self
6271 }
6272}
6273
6274impl wkt::message::Message for OneTimeWindow {
6275 fn typename() -> &'static str {
6276 "type.googleapis.com/google.cloud.deploy.v1.OneTimeWindow"
6277 }
6278}
6279
6280#[derive(Clone, Default, PartialEq)]
6283#[non_exhaustive]
6284pub struct WeeklyWindow {
6285 pub days_of_week: std::vec::Vec<gtype::model::DayOfWeek>,
6288
6289 pub start_time: std::option::Option<gtype::model::TimeOfDay>,
6293
6294 pub end_time: std::option::Option<gtype::model::TimeOfDay>,
6298
6299 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6300}
6301
6302impl WeeklyWindow {
6303 pub fn new() -> Self {
6304 std::default::Default::default()
6305 }
6306
6307 pub fn set_days_of_week<T, V>(mut self, v: T) -> Self
6309 where
6310 T: std::iter::IntoIterator<Item = V>,
6311 V: std::convert::Into<gtype::model::DayOfWeek>,
6312 {
6313 use std::iter::Iterator;
6314 self.days_of_week = v.into_iter().map(|i| i.into()).collect();
6315 self
6316 }
6317
6318 pub fn set_start_time<T>(mut self, v: T) -> Self
6320 where
6321 T: std::convert::Into<gtype::model::TimeOfDay>,
6322 {
6323 self.start_time = std::option::Option::Some(v.into());
6324 self
6325 }
6326
6327 pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
6329 where
6330 T: std::convert::Into<gtype::model::TimeOfDay>,
6331 {
6332 self.start_time = v.map(|x| x.into());
6333 self
6334 }
6335
6336 pub fn set_end_time<T>(mut self, v: T) -> Self
6338 where
6339 T: std::convert::Into<gtype::model::TimeOfDay>,
6340 {
6341 self.end_time = std::option::Option::Some(v.into());
6342 self
6343 }
6344
6345 pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
6347 where
6348 T: std::convert::Into<gtype::model::TimeOfDay>,
6349 {
6350 self.end_time = v.map(|x| x.into());
6351 self
6352 }
6353}
6354
6355impl wkt::message::Message for WeeklyWindow {
6356 fn typename() -> &'static str {
6357 "type.googleapis.com/google.cloud.deploy.v1.WeeklyWindow"
6358 }
6359}
6360
6361#[derive(Clone, Default, PartialEq)]
6365#[non_exhaustive]
6366pub struct PolicyViolation {
6367 pub policy_violation_details: std::vec::Vec<crate::model::PolicyViolationDetails>,
6369
6370 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6371}
6372
6373impl PolicyViolation {
6374 pub fn new() -> Self {
6375 std::default::Default::default()
6376 }
6377
6378 pub fn set_policy_violation_details<T, V>(mut self, v: T) -> Self
6380 where
6381 T: std::iter::IntoIterator<Item = V>,
6382 V: std::convert::Into<crate::model::PolicyViolationDetails>,
6383 {
6384 use std::iter::Iterator;
6385 self.policy_violation_details = v.into_iter().map(|i| i.into()).collect();
6386 self
6387 }
6388}
6389
6390impl wkt::message::Message for PolicyViolation {
6391 fn typename() -> &'static str {
6392 "type.googleapis.com/google.cloud.deploy.v1.PolicyViolation"
6393 }
6394}
6395
6396#[derive(Clone, Default, PartialEq)]
6398#[non_exhaustive]
6399pub struct PolicyViolationDetails {
6400 pub policy: std::string::String,
6404
6405 pub rule_id: std::string::String,
6407
6408 pub failure_message: std::string::String,
6411
6412 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6413}
6414
6415impl PolicyViolationDetails {
6416 pub fn new() -> Self {
6417 std::default::Default::default()
6418 }
6419
6420 pub fn set_policy<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6422 self.policy = v.into();
6423 self
6424 }
6425
6426 pub fn set_rule_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6428 self.rule_id = v.into();
6429 self
6430 }
6431
6432 pub fn set_failure_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6434 self.failure_message = v.into();
6435 self
6436 }
6437}
6438
6439impl wkt::message::Message for PolicyViolationDetails {
6440 fn typename() -> &'static str {
6441 "type.googleapis.com/google.cloud.deploy.v1.PolicyViolationDetails"
6442 }
6443}
6444
6445#[derive(Clone, Default, PartialEq)]
6450#[non_exhaustive]
6451pub struct Release {
6452 pub name: std::string::String,
6456
6457 pub uid: std::string::String,
6459
6460 pub description: std::string::String,
6462
6463 pub annotations: std::collections::HashMap<std::string::String, std::string::String>,
6468
6469 pub labels: std::collections::HashMap<std::string::String, std::string::String>,
6481
6482 pub abandoned: bool,
6484
6485 pub create_time: std::option::Option<wkt::Timestamp>,
6487
6488 pub render_start_time: std::option::Option<wkt::Timestamp>,
6490
6491 pub render_end_time: std::option::Option<wkt::Timestamp>,
6493
6494 pub skaffold_config_uri: std::string::String,
6497
6498 pub skaffold_config_path: std::string::String,
6500
6501 pub build_artifacts: std::vec::Vec<crate::model::BuildArtifact>,
6503
6504 pub delivery_pipeline_snapshot: std::option::Option<crate::model::DeliveryPipeline>,
6507
6508 pub target_snapshots: std::vec::Vec<crate::model::Target>,
6510
6511 pub custom_target_type_snapshots: std::vec::Vec<crate::model::CustomTargetType>,
6514
6515 pub render_state: crate::model::release::RenderState,
6517
6518 pub etag: std::string::String,
6522
6523 pub skaffold_version: std::string::String,
6529
6530 pub target_artifacts:
6533 std::collections::HashMap<std::string::String, crate::model::TargetArtifact>,
6534
6535 pub target_renders:
6538 std::collections::HashMap<std::string::String, crate::model::release::TargetRender>,
6539
6540 pub condition: std::option::Option<crate::model::release::ReleaseCondition>,
6542
6543 pub deploy_parameters: std::collections::HashMap<std::string::String, std::string::String>,
6545
6546 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6547}
6548
6549impl Release {
6550 pub fn new() -> Self {
6551 std::default::Default::default()
6552 }
6553
6554 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6556 self.name = v.into();
6557 self
6558 }
6559
6560 pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6562 self.uid = v.into();
6563 self
6564 }
6565
6566 pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6568 self.description = v.into();
6569 self
6570 }
6571
6572 pub fn set_annotations<T, K, V>(mut self, v: T) -> Self
6574 where
6575 T: std::iter::IntoIterator<Item = (K, V)>,
6576 K: std::convert::Into<std::string::String>,
6577 V: std::convert::Into<std::string::String>,
6578 {
6579 use std::iter::Iterator;
6580 self.annotations = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
6581 self
6582 }
6583
6584 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
6586 where
6587 T: std::iter::IntoIterator<Item = (K, V)>,
6588 K: std::convert::Into<std::string::String>,
6589 V: std::convert::Into<std::string::String>,
6590 {
6591 use std::iter::Iterator;
6592 self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
6593 self
6594 }
6595
6596 pub fn set_abandoned<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6598 self.abandoned = v.into();
6599 self
6600 }
6601
6602 pub fn set_create_time<T>(mut self, v: T) -> Self
6604 where
6605 T: std::convert::Into<wkt::Timestamp>,
6606 {
6607 self.create_time = std::option::Option::Some(v.into());
6608 self
6609 }
6610
6611 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
6613 where
6614 T: std::convert::Into<wkt::Timestamp>,
6615 {
6616 self.create_time = v.map(|x| x.into());
6617 self
6618 }
6619
6620 pub fn set_render_start_time<T>(mut self, v: T) -> Self
6622 where
6623 T: std::convert::Into<wkt::Timestamp>,
6624 {
6625 self.render_start_time = std::option::Option::Some(v.into());
6626 self
6627 }
6628
6629 pub fn set_or_clear_render_start_time<T>(mut self, v: std::option::Option<T>) -> Self
6631 where
6632 T: std::convert::Into<wkt::Timestamp>,
6633 {
6634 self.render_start_time = v.map(|x| x.into());
6635 self
6636 }
6637
6638 pub fn set_render_end_time<T>(mut self, v: T) -> Self
6640 where
6641 T: std::convert::Into<wkt::Timestamp>,
6642 {
6643 self.render_end_time = std::option::Option::Some(v.into());
6644 self
6645 }
6646
6647 pub fn set_or_clear_render_end_time<T>(mut self, v: std::option::Option<T>) -> Self
6649 where
6650 T: std::convert::Into<wkt::Timestamp>,
6651 {
6652 self.render_end_time = v.map(|x| x.into());
6653 self
6654 }
6655
6656 pub fn set_skaffold_config_uri<T: std::convert::Into<std::string::String>>(
6658 mut self,
6659 v: T,
6660 ) -> Self {
6661 self.skaffold_config_uri = v.into();
6662 self
6663 }
6664
6665 pub fn set_skaffold_config_path<T: std::convert::Into<std::string::String>>(
6667 mut self,
6668 v: T,
6669 ) -> Self {
6670 self.skaffold_config_path = v.into();
6671 self
6672 }
6673
6674 pub fn set_build_artifacts<T, V>(mut self, v: T) -> Self
6676 where
6677 T: std::iter::IntoIterator<Item = V>,
6678 V: std::convert::Into<crate::model::BuildArtifact>,
6679 {
6680 use std::iter::Iterator;
6681 self.build_artifacts = v.into_iter().map(|i| i.into()).collect();
6682 self
6683 }
6684
6685 pub fn set_delivery_pipeline_snapshot<T>(mut self, v: T) -> Self
6687 where
6688 T: std::convert::Into<crate::model::DeliveryPipeline>,
6689 {
6690 self.delivery_pipeline_snapshot = std::option::Option::Some(v.into());
6691 self
6692 }
6693
6694 pub fn set_or_clear_delivery_pipeline_snapshot<T>(mut self, v: std::option::Option<T>) -> Self
6696 where
6697 T: std::convert::Into<crate::model::DeliveryPipeline>,
6698 {
6699 self.delivery_pipeline_snapshot = v.map(|x| x.into());
6700 self
6701 }
6702
6703 pub fn set_target_snapshots<T, V>(mut self, v: T) -> Self
6705 where
6706 T: std::iter::IntoIterator<Item = V>,
6707 V: std::convert::Into<crate::model::Target>,
6708 {
6709 use std::iter::Iterator;
6710 self.target_snapshots = v.into_iter().map(|i| i.into()).collect();
6711 self
6712 }
6713
6714 pub fn set_custom_target_type_snapshots<T, V>(mut self, v: T) -> Self
6716 where
6717 T: std::iter::IntoIterator<Item = V>,
6718 V: std::convert::Into<crate::model::CustomTargetType>,
6719 {
6720 use std::iter::Iterator;
6721 self.custom_target_type_snapshots = v.into_iter().map(|i| i.into()).collect();
6722 self
6723 }
6724
6725 pub fn set_render_state<T: std::convert::Into<crate::model::release::RenderState>>(
6727 mut self,
6728 v: T,
6729 ) -> Self {
6730 self.render_state = v.into();
6731 self
6732 }
6733
6734 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6736 self.etag = v.into();
6737 self
6738 }
6739
6740 pub fn set_skaffold_version<T: std::convert::Into<std::string::String>>(
6742 mut self,
6743 v: T,
6744 ) -> Self {
6745 self.skaffold_version = v.into();
6746 self
6747 }
6748
6749 pub fn set_target_artifacts<T, K, V>(mut self, v: T) -> Self
6751 where
6752 T: std::iter::IntoIterator<Item = (K, V)>,
6753 K: std::convert::Into<std::string::String>,
6754 V: std::convert::Into<crate::model::TargetArtifact>,
6755 {
6756 use std::iter::Iterator;
6757 self.target_artifacts = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
6758 self
6759 }
6760
6761 pub fn set_target_renders<T, K, V>(mut self, v: T) -> Self
6763 where
6764 T: std::iter::IntoIterator<Item = (K, V)>,
6765 K: std::convert::Into<std::string::String>,
6766 V: std::convert::Into<crate::model::release::TargetRender>,
6767 {
6768 use std::iter::Iterator;
6769 self.target_renders = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
6770 self
6771 }
6772
6773 pub fn set_condition<T>(mut self, v: T) -> Self
6775 where
6776 T: std::convert::Into<crate::model::release::ReleaseCondition>,
6777 {
6778 self.condition = std::option::Option::Some(v.into());
6779 self
6780 }
6781
6782 pub fn set_or_clear_condition<T>(mut self, v: std::option::Option<T>) -> Self
6784 where
6785 T: std::convert::Into<crate::model::release::ReleaseCondition>,
6786 {
6787 self.condition = v.map(|x| x.into());
6788 self
6789 }
6790
6791 pub fn set_deploy_parameters<T, K, V>(mut self, v: T) -> Self
6793 where
6794 T: std::iter::IntoIterator<Item = (K, V)>,
6795 K: std::convert::Into<std::string::String>,
6796 V: std::convert::Into<std::string::String>,
6797 {
6798 use std::iter::Iterator;
6799 self.deploy_parameters = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
6800 self
6801 }
6802}
6803
6804impl wkt::message::Message for Release {
6805 fn typename() -> &'static str {
6806 "type.googleapis.com/google.cloud.deploy.v1.Release"
6807 }
6808}
6809
6810pub mod release {
6812 #[allow(unused_imports)]
6813 use super::*;
6814
6815 #[derive(Clone, Default, PartialEq)]
6817 #[non_exhaustive]
6818 pub struct TargetRender {
6819 pub rendering_build: std::string::String,
6823
6824 pub rendering_state: crate::model::release::target_render::TargetRenderState,
6826
6827 pub metadata: std::option::Option<crate::model::RenderMetadata>,
6829
6830 pub failure_cause: crate::model::release::target_render::FailureCause,
6833
6834 pub failure_message: std::string::String,
6837
6838 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6839 }
6840
6841 impl TargetRender {
6842 pub fn new() -> Self {
6843 std::default::Default::default()
6844 }
6845
6846 pub fn set_rendering_build<T: std::convert::Into<std::string::String>>(
6848 mut self,
6849 v: T,
6850 ) -> Self {
6851 self.rendering_build = v.into();
6852 self
6853 }
6854
6855 pub fn set_rendering_state<
6857 T: std::convert::Into<crate::model::release::target_render::TargetRenderState>,
6858 >(
6859 mut self,
6860 v: T,
6861 ) -> Self {
6862 self.rendering_state = v.into();
6863 self
6864 }
6865
6866 pub fn set_metadata<T>(mut self, v: T) -> Self
6868 where
6869 T: std::convert::Into<crate::model::RenderMetadata>,
6870 {
6871 self.metadata = std::option::Option::Some(v.into());
6872 self
6873 }
6874
6875 pub fn set_or_clear_metadata<T>(mut self, v: std::option::Option<T>) -> Self
6877 where
6878 T: std::convert::Into<crate::model::RenderMetadata>,
6879 {
6880 self.metadata = v.map(|x| x.into());
6881 self
6882 }
6883
6884 pub fn set_failure_cause<
6886 T: std::convert::Into<crate::model::release::target_render::FailureCause>,
6887 >(
6888 mut self,
6889 v: T,
6890 ) -> Self {
6891 self.failure_cause = v.into();
6892 self
6893 }
6894
6895 pub fn set_failure_message<T: std::convert::Into<std::string::String>>(
6897 mut self,
6898 v: T,
6899 ) -> Self {
6900 self.failure_message = v.into();
6901 self
6902 }
6903 }
6904
6905 impl wkt::message::Message for TargetRender {
6906 fn typename() -> &'static str {
6907 "type.googleapis.com/google.cloud.deploy.v1.Release.TargetRender"
6908 }
6909 }
6910
6911 pub mod target_render {
6913 #[allow(unused_imports)]
6914 use super::*;
6915
6916 #[derive(Clone, Debug, PartialEq)]
6932 #[non_exhaustive]
6933 pub enum TargetRenderState {
6934 Unspecified,
6936 Succeeded,
6938 Failed,
6940 InProgress,
6942 UnknownValue(target_render_state::UnknownValue),
6947 }
6948
6949 #[doc(hidden)]
6950 pub mod target_render_state {
6951 #[allow(unused_imports)]
6952 use super::*;
6953 #[derive(Clone, Debug, PartialEq)]
6954 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
6955 }
6956
6957 impl TargetRenderState {
6958 pub fn value(&self) -> std::option::Option<i32> {
6963 match self {
6964 Self::Unspecified => std::option::Option::Some(0),
6965 Self::Succeeded => std::option::Option::Some(1),
6966 Self::Failed => std::option::Option::Some(2),
6967 Self::InProgress => std::option::Option::Some(3),
6968 Self::UnknownValue(u) => u.0.value(),
6969 }
6970 }
6971
6972 pub fn name(&self) -> std::option::Option<&str> {
6977 match self {
6978 Self::Unspecified => {
6979 std::option::Option::Some("TARGET_RENDER_STATE_UNSPECIFIED")
6980 }
6981 Self::Succeeded => std::option::Option::Some("SUCCEEDED"),
6982 Self::Failed => std::option::Option::Some("FAILED"),
6983 Self::InProgress => std::option::Option::Some("IN_PROGRESS"),
6984 Self::UnknownValue(u) => u.0.name(),
6985 }
6986 }
6987 }
6988
6989 impl std::default::Default for TargetRenderState {
6990 fn default() -> Self {
6991 use std::convert::From;
6992 Self::from(0)
6993 }
6994 }
6995
6996 impl std::fmt::Display for TargetRenderState {
6997 fn fmt(
6998 &self,
6999 f: &mut std::fmt::Formatter<'_>,
7000 ) -> std::result::Result<(), std::fmt::Error> {
7001 wkt::internal::display_enum(f, self.name(), self.value())
7002 }
7003 }
7004
7005 impl std::convert::From<i32> for TargetRenderState {
7006 fn from(value: i32) -> Self {
7007 match value {
7008 0 => Self::Unspecified,
7009 1 => Self::Succeeded,
7010 2 => Self::Failed,
7011 3 => Self::InProgress,
7012 _ => Self::UnknownValue(target_render_state::UnknownValue(
7013 wkt::internal::UnknownEnumValue::Integer(value),
7014 )),
7015 }
7016 }
7017 }
7018
7019 impl std::convert::From<&str> for TargetRenderState {
7020 fn from(value: &str) -> Self {
7021 use std::string::ToString;
7022 match value {
7023 "TARGET_RENDER_STATE_UNSPECIFIED" => Self::Unspecified,
7024 "SUCCEEDED" => Self::Succeeded,
7025 "FAILED" => Self::Failed,
7026 "IN_PROGRESS" => Self::InProgress,
7027 _ => Self::UnknownValue(target_render_state::UnknownValue(
7028 wkt::internal::UnknownEnumValue::String(value.to_string()),
7029 )),
7030 }
7031 }
7032 }
7033
7034 impl serde::ser::Serialize for TargetRenderState {
7035 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
7036 where
7037 S: serde::Serializer,
7038 {
7039 match self {
7040 Self::Unspecified => serializer.serialize_i32(0),
7041 Self::Succeeded => serializer.serialize_i32(1),
7042 Self::Failed => serializer.serialize_i32(2),
7043 Self::InProgress => serializer.serialize_i32(3),
7044 Self::UnknownValue(u) => u.0.serialize(serializer),
7045 }
7046 }
7047 }
7048
7049 impl<'de> serde::de::Deserialize<'de> for TargetRenderState {
7050 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7051 where
7052 D: serde::Deserializer<'de>,
7053 {
7054 deserializer.deserialize_any(wkt::internal::EnumVisitor::<TargetRenderState>::new(
7055 ".google.cloud.deploy.v1.Release.TargetRender.TargetRenderState",
7056 ))
7057 }
7058 }
7059
7060 #[derive(Clone, Debug, PartialEq)]
7076 #[non_exhaustive]
7077 pub enum FailureCause {
7078 Unspecified,
7080 CloudBuildUnavailable,
7084 ExecutionFailed,
7087 CloudBuildRequestFailed,
7090 VerificationConfigNotFound,
7094 CustomActionNotFound,
7098 DeploymentStrategyNotSupported,
7101 RenderFeatureNotSupported,
7103 UnknownValue(failure_cause::UnknownValue),
7108 }
7109
7110 #[doc(hidden)]
7111 pub mod failure_cause {
7112 #[allow(unused_imports)]
7113 use super::*;
7114 #[derive(Clone, Debug, PartialEq)]
7115 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
7116 }
7117
7118 impl FailureCause {
7119 pub fn value(&self) -> std::option::Option<i32> {
7124 match self {
7125 Self::Unspecified => std::option::Option::Some(0),
7126 Self::CloudBuildUnavailable => std::option::Option::Some(1),
7127 Self::ExecutionFailed => std::option::Option::Some(2),
7128 Self::CloudBuildRequestFailed => std::option::Option::Some(3),
7129 Self::VerificationConfigNotFound => std::option::Option::Some(4),
7130 Self::CustomActionNotFound => std::option::Option::Some(5),
7131 Self::DeploymentStrategyNotSupported => std::option::Option::Some(6),
7132 Self::RenderFeatureNotSupported => std::option::Option::Some(7),
7133 Self::UnknownValue(u) => u.0.value(),
7134 }
7135 }
7136
7137 pub fn name(&self) -> std::option::Option<&str> {
7142 match self {
7143 Self::Unspecified => std::option::Option::Some("FAILURE_CAUSE_UNSPECIFIED"),
7144 Self::CloudBuildUnavailable => {
7145 std::option::Option::Some("CLOUD_BUILD_UNAVAILABLE")
7146 }
7147 Self::ExecutionFailed => std::option::Option::Some("EXECUTION_FAILED"),
7148 Self::CloudBuildRequestFailed => {
7149 std::option::Option::Some("CLOUD_BUILD_REQUEST_FAILED")
7150 }
7151 Self::VerificationConfigNotFound => {
7152 std::option::Option::Some("VERIFICATION_CONFIG_NOT_FOUND")
7153 }
7154 Self::CustomActionNotFound => {
7155 std::option::Option::Some("CUSTOM_ACTION_NOT_FOUND")
7156 }
7157 Self::DeploymentStrategyNotSupported => {
7158 std::option::Option::Some("DEPLOYMENT_STRATEGY_NOT_SUPPORTED")
7159 }
7160 Self::RenderFeatureNotSupported => {
7161 std::option::Option::Some("RENDER_FEATURE_NOT_SUPPORTED")
7162 }
7163 Self::UnknownValue(u) => u.0.name(),
7164 }
7165 }
7166 }
7167
7168 impl std::default::Default for FailureCause {
7169 fn default() -> Self {
7170 use std::convert::From;
7171 Self::from(0)
7172 }
7173 }
7174
7175 impl std::fmt::Display for FailureCause {
7176 fn fmt(
7177 &self,
7178 f: &mut std::fmt::Formatter<'_>,
7179 ) -> std::result::Result<(), std::fmt::Error> {
7180 wkt::internal::display_enum(f, self.name(), self.value())
7181 }
7182 }
7183
7184 impl std::convert::From<i32> for FailureCause {
7185 fn from(value: i32) -> Self {
7186 match value {
7187 0 => Self::Unspecified,
7188 1 => Self::CloudBuildUnavailable,
7189 2 => Self::ExecutionFailed,
7190 3 => Self::CloudBuildRequestFailed,
7191 4 => Self::VerificationConfigNotFound,
7192 5 => Self::CustomActionNotFound,
7193 6 => Self::DeploymentStrategyNotSupported,
7194 7 => Self::RenderFeatureNotSupported,
7195 _ => Self::UnknownValue(failure_cause::UnknownValue(
7196 wkt::internal::UnknownEnumValue::Integer(value),
7197 )),
7198 }
7199 }
7200 }
7201
7202 impl std::convert::From<&str> for FailureCause {
7203 fn from(value: &str) -> Self {
7204 use std::string::ToString;
7205 match value {
7206 "FAILURE_CAUSE_UNSPECIFIED" => Self::Unspecified,
7207 "CLOUD_BUILD_UNAVAILABLE" => Self::CloudBuildUnavailable,
7208 "EXECUTION_FAILED" => Self::ExecutionFailed,
7209 "CLOUD_BUILD_REQUEST_FAILED" => Self::CloudBuildRequestFailed,
7210 "VERIFICATION_CONFIG_NOT_FOUND" => Self::VerificationConfigNotFound,
7211 "CUSTOM_ACTION_NOT_FOUND" => Self::CustomActionNotFound,
7212 "DEPLOYMENT_STRATEGY_NOT_SUPPORTED" => Self::DeploymentStrategyNotSupported,
7213 "RENDER_FEATURE_NOT_SUPPORTED" => Self::RenderFeatureNotSupported,
7214 _ => Self::UnknownValue(failure_cause::UnknownValue(
7215 wkt::internal::UnknownEnumValue::String(value.to_string()),
7216 )),
7217 }
7218 }
7219 }
7220
7221 impl serde::ser::Serialize for FailureCause {
7222 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
7223 where
7224 S: serde::Serializer,
7225 {
7226 match self {
7227 Self::Unspecified => serializer.serialize_i32(0),
7228 Self::CloudBuildUnavailable => serializer.serialize_i32(1),
7229 Self::ExecutionFailed => serializer.serialize_i32(2),
7230 Self::CloudBuildRequestFailed => serializer.serialize_i32(3),
7231 Self::VerificationConfigNotFound => serializer.serialize_i32(4),
7232 Self::CustomActionNotFound => serializer.serialize_i32(5),
7233 Self::DeploymentStrategyNotSupported => serializer.serialize_i32(6),
7234 Self::RenderFeatureNotSupported => serializer.serialize_i32(7),
7235 Self::UnknownValue(u) => u.0.serialize(serializer),
7236 }
7237 }
7238 }
7239
7240 impl<'de> serde::de::Deserialize<'de> for FailureCause {
7241 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7242 where
7243 D: serde::Deserializer<'de>,
7244 {
7245 deserializer.deserialize_any(wkt::internal::EnumVisitor::<FailureCause>::new(
7246 ".google.cloud.deploy.v1.Release.TargetRender.FailureCause",
7247 ))
7248 }
7249 }
7250 }
7251
7252 #[derive(Clone, Default, PartialEq)]
7256 #[non_exhaustive]
7257 pub struct ReleaseReadyCondition {
7258 pub status: bool,
7263
7264 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7265 }
7266
7267 impl ReleaseReadyCondition {
7268 pub fn new() -> Self {
7269 std::default::Default::default()
7270 }
7271
7272 pub fn set_status<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
7274 self.status = v.into();
7275 self
7276 }
7277 }
7278
7279 impl wkt::message::Message for ReleaseReadyCondition {
7280 fn typename() -> &'static str {
7281 "type.googleapis.com/google.cloud.deploy.v1.Release.ReleaseReadyCondition"
7282 }
7283 }
7284
7285 #[derive(Clone, Default, PartialEq)]
7288 #[non_exhaustive]
7289 pub struct SkaffoldSupportedCondition {
7290 pub status: bool,
7292
7293 pub skaffold_support_state: crate::model::SkaffoldSupportState,
7295
7296 pub maintenance_mode_time: std::option::Option<wkt::Timestamp>,
7299
7300 pub support_expiration_time: std::option::Option<wkt::Timestamp>,
7303
7304 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7305 }
7306
7307 impl SkaffoldSupportedCondition {
7308 pub fn new() -> Self {
7309 std::default::Default::default()
7310 }
7311
7312 pub fn set_status<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
7314 self.status = v.into();
7315 self
7316 }
7317
7318 pub fn set_skaffold_support_state<
7320 T: std::convert::Into<crate::model::SkaffoldSupportState>,
7321 >(
7322 mut self,
7323 v: T,
7324 ) -> Self {
7325 self.skaffold_support_state = v.into();
7326 self
7327 }
7328
7329 pub fn set_maintenance_mode_time<T>(mut self, v: T) -> Self
7331 where
7332 T: std::convert::Into<wkt::Timestamp>,
7333 {
7334 self.maintenance_mode_time = std::option::Option::Some(v.into());
7335 self
7336 }
7337
7338 pub fn set_or_clear_maintenance_mode_time<T>(mut self, v: std::option::Option<T>) -> Self
7340 where
7341 T: std::convert::Into<wkt::Timestamp>,
7342 {
7343 self.maintenance_mode_time = v.map(|x| x.into());
7344 self
7345 }
7346
7347 pub fn set_support_expiration_time<T>(mut self, v: T) -> Self
7349 where
7350 T: std::convert::Into<wkt::Timestamp>,
7351 {
7352 self.support_expiration_time = std::option::Option::Some(v.into());
7353 self
7354 }
7355
7356 pub fn set_or_clear_support_expiration_time<T>(mut self, v: std::option::Option<T>) -> Self
7358 where
7359 T: std::convert::Into<wkt::Timestamp>,
7360 {
7361 self.support_expiration_time = v.map(|x| x.into());
7362 self
7363 }
7364 }
7365
7366 impl wkt::message::Message for SkaffoldSupportedCondition {
7367 fn typename() -> &'static str {
7368 "type.googleapis.com/google.cloud.deploy.v1.Release.SkaffoldSupportedCondition"
7369 }
7370 }
7371
7372 #[derive(Clone, Default, PartialEq)]
7374 #[non_exhaustive]
7375 pub struct ReleaseCondition {
7376 pub release_ready_condition:
7378 std::option::Option<crate::model::release::ReleaseReadyCondition>,
7379
7380 pub skaffold_supported_condition:
7383 std::option::Option<crate::model::release::SkaffoldSupportedCondition>,
7384
7385 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7386 }
7387
7388 impl ReleaseCondition {
7389 pub fn new() -> Self {
7390 std::default::Default::default()
7391 }
7392
7393 pub fn set_release_ready_condition<T>(mut self, v: T) -> Self
7395 where
7396 T: std::convert::Into<crate::model::release::ReleaseReadyCondition>,
7397 {
7398 self.release_ready_condition = std::option::Option::Some(v.into());
7399 self
7400 }
7401
7402 pub fn set_or_clear_release_ready_condition<T>(mut self, v: std::option::Option<T>) -> Self
7404 where
7405 T: std::convert::Into<crate::model::release::ReleaseReadyCondition>,
7406 {
7407 self.release_ready_condition = v.map(|x| x.into());
7408 self
7409 }
7410
7411 pub fn set_skaffold_supported_condition<T>(mut self, v: T) -> Self
7413 where
7414 T: std::convert::Into<crate::model::release::SkaffoldSupportedCondition>,
7415 {
7416 self.skaffold_supported_condition = std::option::Option::Some(v.into());
7417 self
7418 }
7419
7420 pub fn set_or_clear_skaffold_supported_condition<T>(
7422 mut self,
7423 v: std::option::Option<T>,
7424 ) -> Self
7425 where
7426 T: std::convert::Into<crate::model::release::SkaffoldSupportedCondition>,
7427 {
7428 self.skaffold_supported_condition = v.map(|x| x.into());
7429 self
7430 }
7431 }
7432
7433 impl wkt::message::Message for ReleaseCondition {
7434 fn typename() -> &'static str {
7435 "type.googleapis.com/google.cloud.deploy.v1.Release.ReleaseCondition"
7436 }
7437 }
7438
7439 #[derive(Clone, Debug, PartialEq)]
7455 #[non_exhaustive]
7456 pub enum RenderState {
7457 Unspecified,
7459 Succeeded,
7461 Failed,
7463 InProgress,
7465 UnknownValue(render_state::UnknownValue),
7470 }
7471
7472 #[doc(hidden)]
7473 pub mod render_state {
7474 #[allow(unused_imports)]
7475 use super::*;
7476 #[derive(Clone, Debug, PartialEq)]
7477 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
7478 }
7479
7480 impl RenderState {
7481 pub fn value(&self) -> std::option::Option<i32> {
7486 match self {
7487 Self::Unspecified => std::option::Option::Some(0),
7488 Self::Succeeded => std::option::Option::Some(1),
7489 Self::Failed => std::option::Option::Some(2),
7490 Self::InProgress => std::option::Option::Some(3),
7491 Self::UnknownValue(u) => u.0.value(),
7492 }
7493 }
7494
7495 pub fn name(&self) -> std::option::Option<&str> {
7500 match self {
7501 Self::Unspecified => std::option::Option::Some("RENDER_STATE_UNSPECIFIED"),
7502 Self::Succeeded => std::option::Option::Some("SUCCEEDED"),
7503 Self::Failed => std::option::Option::Some("FAILED"),
7504 Self::InProgress => std::option::Option::Some("IN_PROGRESS"),
7505 Self::UnknownValue(u) => u.0.name(),
7506 }
7507 }
7508 }
7509
7510 impl std::default::Default for RenderState {
7511 fn default() -> Self {
7512 use std::convert::From;
7513 Self::from(0)
7514 }
7515 }
7516
7517 impl std::fmt::Display for RenderState {
7518 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
7519 wkt::internal::display_enum(f, self.name(), self.value())
7520 }
7521 }
7522
7523 impl std::convert::From<i32> for RenderState {
7524 fn from(value: i32) -> Self {
7525 match value {
7526 0 => Self::Unspecified,
7527 1 => Self::Succeeded,
7528 2 => Self::Failed,
7529 3 => Self::InProgress,
7530 _ => Self::UnknownValue(render_state::UnknownValue(
7531 wkt::internal::UnknownEnumValue::Integer(value),
7532 )),
7533 }
7534 }
7535 }
7536
7537 impl std::convert::From<&str> for RenderState {
7538 fn from(value: &str) -> Self {
7539 use std::string::ToString;
7540 match value {
7541 "RENDER_STATE_UNSPECIFIED" => Self::Unspecified,
7542 "SUCCEEDED" => Self::Succeeded,
7543 "FAILED" => Self::Failed,
7544 "IN_PROGRESS" => Self::InProgress,
7545 _ => Self::UnknownValue(render_state::UnknownValue(
7546 wkt::internal::UnknownEnumValue::String(value.to_string()),
7547 )),
7548 }
7549 }
7550 }
7551
7552 impl serde::ser::Serialize for RenderState {
7553 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
7554 where
7555 S: serde::Serializer,
7556 {
7557 match self {
7558 Self::Unspecified => serializer.serialize_i32(0),
7559 Self::Succeeded => serializer.serialize_i32(1),
7560 Self::Failed => serializer.serialize_i32(2),
7561 Self::InProgress => serializer.serialize_i32(3),
7562 Self::UnknownValue(u) => u.0.serialize(serializer),
7563 }
7564 }
7565 }
7566
7567 impl<'de> serde::de::Deserialize<'de> for RenderState {
7568 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7569 where
7570 D: serde::Deserializer<'de>,
7571 {
7572 deserializer.deserialize_any(wkt::internal::EnumVisitor::<RenderState>::new(
7573 ".google.cloud.deploy.v1.Release.RenderState",
7574 ))
7575 }
7576 }
7577}
7578
7579#[derive(Clone, Default, PartialEq)]
7581#[non_exhaustive]
7582pub struct CreateDeployPolicyRequest {
7583 pub parent: std::string::String,
7586
7587 pub deploy_policy_id: std::string::String,
7589
7590 pub deploy_policy: std::option::Option<crate::model::DeployPolicy>,
7592
7593 pub request_id: std::string::String,
7607
7608 pub validate_only: bool,
7611
7612 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7613}
7614
7615impl CreateDeployPolicyRequest {
7616 pub fn new() -> Self {
7617 std::default::Default::default()
7618 }
7619
7620 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7622 self.parent = v.into();
7623 self
7624 }
7625
7626 pub fn set_deploy_policy_id<T: std::convert::Into<std::string::String>>(
7628 mut self,
7629 v: T,
7630 ) -> Self {
7631 self.deploy_policy_id = v.into();
7632 self
7633 }
7634
7635 pub fn set_deploy_policy<T>(mut self, v: T) -> Self
7637 where
7638 T: std::convert::Into<crate::model::DeployPolicy>,
7639 {
7640 self.deploy_policy = std::option::Option::Some(v.into());
7641 self
7642 }
7643
7644 pub fn set_or_clear_deploy_policy<T>(mut self, v: std::option::Option<T>) -> Self
7646 where
7647 T: std::convert::Into<crate::model::DeployPolicy>,
7648 {
7649 self.deploy_policy = v.map(|x| x.into());
7650 self
7651 }
7652
7653 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7655 self.request_id = v.into();
7656 self
7657 }
7658
7659 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
7661 self.validate_only = v.into();
7662 self
7663 }
7664}
7665
7666impl wkt::message::Message for CreateDeployPolicyRequest {
7667 fn typename() -> &'static str {
7668 "type.googleapis.com/google.cloud.deploy.v1.CreateDeployPolicyRequest"
7669 }
7670}
7671
7672#[derive(Clone, Default, PartialEq)]
7674#[non_exhaustive]
7675pub struct UpdateDeployPolicyRequest {
7676 pub update_mask: std::option::Option<wkt::FieldMask>,
7682
7683 pub deploy_policy: std::option::Option<crate::model::DeployPolicy>,
7685
7686 pub request_id: std::string::String,
7700
7701 pub allow_missing: bool,
7704
7705 pub validate_only: bool,
7708
7709 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7710}
7711
7712impl UpdateDeployPolicyRequest {
7713 pub fn new() -> Self {
7714 std::default::Default::default()
7715 }
7716
7717 pub fn set_update_mask<T>(mut self, v: T) -> Self
7719 where
7720 T: std::convert::Into<wkt::FieldMask>,
7721 {
7722 self.update_mask = std::option::Option::Some(v.into());
7723 self
7724 }
7725
7726 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
7728 where
7729 T: std::convert::Into<wkt::FieldMask>,
7730 {
7731 self.update_mask = v.map(|x| x.into());
7732 self
7733 }
7734
7735 pub fn set_deploy_policy<T>(mut self, v: T) -> Self
7737 where
7738 T: std::convert::Into<crate::model::DeployPolicy>,
7739 {
7740 self.deploy_policy = std::option::Option::Some(v.into());
7741 self
7742 }
7743
7744 pub fn set_or_clear_deploy_policy<T>(mut self, v: std::option::Option<T>) -> Self
7746 where
7747 T: std::convert::Into<crate::model::DeployPolicy>,
7748 {
7749 self.deploy_policy = v.map(|x| x.into());
7750 self
7751 }
7752
7753 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7755 self.request_id = v.into();
7756 self
7757 }
7758
7759 pub fn set_allow_missing<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
7761 self.allow_missing = v.into();
7762 self
7763 }
7764
7765 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
7767 self.validate_only = v.into();
7768 self
7769 }
7770}
7771
7772impl wkt::message::Message for UpdateDeployPolicyRequest {
7773 fn typename() -> &'static str {
7774 "type.googleapis.com/google.cloud.deploy.v1.UpdateDeployPolicyRequest"
7775 }
7776}
7777
7778#[derive(Clone, Default, PartialEq)]
7780#[non_exhaustive]
7781pub struct DeleteDeployPolicyRequest {
7782 pub name: std::string::String,
7785
7786 pub request_id: std::string::String,
7800
7801 pub allow_missing: bool,
7804
7805 pub validate_only: bool,
7808
7809 pub etag: std::string::String,
7813
7814 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7815}
7816
7817impl DeleteDeployPolicyRequest {
7818 pub fn new() -> Self {
7819 std::default::Default::default()
7820 }
7821
7822 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7824 self.name = v.into();
7825 self
7826 }
7827
7828 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7830 self.request_id = v.into();
7831 self
7832 }
7833
7834 pub fn set_allow_missing<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
7836 self.allow_missing = v.into();
7837 self
7838 }
7839
7840 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
7842 self.validate_only = v.into();
7843 self
7844 }
7845
7846 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7848 self.etag = v.into();
7849 self
7850 }
7851}
7852
7853impl wkt::message::Message for DeleteDeployPolicyRequest {
7854 fn typename() -> &'static str {
7855 "type.googleapis.com/google.cloud.deploy.v1.DeleteDeployPolicyRequest"
7856 }
7857}
7858
7859#[derive(Clone, Default, PartialEq)]
7861#[non_exhaustive]
7862pub struct ListDeployPoliciesRequest {
7863 pub parent: std::string::String,
7866
7867 pub page_size: i32,
7872
7873 pub page_token: std::string::String,
7879
7880 pub filter: std::string::String,
7883
7884 pub order_by: std::string::String,
7886
7887 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7888}
7889
7890impl ListDeployPoliciesRequest {
7891 pub fn new() -> Self {
7892 std::default::Default::default()
7893 }
7894
7895 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7897 self.parent = v.into();
7898 self
7899 }
7900
7901 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
7903 self.page_size = v.into();
7904 self
7905 }
7906
7907 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7909 self.page_token = v.into();
7910 self
7911 }
7912
7913 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7915 self.filter = v.into();
7916 self
7917 }
7918
7919 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7921 self.order_by = v.into();
7922 self
7923 }
7924}
7925
7926impl wkt::message::Message for ListDeployPoliciesRequest {
7927 fn typename() -> &'static str {
7928 "type.googleapis.com/google.cloud.deploy.v1.ListDeployPoliciesRequest"
7929 }
7930}
7931
7932#[derive(Clone, Default, PartialEq)]
7934#[non_exhaustive]
7935pub struct ListDeployPoliciesResponse {
7936 pub deploy_policies: std::vec::Vec<crate::model::DeployPolicy>,
7938
7939 pub next_page_token: std::string::String,
7942
7943 pub unreachable: std::vec::Vec<std::string::String>,
7945
7946 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7947}
7948
7949impl ListDeployPoliciesResponse {
7950 pub fn new() -> Self {
7951 std::default::Default::default()
7952 }
7953
7954 pub fn set_deploy_policies<T, V>(mut self, v: T) -> Self
7956 where
7957 T: std::iter::IntoIterator<Item = V>,
7958 V: std::convert::Into<crate::model::DeployPolicy>,
7959 {
7960 use std::iter::Iterator;
7961 self.deploy_policies = v.into_iter().map(|i| i.into()).collect();
7962 self
7963 }
7964
7965 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7967 self.next_page_token = v.into();
7968 self
7969 }
7970
7971 pub fn set_unreachable<T, V>(mut self, v: T) -> Self
7973 where
7974 T: std::iter::IntoIterator<Item = V>,
7975 V: std::convert::Into<std::string::String>,
7976 {
7977 use std::iter::Iterator;
7978 self.unreachable = v.into_iter().map(|i| i.into()).collect();
7979 self
7980 }
7981}
7982
7983impl wkt::message::Message for ListDeployPoliciesResponse {
7984 fn typename() -> &'static str {
7985 "type.googleapis.com/google.cloud.deploy.v1.ListDeployPoliciesResponse"
7986 }
7987}
7988
7989#[doc(hidden)]
7990impl gax::paginator::internal::PageableResponse for ListDeployPoliciesResponse {
7991 type PageItem = crate::model::DeployPolicy;
7992
7993 fn items(self) -> std::vec::Vec<Self::PageItem> {
7994 self.deploy_policies
7995 }
7996
7997 fn next_page_token(&self) -> std::string::String {
7998 use std::clone::Clone;
7999 self.next_page_token.clone()
8000 }
8001}
8002
8003#[derive(Clone, Default, PartialEq)]
8005#[non_exhaustive]
8006pub struct GetDeployPolicyRequest {
8007 pub name: std::string::String,
8010
8011 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8012}
8013
8014impl GetDeployPolicyRequest {
8015 pub fn new() -> Self {
8016 std::default::Default::default()
8017 }
8018
8019 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8021 self.name = v.into();
8022 self
8023 }
8024}
8025
8026impl wkt::message::Message for GetDeployPolicyRequest {
8027 fn typename() -> &'static str {
8028 "type.googleapis.com/google.cloud.deploy.v1.GetDeployPolicyRequest"
8029 }
8030}
8031
8032#[derive(Clone, Default, PartialEq)]
8034#[non_exhaustive]
8035pub struct BuildArtifact {
8036 pub image: std::string::String,
8038
8039 pub tag: std::string::String,
8043
8044 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8045}
8046
8047impl BuildArtifact {
8048 pub fn new() -> Self {
8049 std::default::Default::default()
8050 }
8051
8052 pub fn set_image<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8054 self.image = v.into();
8055 self
8056 }
8057
8058 pub fn set_tag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8060 self.tag = v.into();
8061 self
8062 }
8063}
8064
8065impl wkt::message::Message for BuildArtifact {
8066 fn typename() -> &'static str {
8067 "type.googleapis.com/google.cloud.deploy.v1.BuildArtifact"
8068 }
8069}
8070
8071#[derive(Clone, Default, PartialEq)]
8073#[non_exhaustive]
8074pub struct TargetArtifact {
8075 pub skaffold_config_path: std::string::String,
8078
8079 pub manifest_path: std::string::String,
8082
8083 pub phase_artifacts: std::collections::HashMap<
8085 std::string::String,
8086 crate::model::target_artifact::PhaseArtifact,
8087 >,
8088
8089 pub uri: std::option::Option<crate::model::target_artifact::Uri>,
8090
8091 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8092}
8093
8094impl TargetArtifact {
8095 pub fn new() -> Self {
8096 std::default::Default::default()
8097 }
8098
8099 pub fn set_skaffold_config_path<T: std::convert::Into<std::string::String>>(
8101 mut self,
8102 v: T,
8103 ) -> Self {
8104 self.skaffold_config_path = v.into();
8105 self
8106 }
8107
8108 pub fn set_manifest_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8110 self.manifest_path = v.into();
8111 self
8112 }
8113
8114 pub fn set_phase_artifacts<T, K, V>(mut self, v: T) -> Self
8116 where
8117 T: std::iter::IntoIterator<Item = (K, V)>,
8118 K: std::convert::Into<std::string::String>,
8119 V: std::convert::Into<crate::model::target_artifact::PhaseArtifact>,
8120 {
8121 use std::iter::Iterator;
8122 self.phase_artifacts = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
8123 self
8124 }
8125
8126 pub fn set_uri<
8131 T: std::convert::Into<std::option::Option<crate::model::target_artifact::Uri>>,
8132 >(
8133 mut self,
8134 v: T,
8135 ) -> Self {
8136 self.uri = v.into();
8137 self
8138 }
8139
8140 pub fn artifact_uri(&self) -> std::option::Option<&std::string::String> {
8144 #[allow(unreachable_patterns)]
8145 self.uri.as_ref().and_then(|v| match v {
8146 crate::model::target_artifact::Uri::ArtifactUri(v) => std::option::Option::Some(v),
8147 _ => std::option::Option::None,
8148 })
8149 }
8150
8151 pub fn set_artifact_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8157 self.uri =
8158 std::option::Option::Some(crate::model::target_artifact::Uri::ArtifactUri(v.into()));
8159 self
8160 }
8161}
8162
8163impl wkt::message::Message for TargetArtifact {
8164 fn typename() -> &'static str {
8165 "type.googleapis.com/google.cloud.deploy.v1.TargetArtifact"
8166 }
8167}
8168
8169pub mod target_artifact {
8171 #[allow(unused_imports)]
8172 use super::*;
8173
8174 #[derive(Clone, Default, PartialEq)]
8176 #[non_exhaustive]
8177 pub struct PhaseArtifact {
8178 pub skaffold_config_path: std::string::String,
8181
8182 pub manifest_path: std::string::String,
8184
8185 pub job_manifests_path: std::string::String,
8188
8189 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8190 }
8191
8192 impl PhaseArtifact {
8193 pub fn new() -> Self {
8194 std::default::Default::default()
8195 }
8196
8197 pub fn set_skaffold_config_path<T: std::convert::Into<std::string::String>>(
8199 mut self,
8200 v: T,
8201 ) -> Self {
8202 self.skaffold_config_path = v.into();
8203 self
8204 }
8205
8206 pub fn set_manifest_path<T: std::convert::Into<std::string::String>>(
8208 mut self,
8209 v: T,
8210 ) -> Self {
8211 self.manifest_path = v.into();
8212 self
8213 }
8214
8215 pub fn set_job_manifests_path<T: std::convert::Into<std::string::String>>(
8217 mut self,
8218 v: T,
8219 ) -> Self {
8220 self.job_manifests_path = v.into();
8221 self
8222 }
8223 }
8224
8225 impl wkt::message::Message for PhaseArtifact {
8226 fn typename() -> &'static str {
8227 "type.googleapis.com/google.cloud.deploy.v1.TargetArtifact.PhaseArtifact"
8228 }
8229 }
8230
8231 #[derive(Clone, Debug, PartialEq)]
8232 #[non_exhaustive]
8233 pub enum Uri {
8234 ArtifactUri(std::string::String),
8238 }
8239}
8240
8241#[derive(Clone, Default, PartialEq)]
8243#[non_exhaustive]
8244pub struct DeployArtifact {
8245 pub artifact_uri: std::string::String,
8248
8249 pub manifest_paths: std::vec::Vec<std::string::String>,
8252
8253 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8254}
8255
8256impl DeployArtifact {
8257 pub fn new() -> Self {
8258 std::default::Default::default()
8259 }
8260
8261 pub fn set_artifact_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8263 self.artifact_uri = v.into();
8264 self
8265 }
8266
8267 pub fn set_manifest_paths<T, V>(mut self, v: T) -> Self
8269 where
8270 T: std::iter::IntoIterator<Item = V>,
8271 V: std::convert::Into<std::string::String>,
8272 {
8273 use std::iter::Iterator;
8274 self.manifest_paths = v.into_iter().map(|i| i.into()).collect();
8275 self
8276 }
8277}
8278
8279impl wkt::message::Message for DeployArtifact {
8280 fn typename() -> &'static str {
8281 "type.googleapis.com/google.cloud.deploy.v1.DeployArtifact"
8282 }
8283}
8284
8285#[derive(Clone, Default, PartialEq)]
8288#[non_exhaustive]
8289pub struct CloudRunRenderMetadata {
8290 pub service: std::string::String,
8293
8294 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8295}
8296
8297impl CloudRunRenderMetadata {
8298 pub fn new() -> Self {
8299 std::default::Default::default()
8300 }
8301
8302 pub fn set_service<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8304 self.service = v.into();
8305 self
8306 }
8307}
8308
8309impl wkt::message::Message for CloudRunRenderMetadata {
8310 fn typename() -> &'static str {
8311 "type.googleapis.com/google.cloud.deploy.v1.CloudRunRenderMetadata"
8312 }
8313}
8314
8315#[derive(Clone, Default, PartialEq)]
8317#[non_exhaustive]
8318pub struct RenderMetadata {
8319 pub cloud_run: std::option::Option<crate::model::CloudRunRenderMetadata>,
8321
8322 pub custom: std::option::Option<crate::model::CustomMetadata>,
8324
8325 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8326}
8327
8328impl RenderMetadata {
8329 pub fn new() -> Self {
8330 std::default::Default::default()
8331 }
8332
8333 pub fn set_cloud_run<T>(mut self, v: T) -> Self
8335 where
8336 T: std::convert::Into<crate::model::CloudRunRenderMetadata>,
8337 {
8338 self.cloud_run = std::option::Option::Some(v.into());
8339 self
8340 }
8341
8342 pub fn set_or_clear_cloud_run<T>(mut self, v: std::option::Option<T>) -> Self
8344 where
8345 T: std::convert::Into<crate::model::CloudRunRenderMetadata>,
8346 {
8347 self.cloud_run = v.map(|x| x.into());
8348 self
8349 }
8350
8351 pub fn set_custom<T>(mut self, v: T) -> Self
8353 where
8354 T: std::convert::Into<crate::model::CustomMetadata>,
8355 {
8356 self.custom = std::option::Option::Some(v.into());
8357 self
8358 }
8359
8360 pub fn set_or_clear_custom<T>(mut self, v: std::option::Option<T>) -> Self
8362 where
8363 T: std::convert::Into<crate::model::CustomMetadata>,
8364 {
8365 self.custom = v.map(|x| x.into());
8366 self
8367 }
8368}
8369
8370impl wkt::message::Message for RenderMetadata {
8371 fn typename() -> &'static str {
8372 "type.googleapis.com/google.cloud.deploy.v1.RenderMetadata"
8373 }
8374}
8375
8376#[derive(Clone, Default, PartialEq)]
8378#[non_exhaustive]
8379pub struct ListReleasesRequest {
8380 pub parent: std::string::String,
8383
8384 pub page_size: i32,
8389
8390 pub page_token: std::string::String,
8396
8397 pub filter: std::string::String,
8400
8401 pub order_by: std::string::String,
8404
8405 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8406}
8407
8408impl ListReleasesRequest {
8409 pub fn new() -> Self {
8410 std::default::Default::default()
8411 }
8412
8413 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8415 self.parent = v.into();
8416 self
8417 }
8418
8419 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
8421 self.page_size = v.into();
8422 self
8423 }
8424
8425 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8427 self.page_token = v.into();
8428 self
8429 }
8430
8431 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8433 self.filter = v.into();
8434 self
8435 }
8436
8437 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8439 self.order_by = v.into();
8440 self
8441 }
8442}
8443
8444impl wkt::message::Message for ListReleasesRequest {
8445 fn typename() -> &'static str {
8446 "type.googleapis.com/google.cloud.deploy.v1.ListReleasesRequest"
8447 }
8448}
8449
8450#[derive(Clone, Default, PartialEq)]
8452#[non_exhaustive]
8453pub struct ListReleasesResponse {
8454 pub releases: std::vec::Vec<crate::model::Release>,
8456
8457 pub next_page_token: std::string::String,
8460
8461 pub unreachable: std::vec::Vec<std::string::String>,
8463
8464 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8465}
8466
8467impl ListReleasesResponse {
8468 pub fn new() -> Self {
8469 std::default::Default::default()
8470 }
8471
8472 pub fn set_releases<T, V>(mut self, v: T) -> Self
8474 where
8475 T: std::iter::IntoIterator<Item = V>,
8476 V: std::convert::Into<crate::model::Release>,
8477 {
8478 use std::iter::Iterator;
8479 self.releases = v.into_iter().map(|i| i.into()).collect();
8480 self
8481 }
8482
8483 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8485 self.next_page_token = v.into();
8486 self
8487 }
8488
8489 pub fn set_unreachable<T, V>(mut self, v: T) -> Self
8491 where
8492 T: std::iter::IntoIterator<Item = V>,
8493 V: std::convert::Into<std::string::String>,
8494 {
8495 use std::iter::Iterator;
8496 self.unreachable = v.into_iter().map(|i| i.into()).collect();
8497 self
8498 }
8499}
8500
8501impl wkt::message::Message for ListReleasesResponse {
8502 fn typename() -> &'static str {
8503 "type.googleapis.com/google.cloud.deploy.v1.ListReleasesResponse"
8504 }
8505}
8506
8507#[doc(hidden)]
8508impl gax::paginator::internal::PageableResponse for ListReleasesResponse {
8509 type PageItem = crate::model::Release;
8510
8511 fn items(self) -> std::vec::Vec<Self::PageItem> {
8512 self.releases
8513 }
8514
8515 fn next_page_token(&self) -> std::string::String {
8516 use std::clone::Clone;
8517 self.next_page_token.clone()
8518 }
8519}
8520
8521#[derive(Clone, Default, PartialEq)]
8523#[non_exhaustive]
8524pub struct GetReleaseRequest {
8525 pub name: std::string::String,
8528
8529 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8530}
8531
8532impl GetReleaseRequest {
8533 pub fn new() -> Self {
8534 std::default::Default::default()
8535 }
8536
8537 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8539 self.name = v.into();
8540 self
8541 }
8542}
8543
8544impl wkt::message::Message for GetReleaseRequest {
8545 fn typename() -> &'static str {
8546 "type.googleapis.com/google.cloud.deploy.v1.GetReleaseRequest"
8547 }
8548}
8549
8550#[derive(Clone, Default, PartialEq)]
8552#[non_exhaustive]
8553pub struct CreateReleaseRequest {
8554 pub parent: std::string::String,
8558
8559 pub release_id: std::string::String,
8561
8562 pub release: std::option::Option<crate::model::Release>,
8564
8565 pub request_id: std::string::String,
8579
8580 pub validate_only: bool,
8583
8584 pub override_deploy_policy: std::vec::Vec<std::string::String>,
8587
8588 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8589}
8590
8591impl CreateReleaseRequest {
8592 pub fn new() -> Self {
8593 std::default::Default::default()
8594 }
8595
8596 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8598 self.parent = v.into();
8599 self
8600 }
8601
8602 pub fn set_release_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8604 self.release_id = v.into();
8605 self
8606 }
8607
8608 pub fn set_release<T>(mut self, v: T) -> Self
8610 where
8611 T: std::convert::Into<crate::model::Release>,
8612 {
8613 self.release = std::option::Option::Some(v.into());
8614 self
8615 }
8616
8617 pub fn set_or_clear_release<T>(mut self, v: std::option::Option<T>) -> Self
8619 where
8620 T: std::convert::Into<crate::model::Release>,
8621 {
8622 self.release = v.map(|x| x.into());
8623 self
8624 }
8625
8626 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8628 self.request_id = v.into();
8629 self
8630 }
8631
8632 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
8634 self.validate_only = v.into();
8635 self
8636 }
8637
8638 pub fn set_override_deploy_policy<T, V>(mut self, v: T) -> Self
8640 where
8641 T: std::iter::IntoIterator<Item = V>,
8642 V: std::convert::Into<std::string::String>,
8643 {
8644 use std::iter::Iterator;
8645 self.override_deploy_policy = v.into_iter().map(|i| i.into()).collect();
8646 self
8647 }
8648}
8649
8650impl wkt::message::Message for CreateReleaseRequest {
8651 fn typename() -> &'static str {
8652 "type.googleapis.com/google.cloud.deploy.v1.CreateReleaseRequest"
8653 }
8654}
8655
8656#[derive(Clone, Default, PartialEq)]
8660#[non_exhaustive]
8661pub struct Rollout {
8662 pub name: std::string::String,
8666
8667 pub uid: std::string::String,
8669
8670 pub description: std::string::String,
8673
8674 pub annotations: std::collections::HashMap<std::string::String, std::string::String>,
8679
8680 pub labels: std::collections::HashMap<std::string::String, std::string::String>,
8692
8693 pub create_time: std::option::Option<wkt::Timestamp>,
8695
8696 pub approve_time: std::option::Option<wkt::Timestamp>,
8698
8699 pub enqueue_time: std::option::Option<wkt::Timestamp>,
8701
8702 pub deploy_start_time: std::option::Option<wkt::Timestamp>,
8704
8705 pub deploy_end_time: std::option::Option<wkt::Timestamp>,
8707
8708 pub target_id: std::string::String,
8710
8711 pub approval_state: crate::model::rollout::ApprovalState,
8713
8714 pub state: crate::model::rollout::State,
8716
8717 pub failure_reason: std::string::String,
8720
8721 pub deploying_build: std::string::String,
8725
8726 pub etag: std::string::String,
8730
8731 pub deploy_failure_cause: crate::model::rollout::FailureCause,
8734
8735 pub phases: std::vec::Vec<crate::model::Phase>,
8737
8738 pub metadata: std::option::Option<crate::model::Metadata>,
8740
8741 pub controller_rollout: std::string::String,
8744
8745 pub rollback_of_rollout: std::string::String,
8748
8749 pub rolled_back_by_rollouts: std::vec::Vec<std::string::String>,
8751
8752 pub active_repair_automation_run: std::string::String,
8754
8755 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8756}
8757
8758impl Rollout {
8759 pub fn new() -> Self {
8760 std::default::Default::default()
8761 }
8762
8763 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8765 self.name = v.into();
8766 self
8767 }
8768
8769 pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8771 self.uid = v.into();
8772 self
8773 }
8774
8775 pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8777 self.description = v.into();
8778 self
8779 }
8780
8781 pub fn set_annotations<T, K, V>(mut self, v: T) -> Self
8783 where
8784 T: std::iter::IntoIterator<Item = (K, V)>,
8785 K: std::convert::Into<std::string::String>,
8786 V: std::convert::Into<std::string::String>,
8787 {
8788 use std::iter::Iterator;
8789 self.annotations = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
8790 self
8791 }
8792
8793 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
8795 where
8796 T: std::iter::IntoIterator<Item = (K, V)>,
8797 K: std::convert::Into<std::string::String>,
8798 V: std::convert::Into<std::string::String>,
8799 {
8800 use std::iter::Iterator;
8801 self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
8802 self
8803 }
8804
8805 pub fn set_create_time<T>(mut self, v: T) -> Self
8807 where
8808 T: std::convert::Into<wkt::Timestamp>,
8809 {
8810 self.create_time = std::option::Option::Some(v.into());
8811 self
8812 }
8813
8814 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
8816 where
8817 T: std::convert::Into<wkt::Timestamp>,
8818 {
8819 self.create_time = v.map(|x| x.into());
8820 self
8821 }
8822
8823 pub fn set_approve_time<T>(mut self, v: T) -> Self
8825 where
8826 T: std::convert::Into<wkt::Timestamp>,
8827 {
8828 self.approve_time = std::option::Option::Some(v.into());
8829 self
8830 }
8831
8832 pub fn set_or_clear_approve_time<T>(mut self, v: std::option::Option<T>) -> Self
8834 where
8835 T: std::convert::Into<wkt::Timestamp>,
8836 {
8837 self.approve_time = v.map(|x| x.into());
8838 self
8839 }
8840
8841 pub fn set_enqueue_time<T>(mut self, v: T) -> Self
8843 where
8844 T: std::convert::Into<wkt::Timestamp>,
8845 {
8846 self.enqueue_time = std::option::Option::Some(v.into());
8847 self
8848 }
8849
8850 pub fn set_or_clear_enqueue_time<T>(mut self, v: std::option::Option<T>) -> Self
8852 where
8853 T: std::convert::Into<wkt::Timestamp>,
8854 {
8855 self.enqueue_time = v.map(|x| x.into());
8856 self
8857 }
8858
8859 pub fn set_deploy_start_time<T>(mut self, v: T) -> Self
8861 where
8862 T: std::convert::Into<wkt::Timestamp>,
8863 {
8864 self.deploy_start_time = std::option::Option::Some(v.into());
8865 self
8866 }
8867
8868 pub fn set_or_clear_deploy_start_time<T>(mut self, v: std::option::Option<T>) -> Self
8870 where
8871 T: std::convert::Into<wkt::Timestamp>,
8872 {
8873 self.deploy_start_time = v.map(|x| x.into());
8874 self
8875 }
8876
8877 pub fn set_deploy_end_time<T>(mut self, v: T) -> Self
8879 where
8880 T: std::convert::Into<wkt::Timestamp>,
8881 {
8882 self.deploy_end_time = std::option::Option::Some(v.into());
8883 self
8884 }
8885
8886 pub fn set_or_clear_deploy_end_time<T>(mut self, v: std::option::Option<T>) -> Self
8888 where
8889 T: std::convert::Into<wkt::Timestamp>,
8890 {
8891 self.deploy_end_time = v.map(|x| x.into());
8892 self
8893 }
8894
8895 pub fn set_target_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8897 self.target_id = v.into();
8898 self
8899 }
8900
8901 pub fn set_approval_state<T: std::convert::Into<crate::model::rollout::ApprovalState>>(
8903 mut self,
8904 v: T,
8905 ) -> Self {
8906 self.approval_state = v.into();
8907 self
8908 }
8909
8910 pub fn set_state<T: std::convert::Into<crate::model::rollout::State>>(mut self, v: T) -> Self {
8912 self.state = v.into();
8913 self
8914 }
8915
8916 pub fn set_failure_reason<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8918 self.failure_reason = v.into();
8919 self
8920 }
8921
8922 pub fn set_deploying_build<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8924 self.deploying_build = v.into();
8925 self
8926 }
8927
8928 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8930 self.etag = v.into();
8931 self
8932 }
8933
8934 pub fn set_deploy_failure_cause<T: std::convert::Into<crate::model::rollout::FailureCause>>(
8936 mut self,
8937 v: T,
8938 ) -> Self {
8939 self.deploy_failure_cause = v.into();
8940 self
8941 }
8942
8943 pub fn set_phases<T, V>(mut self, v: T) -> Self
8945 where
8946 T: std::iter::IntoIterator<Item = V>,
8947 V: std::convert::Into<crate::model::Phase>,
8948 {
8949 use std::iter::Iterator;
8950 self.phases = v.into_iter().map(|i| i.into()).collect();
8951 self
8952 }
8953
8954 pub fn set_metadata<T>(mut self, v: T) -> Self
8956 where
8957 T: std::convert::Into<crate::model::Metadata>,
8958 {
8959 self.metadata = std::option::Option::Some(v.into());
8960 self
8961 }
8962
8963 pub fn set_or_clear_metadata<T>(mut self, v: std::option::Option<T>) -> Self
8965 where
8966 T: std::convert::Into<crate::model::Metadata>,
8967 {
8968 self.metadata = v.map(|x| x.into());
8969 self
8970 }
8971
8972 pub fn set_controller_rollout<T: std::convert::Into<std::string::String>>(
8974 mut self,
8975 v: T,
8976 ) -> Self {
8977 self.controller_rollout = v.into();
8978 self
8979 }
8980
8981 pub fn set_rollback_of_rollout<T: std::convert::Into<std::string::String>>(
8983 mut self,
8984 v: T,
8985 ) -> Self {
8986 self.rollback_of_rollout = v.into();
8987 self
8988 }
8989
8990 pub fn set_rolled_back_by_rollouts<T, V>(mut self, v: T) -> Self
8992 where
8993 T: std::iter::IntoIterator<Item = V>,
8994 V: std::convert::Into<std::string::String>,
8995 {
8996 use std::iter::Iterator;
8997 self.rolled_back_by_rollouts = v.into_iter().map(|i| i.into()).collect();
8998 self
8999 }
9000
9001 pub fn set_active_repair_automation_run<T: std::convert::Into<std::string::String>>(
9003 mut self,
9004 v: T,
9005 ) -> Self {
9006 self.active_repair_automation_run = v.into();
9007 self
9008 }
9009}
9010
9011impl wkt::message::Message for Rollout {
9012 fn typename() -> &'static str {
9013 "type.googleapis.com/google.cloud.deploy.v1.Rollout"
9014 }
9015}
9016
9017pub mod rollout {
9019 #[allow(unused_imports)]
9020 use super::*;
9021
9022 #[derive(Clone, Debug, PartialEq)]
9038 #[non_exhaustive]
9039 pub enum ApprovalState {
9040 Unspecified,
9042 NeedsApproval,
9044 DoesNotNeedApproval,
9046 Approved,
9048 Rejected,
9050 UnknownValue(approval_state::UnknownValue),
9055 }
9056
9057 #[doc(hidden)]
9058 pub mod approval_state {
9059 #[allow(unused_imports)]
9060 use super::*;
9061 #[derive(Clone, Debug, PartialEq)]
9062 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
9063 }
9064
9065 impl ApprovalState {
9066 pub fn value(&self) -> std::option::Option<i32> {
9071 match self {
9072 Self::Unspecified => std::option::Option::Some(0),
9073 Self::NeedsApproval => std::option::Option::Some(1),
9074 Self::DoesNotNeedApproval => std::option::Option::Some(2),
9075 Self::Approved => std::option::Option::Some(3),
9076 Self::Rejected => std::option::Option::Some(4),
9077 Self::UnknownValue(u) => u.0.value(),
9078 }
9079 }
9080
9081 pub fn name(&self) -> std::option::Option<&str> {
9086 match self {
9087 Self::Unspecified => std::option::Option::Some("APPROVAL_STATE_UNSPECIFIED"),
9088 Self::NeedsApproval => std::option::Option::Some("NEEDS_APPROVAL"),
9089 Self::DoesNotNeedApproval => std::option::Option::Some("DOES_NOT_NEED_APPROVAL"),
9090 Self::Approved => std::option::Option::Some("APPROVED"),
9091 Self::Rejected => std::option::Option::Some("REJECTED"),
9092 Self::UnknownValue(u) => u.0.name(),
9093 }
9094 }
9095 }
9096
9097 impl std::default::Default for ApprovalState {
9098 fn default() -> Self {
9099 use std::convert::From;
9100 Self::from(0)
9101 }
9102 }
9103
9104 impl std::fmt::Display for ApprovalState {
9105 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
9106 wkt::internal::display_enum(f, self.name(), self.value())
9107 }
9108 }
9109
9110 impl std::convert::From<i32> for ApprovalState {
9111 fn from(value: i32) -> Self {
9112 match value {
9113 0 => Self::Unspecified,
9114 1 => Self::NeedsApproval,
9115 2 => Self::DoesNotNeedApproval,
9116 3 => Self::Approved,
9117 4 => Self::Rejected,
9118 _ => Self::UnknownValue(approval_state::UnknownValue(
9119 wkt::internal::UnknownEnumValue::Integer(value),
9120 )),
9121 }
9122 }
9123 }
9124
9125 impl std::convert::From<&str> for ApprovalState {
9126 fn from(value: &str) -> Self {
9127 use std::string::ToString;
9128 match value {
9129 "APPROVAL_STATE_UNSPECIFIED" => Self::Unspecified,
9130 "NEEDS_APPROVAL" => Self::NeedsApproval,
9131 "DOES_NOT_NEED_APPROVAL" => Self::DoesNotNeedApproval,
9132 "APPROVED" => Self::Approved,
9133 "REJECTED" => Self::Rejected,
9134 _ => Self::UnknownValue(approval_state::UnknownValue(
9135 wkt::internal::UnknownEnumValue::String(value.to_string()),
9136 )),
9137 }
9138 }
9139 }
9140
9141 impl serde::ser::Serialize for ApprovalState {
9142 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9143 where
9144 S: serde::Serializer,
9145 {
9146 match self {
9147 Self::Unspecified => serializer.serialize_i32(0),
9148 Self::NeedsApproval => serializer.serialize_i32(1),
9149 Self::DoesNotNeedApproval => serializer.serialize_i32(2),
9150 Self::Approved => serializer.serialize_i32(3),
9151 Self::Rejected => serializer.serialize_i32(4),
9152 Self::UnknownValue(u) => u.0.serialize(serializer),
9153 }
9154 }
9155 }
9156
9157 impl<'de> serde::de::Deserialize<'de> for ApprovalState {
9158 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9159 where
9160 D: serde::Deserializer<'de>,
9161 {
9162 deserializer.deserialize_any(wkt::internal::EnumVisitor::<ApprovalState>::new(
9163 ".google.cloud.deploy.v1.Rollout.ApprovalState",
9164 ))
9165 }
9166 }
9167
9168 #[derive(Clone, Debug, PartialEq)]
9184 #[non_exhaustive]
9185 pub enum State {
9186 Unspecified,
9188 Succeeded,
9190 Failed,
9192 InProgress,
9194 PendingApproval,
9196 ApprovalRejected,
9198 Pending,
9201 PendingRelease,
9203 Cancelling,
9205 Cancelled,
9207 Halted,
9209 UnknownValue(state::UnknownValue),
9214 }
9215
9216 #[doc(hidden)]
9217 pub mod state {
9218 #[allow(unused_imports)]
9219 use super::*;
9220 #[derive(Clone, Debug, PartialEq)]
9221 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
9222 }
9223
9224 impl State {
9225 pub fn value(&self) -> std::option::Option<i32> {
9230 match self {
9231 Self::Unspecified => std::option::Option::Some(0),
9232 Self::Succeeded => std::option::Option::Some(1),
9233 Self::Failed => std::option::Option::Some(2),
9234 Self::InProgress => std::option::Option::Some(3),
9235 Self::PendingApproval => std::option::Option::Some(4),
9236 Self::ApprovalRejected => std::option::Option::Some(5),
9237 Self::Pending => std::option::Option::Some(6),
9238 Self::PendingRelease => std::option::Option::Some(7),
9239 Self::Cancelling => std::option::Option::Some(8),
9240 Self::Cancelled => std::option::Option::Some(9),
9241 Self::Halted => std::option::Option::Some(10),
9242 Self::UnknownValue(u) => u.0.value(),
9243 }
9244 }
9245
9246 pub fn name(&self) -> std::option::Option<&str> {
9251 match self {
9252 Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
9253 Self::Succeeded => std::option::Option::Some("SUCCEEDED"),
9254 Self::Failed => std::option::Option::Some("FAILED"),
9255 Self::InProgress => std::option::Option::Some("IN_PROGRESS"),
9256 Self::PendingApproval => std::option::Option::Some("PENDING_APPROVAL"),
9257 Self::ApprovalRejected => std::option::Option::Some("APPROVAL_REJECTED"),
9258 Self::Pending => std::option::Option::Some("PENDING"),
9259 Self::PendingRelease => std::option::Option::Some("PENDING_RELEASE"),
9260 Self::Cancelling => std::option::Option::Some("CANCELLING"),
9261 Self::Cancelled => std::option::Option::Some("CANCELLED"),
9262 Self::Halted => std::option::Option::Some("HALTED"),
9263 Self::UnknownValue(u) => u.0.name(),
9264 }
9265 }
9266 }
9267
9268 impl std::default::Default for State {
9269 fn default() -> Self {
9270 use std::convert::From;
9271 Self::from(0)
9272 }
9273 }
9274
9275 impl std::fmt::Display for State {
9276 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
9277 wkt::internal::display_enum(f, self.name(), self.value())
9278 }
9279 }
9280
9281 impl std::convert::From<i32> for State {
9282 fn from(value: i32) -> Self {
9283 match value {
9284 0 => Self::Unspecified,
9285 1 => Self::Succeeded,
9286 2 => Self::Failed,
9287 3 => Self::InProgress,
9288 4 => Self::PendingApproval,
9289 5 => Self::ApprovalRejected,
9290 6 => Self::Pending,
9291 7 => Self::PendingRelease,
9292 8 => Self::Cancelling,
9293 9 => Self::Cancelled,
9294 10 => Self::Halted,
9295 _ => Self::UnknownValue(state::UnknownValue(
9296 wkt::internal::UnknownEnumValue::Integer(value),
9297 )),
9298 }
9299 }
9300 }
9301
9302 impl std::convert::From<&str> for State {
9303 fn from(value: &str) -> Self {
9304 use std::string::ToString;
9305 match value {
9306 "STATE_UNSPECIFIED" => Self::Unspecified,
9307 "SUCCEEDED" => Self::Succeeded,
9308 "FAILED" => Self::Failed,
9309 "IN_PROGRESS" => Self::InProgress,
9310 "PENDING_APPROVAL" => Self::PendingApproval,
9311 "APPROVAL_REJECTED" => Self::ApprovalRejected,
9312 "PENDING" => Self::Pending,
9313 "PENDING_RELEASE" => Self::PendingRelease,
9314 "CANCELLING" => Self::Cancelling,
9315 "CANCELLED" => Self::Cancelled,
9316 "HALTED" => Self::Halted,
9317 _ => Self::UnknownValue(state::UnknownValue(
9318 wkt::internal::UnknownEnumValue::String(value.to_string()),
9319 )),
9320 }
9321 }
9322 }
9323
9324 impl serde::ser::Serialize for State {
9325 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9326 where
9327 S: serde::Serializer,
9328 {
9329 match self {
9330 Self::Unspecified => serializer.serialize_i32(0),
9331 Self::Succeeded => serializer.serialize_i32(1),
9332 Self::Failed => serializer.serialize_i32(2),
9333 Self::InProgress => serializer.serialize_i32(3),
9334 Self::PendingApproval => serializer.serialize_i32(4),
9335 Self::ApprovalRejected => serializer.serialize_i32(5),
9336 Self::Pending => serializer.serialize_i32(6),
9337 Self::PendingRelease => serializer.serialize_i32(7),
9338 Self::Cancelling => serializer.serialize_i32(8),
9339 Self::Cancelled => serializer.serialize_i32(9),
9340 Self::Halted => serializer.serialize_i32(10),
9341 Self::UnknownValue(u) => u.0.serialize(serializer),
9342 }
9343 }
9344 }
9345
9346 impl<'de> serde::de::Deserialize<'de> for State {
9347 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9348 where
9349 D: serde::Deserializer<'de>,
9350 {
9351 deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
9352 ".google.cloud.deploy.v1.Rollout.State",
9353 ))
9354 }
9355 }
9356
9357 #[derive(Clone, Debug, PartialEq)]
9373 #[non_exhaustive]
9374 pub enum FailureCause {
9375 Unspecified,
9377 CloudBuildUnavailable,
9381 ExecutionFailed,
9384 DeadlineExceeded,
9386 ReleaseFailed,
9388 ReleaseAbandoned,
9390 VerificationConfigNotFound,
9392 CloudBuildRequestFailed,
9395 OperationFeatureNotSupported,
9397 UnknownValue(failure_cause::UnknownValue),
9402 }
9403
9404 #[doc(hidden)]
9405 pub mod failure_cause {
9406 #[allow(unused_imports)]
9407 use super::*;
9408 #[derive(Clone, Debug, PartialEq)]
9409 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
9410 }
9411
9412 impl FailureCause {
9413 pub fn value(&self) -> std::option::Option<i32> {
9418 match self {
9419 Self::Unspecified => std::option::Option::Some(0),
9420 Self::CloudBuildUnavailable => std::option::Option::Some(1),
9421 Self::ExecutionFailed => std::option::Option::Some(2),
9422 Self::DeadlineExceeded => std::option::Option::Some(3),
9423 Self::ReleaseFailed => std::option::Option::Some(4),
9424 Self::ReleaseAbandoned => std::option::Option::Some(5),
9425 Self::VerificationConfigNotFound => std::option::Option::Some(6),
9426 Self::CloudBuildRequestFailed => std::option::Option::Some(7),
9427 Self::OperationFeatureNotSupported => std::option::Option::Some(8),
9428 Self::UnknownValue(u) => u.0.value(),
9429 }
9430 }
9431
9432 pub fn name(&self) -> std::option::Option<&str> {
9437 match self {
9438 Self::Unspecified => std::option::Option::Some("FAILURE_CAUSE_UNSPECIFIED"),
9439 Self::CloudBuildUnavailable => std::option::Option::Some("CLOUD_BUILD_UNAVAILABLE"),
9440 Self::ExecutionFailed => std::option::Option::Some("EXECUTION_FAILED"),
9441 Self::DeadlineExceeded => std::option::Option::Some("DEADLINE_EXCEEDED"),
9442 Self::ReleaseFailed => std::option::Option::Some("RELEASE_FAILED"),
9443 Self::ReleaseAbandoned => std::option::Option::Some("RELEASE_ABANDONED"),
9444 Self::VerificationConfigNotFound => {
9445 std::option::Option::Some("VERIFICATION_CONFIG_NOT_FOUND")
9446 }
9447 Self::CloudBuildRequestFailed => {
9448 std::option::Option::Some("CLOUD_BUILD_REQUEST_FAILED")
9449 }
9450 Self::OperationFeatureNotSupported => {
9451 std::option::Option::Some("OPERATION_FEATURE_NOT_SUPPORTED")
9452 }
9453 Self::UnknownValue(u) => u.0.name(),
9454 }
9455 }
9456 }
9457
9458 impl std::default::Default for FailureCause {
9459 fn default() -> Self {
9460 use std::convert::From;
9461 Self::from(0)
9462 }
9463 }
9464
9465 impl std::fmt::Display for FailureCause {
9466 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
9467 wkt::internal::display_enum(f, self.name(), self.value())
9468 }
9469 }
9470
9471 impl std::convert::From<i32> for FailureCause {
9472 fn from(value: i32) -> Self {
9473 match value {
9474 0 => Self::Unspecified,
9475 1 => Self::CloudBuildUnavailable,
9476 2 => Self::ExecutionFailed,
9477 3 => Self::DeadlineExceeded,
9478 4 => Self::ReleaseFailed,
9479 5 => Self::ReleaseAbandoned,
9480 6 => Self::VerificationConfigNotFound,
9481 7 => Self::CloudBuildRequestFailed,
9482 8 => Self::OperationFeatureNotSupported,
9483 _ => Self::UnknownValue(failure_cause::UnknownValue(
9484 wkt::internal::UnknownEnumValue::Integer(value),
9485 )),
9486 }
9487 }
9488 }
9489
9490 impl std::convert::From<&str> for FailureCause {
9491 fn from(value: &str) -> Self {
9492 use std::string::ToString;
9493 match value {
9494 "FAILURE_CAUSE_UNSPECIFIED" => Self::Unspecified,
9495 "CLOUD_BUILD_UNAVAILABLE" => Self::CloudBuildUnavailable,
9496 "EXECUTION_FAILED" => Self::ExecutionFailed,
9497 "DEADLINE_EXCEEDED" => Self::DeadlineExceeded,
9498 "RELEASE_FAILED" => Self::ReleaseFailed,
9499 "RELEASE_ABANDONED" => Self::ReleaseAbandoned,
9500 "VERIFICATION_CONFIG_NOT_FOUND" => Self::VerificationConfigNotFound,
9501 "CLOUD_BUILD_REQUEST_FAILED" => Self::CloudBuildRequestFailed,
9502 "OPERATION_FEATURE_NOT_SUPPORTED" => Self::OperationFeatureNotSupported,
9503 _ => Self::UnknownValue(failure_cause::UnknownValue(
9504 wkt::internal::UnknownEnumValue::String(value.to_string()),
9505 )),
9506 }
9507 }
9508 }
9509
9510 impl serde::ser::Serialize for FailureCause {
9511 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9512 where
9513 S: serde::Serializer,
9514 {
9515 match self {
9516 Self::Unspecified => serializer.serialize_i32(0),
9517 Self::CloudBuildUnavailable => serializer.serialize_i32(1),
9518 Self::ExecutionFailed => serializer.serialize_i32(2),
9519 Self::DeadlineExceeded => serializer.serialize_i32(3),
9520 Self::ReleaseFailed => serializer.serialize_i32(4),
9521 Self::ReleaseAbandoned => serializer.serialize_i32(5),
9522 Self::VerificationConfigNotFound => serializer.serialize_i32(6),
9523 Self::CloudBuildRequestFailed => serializer.serialize_i32(7),
9524 Self::OperationFeatureNotSupported => serializer.serialize_i32(8),
9525 Self::UnknownValue(u) => u.0.serialize(serializer),
9526 }
9527 }
9528 }
9529
9530 impl<'de> serde::de::Deserialize<'de> for FailureCause {
9531 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9532 where
9533 D: serde::Deserializer<'de>,
9534 {
9535 deserializer.deserialize_any(wkt::internal::EnumVisitor::<FailureCause>::new(
9536 ".google.cloud.deploy.v1.Rollout.FailureCause",
9537 ))
9538 }
9539 }
9540}
9541
9542#[derive(Clone, Default, PartialEq)]
9544#[non_exhaustive]
9545pub struct Metadata {
9546 pub cloud_run: std::option::Option<crate::model::CloudRunMetadata>,
9549
9550 pub automation: std::option::Option<crate::model::AutomationRolloutMetadata>,
9553
9554 pub custom: std::option::Option<crate::model::CustomMetadata>,
9556
9557 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9558}
9559
9560impl Metadata {
9561 pub fn new() -> Self {
9562 std::default::Default::default()
9563 }
9564
9565 pub fn set_cloud_run<T>(mut self, v: T) -> Self
9567 where
9568 T: std::convert::Into<crate::model::CloudRunMetadata>,
9569 {
9570 self.cloud_run = std::option::Option::Some(v.into());
9571 self
9572 }
9573
9574 pub fn set_or_clear_cloud_run<T>(mut self, v: std::option::Option<T>) -> Self
9576 where
9577 T: std::convert::Into<crate::model::CloudRunMetadata>,
9578 {
9579 self.cloud_run = v.map(|x| x.into());
9580 self
9581 }
9582
9583 pub fn set_automation<T>(mut self, v: T) -> Self
9585 where
9586 T: std::convert::Into<crate::model::AutomationRolloutMetadata>,
9587 {
9588 self.automation = std::option::Option::Some(v.into());
9589 self
9590 }
9591
9592 pub fn set_or_clear_automation<T>(mut self, v: std::option::Option<T>) -> Self
9594 where
9595 T: std::convert::Into<crate::model::AutomationRolloutMetadata>,
9596 {
9597 self.automation = v.map(|x| x.into());
9598 self
9599 }
9600
9601 pub fn set_custom<T>(mut self, v: T) -> Self
9603 where
9604 T: std::convert::Into<crate::model::CustomMetadata>,
9605 {
9606 self.custom = std::option::Option::Some(v.into());
9607 self
9608 }
9609
9610 pub fn set_or_clear_custom<T>(mut self, v: std::option::Option<T>) -> Self
9612 where
9613 T: std::convert::Into<crate::model::CustomMetadata>,
9614 {
9615 self.custom = v.map(|x| x.into());
9616 self
9617 }
9618}
9619
9620impl wkt::message::Message for Metadata {
9621 fn typename() -> &'static str {
9622 "type.googleapis.com/google.cloud.deploy.v1.Metadata"
9623 }
9624}
9625
9626#[derive(Clone, Default, PartialEq)]
9629#[non_exhaustive]
9630pub struct DeployJobRunMetadata {
9631 pub cloud_run: std::option::Option<crate::model::CloudRunMetadata>,
9634
9635 pub custom_target: std::option::Option<crate::model::CustomTargetDeployMetadata>,
9637
9638 pub custom: std::option::Option<crate::model::CustomMetadata>,
9640
9641 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9642}
9643
9644impl DeployJobRunMetadata {
9645 pub fn new() -> Self {
9646 std::default::Default::default()
9647 }
9648
9649 pub fn set_cloud_run<T>(mut self, v: T) -> Self
9651 where
9652 T: std::convert::Into<crate::model::CloudRunMetadata>,
9653 {
9654 self.cloud_run = std::option::Option::Some(v.into());
9655 self
9656 }
9657
9658 pub fn set_or_clear_cloud_run<T>(mut self, v: std::option::Option<T>) -> Self
9660 where
9661 T: std::convert::Into<crate::model::CloudRunMetadata>,
9662 {
9663 self.cloud_run = v.map(|x| x.into());
9664 self
9665 }
9666
9667 pub fn set_custom_target<T>(mut self, v: T) -> Self
9669 where
9670 T: std::convert::Into<crate::model::CustomTargetDeployMetadata>,
9671 {
9672 self.custom_target = std::option::Option::Some(v.into());
9673 self
9674 }
9675
9676 pub fn set_or_clear_custom_target<T>(mut self, v: std::option::Option<T>) -> Self
9678 where
9679 T: std::convert::Into<crate::model::CustomTargetDeployMetadata>,
9680 {
9681 self.custom_target = v.map(|x| x.into());
9682 self
9683 }
9684
9685 pub fn set_custom<T>(mut self, v: T) -> Self
9687 where
9688 T: std::convert::Into<crate::model::CustomMetadata>,
9689 {
9690 self.custom = std::option::Option::Some(v.into());
9691 self
9692 }
9693
9694 pub fn set_or_clear_custom<T>(mut self, v: std::option::Option<T>) -> Self
9696 where
9697 T: std::convert::Into<crate::model::CustomMetadata>,
9698 {
9699 self.custom = v.map(|x| x.into());
9700 self
9701 }
9702}
9703
9704impl wkt::message::Message for DeployJobRunMetadata {
9705 fn typename() -> &'static str {
9706 "type.googleapis.com/google.cloud.deploy.v1.DeployJobRunMetadata"
9707 }
9708}
9709
9710#[derive(Clone, Default, PartialEq)]
9712#[non_exhaustive]
9713pub struct CloudRunMetadata {
9714 pub service: std::string::String,
9718
9719 pub service_urls: std::vec::Vec<std::string::String>,
9722
9723 pub revision: std::string::String,
9725
9726 pub job: std::string::String,
9730
9731 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9732}
9733
9734impl CloudRunMetadata {
9735 pub fn new() -> Self {
9736 std::default::Default::default()
9737 }
9738
9739 pub fn set_service<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9741 self.service = v.into();
9742 self
9743 }
9744
9745 pub fn set_service_urls<T, V>(mut self, v: T) -> Self
9747 where
9748 T: std::iter::IntoIterator<Item = V>,
9749 V: std::convert::Into<std::string::String>,
9750 {
9751 use std::iter::Iterator;
9752 self.service_urls = v.into_iter().map(|i| i.into()).collect();
9753 self
9754 }
9755
9756 pub fn set_revision<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9758 self.revision = v.into();
9759 self
9760 }
9761
9762 pub fn set_job<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9764 self.job = v.into();
9765 self
9766 }
9767}
9768
9769impl wkt::message::Message for CloudRunMetadata {
9770 fn typename() -> &'static str {
9771 "type.googleapis.com/google.cloud.deploy.v1.CloudRunMetadata"
9772 }
9773}
9774
9775#[derive(Clone, Default, PartialEq)]
9778#[non_exhaustive]
9779pub struct CustomTargetDeployMetadata {
9780 pub skip_message: std::string::String,
9783
9784 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9785}
9786
9787impl CustomTargetDeployMetadata {
9788 pub fn new() -> Self {
9789 std::default::Default::default()
9790 }
9791
9792 pub fn set_skip_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9794 self.skip_message = v.into();
9795 self
9796 }
9797}
9798
9799impl wkt::message::Message for CustomTargetDeployMetadata {
9800 fn typename() -> &'static str {
9801 "type.googleapis.com/google.cloud.deploy.v1.CustomTargetDeployMetadata"
9802 }
9803}
9804
9805#[derive(Clone, Default, PartialEq)]
9808#[non_exhaustive]
9809pub struct AutomationRolloutMetadata {
9810 pub promote_automation_run: std::string::String,
9813
9814 pub advance_automation_runs: std::vec::Vec<std::string::String>,
9817
9818 pub repair_automation_runs: std::vec::Vec<std::string::String>,
9821
9822 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9823}
9824
9825impl AutomationRolloutMetadata {
9826 pub fn new() -> Self {
9827 std::default::Default::default()
9828 }
9829
9830 pub fn set_promote_automation_run<T: std::convert::Into<std::string::String>>(
9832 mut self,
9833 v: T,
9834 ) -> Self {
9835 self.promote_automation_run = v.into();
9836 self
9837 }
9838
9839 pub fn set_advance_automation_runs<T, V>(mut self, v: T) -> Self
9841 where
9842 T: std::iter::IntoIterator<Item = V>,
9843 V: std::convert::Into<std::string::String>,
9844 {
9845 use std::iter::Iterator;
9846 self.advance_automation_runs = v.into_iter().map(|i| i.into()).collect();
9847 self
9848 }
9849
9850 pub fn set_repair_automation_runs<T, V>(mut self, v: T) -> Self
9852 where
9853 T: std::iter::IntoIterator<Item = V>,
9854 V: std::convert::Into<std::string::String>,
9855 {
9856 use std::iter::Iterator;
9857 self.repair_automation_runs = v.into_iter().map(|i| i.into()).collect();
9858 self
9859 }
9860}
9861
9862impl wkt::message::Message for AutomationRolloutMetadata {
9863 fn typename() -> &'static str {
9864 "type.googleapis.com/google.cloud.deploy.v1.AutomationRolloutMetadata"
9865 }
9866}
9867
9868#[derive(Clone, Default, PartialEq)]
9870#[non_exhaustive]
9871pub struct CustomMetadata {
9872 pub values: std::collections::HashMap<std::string::String, std::string::String>,
9874
9875 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9876}
9877
9878impl CustomMetadata {
9879 pub fn new() -> Self {
9880 std::default::Default::default()
9881 }
9882
9883 pub fn set_values<T, K, V>(mut self, v: T) -> Self
9885 where
9886 T: std::iter::IntoIterator<Item = (K, V)>,
9887 K: std::convert::Into<std::string::String>,
9888 V: std::convert::Into<std::string::String>,
9889 {
9890 use std::iter::Iterator;
9891 self.values = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
9892 self
9893 }
9894}
9895
9896impl wkt::message::Message for CustomMetadata {
9897 fn typename() -> &'static str {
9898 "type.googleapis.com/google.cloud.deploy.v1.CustomMetadata"
9899 }
9900}
9901
9902#[derive(Clone, Default, PartialEq)]
9905#[non_exhaustive]
9906pub struct Phase {
9907 pub id: std::string::String,
9909
9910 pub state: crate::model::phase::State,
9912
9913 pub skip_message: std::string::String,
9916
9917 pub jobs: std::option::Option<crate::model::phase::Jobs>,
9919
9920 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9921}
9922
9923impl Phase {
9924 pub fn new() -> Self {
9925 std::default::Default::default()
9926 }
9927
9928 pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9930 self.id = v.into();
9931 self
9932 }
9933
9934 pub fn set_state<T: std::convert::Into<crate::model::phase::State>>(mut self, v: T) -> Self {
9936 self.state = v.into();
9937 self
9938 }
9939
9940 pub fn set_skip_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9942 self.skip_message = v.into();
9943 self
9944 }
9945
9946 pub fn set_jobs<T: std::convert::Into<std::option::Option<crate::model::phase::Jobs>>>(
9951 mut self,
9952 v: T,
9953 ) -> Self {
9954 self.jobs = v.into();
9955 self
9956 }
9957
9958 pub fn deployment_jobs(
9962 &self,
9963 ) -> std::option::Option<&std::boxed::Box<crate::model::DeploymentJobs>> {
9964 #[allow(unreachable_patterns)]
9965 self.jobs.as_ref().and_then(|v| match v {
9966 crate::model::phase::Jobs::DeploymentJobs(v) => std::option::Option::Some(v),
9967 _ => std::option::Option::None,
9968 })
9969 }
9970
9971 pub fn set_deployment_jobs<
9977 T: std::convert::Into<std::boxed::Box<crate::model::DeploymentJobs>>,
9978 >(
9979 mut self,
9980 v: T,
9981 ) -> Self {
9982 self.jobs = std::option::Option::Some(crate::model::phase::Jobs::DeploymentJobs(v.into()));
9983 self
9984 }
9985
9986 pub fn child_rollout_jobs(
9990 &self,
9991 ) -> std::option::Option<&std::boxed::Box<crate::model::ChildRolloutJobs>> {
9992 #[allow(unreachable_patterns)]
9993 self.jobs.as_ref().and_then(|v| match v {
9994 crate::model::phase::Jobs::ChildRolloutJobs(v) => std::option::Option::Some(v),
9995 _ => std::option::Option::None,
9996 })
9997 }
9998
9999 pub fn set_child_rollout_jobs<
10005 T: std::convert::Into<std::boxed::Box<crate::model::ChildRolloutJobs>>,
10006 >(
10007 mut self,
10008 v: T,
10009 ) -> Self {
10010 self.jobs =
10011 std::option::Option::Some(crate::model::phase::Jobs::ChildRolloutJobs(v.into()));
10012 self
10013 }
10014}
10015
10016impl wkt::message::Message for Phase {
10017 fn typename() -> &'static str {
10018 "type.googleapis.com/google.cloud.deploy.v1.Phase"
10019 }
10020}
10021
10022pub mod phase {
10024 #[allow(unused_imports)]
10025 use super::*;
10026
10027 #[derive(Clone, Debug, PartialEq)]
10043 #[non_exhaustive]
10044 pub enum State {
10045 Unspecified,
10047 Pending,
10049 InProgress,
10051 Succeeded,
10053 Failed,
10055 Aborted,
10057 Skipped,
10059 UnknownValue(state::UnknownValue),
10064 }
10065
10066 #[doc(hidden)]
10067 pub mod state {
10068 #[allow(unused_imports)]
10069 use super::*;
10070 #[derive(Clone, Debug, PartialEq)]
10071 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
10072 }
10073
10074 impl State {
10075 pub fn value(&self) -> std::option::Option<i32> {
10080 match self {
10081 Self::Unspecified => std::option::Option::Some(0),
10082 Self::Pending => std::option::Option::Some(1),
10083 Self::InProgress => std::option::Option::Some(2),
10084 Self::Succeeded => std::option::Option::Some(3),
10085 Self::Failed => std::option::Option::Some(4),
10086 Self::Aborted => std::option::Option::Some(5),
10087 Self::Skipped => std::option::Option::Some(6),
10088 Self::UnknownValue(u) => u.0.value(),
10089 }
10090 }
10091
10092 pub fn name(&self) -> std::option::Option<&str> {
10097 match self {
10098 Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
10099 Self::Pending => std::option::Option::Some("PENDING"),
10100 Self::InProgress => std::option::Option::Some("IN_PROGRESS"),
10101 Self::Succeeded => std::option::Option::Some("SUCCEEDED"),
10102 Self::Failed => std::option::Option::Some("FAILED"),
10103 Self::Aborted => std::option::Option::Some("ABORTED"),
10104 Self::Skipped => std::option::Option::Some("SKIPPED"),
10105 Self::UnknownValue(u) => u.0.name(),
10106 }
10107 }
10108 }
10109
10110 impl std::default::Default for State {
10111 fn default() -> Self {
10112 use std::convert::From;
10113 Self::from(0)
10114 }
10115 }
10116
10117 impl std::fmt::Display for State {
10118 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
10119 wkt::internal::display_enum(f, self.name(), self.value())
10120 }
10121 }
10122
10123 impl std::convert::From<i32> for State {
10124 fn from(value: i32) -> Self {
10125 match value {
10126 0 => Self::Unspecified,
10127 1 => Self::Pending,
10128 2 => Self::InProgress,
10129 3 => Self::Succeeded,
10130 4 => Self::Failed,
10131 5 => Self::Aborted,
10132 6 => Self::Skipped,
10133 _ => Self::UnknownValue(state::UnknownValue(
10134 wkt::internal::UnknownEnumValue::Integer(value),
10135 )),
10136 }
10137 }
10138 }
10139
10140 impl std::convert::From<&str> for State {
10141 fn from(value: &str) -> Self {
10142 use std::string::ToString;
10143 match value {
10144 "STATE_UNSPECIFIED" => Self::Unspecified,
10145 "PENDING" => Self::Pending,
10146 "IN_PROGRESS" => Self::InProgress,
10147 "SUCCEEDED" => Self::Succeeded,
10148 "FAILED" => Self::Failed,
10149 "ABORTED" => Self::Aborted,
10150 "SKIPPED" => Self::Skipped,
10151 _ => Self::UnknownValue(state::UnknownValue(
10152 wkt::internal::UnknownEnumValue::String(value.to_string()),
10153 )),
10154 }
10155 }
10156 }
10157
10158 impl serde::ser::Serialize for State {
10159 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10160 where
10161 S: serde::Serializer,
10162 {
10163 match self {
10164 Self::Unspecified => serializer.serialize_i32(0),
10165 Self::Pending => serializer.serialize_i32(1),
10166 Self::InProgress => serializer.serialize_i32(2),
10167 Self::Succeeded => serializer.serialize_i32(3),
10168 Self::Failed => serializer.serialize_i32(4),
10169 Self::Aborted => serializer.serialize_i32(5),
10170 Self::Skipped => serializer.serialize_i32(6),
10171 Self::UnknownValue(u) => u.0.serialize(serializer),
10172 }
10173 }
10174 }
10175
10176 impl<'de> serde::de::Deserialize<'de> for State {
10177 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10178 where
10179 D: serde::Deserializer<'de>,
10180 {
10181 deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
10182 ".google.cloud.deploy.v1.Phase.State",
10183 ))
10184 }
10185 }
10186
10187 #[derive(Clone, Debug, PartialEq)]
10189 #[non_exhaustive]
10190 pub enum Jobs {
10191 DeploymentJobs(std::boxed::Box<crate::model::DeploymentJobs>),
10193 ChildRolloutJobs(std::boxed::Box<crate::model::ChildRolloutJobs>),
10195 }
10196}
10197
10198#[derive(Clone, Default, PartialEq)]
10200#[non_exhaustive]
10201pub struct DeploymentJobs {
10202 pub predeploy_job: std::option::Option<crate::model::Job>,
10204
10205 pub deploy_job: std::option::Option<crate::model::Job>,
10207
10208 pub verify_job: std::option::Option<crate::model::Job>,
10210
10211 pub postdeploy_job: std::option::Option<crate::model::Job>,
10213
10214 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10215}
10216
10217impl DeploymentJobs {
10218 pub fn new() -> Self {
10219 std::default::Default::default()
10220 }
10221
10222 pub fn set_predeploy_job<T>(mut self, v: T) -> Self
10224 where
10225 T: std::convert::Into<crate::model::Job>,
10226 {
10227 self.predeploy_job = std::option::Option::Some(v.into());
10228 self
10229 }
10230
10231 pub fn set_or_clear_predeploy_job<T>(mut self, v: std::option::Option<T>) -> Self
10233 where
10234 T: std::convert::Into<crate::model::Job>,
10235 {
10236 self.predeploy_job = v.map(|x| x.into());
10237 self
10238 }
10239
10240 pub fn set_deploy_job<T>(mut self, v: T) -> Self
10242 where
10243 T: std::convert::Into<crate::model::Job>,
10244 {
10245 self.deploy_job = std::option::Option::Some(v.into());
10246 self
10247 }
10248
10249 pub fn set_or_clear_deploy_job<T>(mut self, v: std::option::Option<T>) -> Self
10251 where
10252 T: std::convert::Into<crate::model::Job>,
10253 {
10254 self.deploy_job = v.map(|x| x.into());
10255 self
10256 }
10257
10258 pub fn set_verify_job<T>(mut self, v: T) -> Self
10260 where
10261 T: std::convert::Into<crate::model::Job>,
10262 {
10263 self.verify_job = std::option::Option::Some(v.into());
10264 self
10265 }
10266
10267 pub fn set_or_clear_verify_job<T>(mut self, v: std::option::Option<T>) -> Self
10269 where
10270 T: std::convert::Into<crate::model::Job>,
10271 {
10272 self.verify_job = v.map(|x| x.into());
10273 self
10274 }
10275
10276 pub fn set_postdeploy_job<T>(mut self, v: T) -> Self
10278 where
10279 T: std::convert::Into<crate::model::Job>,
10280 {
10281 self.postdeploy_job = std::option::Option::Some(v.into());
10282 self
10283 }
10284
10285 pub fn set_or_clear_postdeploy_job<T>(mut self, v: std::option::Option<T>) -> Self
10287 where
10288 T: std::convert::Into<crate::model::Job>,
10289 {
10290 self.postdeploy_job = v.map(|x| x.into());
10291 self
10292 }
10293}
10294
10295impl wkt::message::Message for DeploymentJobs {
10296 fn typename() -> &'static str {
10297 "type.googleapis.com/google.cloud.deploy.v1.DeploymentJobs"
10298 }
10299}
10300
10301#[derive(Clone, Default, PartialEq)]
10303#[non_exhaustive]
10304pub struct ChildRolloutJobs {
10305 pub create_rollout_jobs: std::vec::Vec<crate::model::Job>,
10307
10308 pub advance_rollout_jobs: std::vec::Vec<crate::model::Job>,
10310
10311 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10312}
10313
10314impl ChildRolloutJobs {
10315 pub fn new() -> Self {
10316 std::default::Default::default()
10317 }
10318
10319 pub fn set_create_rollout_jobs<T, V>(mut self, v: T) -> Self
10321 where
10322 T: std::iter::IntoIterator<Item = V>,
10323 V: std::convert::Into<crate::model::Job>,
10324 {
10325 use std::iter::Iterator;
10326 self.create_rollout_jobs = v.into_iter().map(|i| i.into()).collect();
10327 self
10328 }
10329
10330 pub fn set_advance_rollout_jobs<T, V>(mut self, v: T) -> Self
10332 where
10333 T: std::iter::IntoIterator<Item = V>,
10334 V: std::convert::Into<crate::model::Job>,
10335 {
10336 use std::iter::Iterator;
10337 self.advance_rollout_jobs = v.into_iter().map(|i| i.into()).collect();
10338 self
10339 }
10340}
10341
10342impl wkt::message::Message for ChildRolloutJobs {
10343 fn typename() -> &'static str {
10344 "type.googleapis.com/google.cloud.deploy.v1.ChildRolloutJobs"
10345 }
10346}
10347
10348#[derive(Clone, Default, PartialEq)]
10350#[non_exhaustive]
10351pub struct Job {
10352 pub id: std::string::String,
10354
10355 pub state: crate::model::job::State,
10357
10358 pub skip_message: std::string::String,
10361
10362 pub job_run: std::string::String,
10365
10366 pub job_type: std::option::Option<crate::model::job::JobType>,
10368
10369 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10370}
10371
10372impl Job {
10373 pub fn new() -> Self {
10374 std::default::Default::default()
10375 }
10376
10377 pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10379 self.id = v.into();
10380 self
10381 }
10382
10383 pub fn set_state<T: std::convert::Into<crate::model::job::State>>(mut self, v: T) -> Self {
10385 self.state = v.into();
10386 self
10387 }
10388
10389 pub fn set_skip_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10391 self.skip_message = v.into();
10392 self
10393 }
10394
10395 pub fn set_job_run<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10397 self.job_run = v.into();
10398 self
10399 }
10400
10401 pub fn set_job_type<T: std::convert::Into<std::option::Option<crate::model::job::JobType>>>(
10406 mut self,
10407 v: T,
10408 ) -> Self {
10409 self.job_type = v.into();
10410 self
10411 }
10412
10413 pub fn deploy_job(&self) -> std::option::Option<&std::boxed::Box<crate::model::DeployJob>> {
10417 #[allow(unreachable_patterns)]
10418 self.job_type.as_ref().and_then(|v| match v {
10419 crate::model::job::JobType::DeployJob(v) => std::option::Option::Some(v),
10420 _ => std::option::Option::None,
10421 })
10422 }
10423
10424 pub fn set_deploy_job<T: std::convert::Into<std::boxed::Box<crate::model::DeployJob>>>(
10430 mut self,
10431 v: T,
10432 ) -> Self {
10433 self.job_type = std::option::Option::Some(crate::model::job::JobType::DeployJob(v.into()));
10434 self
10435 }
10436
10437 pub fn verify_job(&self) -> std::option::Option<&std::boxed::Box<crate::model::VerifyJob>> {
10441 #[allow(unreachable_patterns)]
10442 self.job_type.as_ref().and_then(|v| match v {
10443 crate::model::job::JobType::VerifyJob(v) => std::option::Option::Some(v),
10444 _ => std::option::Option::None,
10445 })
10446 }
10447
10448 pub fn set_verify_job<T: std::convert::Into<std::boxed::Box<crate::model::VerifyJob>>>(
10454 mut self,
10455 v: T,
10456 ) -> Self {
10457 self.job_type = std::option::Option::Some(crate::model::job::JobType::VerifyJob(v.into()));
10458 self
10459 }
10460
10461 pub fn predeploy_job(
10465 &self,
10466 ) -> std::option::Option<&std::boxed::Box<crate::model::PredeployJob>> {
10467 #[allow(unreachable_patterns)]
10468 self.job_type.as_ref().and_then(|v| match v {
10469 crate::model::job::JobType::PredeployJob(v) => std::option::Option::Some(v),
10470 _ => std::option::Option::None,
10471 })
10472 }
10473
10474 pub fn set_predeploy_job<T: std::convert::Into<std::boxed::Box<crate::model::PredeployJob>>>(
10480 mut self,
10481 v: T,
10482 ) -> Self {
10483 self.job_type =
10484 std::option::Option::Some(crate::model::job::JobType::PredeployJob(v.into()));
10485 self
10486 }
10487
10488 pub fn postdeploy_job(
10492 &self,
10493 ) -> std::option::Option<&std::boxed::Box<crate::model::PostdeployJob>> {
10494 #[allow(unreachable_patterns)]
10495 self.job_type.as_ref().and_then(|v| match v {
10496 crate::model::job::JobType::PostdeployJob(v) => std::option::Option::Some(v),
10497 _ => std::option::Option::None,
10498 })
10499 }
10500
10501 pub fn set_postdeploy_job<
10507 T: std::convert::Into<std::boxed::Box<crate::model::PostdeployJob>>,
10508 >(
10509 mut self,
10510 v: T,
10511 ) -> Self {
10512 self.job_type =
10513 std::option::Option::Some(crate::model::job::JobType::PostdeployJob(v.into()));
10514 self
10515 }
10516
10517 pub fn create_child_rollout_job(
10521 &self,
10522 ) -> std::option::Option<&std::boxed::Box<crate::model::CreateChildRolloutJob>> {
10523 #[allow(unreachable_patterns)]
10524 self.job_type.as_ref().and_then(|v| match v {
10525 crate::model::job::JobType::CreateChildRolloutJob(v) => std::option::Option::Some(v),
10526 _ => std::option::Option::None,
10527 })
10528 }
10529
10530 pub fn set_create_child_rollout_job<
10536 T: std::convert::Into<std::boxed::Box<crate::model::CreateChildRolloutJob>>,
10537 >(
10538 mut self,
10539 v: T,
10540 ) -> Self {
10541 self.job_type =
10542 std::option::Option::Some(crate::model::job::JobType::CreateChildRolloutJob(v.into()));
10543 self
10544 }
10545
10546 pub fn advance_child_rollout_job(
10550 &self,
10551 ) -> std::option::Option<&std::boxed::Box<crate::model::AdvanceChildRolloutJob>> {
10552 #[allow(unreachable_patterns)]
10553 self.job_type.as_ref().and_then(|v| match v {
10554 crate::model::job::JobType::AdvanceChildRolloutJob(v) => std::option::Option::Some(v),
10555 _ => std::option::Option::None,
10556 })
10557 }
10558
10559 pub fn set_advance_child_rollout_job<
10565 T: std::convert::Into<std::boxed::Box<crate::model::AdvanceChildRolloutJob>>,
10566 >(
10567 mut self,
10568 v: T,
10569 ) -> Self {
10570 self.job_type =
10571 std::option::Option::Some(crate::model::job::JobType::AdvanceChildRolloutJob(v.into()));
10572 self
10573 }
10574}
10575
10576impl wkt::message::Message for Job {
10577 fn typename() -> &'static str {
10578 "type.googleapis.com/google.cloud.deploy.v1.Job"
10579 }
10580}
10581
10582pub mod job {
10584 #[allow(unused_imports)]
10585 use super::*;
10586
10587 #[derive(Clone, Debug, PartialEq)]
10603 #[non_exhaustive]
10604 pub enum State {
10605 Unspecified,
10607 Pending,
10609 Disabled,
10611 InProgress,
10613 Succeeded,
10615 Failed,
10617 Aborted,
10619 Skipped,
10621 Ignored,
10623 UnknownValue(state::UnknownValue),
10628 }
10629
10630 #[doc(hidden)]
10631 pub mod state {
10632 #[allow(unused_imports)]
10633 use super::*;
10634 #[derive(Clone, Debug, PartialEq)]
10635 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
10636 }
10637
10638 impl State {
10639 pub fn value(&self) -> std::option::Option<i32> {
10644 match self {
10645 Self::Unspecified => std::option::Option::Some(0),
10646 Self::Pending => std::option::Option::Some(1),
10647 Self::Disabled => std::option::Option::Some(2),
10648 Self::InProgress => std::option::Option::Some(3),
10649 Self::Succeeded => std::option::Option::Some(4),
10650 Self::Failed => std::option::Option::Some(5),
10651 Self::Aborted => std::option::Option::Some(6),
10652 Self::Skipped => std::option::Option::Some(7),
10653 Self::Ignored => std::option::Option::Some(8),
10654 Self::UnknownValue(u) => u.0.value(),
10655 }
10656 }
10657
10658 pub fn name(&self) -> std::option::Option<&str> {
10663 match self {
10664 Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
10665 Self::Pending => std::option::Option::Some("PENDING"),
10666 Self::Disabled => std::option::Option::Some("DISABLED"),
10667 Self::InProgress => std::option::Option::Some("IN_PROGRESS"),
10668 Self::Succeeded => std::option::Option::Some("SUCCEEDED"),
10669 Self::Failed => std::option::Option::Some("FAILED"),
10670 Self::Aborted => std::option::Option::Some("ABORTED"),
10671 Self::Skipped => std::option::Option::Some("SKIPPED"),
10672 Self::Ignored => std::option::Option::Some("IGNORED"),
10673 Self::UnknownValue(u) => u.0.name(),
10674 }
10675 }
10676 }
10677
10678 impl std::default::Default for State {
10679 fn default() -> Self {
10680 use std::convert::From;
10681 Self::from(0)
10682 }
10683 }
10684
10685 impl std::fmt::Display for State {
10686 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
10687 wkt::internal::display_enum(f, self.name(), self.value())
10688 }
10689 }
10690
10691 impl std::convert::From<i32> for State {
10692 fn from(value: i32) -> Self {
10693 match value {
10694 0 => Self::Unspecified,
10695 1 => Self::Pending,
10696 2 => Self::Disabled,
10697 3 => Self::InProgress,
10698 4 => Self::Succeeded,
10699 5 => Self::Failed,
10700 6 => Self::Aborted,
10701 7 => Self::Skipped,
10702 8 => Self::Ignored,
10703 _ => Self::UnknownValue(state::UnknownValue(
10704 wkt::internal::UnknownEnumValue::Integer(value),
10705 )),
10706 }
10707 }
10708 }
10709
10710 impl std::convert::From<&str> for State {
10711 fn from(value: &str) -> Self {
10712 use std::string::ToString;
10713 match value {
10714 "STATE_UNSPECIFIED" => Self::Unspecified,
10715 "PENDING" => Self::Pending,
10716 "DISABLED" => Self::Disabled,
10717 "IN_PROGRESS" => Self::InProgress,
10718 "SUCCEEDED" => Self::Succeeded,
10719 "FAILED" => Self::Failed,
10720 "ABORTED" => Self::Aborted,
10721 "SKIPPED" => Self::Skipped,
10722 "IGNORED" => Self::Ignored,
10723 _ => Self::UnknownValue(state::UnknownValue(
10724 wkt::internal::UnknownEnumValue::String(value.to_string()),
10725 )),
10726 }
10727 }
10728 }
10729
10730 impl serde::ser::Serialize for State {
10731 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10732 where
10733 S: serde::Serializer,
10734 {
10735 match self {
10736 Self::Unspecified => serializer.serialize_i32(0),
10737 Self::Pending => serializer.serialize_i32(1),
10738 Self::Disabled => serializer.serialize_i32(2),
10739 Self::InProgress => serializer.serialize_i32(3),
10740 Self::Succeeded => serializer.serialize_i32(4),
10741 Self::Failed => serializer.serialize_i32(5),
10742 Self::Aborted => serializer.serialize_i32(6),
10743 Self::Skipped => serializer.serialize_i32(7),
10744 Self::Ignored => serializer.serialize_i32(8),
10745 Self::UnknownValue(u) => u.0.serialize(serializer),
10746 }
10747 }
10748 }
10749
10750 impl<'de> serde::de::Deserialize<'de> for State {
10751 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10752 where
10753 D: serde::Deserializer<'de>,
10754 {
10755 deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
10756 ".google.cloud.deploy.v1.Job.State",
10757 ))
10758 }
10759 }
10760
10761 #[derive(Clone, Debug, PartialEq)]
10763 #[non_exhaustive]
10764 pub enum JobType {
10765 DeployJob(std::boxed::Box<crate::model::DeployJob>),
10767 VerifyJob(std::boxed::Box<crate::model::VerifyJob>),
10769 PredeployJob(std::boxed::Box<crate::model::PredeployJob>),
10771 PostdeployJob(std::boxed::Box<crate::model::PostdeployJob>),
10773 CreateChildRolloutJob(std::boxed::Box<crate::model::CreateChildRolloutJob>),
10775 AdvanceChildRolloutJob(std::boxed::Box<crate::model::AdvanceChildRolloutJob>),
10777 }
10778}
10779
10780#[derive(Clone, Default, PartialEq)]
10782#[non_exhaustive]
10783pub struct DeployJob {
10784 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10785}
10786
10787impl DeployJob {
10788 pub fn new() -> Self {
10789 std::default::Default::default()
10790 }
10791}
10792
10793impl wkt::message::Message for DeployJob {
10794 fn typename() -> &'static str {
10795 "type.googleapis.com/google.cloud.deploy.v1.DeployJob"
10796 }
10797}
10798
10799#[derive(Clone, Default, PartialEq)]
10801#[non_exhaustive]
10802pub struct VerifyJob {
10803 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10804}
10805
10806impl VerifyJob {
10807 pub fn new() -> Self {
10808 std::default::Default::default()
10809 }
10810}
10811
10812impl wkt::message::Message for VerifyJob {
10813 fn typename() -> &'static str {
10814 "type.googleapis.com/google.cloud.deploy.v1.VerifyJob"
10815 }
10816}
10817
10818#[derive(Clone, Default, PartialEq)]
10820#[non_exhaustive]
10821pub struct PredeployJob {
10822 pub actions: std::vec::Vec<std::string::String>,
10824
10825 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10826}
10827
10828impl PredeployJob {
10829 pub fn new() -> Self {
10830 std::default::Default::default()
10831 }
10832
10833 pub fn set_actions<T, V>(mut self, v: T) -> Self
10835 where
10836 T: std::iter::IntoIterator<Item = V>,
10837 V: std::convert::Into<std::string::String>,
10838 {
10839 use std::iter::Iterator;
10840 self.actions = v.into_iter().map(|i| i.into()).collect();
10841 self
10842 }
10843}
10844
10845impl wkt::message::Message for PredeployJob {
10846 fn typename() -> &'static str {
10847 "type.googleapis.com/google.cloud.deploy.v1.PredeployJob"
10848 }
10849}
10850
10851#[derive(Clone, Default, PartialEq)]
10853#[non_exhaustive]
10854pub struct PostdeployJob {
10855 pub actions: std::vec::Vec<std::string::String>,
10857
10858 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10859}
10860
10861impl PostdeployJob {
10862 pub fn new() -> Self {
10863 std::default::Default::default()
10864 }
10865
10866 pub fn set_actions<T, V>(mut self, v: T) -> Self
10868 where
10869 T: std::iter::IntoIterator<Item = V>,
10870 V: std::convert::Into<std::string::String>,
10871 {
10872 use std::iter::Iterator;
10873 self.actions = v.into_iter().map(|i| i.into()).collect();
10874 self
10875 }
10876}
10877
10878impl wkt::message::Message for PostdeployJob {
10879 fn typename() -> &'static str {
10880 "type.googleapis.com/google.cloud.deploy.v1.PostdeployJob"
10881 }
10882}
10883
10884#[derive(Clone, Default, PartialEq)]
10886#[non_exhaustive]
10887pub struct CreateChildRolloutJob {
10888 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10889}
10890
10891impl CreateChildRolloutJob {
10892 pub fn new() -> Self {
10893 std::default::Default::default()
10894 }
10895}
10896
10897impl wkt::message::Message for CreateChildRolloutJob {
10898 fn typename() -> &'static str {
10899 "type.googleapis.com/google.cloud.deploy.v1.CreateChildRolloutJob"
10900 }
10901}
10902
10903#[derive(Clone, Default, PartialEq)]
10905#[non_exhaustive]
10906pub struct AdvanceChildRolloutJob {
10907 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10908}
10909
10910impl AdvanceChildRolloutJob {
10911 pub fn new() -> Self {
10912 std::default::Default::default()
10913 }
10914}
10915
10916impl wkt::message::Message for AdvanceChildRolloutJob {
10917 fn typename() -> &'static str {
10918 "type.googleapis.com/google.cloud.deploy.v1.AdvanceChildRolloutJob"
10919 }
10920}
10921
10922#[derive(Clone, Default, PartialEq)]
10924#[non_exhaustive]
10925pub struct ListRolloutsRequest {
10926 pub parent: std::string::String,
10928
10929 pub page_size: i32,
10934
10935 pub page_token: std::string::String,
10941
10942 pub filter: std::string::String,
10945
10946 pub order_by: std::string::String,
10949
10950 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10951}
10952
10953impl ListRolloutsRequest {
10954 pub fn new() -> Self {
10955 std::default::Default::default()
10956 }
10957
10958 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10960 self.parent = v.into();
10961 self
10962 }
10963
10964 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10966 self.page_size = v.into();
10967 self
10968 }
10969
10970 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10972 self.page_token = v.into();
10973 self
10974 }
10975
10976 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10978 self.filter = v.into();
10979 self
10980 }
10981
10982 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10984 self.order_by = v.into();
10985 self
10986 }
10987}
10988
10989impl wkt::message::Message for ListRolloutsRequest {
10990 fn typename() -> &'static str {
10991 "type.googleapis.com/google.cloud.deploy.v1.ListRolloutsRequest"
10992 }
10993}
10994
10995#[derive(Clone, Default, PartialEq)]
10997#[non_exhaustive]
10998pub struct ListRolloutsResponse {
10999 pub rollouts: std::vec::Vec<crate::model::Rollout>,
11001
11002 pub next_page_token: std::string::String,
11005
11006 pub unreachable: std::vec::Vec<std::string::String>,
11008
11009 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11010}
11011
11012impl ListRolloutsResponse {
11013 pub fn new() -> Self {
11014 std::default::Default::default()
11015 }
11016
11017 pub fn set_rollouts<T, V>(mut self, v: T) -> Self
11019 where
11020 T: std::iter::IntoIterator<Item = V>,
11021 V: std::convert::Into<crate::model::Rollout>,
11022 {
11023 use std::iter::Iterator;
11024 self.rollouts = v.into_iter().map(|i| i.into()).collect();
11025 self
11026 }
11027
11028 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11030 self.next_page_token = v.into();
11031 self
11032 }
11033
11034 pub fn set_unreachable<T, V>(mut self, v: T) -> Self
11036 where
11037 T: std::iter::IntoIterator<Item = V>,
11038 V: std::convert::Into<std::string::String>,
11039 {
11040 use std::iter::Iterator;
11041 self.unreachable = v.into_iter().map(|i| i.into()).collect();
11042 self
11043 }
11044}
11045
11046impl wkt::message::Message for ListRolloutsResponse {
11047 fn typename() -> &'static str {
11048 "type.googleapis.com/google.cloud.deploy.v1.ListRolloutsResponse"
11049 }
11050}
11051
11052#[doc(hidden)]
11053impl gax::paginator::internal::PageableResponse for ListRolloutsResponse {
11054 type PageItem = crate::model::Rollout;
11055
11056 fn items(self) -> std::vec::Vec<Self::PageItem> {
11057 self.rollouts
11058 }
11059
11060 fn next_page_token(&self) -> std::string::String {
11061 use std::clone::Clone;
11062 self.next_page_token.clone()
11063 }
11064}
11065
11066#[derive(Clone, Default, PartialEq)]
11068#[non_exhaustive]
11069pub struct GetRolloutRequest {
11070 pub name: std::string::String,
11073
11074 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11075}
11076
11077impl GetRolloutRequest {
11078 pub fn new() -> Self {
11079 std::default::Default::default()
11080 }
11081
11082 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11084 self.name = v.into();
11085 self
11086 }
11087}
11088
11089impl wkt::message::Message for GetRolloutRequest {
11090 fn typename() -> &'static str {
11091 "type.googleapis.com/google.cloud.deploy.v1.GetRolloutRequest"
11092 }
11093}
11094
11095#[derive(Clone, Default, PartialEq)]
11097#[non_exhaustive]
11098pub struct CreateRolloutRequest {
11099 pub parent: std::string::String,
11103
11104 pub rollout_id: std::string::String,
11106
11107 pub rollout: std::option::Option<crate::model::Rollout>,
11109
11110 pub request_id: std::string::String,
11124
11125 pub validate_only: bool,
11128
11129 pub override_deploy_policy: std::vec::Vec<std::string::String>,
11132
11133 pub starting_phase_id: std::string::String,
11136
11137 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11138}
11139
11140impl CreateRolloutRequest {
11141 pub fn new() -> Self {
11142 std::default::Default::default()
11143 }
11144
11145 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11147 self.parent = v.into();
11148 self
11149 }
11150
11151 pub fn set_rollout_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11153 self.rollout_id = v.into();
11154 self
11155 }
11156
11157 pub fn set_rollout<T>(mut self, v: T) -> Self
11159 where
11160 T: std::convert::Into<crate::model::Rollout>,
11161 {
11162 self.rollout = std::option::Option::Some(v.into());
11163 self
11164 }
11165
11166 pub fn set_or_clear_rollout<T>(mut self, v: std::option::Option<T>) -> Self
11168 where
11169 T: std::convert::Into<crate::model::Rollout>,
11170 {
11171 self.rollout = v.map(|x| x.into());
11172 self
11173 }
11174
11175 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11177 self.request_id = v.into();
11178 self
11179 }
11180
11181 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
11183 self.validate_only = v.into();
11184 self
11185 }
11186
11187 pub fn set_override_deploy_policy<T, V>(mut self, v: T) -> Self
11189 where
11190 T: std::iter::IntoIterator<Item = V>,
11191 V: std::convert::Into<std::string::String>,
11192 {
11193 use std::iter::Iterator;
11194 self.override_deploy_policy = v.into_iter().map(|i| i.into()).collect();
11195 self
11196 }
11197
11198 pub fn set_starting_phase_id<T: std::convert::Into<std::string::String>>(
11200 mut self,
11201 v: T,
11202 ) -> Self {
11203 self.starting_phase_id = v.into();
11204 self
11205 }
11206}
11207
11208impl wkt::message::Message for CreateRolloutRequest {
11209 fn typename() -> &'static str {
11210 "type.googleapis.com/google.cloud.deploy.v1.CreateRolloutRequest"
11211 }
11212}
11213
11214#[derive(Clone, Default, PartialEq)]
11216#[non_exhaustive]
11217pub struct OperationMetadata {
11218 pub create_time: std::option::Option<wkt::Timestamp>,
11220
11221 pub end_time: std::option::Option<wkt::Timestamp>,
11223
11224 pub target: std::string::String,
11226
11227 pub verb: std::string::String,
11229
11230 pub status_message: std::string::String,
11232
11233 pub requested_cancellation: bool,
11243
11244 pub api_version: std::string::String,
11246
11247 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11248}
11249
11250impl OperationMetadata {
11251 pub fn new() -> Self {
11252 std::default::Default::default()
11253 }
11254
11255 pub fn set_create_time<T>(mut self, v: T) -> Self
11257 where
11258 T: std::convert::Into<wkt::Timestamp>,
11259 {
11260 self.create_time = std::option::Option::Some(v.into());
11261 self
11262 }
11263
11264 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
11266 where
11267 T: std::convert::Into<wkt::Timestamp>,
11268 {
11269 self.create_time = v.map(|x| x.into());
11270 self
11271 }
11272
11273 pub fn set_end_time<T>(mut self, v: T) -> Self
11275 where
11276 T: std::convert::Into<wkt::Timestamp>,
11277 {
11278 self.end_time = std::option::Option::Some(v.into());
11279 self
11280 }
11281
11282 pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
11284 where
11285 T: std::convert::Into<wkt::Timestamp>,
11286 {
11287 self.end_time = v.map(|x| x.into());
11288 self
11289 }
11290
11291 pub fn set_target<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11293 self.target = v.into();
11294 self
11295 }
11296
11297 pub fn set_verb<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11299 self.verb = v.into();
11300 self
11301 }
11302
11303 pub fn set_status_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11305 self.status_message = v.into();
11306 self
11307 }
11308
11309 pub fn set_requested_cancellation<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
11311 self.requested_cancellation = v.into();
11312 self
11313 }
11314
11315 pub fn set_api_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11317 self.api_version = v.into();
11318 self
11319 }
11320}
11321
11322impl wkt::message::Message for OperationMetadata {
11323 fn typename() -> &'static str {
11324 "type.googleapis.com/google.cloud.deploy.v1.OperationMetadata"
11325 }
11326}
11327
11328#[derive(Clone, Default, PartialEq)]
11330#[non_exhaustive]
11331pub struct ApproveRolloutRequest {
11332 pub name: std::string::String,
11335
11336 pub approved: bool,
11338
11339 pub override_deploy_policy: std::vec::Vec<std::string::String>,
11342
11343 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11344}
11345
11346impl ApproveRolloutRequest {
11347 pub fn new() -> Self {
11348 std::default::Default::default()
11349 }
11350
11351 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11353 self.name = v.into();
11354 self
11355 }
11356
11357 pub fn set_approved<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
11359 self.approved = v.into();
11360 self
11361 }
11362
11363 pub fn set_override_deploy_policy<T, V>(mut self, v: T) -> Self
11365 where
11366 T: std::iter::IntoIterator<Item = V>,
11367 V: std::convert::Into<std::string::String>,
11368 {
11369 use std::iter::Iterator;
11370 self.override_deploy_policy = v.into_iter().map(|i| i.into()).collect();
11371 self
11372 }
11373}
11374
11375impl wkt::message::Message for ApproveRolloutRequest {
11376 fn typename() -> &'static str {
11377 "type.googleapis.com/google.cloud.deploy.v1.ApproveRolloutRequest"
11378 }
11379}
11380
11381#[derive(Clone, Default, PartialEq)]
11383#[non_exhaustive]
11384pub struct ApproveRolloutResponse {
11385 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11386}
11387
11388impl ApproveRolloutResponse {
11389 pub fn new() -> Self {
11390 std::default::Default::default()
11391 }
11392}
11393
11394impl wkt::message::Message for ApproveRolloutResponse {
11395 fn typename() -> &'static str {
11396 "type.googleapis.com/google.cloud.deploy.v1.ApproveRolloutResponse"
11397 }
11398}
11399
11400#[derive(Clone, Default, PartialEq)]
11402#[non_exhaustive]
11403pub struct AdvanceRolloutRequest {
11404 pub name: std::string::String,
11407
11408 pub phase_id: std::string::String,
11410
11411 pub override_deploy_policy: std::vec::Vec<std::string::String>,
11414
11415 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11416}
11417
11418impl AdvanceRolloutRequest {
11419 pub fn new() -> Self {
11420 std::default::Default::default()
11421 }
11422
11423 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11425 self.name = v.into();
11426 self
11427 }
11428
11429 pub fn set_phase_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11431 self.phase_id = v.into();
11432 self
11433 }
11434
11435 pub fn set_override_deploy_policy<T, V>(mut self, v: T) -> Self
11437 where
11438 T: std::iter::IntoIterator<Item = V>,
11439 V: std::convert::Into<std::string::String>,
11440 {
11441 use std::iter::Iterator;
11442 self.override_deploy_policy = v.into_iter().map(|i| i.into()).collect();
11443 self
11444 }
11445}
11446
11447impl wkt::message::Message for AdvanceRolloutRequest {
11448 fn typename() -> &'static str {
11449 "type.googleapis.com/google.cloud.deploy.v1.AdvanceRolloutRequest"
11450 }
11451}
11452
11453#[derive(Clone, Default, PartialEq)]
11455#[non_exhaustive]
11456pub struct AdvanceRolloutResponse {
11457 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11458}
11459
11460impl AdvanceRolloutResponse {
11461 pub fn new() -> Self {
11462 std::default::Default::default()
11463 }
11464}
11465
11466impl wkt::message::Message for AdvanceRolloutResponse {
11467 fn typename() -> &'static str {
11468 "type.googleapis.com/google.cloud.deploy.v1.AdvanceRolloutResponse"
11469 }
11470}
11471
11472#[derive(Clone, Default, PartialEq)]
11474#[non_exhaustive]
11475pub struct CancelRolloutRequest {
11476 pub name: std::string::String,
11479
11480 pub override_deploy_policy: std::vec::Vec<std::string::String>,
11483
11484 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11485}
11486
11487impl CancelRolloutRequest {
11488 pub fn new() -> Self {
11489 std::default::Default::default()
11490 }
11491
11492 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11494 self.name = v.into();
11495 self
11496 }
11497
11498 pub fn set_override_deploy_policy<T, V>(mut self, v: T) -> Self
11500 where
11501 T: std::iter::IntoIterator<Item = V>,
11502 V: std::convert::Into<std::string::String>,
11503 {
11504 use std::iter::Iterator;
11505 self.override_deploy_policy = v.into_iter().map(|i| i.into()).collect();
11506 self
11507 }
11508}
11509
11510impl wkt::message::Message for CancelRolloutRequest {
11511 fn typename() -> &'static str {
11512 "type.googleapis.com/google.cloud.deploy.v1.CancelRolloutRequest"
11513 }
11514}
11515
11516#[derive(Clone, Default, PartialEq)]
11518#[non_exhaustive]
11519pub struct CancelRolloutResponse {
11520 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11521}
11522
11523impl CancelRolloutResponse {
11524 pub fn new() -> Self {
11525 std::default::Default::default()
11526 }
11527}
11528
11529impl wkt::message::Message for CancelRolloutResponse {
11530 fn typename() -> &'static str {
11531 "type.googleapis.com/google.cloud.deploy.v1.CancelRolloutResponse"
11532 }
11533}
11534
11535#[derive(Clone, Default, PartialEq)]
11537#[non_exhaustive]
11538pub struct IgnoreJobRequest {
11539 pub rollout: std::string::String,
11542
11543 pub phase_id: std::string::String,
11545
11546 pub job_id: std::string::String,
11548
11549 pub override_deploy_policy: std::vec::Vec<std::string::String>,
11552
11553 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11554}
11555
11556impl IgnoreJobRequest {
11557 pub fn new() -> Self {
11558 std::default::Default::default()
11559 }
11560
11561 pub fn set_rollout<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11563 self.rollout = v.into();
11564 self
11565 }
11566
11567 pub fn set_phase_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11569 self.phase_id = v.into();
11570 self
11571 }
11572
11573 pub fn set_job_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11575 self.job_id = v.into();
11576 self
11577 }
11578
11579 pub fn set_override_deploy_policy<T, V>(mut self, v: T) -> Self
11581 where
11582 T: std::iter::IntoIterator<Item = V>,
11583 V: std::convert::Into<std::string::String>,
11584 {
11585 use std::iter::Iterator;
11586 self.override_deploy_policy = v.into_iter().map(|i| i.into()).collect();
11587 self
11588 }
11589}
11590
11591impl wkt::message::Message for IgnoreJobRequest {
11592 fn typename() -> &'static str {
11593 "type.googleapis.com/google.cloud.deploy.v1.IgnoreJobRequest"
11594 }
11595}
11596
11597#[derive(Clone, Default, PartialEq)]
11599#[non_exhaustive]
11600pub struct IgnoreJobResponse {
11601 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11602}
11603
11604impl IgnoreJobResponse {
11605 pub fn new() -> Self {
11606 std::default::Default::default()
11607 }
11608}
11609
11610impl wkt::message::Message for IgnoreJobResponse {
11611 fn typename() -> &'static str {
11612 "type.googleapis.com/google.cloud.deploy.v1.IgnoreJobResponse"
11613 }
11614}
11615
11616#[derive(Clone, Default, PartialEq)]
11618#[non_exhaustive]
11619pub struct RetryJobRequest {
11620 pub rollout: std::string::String,
11623
11624 pub phase_id: std::string::String,
11626
11627 pub job_id: std::string::String,
11629
11630 pub override_deploy_policy: std::vec::Vec<std::string::String>,
11633
11634 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11635}
11636
11637impl RetryJobRequest {
11638 pub fn new() -> Self {
11639 std::default::Default::default()
11640 }
11641
11642 pub fn set_rollout<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11644 self.rollout = v.into();
11645 self
11646 }
11647
11648 pub fn set_phase_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11650 self.phase_id = v.into();
11651 self
11652 }
11653
11654 pub fn set_job_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11656 self.job_id = v.into();
11657 self
11658 }
11659
11660 pub fn set_override_deploy_policy<T, V>(mut self, v: T) -> Self
11662 where
11663 T: std::iter::IntoIterator<Item = V>,
11664 V: std::convert::Into<std::string::String>,
11665 {
11666 use std::iter::Iterator;
11667 self.override_deploy_policy = v.into_iter().map(|i| i.into()).collect();
11668 self
11669 }
11670}
11671
11672impl wkt::message::Message for RetryJobRequest {
11673 fn typename() -> &'static str {
11674 "type.googleapis.com/google.cloud.deploy.v1.RetryJobRequest"
11675 }
11676}
11677
11678#[derive(Clone, Default, PartialEq)]
11680#[non_exhaustive]
11681pub struct RetryJobResponse {
11682 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11683}
11684
11685impl RetryJobResponse {
11686 pub fn new() -> Self {
11687 std::default::Default::default()
11688 }
11689}
11690
11691impl wkt::message::Message for RetryJobResponse {
11692 fn typename() -> &'static str {
11693 "type.googleapis.com/google.cloud.deploy.v1.RetryJobResponse"
11694 }
11695}
11696
11697#[derive(Clone, Default, PartialEq)]
11699#[non_exhaustive]
11700pub struct AbandonReleaseRequest {
11701 pub name: std::string::String,
11704
11705 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11706}
11707
11708impl AbandonReleaseRequest {
11709 pub fn new() -> Self {
11710 std::default::Default::default()
11711 }
11712
11713 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11715 self.name = v.into();
11716 self
11717 }
11718}
11719
11720impl wkt::message::Message for AbandonReleaseRequest {
11721 fn typename() -> &'static str {
11722 "type.googleapis.com/google.cloud.deploy.v1.AbandonReleaseRequest"
11723 }
11724}
11725
11726#[derive(Clone, Default, PartialEq)]
11728#[non_exhaustive]
11729pub struct AbandonReleaseResponse {
11730 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11731}
11732
11733impl AbandonReleaseResponse {
11734 pub fn new() -> Self {
11735 std::default::Default::default()
11736 }
11737}
11738
11739impl wkt::message::Message for AbandonReleaseResponse {
11740 fn typename() -> &'static str {
11741 "type.googleapis.com/google.cloud.deploy.v1.AbandonReleaseResponse"
11742 }
11743}
11744
11745#[derive(Clone, Default, PartialEq)]
11749#[non_exhaustive]
11750pub struct JobRun {
11751 pub name: std::string::String,
11754
11755 pub uid: std::string::String,
11757
11758 pub phase_id: std::string::String,
11760
11761 pub job_id: std::string::String,
11763
11764 pub create_time: std::option::Option<wkt::Timestamp>,
11766
11767 pub start_time: std::option::Option<wkt::Timestamp>,
11769
11770 pub end_time: std::option::Option<wkt::Timestamp>,
11772
11773 pub state: crate::model::job_run::State,
11775
11776 pub etag: std::string::String,
11780
11781 pub job_run: std::option::Option<crate::model::job_run::JobRun>,
11783
11784 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11785}
11786
11787impl JobRun {
11788 pub fn new() -> Self {
11789 std::default::Default::default()
11790 }
11791
11792 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11794 self.name = v.into();
11795 self
11796 }
11797
11798 pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11800 self.uid = v.into();
11801 self
11802 }
11803
11804 pub fn set_phase_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11806 self.phase_id = v.into();
11807 self
11808 }
11809
11810 pub fn set_job_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11812 self.job_id = v.into();
11813 self
11814 }
11815
11816 pub fn set_create_time<T>(mut self, v: T) -> Self
11818 where
11819 T: std::convert::Into<wkt::Timestamp>,
11820 {
11821 self.create_time = std::option::Option::Some(v.into());
11822 self
11823 }
11824
11825 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
11827 where
11828 T: std::convert::Into<wkt::Timestamp>,
11829 {
11830 self.create_time = v.map(|x| x.into());
11831 self
11832 }
11833
11834 pub fn set_start_time<T>(mut self, v: T) -> Self
11836 where
11837 T: std::convert::Into<wkt::Timestamp>,
11838 {
11839 self.start_time = std::option::Option::Some(v.into());
11840 self
11841 }
11842
11843 pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
11845 where
11846 T: std::convert::Into<wkt::Timestamp>,
11847 {
11848 self.start_time = v.map(|x| x.into());
11849 self
11850 }
11851
11852 pub fn set_end_time<T>(mut self, v: T) -> Self
11854 where
11855 T: std::convert::Into<wkt::Timestamp>,
11856 {
11857 self.end_time = std::option::Option::Some(v.into());
11858 self
11859 }
11860
11861 pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
11863 where
11864 T: std::convert::Into<wkt::Timestamp>,
11865 {
11866 self.end_time = v.map(|x| x.into());
11867 self
11868 }
11869
11870 pub fn set_state<T: std::convert::Into<crate::model::job_run::State>>(mut self, v: T) -> Self {
11872 self.state = v.into();
11873 self
11874 }
11875
11876 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11878 self.etag = v.into();
11879 self
11880 }
11881
11882 pub fn set_job_run<
11887 T: std::convert::Into<std::option::Option<crate::model::job_run::JobRun>>,
11888 >(
11889 mut self,
11890 v: T,
11891 ) -> Self {
11892 self.job_run = v.into();
11893 self
11894 }
11895
11896 pub fn deploy_job_run(
11900 &self,
11901 ) -> std::option::Option<&std::boxed::Box<crate::model::DeployJobRun>> {
11902 #[allow(unreachable_patterns)]
11903 self.job_run.as_ref().and_then(|v| match v {
11904 crate::model::job_run::JobRun::DeployJobRun(v) => std::option::Option::Some(v),
11905 _ => std::option::Option::None,
11906 })
11907 }
11908
11909 pub fn set_deploy_job_run<
11915 T: std::convert::Into<std::boxed::Box<crate::model::DeployJobRun>>,
11916 >(
11917 mut self,
11918 v: T,
11919 ) -> Self {
11920 self.job_run =
11921 std::option::Option::Some(crate::model::job_run::JobRun::DeployJobRun(v.into()));
11922 self
11923 }
11924
11925 pub fn verify_job_run(
11929 &self,
11930 ) -> std::option::Option<&std::boxed::Box<crate::model::VerifyJobRun>> {
11931 #[allow(unreachable_patterns)]
11932 self.job_run.as_ref().and_then(|v| match v {
11933 crate::model::job_run::JobRun::VerifyJobRun(v) => std::option::Option::Some(v),
11934 _ => std::option::Option::None,
11935 })
11936 }
11937
11938 pub fn set_verify_job_run<
11944 T: std::convert::Into<std::boxed::Box<crate::model::VerifyJobRun>>,
11945 >(
11946 mut self,
11947 v: T,
11948 ) -> Self {
11949 self.job_run =
11950 std::option::Option::Some(crate::model::job_run::JobRun::VerifyJobRun(v.into()));
11951 self
11952 }
11953
11954 pub fn predeploy_job_run(
11958 &self,
11959 ) -> std::option::Option<&std::boxed::Box<crate::model::PredeployJobRun>> {
11960 #[allow(unreachable_patterns)]
11961 self.job_run.as_ref().and_then(|v| match v {
11962 crate::model::job_run::JobRun::PredeployJobRun(v) => std::option::Option::Some(v),
11963 _ => std::option::Option::None,
11964 })
11965 }
11966
11967 pub fn set_predeploy_job_run<
11973 T: std::convert::Into<std::boxed::Box<crate::model::PredeployJobRun>>,
11974 >(
11975 mut self,
11976 v: T,
11977 ) -> Self {
11978 self.job_run =
11979 std::option::Option::Some(crate::model::job_run::JobRun::PredeployJobRun(v.into()));
11980 self
11981 }
11982
11983 pub fn postdeploy_job_run(
11987 &self,
11988 ) -> std::option::Option<&std::boxed::Box<crate::model::PostdeployJobRun>> {
11989 #[allow(unreachable_patterns)]
11990 self.job_run.as_ref().and_then(|v| match v {
11991 crate::model::job_run::JobRun::PostdeployJobRun(v) => std::option::Option::Some(v),
11992 _ => std::option::Option::None,
11993 })
11994 }
11995
11996 pub fn set_postdeploy_job_run<
12002 T: std::convert::Into<std::boxed::Box<crate::model::PostdeployJobRun>>,
12003 >(
12004 mut self,
12005 v: T,
12006 ) -> Self {
12007 self.job_run =
12008 std::option::Option::Some(crate::model::job_run::JobRun::PostdeployJobRun(v.into()));
12009 self
12010 }
12011
12012 pub fn create_child_rollout_job_run(
12016 &self,
12017 ) -> std::option::Option<&std::boxed::Box<crate::model::CreateChildRolloutJobRun>> {
12018 #[allow(unreachable_patterns)]
12019 self.job_run.as_ref().and_then(|v| match v {
12020 crate::model::job_run::JobRun::CreateChildRolloutJobRun(v) => {
12021 std::option::Option::Some(v)
12022 }
12023 _ => std::option::Option::None,
12024 })
12025 }
12026
12027 pub fn set_create_child_rollout_job_run<
12033 T: std::convert::Into<std::boxed::Box<crate::model::CreateChildRolloutJobRun>>,
12034 >(
12035 mut self,
12036 v: T,
12037 ) -> Self {
12038 self.job_run = std::option::Option::Some(
12039 crate::model::job_run::JobRun::CreateChildRolloutJobRun(v.into()),
12040 );
12041 self
12042 }
12043
12044 pub fn advance_child_rollout_job_run(
12048 &self,
12049 ) -> std::option::Option<&std::boxed::Box<crate::model::AdvanceChildRolloutJobRun>> {
12050 #[allow(unreachable_patterns)]
12051 self.job_run.as_ref().and_then(|v| match v {
12052 crate::model::job_run::JobRun::AdvanceChildRolloutJobRun(v) => {
12053 std::option::Option::Some(v)
12054 }
12055 _ => std::option::Option::None,
12056 })
12057 }
12058
12059 pub fn set_advance_child_rollout_job_run<
12065 T: std::convert::Into<std::boxed::Box<crate::model::AdvanceChildRolloutJobRun>>,
12066 >(
12067 mut self,
12068 v: T,
12069 ) -> Self {
12070 self.job_run = std::option::Option::Some(
12071 crate::model::job_run::JobRun::AdvanceChildRolloutJobRun(v.into()),
12072 );
12073 self
12074 }
12075}
12076
12077impl wkt::message::Message for JobRun {
12078 fn typename() -> &'static str {
12079 "type.googleapis.com/google.cloud.deploy.v1.JobRun"
12080 }
12081}
12082
12083pub mod job_run {
12085 #[allow(unused_imports)]
12086 use super::*;
12087
12088 #[derive(Clone, Debug, PartialEq)]
12104 #[non_exhaustive]
12105 pub enum State {
12106 Unspecified,
12108 InProgress,
12110 Succeeded,
12112 Failed,
12114 Terminating,
12116 Terminated,
12118 UnknownValue(state::UnknownValue),
12123 }
12124
12125 #[doc(hidden)]
12126 pub mod state {
12127 #[allow(unused_imports)]
12128 use super::*;
12129 #[derive(Clone, Debug, PartialEq)]
12130 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
12131 }
12132
12133 impl State {
12134 pub fn value(&self) -> std::option::Option<i32> {
12139 match self {
12140 Self::Unspecified => std::option::Option::Some(0),
12141 Self::InProgress => std::option::Option::Some(1),
12142 Self::Succeeded => std::option::Option::Some(2),
12143 Self::Failed => std::option::Option::Some(3),
12144 Self::Terminating => std::option::Option::Some(4),
12145 Self::Terminated => std::option::Option::Some(5),
12146 Self::UnknownValue(u) => u.0.value(),
12147 }
12148 }
12149
12150 pub fn name(&self) -> std::option::Option<&str> {
12155 match self {
12156 Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
12157 Self::InProgress => std::option::Option::Some("IN_PROGRESS"),
12158 Self::Succeeded => std::option::Option::Some("SUCCEEDED"),
12159 Self::Failed => std::option::Option::Some("FAILED"),
12160 Self::Terminating => std::option::Option::Some("TERMINATING"),
12161 Self::Terminated => std::option::Option::Some("TERMINATED"),
12162 Self::UnknownValue(u) => u.0.name(),
12163 }
12164 }
12165 }
12166
12167 impl std::default::Default for State {
12168 fn default() -> Self {
12169 use std::convert::From;
12170 Self::from(0)
12171 }
12172 }
12173
12174 impl std::fmt::Display for State {
12175 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
12176 wkt::internal::display_enum(f, self.name(), self.value())
12177 }
12178 }
12179
12180 impl std::convert::From<i32> for State {
12181 fn from(value: i32) -> Self {
12182 match value {
12183 0 => Self::Unspecified,
12184 1 => Self::InProgress,
12185 2 => Self::Succeeded,
12186 3 => Self::Failed,
12187 4 => Self::Terminating,
12188 5 => Self::Terminated,
12189 _ => Self::UnknownValue(state::UnknownValue(
12190 wkt::internal::UnknownEnumValue::Integer(value),
12191 )),
12192 }
12193 }
12194 }
12195
12196 impl std::convert::From<&str> for State {
12197 fn from(value: &str) -> Self {
12198 use std::string::ToString;
12199 match value {
12200 "STATE_UNSPECIFIED" => Self::Unspecified,
12201 "IN_PROGRESS" => Self::InProgress,
12202 "SUCCEEDED" => Self::Succeeded,
12203 "FAILED" => Self::Failed,
12204 "TERMINATING" => Self::Terminating,
12205 "TERMINATED" => Self::Terminated,
12206 _ => Self::UnknownValue(state::UnknownValue(
12207 wkt::internal::UnknownEnumValue::String(value.to_string()),
12208 )),
12209 }
12210 }
12211 }
12212
12213 impl serde::ser::Serialize for State {
12214 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12215 where
12216 S: serde::Serializer,
12217 {
12218 match self {
12219 Self::Unspecified => serializer.serialize_i32(0),
12220 Self::InProgress => serializer.serialize_i32(1),
12221 Self::Succeeded => serializer.serialize_i32(2),
12222 Self::Failed => serializer.serialize_i32(3),
12223 Self::Terminating => serializer.serialize_i32(4),
12224 Self::Terminated => serializer.serialize_i32(5),
12225 Self::UnknownValue(u) => u.0.serialize(serializer),
12226 }
12227 }
12228 }
12229
12230 impl<'de> serde::de::Deserialize<'de> for State {
12231 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12232 where
12233 D: serde::Deserializer<'de>,
12234 {
12235 deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
12236 ".google.cloud.deploy.v1.JobRun.State",
12237 ))
12238 }
12239 }
12240
12241 #[derive(Clone, Debug, PartialEq)]
12243 #[non_exhaustive]
12244 pub enum JobRun {
12245 DeployJobRun(std::boxed::Box<crate::model::DeployJobRun>),
12247 VerifyJobRun(std::boxed::Box<crate::model::VerifyJobRun>),
12249 PredeployJobRun(std::boxed::Box<crate::model::PredeployJobRun>),
12251 PostdeployJobRun(std::boxed::Box<crate::model::PostdeployJobRun>),
12253 CreateChildRolloutJobRun(std::boxed::Box<crate::model::CreateChildRolloutJobRun>),
12255 AdvanceChildRolloutJobRun(std::boxed::Box<crate::model::AdvanceChildRolloutJobRun>),
12257 }
12258}
12259
12260#[derive(Clone, Default, PartialEq)]
12262#[non_exhaustive]
12263pub struct DeployJobRun {
12264 pub build: std::string::String,
12268
12269 pub failure_cause: crate::model::deploy_job_run::FailureCause,
12272
12273 pub failure_message: std::string::String,
12275
12276 pub metadata: std::option::Option<crate::model::DeployJobRunMetadata>,
12278
12279 pub artifact: std::option::Option<crate::model::DeployArtifact>,
12281
12282 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12283}
12284
12285impl DeployJobRun {
12286 pub fn new() -> Self {
12287 std::default::Default::default()
12288 }
12289
12290 pub fn set_build<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12292 self.build = v.into();
12293 self
12294 }
12295
12296 pub fn set_failure_cause<T: std::convert::Into<crate::model::deploy_job_run::FailureCause>>(
12298 mut self,
12299 v: T,
12300 ) -> Self {
12301 self.failure_cause = v.into();
12302 self
12303 }
12304
12305 pub fn set_failure_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12307 self.failure_message = v.into();
12308 self
12309 }
12310
12311 pub fn set_metadata<T>(mut self, v: T) -> Self
12313 where
12314 T: std::convert::Into<crate::model::DeployJobRunMetadata>,
12315 {
12316 self.metadata = std::option::Option::Some(v.into());
12317 self
12318 }
12319
12320 pub fn set_or_clear_metadata<T>(mut self, v: std::option::Option<T>) -> Self
12322 where
12323 T: std::convert::Into<crate::model::DeployJobRunMetadata>,
12324 {
12325 self.metadata = v.map(|x| x.into());
12326 self
12327 }
12328
12329 pub fn set_artifact<T>(mut self, v: T) -> Self
12331 where
12332 T: std::convert::Into<crate::model::DeployArtifact>,
12333 {
12334 self.artifact = std::option::Option::Some(v.into());
12335 self
12336 }
12337
12338 pub fn set_or_clear_artifact<T>(mut self, v: std::option::Option<T>) -> Self
12340 where
12341 T: std::convert::Into<crate::model::DeployArtifact>,
12342 {
12343 self.artifact = v.map(|x| x.into());
12344 self
12345 }
12346}
12347
12348impl wkt::message::Message for DeployJobRun {
12349 fn typename() -> &'static str {
12350 "type.googleapis.com/google.cloud.deploy.v1.DeployJobRun"
12351 }
12352}
12353
12354pub mod deploy_job_run {
12356 #[allow(unused_imports)]
12357 use super::*;
12358
12359 #[derive(Clone, Debug, PartialEq)]
12375 #[non_exhaustive]
12376 pub enum FailureCause {
12377 Unspecified,
12379 CloudBuildUnavailable,
12383 ExecutionFailed,
12386 DeadlineExceeded,
12388 MissingResourcesForCanary,
12391 CloudBuildRequestFailed,
12394 DeployFeatureNotSupported,
12396 UnknownValue(failure_cause::UnknownValue),
12401 }
12402
12403 #[doc(hidden)]
12404 pub mod failure_cause {
12405 #[allow(unused_imports)]
12406 use super::*;
12407 #[derive(Clone, Debug, PartialEq)]
12408 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
12409 }
12410
12411 impl FailureCause {
12412 pub fn value(&self) -> std::option::Option<i32> {
12417 match self {
12418 Self::Unspecified => std::option::Option::Some(0),
12419 Self::CloudBuildUnavailable => std::option::Option::Some(1),
12420 Self::ExecutionFailed => std::option::Option::Some(2),
12421 Self::DeadlineExceeded => std::option::Option::Some(3),
12422 Self::MissingResourcesForCanary => std::option::Option::Some(4),
12423 Self::CloudBuildRequestFailed => std::option::Option::Some(5),
12424 Self::DeployFeatureNotSupported => std::option::Option::Some(6),
12425 Self::UnknownValue(u) => u.0.value(),
12426 }
12427 }
12428
12429 pub fn name(&self) -> std::option::Option<&str> {
12434 match self {
12435 Self::Unspecified => std::option::Option::Some("FAILURE_CAUSE_UNSPECIFIED"),
12436 Self::CloudBuildUnavailable => std::option::Option::Some("CLOUD_BUILD_UNAVAILABLE"),
12437 Self::ExecutionFailed => std::option::Option::Some("EXECUTION_FAILED"),
12438 Self::DeadlineExceeded => std::option::Option::Some("DEADLINE_EXCEEDED"),
12439 Self::MissingResourcesForCanary => {
12440 std::option::Option::Some("MISSING_RESOURCES_FOR_CANARY")
12441 }
12442 Self::CloudBuildRequestFailed => {
12443 std::option::Option::Some("CLOUD_BUILD_REQUEST_FAILED")
12444 }
12445 Self::DeployFeatureNotSupported => {
12446 std::option::Option::Some("DEPLOY_FEATURE_NOT_SUPPORTED")
12447 }
12448 Self::UnknownValue(u) => u.0.name(),
12449 }
12450 }
12451 }
12452
12453 impl std::default::Default for FailureCause {
12454 fn default() -> Self {
12455 use std::convert::From;
12456 Self::from(0)
12457 }
12458 }
12459
12460 impl std::fmt::Display for FailureCause {
12461 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
12462 wkt::internal::display_enum(f, self.name(), self.value())
12463 }
12464 }
12465
12466 impl std::convert::From<i32> for FailureCause {
12467 fn from(value: i32) -> Self {
12468 match value {
12469 0 => Self::Unspecified,
12470 1 => Self::CloudBuildUnavailable,
12471 2 => Self::ExecutionFailed,
12472 3 => Self::DeadlineExceeded,
12473 4 => Self::MissingResourcesForCanary,
12474 5 => Self::CloudBuildRequestFailed,
12475 6 => Self::DeployFeatureNotSupported,
12476 _ => Self::UnknownValue(failure_cause::UnknownValue(
12477 wkt::internal::UnknownEnumValue::Integer(value),
12478 )),
12479 }
12480 }
12481 }
12482
12483 impl std::convert::From<&str> for FailureCause {
12484 fn from(value: &str) -> Self {
12485 use std::string::ToString;
12486 match value {
12487 "FAILURE_CAUSE_UNSPECIFIED" => Self::Unspecified,
12488 "CLOUD_BUILD_UNAVAILABLE" => Self::CloudBuildUnavailable,
12489 "EXECUTION_FAILED" => Self::ExecutionFailed,
12490 "DEADLINE_EXCEEDED" => Self::DeadlineExceeded,
12491 "MISSING_RESOURCES_FOR_CANARY" => Self::MissingResourcesForCanary,
12492 "CLOUD_BUILD_REQUEST_FAILED" => Self::CloudBuildRequestFailed,
12493 "DEPLOY_FEATURE_NOT_SUPPORTED" => Self::DeployFeatureNotSupported,
12494 _ => Self::UnknownValue(failure_cause::UnknownValue(
12495 wkt::internal::UnknownEnumValue::String(value.to_string()),
12496 )),
12497 }
12498 }
12499 }
12500
12501 impl serde::ser::Serialize for FailureCause {
12502 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12503 where
12504 S: serde::Serializer,
12505 {
12506 match self {
12507 Self::Unspecified => serializer.serialize_i32(0),
12508 Self::CloudBuildUnavailable => serializer.serialize_i32(1),
12509 Self::ExecutionFailed => serializer.serialize_i32(2),
12510 Self::DeadlineExceeded => serializer.serialize_i32(3),
12511 Self::MissingResourcesForCanary => serializer.serialize_i32(4),
12512 Self::CloudBuildRequestFailed => serializer.serialize_i32(5),
12513 Self::DeployFeatureNotSupported => serializer.serialize_i32(6),
12514 Self::UnknownValue(u) => u.0.serialize(serializer),
12515 }
12516 }
12517 }
12518
12519 impl<'de> serde::de::Deserialize<'de> for FailureCause {
12520 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12521 where
12522 D: serde::Deserializer<'de>,
12523 {
12524 deserializer.deserialize_any(wkt::internal::EnumVisitor::<FailureCause>::new(
12525 ".google.cloud.deploy.v1.DeployJobRun.FailureCause",
12526 ))
12527 }
12528 }
12529}
12530
12531#[derive(Clone, Default, PartialEq)]
12533#[non_exhaustive]
12534pub struct VerifyJobRun {
12535 pub build: std::string::String,
12539
12540 pub artifact_uri: std::string::String,
12543
12544 pub event_log_path: std::string::String,
12547
12548 pub failure_cause: crate::model::verify_job_run::FailureCause,
12551
12552 pub failure_message: std::string::String,
12554
12555 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12556}
12557
12558impl VerifyJobRun {
12559 pub fn new() -> Self {
12560 std::default::Default::default()
12561 }
12562
12563 pub fn set_build<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12565 self.build = v.into();
12566 self
12567 }
12568
12569 pub fn set_artifact_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12571 self.artifact_uri = v.into();
12572 self
12573 }
12574
12575 pub fn set_event_log_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12577 self.event_log_path = v.into();
12578 self
12579 }
12580
12581 pub fn set_failure_cause<T: std::convert::Into<crate::model::verify_job_run::FailureCause>>(
12583 mut self,
12584 v: T,
12585 ) -> Self {
12586 self.failure_cause = v.into();
12587 self
12588 }
12589
12590 pub fn set_failure_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12592 self.failure_message = v.into();
12593 self
12594 }
12595}
12596
12597impl wkt::message::Message for VerifyJobRun {
12598 fn typename() -> &'static str {
12599 "type.googleapis.com/google.cloud.deploy.v1.VerifyJobRun"
12600 }
12601}
12602
12603pub mod verify_job_run {
12605 #[allow(unused_imports)]
12606 use super::*;
12607
12608 #[derive(Clone, Debug, PartialEq)]
12624 #[non_exhaustive]
12625 pub enum FailureCause {
12626 Unspecified,
12628 CloudBuildUnavailable,
12632 ExecutionFailed,
12635 DeadlineExceeded,
12637 VerificationConfigNotFound,
12639 CloudBuildRequestFailed,
12642 UnknownValue(failure_cause::UnknownValue),
12647 }
12648
12649 #[doc(hidden)]
12650 pub mod failure_cause {
12651 #[allow(unused_imports)]
12652 use super::*;
12653 #[derive(Clone, Debug, PartialEq)]
12654 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
12655 }
12656
12657 impl FailureCause {
12658 pub fn value(&self) -> std::option::Option<i32> {
12663 match self {
12664 Self::Unspecified => std::option::Option::Some(0),
12665 Self::CloudBuildUnavailable => std::option::Option::Some(1),
12666 Self::ExecutionFailed => std::option::Option::Some(2),
12667 Self::DeadlineExceeded => std::option::Option::Some(3),
12668 Self::VerificationConfigNotFound => std::option::Option::Some(4),
12669 Self::CloudBuildRequestFailed => std::option::Option::Some(5),
12670 Self::UnknownValue(u) => u.0.value(),
12671 }
12672 }
12673
12674 pub fn name(&self) -> std::option::Option<&str> {
12679 match self {
12680 Self::Unspecified => std::option::Option::Some("FAILURE_CAUSE_UNSPECIFIED"),
12681 Self::CloudBuildUnavailable => std::option::Option::Some("CLOUD_BUILD_UNAVAILABLE"),
12682 Self::ExecutionFailed => std::option::Option::Some("EXECUTION_FAILED"),
12683 Self::DeadlineExceeded => std::option::Option::Some("DEADLINE_EXCEEDED"),
12684 Self::VerificationConfigNotFound => {
12685 std::option::Option::Some("VERIFICATION_CONFIG_NOT_FOUND")
12686 }
12687 Self::CloudBuildRequestFailed => {
12688 std::option::Option::Some("CLOUD_BUILD_REQUEST_FAILED")
12689 }
12690 Self::UnknownValue(u) => u.0.name(),
12691 }
12692 }
12693 }
12694
12695 impl std::default::Default for FailureCause {
12696 fn default() -> Self {
12697 use std::convert::From;
12698 Self::from(0)
12699 }
12700 }
12701
12702 impl std::fmt::Display for FailureCause {
12703 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
12704 wkt::internal::display_enum(f, self.name(), self.value())
12705 }
12706 }
12707
12708 impl std::convert::From<i32> for FailureCause {
12709 fn from(value: i32) -> Self {
12710 match value {
12711 0 => Self::Unspecified,
12712 1 => Self::CloudBuildUnavailable,
12713 2 => Self::ExecutionFailed,
12714 3 => Self::DeadlineExceeded,
12715 4 => Self::VerificationConfigNotFound,
12716 5 => Self::CloudBuildRequestFailed,
12717 _ => Self::UnknownValue(failure_cause::UnknownValue(
12718 wkt::internal::UnknownEnumValue::Integer(value),
12719 )),
12720 }
12721 }
12722 }
12723
12724 impl std::convert::From<&str> for FailureCause {
12725 fn from(value: &str) -> Self {
12726 use std::string::ToString;
12727 match value {
12728 "FAILURE_CAUSE_UNSPECIFIED" => Self::Unspecified,
12729 "CLOUD_BUILD_UNAVAILABLE" => Self::CloudBuildUnavailable,
12730 "EXECUTION_FAILED" => Self::ExecutionFailed,
12731 "DEADLINE_EXCEEDED" => Self::DeadlineExceeded,
12732 "VERIFICATION_CONFIG_NOT_FOUND" => Self::VerificationConfigNotFound,
12733 "CLOUD_BUILD_REQUEST_FAILED" => Self::CloudBuildRequestFailed,
12734 _ => Self::UnknownValue(failure_cause::UnknownValue(
12735 wkt::internal::UnknownEnumValue::String(value.to_string()),
12736 )),
12737 }
12738 }
12739 }
12740
12741 impl serde::ser::Serialize for FailureCause {
12742 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12743 where
12744 S: serde::Serializer,
12745 {
12746 match self {
12747 Self::Unspecified => serializer.serialize_i32(0),
12748 Self::CloudBuildUnavailable => serializer.serialize_i32(1),
12749 Self::ExecutionFailed => serializer.serialize_i32(2),
12750 Self::DeadlineExceeded => serializer.serialize_i32(3),
12751 Self::VerificationConfigNotFound => serializer.serialize_i32(4),
12752 Self::CloudBuildRequestFailed => serializer.serialize_i32(5),
12753 Self::UnknownValue(u) => u.0.serialize(serializer),
12754 }
12755 }
12756 }
12757
12758 impl<'de> serde::de::Deserialize<'de> for FailureCause {
12759 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12760 where
12761 D: serde::Deserializer<'de>,
12762 {
12763 deserializer.deserialize_any(wkt::internal::EnumVisitor::<FailureCause>::new(
12764 ".google.cloud.deploy.v1.VerifyJobRun.FailureCause",
12765 ))
12766 }
12767 }
12768}
12769
12770#[derive(Clone, Default, PartialEq)]
12772#[non_exhaustive]
12773pub struct PredeployJobRun {
12774 pub build: std::string::String,
12778
12779 pub failure_cause: crate::model::predeploy_job_run::FailureCause,
12782
12783 pub failure_message: std::string::String,
12786
12787 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12788}
12789
12790impl PredeployJobRun {
12791 pub fn new() -> Self {
12792 std::default::Default::default()
12793 }
12794
12795 pub fn set_build<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12797 self.build = v.into();
12798 self
12799 }
12800
12801 pub fn set_failure_cause<
12803 T: std::convert::Into<crate::model::predeploy_job_run::FailureCause>,
12804 >(
12805 mut self,
12806 v: T,
12807 ) -> Self {
12808 self.failure_cause = v.into();
12809 self
12810 }
12811
12812 pub fn set_failure_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12814 self.failure_message = v.into();
12815 self
12816 }
12817}
12818
12819impl wkt::message::Message for PredeployJobRun {
12820 fn typename() -> &'static str {
12821 "type.googleapis.com/google.cloud.deploy.v1.PredeployJobRun"
12822 }
12823}
12824
12825pub mod predeploy_job_run {
12827 #[allow(unused_imports)]
12828 use super::*;
12829
12830 #[derive(Clone, Debug, PartialEq)]
12846 #[non_exhaustive]
12847 pub enum FailureCause {
12848 Unspecified,
12850 CloudBuildUnavailable,
12854 ExecutionFailed,
12857 DeadlineExceeded,
12859 CloudBuildRequestFailed,
12862 UnknownValue(failure_cause::UnknownValue),
12867 }
12868
12869 #[doc(hidden)]
12870 pub mod failure_cause {
12871 #[allow(unused_imports)]
12872 use super::*;
12873 #[derive(Clone, Debug, PartialEq)]
12874 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
12875 }
12876
12877 impl FailureCause {
12878 pub fn value(&self) -> std::option::Option<i32> {
12883 match self {
12884 Self::Unspecified => std::option::Option::Some(0),
12885 Self::CloudBuildUnavailable => std::option::Option::Some(1),
12886 Self::ExecutionFailed => std::option::Option::Some(2),
12887 Self::DeadlineExceeded => std::option::Option::Some(3),
12888 Self::CloudBuildRequestFailed => std::option::Option::Some(4),
12889 Self::UnknownValue(u) => u.0.value(),
12890 }
12891 }
12892
12893 pub fn name(&self) -> std::option::Option<&str> {
12898 match self {
12899 Self::Unspecified => std::option::Option::Some("FAILURE_CAUSE_UNSPECIFIED"),
12900 Self::CloudBuildUnavailable => std::option::Option::Some("CLOUD_BUILD_UNAVAILABLE"),
12901 Self::ExecutionFailed => std::option::Option::Some("EXECUTION_FAILED"),
12902 Self::DeadlineExceeded => std::option::Option::Some("DEADLINE_EXCEEDED"),
12903 Self::CloudBuildRequestFailed => {
12904 std::option::Option::Some("CLOUD_BUILD_REQUEST_FAILED")
12905 }
12906 Self::UnknownValue(u) => u.0.name(),
12907 }
12908 }
12909 }
12910
12911 impl std::default::Default for FailureCause {
12912 fn default() -> Self {
12913 use std::convert::From;
12914 Self::from(0)
12915 }
12916 }
12917
12918 impl std::fmt::Display for FailureCause {
12919 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
12920 wkt::internal::display_enum(f, self.name(), self.value())
12921 }
12922 }
12923
12924 impl std::convert::From<i32> for FailureCause {
12925 fn from(value: i32) -> Self {
12926 match value {
12927 0 => Self::Unspecified,
12928 1 => Self::CloudBuildUnavailable,
12929 2 => Self::ExecutionFailed,
12930 3 => Self::DeadlineExceeded,
12931 4 => Self::CloudBuildRequestFailed,
12932 _ => Self::UnknownValue(failure_cause::UnknownValue(
12933 wkt::internal::UnknownEnumValue::Integer(value),
12934 )),
12935 }
12936 }
12937 }
12938
12939 impl std::convert::From<&str> for FailureCause {
12940 fn from(value: &str) -> Self {
12941 use std::string::ToString;
12942 match value {
12943 "FAILURE_CAUSE_UNSPECIFIED" => Self::Unspecified,
12944 "CLOUD_BUILD_UNAVAILABLE" => Self::CloudBuildUnavailable,
12945 "EXECUTION_FAILED" => Self::ExecutionFailed,
12946 "DEADLINE_EXCEEDED" => Self::DeadlineExceeded,
12947 "CLOUD_BUILD_REQUEST_FAILED" => Self::CloudBuildRequestFailed,
12948 _ => Self::UnknownValue(failure_cause::UnknownValue(
12949 wkt::internal::UnknownEnumValue::String(value.to_string()),
12950 )),
12951 }
12952 }
12953 }
12954
12955 impl serde::ser::Serialize for FailureCause {
12956 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12957 where
12958 S: serde::Serializer,
12959 {
12960 match self {
12961 Self::Unspecified => serializer.serialize_i32(0),
12962 Self::CloudBuildUnavailable => serializer.serialize_i32(1),
12963 Self::ExecutionFailed => serializer.serialize_i32(2),
12964 Self::DeadlineExceeded => serializer.serialize_i32(3),
12965 Self::CloudBuildRequestFailed => serializer.serialize_i32(4),
12966 Self::UnknownValue(u) => u.0.serialize(serializer),
12967 }
12968 }
12969 }
12970
12971 impl<'de> serde::de::Deserialize<'de> for FailureCause {
12972 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12973 where
12974 D: serde::Deserializer<'de>,
12975 {
12976 deserializer.deserialize_any(wkt::internal::EnumVisitor::<FailureCause>::new(
12977 ".google.cloud.deploy.v1.PredeployJobRun.FailureCause",
12978 ))
12979 }
12980 }
12981}
12982
12983#[derive(Clone, Default, PartialEq)]
12985#[non_exhaustive]
12986pub struct PostdeployJobRun {
12987 pub build: std::string::String,
12991
12992 pub failure_cause: crate::model::postdeploy_job_run::FailureCause,
12995
12996 pub failure_message: std::string::String,
12999
13000 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13001}
13002
13003impl PostdeployJobRun {
13004 pub fn new() -> Self {
13005 std::default::Default::default()
13006 }
13007
13008 pub fn set_build<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13010 self.build = v.into();
13011 self
13012 }
13013
13014 pub fn set_failure_cause<
13016 T: std::convert::Into<crate::model::postdeploy_job_run::FailureCause>,
13017 >(
13018 mut self,
13019 v: T,
13020 ) -> Self {
13021 self.failure_cause = v.into();
13022 self
13023 }
13024
13025 pub fn set_failure_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13027 self.failure_message = v.into();
13028 self
13029 }
13030}
13031
13032impl wkt::message::Message for PostdeployJobRun {
13033 fn typename() -> &'static str {
13034 "type.googleapis.com/google.cloud.deploy.v1.PostdeployJobRun"
13035 }
13036}
13037
13038pub mod postdeploy_job_run {
13040 #[allow(unused_imports)]
13041 use super::*;
13042
13043 #[derive(Clone, Debug, PartialEq)]
13059 #[non_exhaustive]
13060 pub enum FailureCause {
13061 Unspecified,
13063 CloudBuildUnavailable,
13067 ExecutionFailed,
13070 DeadlineExceeded,
13072 CloudBuildRequestFailed,
13075 UnknownValue(failure_cause::UnknownValue),
13080 }
13081
13082 #[doc(hidden)]
13083 pub mod failure_cause {
13084 #[allow(unused_imports)]
13085 use super::*;
13086 #[derive(Clone, Debug, PartialEq)]
13087 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
13088 }
13089
13090 impl FailureCause {
13091 pub fn value(&self) -> std::option::Option<i32> {
13096 match self {
13097 Self::Unspecified => std::option::Option::Some(0),
13098 Self::CloudBuildUnavailable => std::option::Option::Some(1),
13099 Self::ExecutionFailed => std::option::Option::Some(2),
13100 Self::DeadlineExceeded => std::option::Option::Some(3),
13101 Self::CloudBuildRequestFailed => std::option::Option::Some(4),
13102 Self::UnknownValue(u) => u.0.value(),
13103 }
13104 }
13105
13106 pub fn name(&self) -> std::option::Option<&str> {
13111 match self {
13112 Self::Unspecified => std::option::Option::Some("FAILURE_CAUSE_UNSPECIFIED"),
13113 Self::CloudBuildUnavailable => std::option::Option::Some("CLOUD_BUILD_UNAVAILABLE"),
13114 Self::ExecutionFailed => std::option::Option::Some("EXECUTION_FAILED"),
13115 Self::DeadlineExceeded => std::option::Option::Some("DEADLINE_EXCEEDED"),
13116 Self::CloudBuildRequestFailed => {
13117 std::option::Option::Some("CLOUD_BUILD_REQUEST_FAILED")
13118 }
13119 Self::UnknownValue(u) => u.0.name(),
13120 }
13121 }
13122 }
13123
13124 impl std::default::Default for FailureCause {
13125 fn default() -> Self {
13126 use std::convert::From;
13127 Self::from(0)
13128 }
13129 }
13130
13131 impl std::fmt::Display for FailureCause {
13132 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
13133 wkt::internal::display_enum(f, self.name(), self.value())
13134 }
13135 }
13136
13137 impl std::convert::From<i32> for FailureCause {
13138 fn from(value: i32) -> Self {
13139 match value {
13140 0 => Self::Unspecified,
13141 1 => Self::CloudBuildUnavailable,
13142 2 => Self::ExecutionFailed,
13143 3 => Self::DeadlineExceeded,
13144 4 => Self::CloudBuildRequestFailed,
13145 _ => Self::UnknownValue(failure_cause::UnknownValue(
13146 wkt::internal::UnknownEnumValue::Integer(value),
13147 )),
13148 }
13149 }
13150 }
13151
13152 impl std::convert::From<&str> for FailureCause {
13153 fn from(value: &str) -> Self {
13154 use std::string::ToString;
13155 match value {
13156 "FAILURE_CAUSE_UNSPECIFIED" => Self::Unspecified,
13157 "CLOUD_BUILD_UNAVAILABLE" => Self::CloudBuildUnavailable,
13158 "EXECUTION_FAILED" => Self::ExecutionFailed,
13159 "DEADLINE_EXCEEDED" => Self::DeadlineExceeded,
13160 "CLOUD_BUILD_REQUEST_FAILED" => Self::CloudBuildRequestFailed,
13161 _ => Self::UnknownValue(failure_cause::UnknownValue(
13162 wkt::internal::UnknownEnumValue::String(value.to_string()),
13163 )),
13164 }
13165 }
13166 }
13167
13168 impl serde::ser::Serialize for FailureCause {
13169 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13170 where
13171 S: serde::Serializer,
13172 {
13173 match self {
13174 Self::Unspecified => serializer.serialize_i32(0),
13175 Self::CloudBuildUnavailable => serializer.serialize_i32(1),
13176 Self::ExecutionFailed => serializer.serialize_i32(2),
13177 Self::DeadlineExceeded => serializer.serialize_i32(3),
13178 Self::CloudBuildRequestFailed => serializer.serialize_i32(4),
13179 Self::UnknownValue(u) => u.0.serialize(serializer),
13180 }
13181 }
13182 }
13183
13184 impl<'de> serde::de::Deserialize<'de> for FailureCause {
13185 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13186 where
13187 D: serde::Deserializer<'de>,
13188 {
13189 deserializer.deserialize_any(wkt::internal::EnumVisitor::<FailureCause>::new(
13190 ".google.cloud.deploy.v1.PostdeployJobRun.FailureCause",
13191 ))
13192 }
13193 }
13194}
13195
13196#[derive(Clone, Default, PartialEq)]
13199#[non_exhaustive]
13200pub struct CreateChildRolloutJobRun {
13201 pub rollout: std::string::String,
13204
13205 pub rollout_phase_id: std::string::String,
13207
13208 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13209}
13210
13211impl CreateChildRolloutJobRun {
13212 pub fn new() -> Self {
13213 std::default::Default::default()
13214 }
13215
13216 pub fn set_rollout<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13218 self.rollout = v.into();
13219 self
13220 }
13221
13222 pub fn set_rollout_phase_id<T: std::convert::Into<std::string::String>>(
13224 mut self,
13225 v: T,
13226 ) -> Self {
13227 self.rollout_phase_id = v.into();
13228 self
13229 }
13230}
13231
13232impl wkt::message::Message for CreateChildRolloutJobRun {
13233 fn typename() -> &'static str {
13234 "type.googleapis.com/google.cloud.deploy.v1.CreateChildRolloutJobRun"
13235 }
13236}
13237
13238#[derive(Clone, Default, PartialEq)]
13241#[non_exhaustive]
13242pub struct AdvanceChildRolloutJobRun {
13243 pub rollout: std::string::String,
13246
13247 pub rollout_phase_id: std::string::String,
13249
13250 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13251}
13252
13253impl AdvanceChildRolloutJobRun {
13254 pub fn new() -> Self {
13255 std::default::Default::default()
13256 }
13257
13258 pub fn set_rollout<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13260 self.rollout = v.into();
13261 self
13262 }
13263
13264 pub fn set_rollout_phase_id<T: std::convert::Into<std::string::String>>(
13266 mut self,
13267 v: T,
13268 ) -> Self {
13269 self.rollout_phase_id = v.into();
13270 self
13271 }
13272}
13273
13274impl wkt::message::Message for AdvanceChildRolloutJobRun {
13275 fn typename() -> &'static str {
13276 "type.googleapis.com/google.cloud.deploy.v1.AdvanceChildRolloutJobRun"
13277 }
13278}
13279
13280#[derive(Clone, Default, PartialEq)]
13282#[non_exhaustive]
13283pub struct ListJobRunsRequest {
13284 pub parent: std::string::String,
13286
13287 pub page_size: i32,
13292
13293 pub page_token: std::string::String,
13299
13300 pub filter: std::string::String,
13303
13304 pub order_by: std::string::String,
13307
13308 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13309}
13310
13311impl ListJobRunsRequest {
13312 pub fn new() -> Self {
13313 std::default::Default::default()
13314 }
13315
13316 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13318 self.parent = v.into();
13319 self
13320 }
13321
13322 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
13324 self.page_size = v.into();
13325 self
13326 }
13327
13328 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13330 self.page_token = v.into();
13331 self
13332 }
13333
13334 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13336 self.filter = v.into();
13337 self
13338 }
13339
13340 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13342 self.order_by = v.into();
13343 self
13344 }
13345}
13346
13347impl wkt::message::Message for ListJobRunsRequest {
13348 fn typename() -> &'static str {
13349 "type.googleapis.com/google.cloud.deploy.v1.ListJobRunsRequest"
13350 }
13351}
13352
13353#[derive(Clone, Default, PartialEq)]
13355#[non_exhaustive]
13356pub struct ListJobRunsResponse {
13357 pub job_runs: std::vec::Vec<crate::model::JobRun>,
13359
13360 pub next_page_token: std::string::String,
13363
13364 pub unreachable: std::vec::Vec<std::string::String>,
13366
13367 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13368}
13369
13370impl ListJobRunsResponse {
13371 pub fn new() -> Self {
13372 std::default::Default::default()
13373 }
13374
13375 pub fn set_job_runs<T, V>(mut self, v: T) -> Self
13377 where
13378 T: std::iter::IntoIterator<Item = V>,
13379 V: std::convert::Into<crate::model::JobRun>,
13380 {
13381 use std::iter::Iterator;
13382 self.job_runs = v.into_iter().map(|i| i.into()).collect();
13383 self
13384 }
13385
13386 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13388 self.next_page_token = v.into();
13389 self
13390 }
13391
13392 pub fn set_unreachable<T, V>(mut self, v: T) -> Self
13394 where
13395 T: std::iter::IntoIterator<Item = V>,
13396 V: std::convert::Into<std::string::String>,
13397 {
13398 use std::iter::Iterator;
13399 self.unreachable = v.into_iter().map(|i| i.into()).collect();
13400 self
13401 }
13402}
13403
13404impl wkt::message::Message for ListJobRunsResponse {
13405 fn typename() -> &'static str {
13406 "type.googleapis.com/google.cloud.deploy.v1.ListJobRunsResponse"
13407 }
13408}
13409
13410#[doc(hidden)]
13411impl gax::paginator::internal::PageableResponse for ListJobRunsResponse {
13412 type PageItem = crate::model::JobRun;
13413
13414 fn items(self) -> std::vec::Vec<Self::PageItem> {
13415 self.job_runs
13416 }
13417
13418 fn next_page_token(&self) -> std::string::String {
13419 use std::clone::Clone;
13420 self.next_page_token.clone()
13421 }
13422}
13423
13424#[derive(Clone, Default, PartialEq)]
13426#[non_exhaustive]
13427pub struct GetJobRunRequest {
13428 pub name: std::string::String,
13431
13432 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13433}
13434
13435impl GetJobRunRequest {
13436 pub fn new() -> Self {
13437 std::default::Default::default()
13438 }
13439
13440 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13442 self.name = v.into();
13443 self
13444 }
13445}
13446
13447impl wkt::message::Message for GetJobRunRequest {
13448 fn typename() -> &'static str {
13449 "type.googleapis.com/google.cloud.deploy.v1.GetJobRunRequest"
13450 }
13451}
13452
13453#[derive(Clone, Default, PartialEq)]
13455#[non_exhaustive]
13456pub struct TerminateJobRunRequest {
13457 pub name: std::string::String,
13460
13461 pub override_deploy_policy: std::vec::Vec<std::string::String>,
13464
13465 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13466}
13467
13468impl TerminateJobRunRequest {
13469 pub fn new() -> Self {
13470 std::default::Default::default()
13471 }
13472
13473 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13475 self.name = v.into();
13476 self
13477 }
13478
13479 pub fn set_override_deploy_policy<T, V>(mut self, v: T) -> Self
13481 where
13482 T: std::iter::IntoIterator<Item = V>,
13483 V: std::convert::Into<std::string::String>,
13484 {
13485 use std::iter::Iterator;
13486 self.override_deploy_policy = v.into_iter().map(|i| i.into()).collect();
13487 self
13488 }
13489}
13490
13491impl wkt::message::Message for TerminateJobRunRequest {
13492 fn typename() -> &'static str {
13493 "type.googleapis.com/google.cloud.deploy.v1.TerminateJobRunRequest"
13494 }
13495}
13496
13497#[derive(Clone, Default, PartialEq)]
13499#[non_exhaustive]
13500pub struct TerminateJobRunResponse {
13501 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13502}
13503
13504impl TerminateJobRunResponse {
13505 pub fn new() -> Self {
13506 std::default::Default::default()
13507 }
13508}
13509
13510impl wkt::message::Message for TerminateJobRunResponse {
13511 fn typename() -> &'static str {
13512 "type.googleapis.com/google.cloud.deploy.v1.TerminateJobRunResponse"
13513 }
13514}
13515
13516#[derive(Clone, Default, PartialEq)]
13518#[non_exhaustive]
13519pub struct Config {
13520 pub name: std::string::String,
13522
13523 pub supported_versions: std::vec::Vec<crate::model::SkaffoldVersion>,
13525
13526 pub default_skaffold_version: std::string::String,
13529
13530 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13531}
13532
13533impl Config {
13534 pub fn new() -> Self {
13535 std::default::Default::default()
13536 }
13537
13538 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13540 self.name = v.into();
13541 self
13542 }
13543
13544 pub fn set_supported_versions<T, V>(mut self, v: T) -> Self
13546 where
13547 T: std::iter::IntoIterator<Item = V>,
13548 V: std::convert::Into<crate::model::SkaffoldVersion>,
13549 {
13550 use std::iter::Iterator;
13551 self.supported_versions = v.into_iter().map(|i| i.into()).collect();
13552 self
13553 }
13554
13555 pub fn set_default_skaffold_version<T: std::convert::Into<std::string::String>>(
13557 mut self,
13558 v: T,
13559 ) -> Self {
13560 self.default_skaffold_version = v.into();
13561 self
13562 }
13563}
13564
13565impl wkt::message::Message for Config {
13566 fn typename() -> &'static str {
13567 "type.googleapis.com/google.cloud.deploy.v1.Config"
13568 }
13569}
13570
13571#[derive(Clone, Default, PartialEq)]
13573#[non_exhaustive]
13574pub struct SkaffoldVersion {
13575 pub version: std::string::String,
13577
13578 pub maintenance_mode_time: std::option::Option<wkt::Timestamp>,
13580
13581 pub support_expiration_time: std::option::Option<wkt::Timestamp>,
13583
13584 pub support_end_date: std::option::Option<gtype::model::Date>,
13586
13587 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13588}
13589
13590impl SkaffoldVersion {
13591 pub fn new() -> Self {
13592 std::default::Default::default()
13593 }
13594
13595 pub fn set_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13597 self.version = v.into();
13598 self
13599 }
13600
13601 pub fn set_maintenance_mode_time<T>(mut self, v: T) -> Self
13603 where
13604 T: std::convert::Into<wkt::Timestamp>,
13605 {
13606 self.maintenance_mode_time = std::option::Option::Some(v.into());
13607 self
13608 }
13609
13610 pub fn set_or_clear_maintenance_mode_time<T>(mut self, v: std::option::Option<T>) -> Self
13612 where
13613 T: std::convert::Into<wkt::Timestamp>,
13614 {
13615 self.maintenance_mode_time = v.map(|x| x.into());
13616 self
13617 }
13618
13619 pub fn set_support_expiration_time<T>(mut self, v: T) -> Self
13621 where
13622 T: std::convert::Into<wkt::Timestamp>,
13623 {
13624 self.support_expiration_time = std::option::Option::Some(v.into());
13625 self
13626 }
13627
13628 pub fn set_or_clear_support_expiration_time<T>(mut self, v: std::option::Option<T>) -> Self
13630 where
13631 T: std::convert::Into<wkt::Timestamp>,
13632 {
13633 self.support_expiration_time = v.map(|x| x.into());
13634 self
13635 }
13636
13637 pub fn set_support_end_date<T>(mut self, v: T) -> Self
13639 where
13640 T: std::convert::Into<gtype::model::Date>,
13641 {
13642 self.support_end_date = std::option::Option::Some(v.into());
13643 self
13644 }
13645
13646 pub fn set_or_clear_support_end_date<T>(mut self, v: std::option::Option<T>) -> Self
13648 where
13649 T: std::convert::Into<gtype::model::Date>,
13650 {
13651 self.support_end_date = v.map(|x| x.into());
13652 self
13653 }
13654}
13655
13656impl wkt::message::Message for SkaffoldVersion {
13657 fn typename() -> &'static str {
13658 "type.googleapis.com/google.cloud.deploy.v1.SkaffoldVersion"
13659 }
13660}
13661
13662#[derive(Clone, Default, PartialEq)]
13664#[non_exhaustive]
13665pub struct GetConfigRequest {
13666 pub name: std::string::String,
13668
13669 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13670}
13671
13672impl GetConfigRequest {
13673 pub fn new() -> Self {
13674 std::default::Default::default()
13675 }
13676
13677 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13679 self.name = v.into();
13680 self
13681 }
13682}
13683
13684impl wkt::message::Message for GetConfigRequest {
13685 fn typename() -> &'static str {
13686 "type.googleapis.com/google.cloud.deploy.v1.GetConfigRequest"
13687 }
13688}
13689
13690#[derive(Clone, Default, PartialEq)]
13698#[non_exhaustive]
13699pub struct Automation {
13700 pub name: std::string::String,
13703
13704 pub uid: std::string::String,
13706
13707 pub description: std::string::String,
13709
13710 pub create_time: std::option::Option<wkt::Timestamp>,
13712
13713 pub update_time: std::option::Option<wkt::Timestamp>,
13715
13716 pub annotations: std::collections::HashMap<std::string::String, std::string::String>,
13734
13735 pub labels: std::collections::HashMap<std::string::String, std::string::String>,
13747
13748 pub etag: std::string::String,
13753
13754 pub suspended: bool,
13756
13757 pub service_account: std::string::String,
13760
13761 pub selector: std::option::Option<crate::model::AutomationResourceSelector>,
13763
13764 pub rules: std::vec::Vec<crate::model::AutomationRule>,
13769
13770 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13771}
13772
13773impl Automation {
13774 pub fn new() -> Self {
13775 std::default::Default::default()
13776 }
13777
13778 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13780 self.name = v.into();
13781 self
13782 }
13783
13784 pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13786 self.uid = v.into();
13787 self
13788 }
13789
13790 pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13792 self.description = v.into();
13793 self
13794 }
13795
13796 pub fn set_create_time<T>(mut self, v: T) -> Self
13798 where
13799 T: std::convert::Into<wkt::Timestamp>,
13800 {
13801 self.create_time = std::option::Option::Some(v.into());
13802 self
13803 }
13804
13805 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
13807 where
13808 T: std::convert::Into<wkt::Timestamp>,
13809 {
13810 self.create_time = v.map(|x| x.into());
13811 self
13812 }
13813
13814 pub fn set_update_time<T>(mut self, v: T) -> Self
13816 where
13817 T: std::convert::Into<wkt::Timestamp>,
13818 {
13819 self.update_time = std::option::Option::Some(v.into());
13820 self
13821 }
13822
13823 pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
13825 where
13826 T: std::convert::Into<wkt::Timestamp>,
13827 {
13828 self.update_time = v.map(|x| x.into());
13829 self
13830 }
13831
13832 pub fn set_annotations<T, K, V>(mut self, v: T) -> Self
13834 where
13835 T: std::iter::IntoIterator<Item = (K, V)>,
13836 K: std::convert::Into<std::string::String>,
13837 V: std::convert::Into<std::string::String>,
13838 {
13839 use std::iter::Iterator;
13840 self.annotations = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
13841 self
13842 }
13843
13844 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
13846 where
13847 T: std::iter::IntoIterator<Item = (K, V)>,
13848 K: std::convert::Into<std::string::String>,
13849 V: std::convert::Into<std::string::String>,
13850 {
13851 use std::iter::Iterator;
13852 self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
13853 self
13854 }
13855
13856 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13858 self.etag = v.into();
13859 self
13860 }
13861
13862 pub fn set_suspended<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
13864 self.suspended = v.into();
13865 self
13866 }
13867
13868 pub fn set_service_account<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13870 self.service_account = v.into();
13871 self
13872 }
13873
13874 pub fn set_selector<T>(mut self, v: T) -> Self
13876 where
13877 T: std::convert::Into<crate::model::AutomationResourceSelector>,
13878 {
13879 self.selector = std::option::Option::Some(v.into());
13880 self
13881 }
13882
13883 pub fn set_or_clear_selector<T>(mut self, v: std::option::Option<T>) -> Self
13885 where
13886 T: std::convert::Into<crate::model::AutomationResourceSelector>,
13887 {
13888 self.selector = v.map(|x| x.into());
13889 self
13890 }
13891
13892 pub fn set_rules<T, V>(mut self, v: T) -> Self
13894 where
13895 T: std::iter::IntoIterator<Item = V>,
13896 V: std::convert::Into<crate::model::AutomationRule>,
13897 {
13898 use std::iter::Iterator;
13899 self.rules = v.into_iter().map(|i| i.into()).collect();
13900 self
13901 }
13902}
13903
13904impl wkt::message::Message for Automation {
13905 fn typename() -> &'static str {
13906 "type.googleapis.com/google.cloud.deploy.v1.Automation"
13907 }
13908}
13909
13910#[derive(Clone, Default, PartialEq)]
13913#[non_exhaustive]
13914pub struct AutomationResourceSelector {
13915 pub targets: std::vec::Vec<crate::model::TargetAttribute>,
13917
13918 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13919}
13920
13921impl AutomationResourceSelector {
13922 pub fn new() -> Self {
13923 std::default::Default::default()
13924 }
13925
13926 pub fn set_targets<T, V>(mut self, v: T) -> Self
13928 where
13929 T: std::iter::IntoIterator<Item = V>,
13930 V: std::convert::Into<crate::model::TargetAttribute>,
13931 {
13932 use std::iter::Iterator;
13933 self.targets = v.into_iter().map(|i| i.into()).collect();
13934 self
13935 }
13936}
13937
13938impl wkt::message::Message for AutomationResourceSelector {
13939 fn typename() -> &'static str {
13940 "type.googleapis.com/google.cloud.deploy.v1.AutomationResourceSelector"
13941 }
13942}
13943
13944#[derive(Clone, Default, PartialEq)]
13946#[non_exhaustive]
13947pub struct AutomationRule {
13948 pub rule: std::option::Option<crate::model::automation_rule::Rule>,
13950
13951 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13952}
13953
13954impl AutomationRule {
13955 pub fn new() -> Self {
13956 std::default::Default::default()
13957 }
13958
13959 pub fn set_rule<
13964 T: std::convert::Into<std::option::Option<crate::model::automation_rule::Rule>>,
13965 >(
13966 mut self,
13967 v: T,
13968 ) -> Self {
13969 self.rule = v.into();
13970 self
13971 }
13972
13973 pub fn promote_release_rule(
13977 &self,
13978 ) -> std::option::Option<&std::boxed::Box<crate::model::PromoteReleaseRule>> {
13979 #[allow(unreachable_patterns)]
13980 self.rule.as_ref().and_then(|v| match v {
13981 crate::model::automation_rule::Rule::PromoteReleaseRule(v) => {
13982 std::option::Option::Some(v)
13983 }
13984 _ => std::option::Option::None,
13985 })
13986 }
13987
13988 pub fn set_promote_release_rule<
13994 T: std::convert::Into<std::boxed::Box<crate::model::PromoteReleaseRule>>,
13995 >(
13996 mut self,
13997 v: T,
13998 ) -> Self {
13999 self.rule = std::option::Option::Some(
14000 crate::model::automation_rule::Rule::PromoteReleaseRule(v.into()),
14001 );
14002 self
14003 }
14004
14005 pub fn advance_rollout_rule(
14009 &self,
14010 ) -> std::option::Option<&std::boxed::Box<crate::model::AdvanceRolloutRule>> {
14011 #[allow(unreachable_patterns)]
14012 self.rule.as_ref().and_then(|v| match v {
14013 crate::model::automation_rule::Rule::AdvanceRolloutRule(v) => {
14014 std::option::Option::Some(v)
14015 }
14016 _ => std::option::Option::None,
14017 })
14018 }
14019
14020 pub fn set_advance_rollout_rule<
14026 T: std::convert::Into<std::boxed::Box<crate::model::AdvanceRolloutRule>>,
14027 >(
14028 mut self,
14029 v: T,
14030 ) -> Self {
14031 self.rule = std::option::Option::Some(
14032 crate::model::automation_rule::Rule::AdvanceRolloutRule(v.into()),
14033 );
14034 self
14035 }
14036
14037 pub fn repair_rollout_rule(
14041 &self,
14042 ) -> std::option::Option<&std::boxed::Box<crate::model::RepairRolloutRule>> {
14043 #[allow(unreachable_patterns)]
14044 self.rule.as_ref().and_then(|v| match v {
14045 crate::model::automation_rule::Rule::RepairRolloutRule(v) => {
14046 std::option::Option::Some(v)
14047 }
14048 _ => std::option::Option::None,
14049 })
14050 }
14051
14052 pub fn set_repair_rollout_rule<
14058 T: std::convert::Into<std::boxed::Box<crate::model::RepairRolloutRule>>,
14059 >(
14060 mut self,
14061 v: T,
14062 ) -> Self {
14063 self.rule = std::option::Option::Some(
14064 crate::model::automation_rule::Rule::RepairRolloutRule(v.into()),
14065 );
14066 self
14067 }
14068
14069 pub fn timed_promote_release_rule(
14073 &self,
14074 ) -> std::option::Option<&std::boxed::Box<crate::model::TimedPromoteReleaseRule>> {
14075 #[allow(unreachable_patterns)]
14076 self.rule.as_ref().and_then(|v| match v {
14077 crate::model::automation_rule::Rule::TimedPromoteReleaseRule(v) => {
14078 std::option::Option::Some(v)
14079 }
14080 _ => std::option::Option::None,
14081 })
14082 }
14083
14084 pub fn set_timed_promote_release_rule<
14090 T: std::convert::Into<std::boxed::Box<crate::model::TimedPromoteReleaseRule>>,
14091 >(
14092 mut self,
14093 v: T,
14094 ) -> Self {
14095 self.rule = std::option::Option::Some(
14096 crate::model::automation_rule::Rule::TimedPromoteReleaseRule(v.into()),
14097 );
14098 self
14099 }
14100}
14101
14102impl wkt::message::Message for AutomationRule {
14103 fn typename() -> &'static str {
14104 "type.googleapis.com/google.cloud.deploy.v1.AutomationRule"
14105 }
14106}
14107
14108pub mod automation_rule {
14110 #[allow(unused_imports)]
14111 use super::*;
14112
14113 #[derive(Clone, Debug, PartialEq)]
14115 #[non_exhaustive]
14116 pub enum Rule {
14117 PromoteReleaseRule(std::boxed::Box<crate::model::PromoteReleaseRule>),
14120 AdvanceRolloutRule(std::boxed::Box<crate::model::AdvanceRolloutRule>),
14123 RepairRolloutRule(std::boxed::Box<crate::model::RepairRolloutRule>),
14126 TimedPromoteReleaseRule(std::boxed::Box<crate::model::TimedPromoteReleaseRule>),
14130 }
14131}
14132
14133#[derive(Clone, Default, PartialEq)]
14136#[non_exhaustive]
14137pub struct TimedPromoteReleaseRule {
14138 pub id: std::string::String,
14142
14143 pub destination_target_id: std::string::String,
14150
14151 pub schedule: std::string::String,
14154
14155 pub time_zone: std::string::String,
14158
14159 pub condition: std::option::Option<crate::model::AutomationRuleCondition>,
14161
14162 pub destination_phase: std::string::String,
14165
14166 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14167}
14168
14169impl TimedPromoteReleaseRule {
14170 pub fn new() -> Self {
14171 std::default::Default::default()
14172 }
14173
14174 pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14176 self.id = v.into();
14177 self
14178 }
14179
14180 pub fn set_destination_target_id<T: std::convert::Into<std::string::String>>(
14182 mut self,
14183 v: T,
14184 ) -> Self {
14185 self.destination_target_id = v.into();
14186 self
14187 }
14188
14189 pub fn set_schedule<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14191 self.schedule = v.into();
14192 self
14193 }
14194
14195 pub fn set_time_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14197 self.time_zone = v.into();
14198 self
14199 }
14200
14201 pub fn set_condition<T>(mut self, v: T) -> Self
14203 where
14204 T: std::convert::Into<crate::model::AutomationRuleCondition>,
14205 {
14206 self.condition = std::option::Option::Some(v.into());
14207 self
14208 }
14209
14210 pub fn set_or_clear_condition<T>(mut self, v: std::option::Option<T>) -> Self
14212 where
14213 T: std::convert::Into<crate::model::AutomationRuleCondition>,
14214 {
14215 self.condition = v.map(|x| x.into());
14216 self
14217 }
14218
14219 pub fn set_destination_phase<T: std::convert::Into<std::string::String>>(
14221 mut self,
14222 v: T,
14223 ) -> Self {
14224 self.destination_phase = v.into();
14225 self
14226 }
14227}
14228
14229impl wkt::message::Message for TimedPromoteReleaseRule {
14230 fn typename() -> &'static str {
14231 "type.googleapis.com/google.cloud.deploy.v1.TimedPromoteReleaseRule"
14232 }
14233}
14234
14235#[derive(Clone, Default, PartialEq)]
14238#[non_exhaustive]
14239pub struct PromoteReleaseRule {
14240 pub id: std::string::String,
14244
14245 pub wait: std::option::Option<wkt::Duration>,
14248
14249 pub destination_target_id: std::string::String,
14256
14257 pub condition: std::option::Option<crate::model::AutomationRuleCondition>,
14259
14260 pub destination_phase: std::string::String,
14263
14264 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14265}
14266
14267impl PromoteReleaseRule {
14268 pub fn new() -> Self {
14269 std::default::Default::default()
14270 }
14271
14272 pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14274 self.id = v.into();
14275 self
14276 }
14277
14278 pub fn set_wait<T>(mut self, v: T) -> Self
14280 where
14281 T: std::convert::Into<wkt::Duration>,
14282 {
14283 self.wait = std::option::Option::Some(v.into());
14284 self
14285 }
14286
14287 pub fn set_or_clear_wait<T>(mut self, v: std::option::Option<T>) -> Self
14289 where
14290 T: std::convert::Into<wkt::Duration>,
14291 {
14292 self.wait = v.map(|x| x.into());
14293 self
14294 }
14295
14296 pub fn set_destination_target_id<T: std::convert::Into<std::string::String>>(
14298 mut self,
14299 v: T,
14300 ) -> Self {
14301 self.destination_target_id = v.into();
14302 self
14303 }
14304
14305 pub fn set_condition<T>(mut self, v: T) -> Self
14307 where
14308 T: std::convert::Into<crate::model::AutomationRuleCondition>,
14309 {
14310 self.condition = std::option::Option::Some(v.into());
14311 self
14312 }
14313
14314 pub fn set_or_clear_condition<T>(mut self, v: std::option::Option<T>) -> Self
14316 where
14317 T: std::convert::Into<crate::model::AutomationRuleCondition>,
14318 {
14319 self.condition = v.map(|x| x.into());
14320 self
14321 }
14322
14323 pub fn set_destination_phase<T: std::convert::Into<std::string::String>>(
14325 mut self,
14326 v: T,
14327 ) -> Self {
14328 self.destination_phase = v.into();
14329 self
14330 }
14331}
14332
14333impl wkt::message::Message for PromoteReleaseRule {
14334 fn typename() -> &'static str {
14335 "type.googleapis.com/google.cloud.deploy.v1.PromoteReleaseRule"
14336 }
14337}
14338
14339#[derive(Clone, Default, PartialEq)]
14342#[non_exhaustive]
14343pub struct AdvanceRolloutRule {
14344 pub id: std::string::String,
14348
14349 pub source_phases: std::vec::Vec<std::string::String>,
14355
14356 pub wait: std::option::Option<wkt::Duration>,
14358
14359 pub condition: std::option::Option<crate::model::AutomationRuleCondition>,
14361
14362 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14363}
14364
14365impl AdvanceRolloutRule {
14366 pub fn new() -> Self {
14367 std::default::Default::default()
14368 }
14369
14370 pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14372 self.id = v.into();
14373 self
14374 }
14375
14376 pub fn set_source_phases<T, V>(mut self, v: T) -> Self
14378 where
14379 T: std::iter::IntoIterator<Item = V>,
14380 V: std::convert::Into<std::string::String>,
14381 {
14382 use std::iter::Iterator;
14383 self.source_phases = v.into_iter().map(|i| i.into()).collect();
14384 self
14385 }
14386
14387 pub fn set_wait<T>(mut self, v: T) -> Self
14389 where
14390 T: std::convert::Into<wkt::Duration>,
14391 {
14392 self.wait = std::option::Option::Some(v.into());
14393 self
14394 }
14395
14396 pub fn set_or_clear_wait<T>(mut self, v: std::option::Option<T>) -> Self
14398 where
14399 T: std::convert::Into<wkt::Duration>,
14400 {
14401 self.wait = v.map(|x| x.into());
14402 self
14403 }
14404
14405 pub fn set_condition<T>(mut self, v: T) -> Self
14407 where
14408 T: std::convert::Into<crate::model::AutomationRuleCondition>,
14409 {
14410 self.condition = std::option::Option::Some(v.into());
14411 self
14412 }
14413
14414 pub fn set_or_clear_condition<T>(mut self, v: std::option::Option<T>) -> Self
14416 where
14417 T: std::convert::Into<crate::model::AutomationRuleCondition>,
14418 {
14419 self.condition = v.map(|x| x.into());
14420 self
14421 }
14422}
14423
14424impl wkt::message::Message for AdvanceRolloutRule {
14425 fn typename() -> &'static str {
14426 "type.googleapis.com/google.cloud.deploy.v1.AdvanceRolloutRule"
14427 }
14428}
14429
14430#[derive(Clone, Default, PartialEq)]
14433#[non_exhaustive]
14434pub struct RepairRolloutRule {
14435 pub id: std::string::String,
14439
14440 pub phases: std::vec::Vec<std::string::String>,
14447
14448 pub jobs: std::vec::Vec<std::string::String>,
14456
14457 pub condition: std::option::Option<crate::model::AutomationRuleCondition>,
14459
14460 pub repair_phases: std::vec::Vec<crate::model::RepairPhaseConfig>,
14462
14463 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14464}
14465
14466impl RepairRolloutRule {
14467 pub fn new() -> Self {
14468 std::default::Default::default()
14469 }
14470
14471 pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14473 self.id = v.into();
14474 self
14475 }
14476
14477 pub fn set_phases<T, V>(mut self, v: T) -> Self
14479 where
14480 T: std::iter::IntoIterator<Item = V>,
14481 V: std::convert::Into<std::string::String>,
14482 {
14483 use std::iter::Iterator;
14484 self.phases = v.into_iter().map(|i| i.into()).collect();
14485 self
14486 }
14487
14488 pub fn set_jobs<T, V>(mut self, v: T) -> Self
14490 where
14491 T: std::iter::IntoIterator<Item = V>,
14492 V: std::convert::Into<std::string::String>,
14493 {
14494 use std::iter::Iterator;
14495 self.jobs = v.into_iter().map(|i| i.into()).collect();
14496 self
14497 }
14498
14499 pub fn set_condition<T>(mut self, v: T) -> Self
14501 where
14502 T: std::convert::Into<crate::model::AutomationRuleCondition>,
14503 {
14504 self.condition = std::option::Option::Some(v.into());
14505 self
14506 }
14507
14508 pub fn set_or_clear_condition<T>(mut self, v: std::option::Option<T>) -> Self
14510 where
14511 T: std::convert::Into<crate::model::AutomationRuleCondition>,
14512 {
14513 self.condition = v.map(|x| x.into());
14514 self
14515 }
14516
14517 pub fn set_repair_phases<T, V>(mut self, v: T) -> Self
14519 where
14520 T: std::iter::IntoIterator<Item = V>,
14521 V: std::convert::Into<crate::model::RepairPhaseConfig>,
14522 {
14523 use std::iter::Iterator;
14524 self.repair_phases = v.into_iter().map(|i| i.into()).collect();
14525 self
14526 }
14527}
14528
14529impl wkt::message::Message for RepairRolloutRule {
14530 fn typename() -> &'static str {
14531 "type.googleapis.com/google.cloud.deploy.v1.RepairRolloutRule"
14532 }
14533}
14534
14535#[derive(Clone, Default, PartialEq)]
14537#[non_exhaustive]
14538pub struct RepairPhaseConfig {
14539 pub repair_phase: std::option::Option<crate::model::repair_phase_config::RepairPhase>,
14541
14542 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14543}
14544
14545impl RepairPhaseConfig {
14546 pub fn new() -> Self {
14547 std::default::Default::default()
14548 }
14549
14550 pub fn set_repair_phase<
14555 T: std::convert::Into<std::option::Option<crate::model::repair_phase_config::RepairPhase>>,
14556 >(
14557 mut self,
14558 v: T,
14559 ) -> Self {
14560 self.repair_phase = v.into();
14561 self
14562 }
14563
14564 pub fn retry(&self) -> std::option::Option<&std::boxed::Box<crate::model::Retry>> {
14568 #[allow(unreachable_patterns)]
14569 self.repair_phase.as_ref().and_then(|v| match v {
14570 crate::model::repair_phase_config::RepairPhase::Retry(v) => {
14571 std::option::Option::Some(v)
14572 }
14573 _ => std::option::Option::None,
14574 })
14575 }
14576
14577 pub fn set_retry<T: std::convert::Into<std::boxed::Box<crate::model::Retry>>>(
14583 mut self,
14584 v: T,
14585 ) -> Self {
14586 self.repair_phase = std::option::Option::Some(
14587 crate::model::repair_phase_config::RepairPhase::Retry(v.into()),
14588 );
14589 self
14590 }
14591
14592 pub fn rollback(&self) -> std::option::Option<&std::boxed::Box<crate::model::Rollback>> {
14596 #[allow(unreachable_patterns)]
14597 self.repair_phase.as_ref().and_then(|v| match v {
14598 crate::model::repair_phase_config::RepairPhase::Rollback(v) => {
14599 std::option::Option::Some(v)
14600 }
14601 _ => std::option::Option::None,
14602 })
14603 }
14604
14605 pub fn set_rollback<T: std::convert::Into<std::boxed::Box<crate::model::Rollback>>>(
14611 mut self,
14612 v: T,
14613 ) -> Self {
14614 self.repair_phase = std::option::Option::Some(
14615 crate::model::repair_phase_config::RepairPhase::Rollback(v.into()),
14616 );
14617 self
14618 }
14619}
14620
14621impl wkt::message::Message for RepairPhaseConfig {
14622 fn typename() -> &'static str {
14623 "type.googleapis.com/google.cloud.deploy.v1.RepairPhaseConfig"
14624 }
14625}
14626
14627pub mod repair_phase_config {
14629 #[allow(unused_imports)]
14630 use super::*;
14631
14632 #[derive(Clone, Debug, PartialEq)]
14634 #[non_exhaustive]
14635 pub enum RepairPhase {
14636 Retry(std::boxed::Box<crate::model::Retry>),
14638 Rollback(std::boxed::Box<crate::model::Rollback>),
14640 }
14641}
14642
14643#[derive(Clone, Default, PartialEq)]
14645#[non_exhaustive]
14646pub struct Retry {
14647 pub attempts: i64,
14650
14651 pub wait: std::option::Option<wkt::Duration>,
14654
14655 pub backoff_mode: crate::model::BackoffMode,
14658
14659 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14660}
14661
14662impl Retry {
14663 pub fn new() -> Self {
14664 std::default::Default::default()
14665 }
14666
14667 pub fn set_attempts<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
14669 self.attempts = v.into();
14670 self
14671 }
14672
14673 pub fn set_wait<T>(mut self, v: T) -> Self
14675 where
14676 T: std::convert::Into<wkt::Duration>,
14677 {
14678 self.wait = std::option::Option::Some(v.into());
14679 self
14680 }
14681
14682 pub fn set_or_clear_wait<T>(mut self, v: std::option::Option<T>) -> Self
14684 where
14685 T: std::convert::Into<wkt::Duration>,
14686 {
14687 self.wait = v.map(|x| x.into());
14688 self
14689 }
14690
14691 pub fn set_backoff_mode<T: std::convert::Into<crate::model::BackoffMode>>(
14693 mut self,
14694 v: T,
14695 ) -> Self {
14696 self.backoff_mode = v.into();
14697 self
14698 }
14699}
14700
14701impl wkt::message::Message for Retry {
14702 fn typename() -> &'static str {
14703 "type.googleapis.com/google.cloud.deploy.v1.Retry"
14704 }
14705}
14706
14707#[derive(Clone, Default, PartialEq)]
14709#[non_exhaustive]
14710pub struct Rollback {
14711 pub destination_phase: std::string::String,
14714
14715 pub disable_rollback_if_rollout_pending: bool,
14718
14719 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14720}
14721
14722impl Rollback {
14723 pub fn new() -> Self {
14724 std::default::Default::default()
14725 }
14726
14727 pub fn set_destination_phase<T: std::convert::Into<std::string::String>>(
14729 mut self,
14730 v: T,
14731 ) -> Self {
14732 self.destination_phase = v.into();
14733 self
14734 }
14735
14736 pub fn set_disable_rollback_if_rollout_pending<T: std::convert::Into<bool>>(
14738 mut self,
14739 v: T,
14740 ) -> Self {
14741 self.disable_rollback_if_rollout_pending = v.into();
14742 self
14743 }
14744}
14745
14746impl wkt::message::Message for Rollback {
14747 fn typename() -> &'static str {
14748 "type.googleapis.com/google.cloud.deploy.v1.Rollback"
14749 }
14750}
14751
14752#[derive(Clone, Default, PartialEq)]
14755#[non_exhaustive]
14756pub struct AutomationRuleCondition {
14757 pub targets_present_condition: std::option::Option<crate::model::TargetsPresentCondition>,
14759
14760 pub rule_type_condition:
14762 std::option::Option<crate::model::automation_rule_condition::RuleTypeCondition>,
14763
14764 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14765}
14766
14767impl AutomationRuleCondition {
14768 pub fn new() -> Self {
14769 std::default::Default::default()
14770 }
14771
14772 pub fn set_targets_present_condition<T>(mut self, v: T) -> Self
14774 where
14775 T: std::convert::Into<crate::model::TargetsPresentCondition>,
14776 {
14777 self.targets_present_condition = std::option::Option::Some(v.into());
14778 self
14779 }
14780
14781 pub fn set_or_clear_targets_present_condition<T>(mut self, v: std::option::Option<T>) -> Self
14783 where
14784 T: std::convert::Into<crate::model::TargetsPresentCondition>,
14785 {
14786 self.targets_present_condition = v.map(|x| x.into());
14787 self
14788 }
14789
14790 pub fn set_rule_type_condition<
14795 T: std::convert::Into<
14796 std::option::Option<crate::model::automation_rule_condition::RuleTypeCondition>,
14797 >,
14798 >(
14799 mut self,
14800 v: T,
14801 ) -> Self {
14802 self.rule_type_condition = v.into();
14803 self
14804 }
14805
14806 pub fn timed_promote_release_condition(
14810 &self,
14811 ) -> std::option::Option<&std::boxed::Box<crate::model::TimedPromoteReleaseCondition>> {
14812 #[allow(unreachable_patterns)]
14813 self.rule_type_condition.as_ref().and_then(|v| match v {
14814 crate::model::automation_rule_condition::RuleTypeCondition::TimedPromoteReleaseCondition(v) => std::option::Option::Some(v),
14815 _ => std::option::Option::None,
14816 })
14817 }
14818
14819 pub fn set_timed_promote_release_condition<
14825 T: std::convert::Into<std::boxed::Box<crate::model::TimedPromoteReleaseCondition>>,
14826 >(
14827 mut self,
14828 v: T,
14829 ) -> Self {
14830 self.rule_type_condition = std::option::Option::Some(
14831 crate::model::automation_rule_condition::RuleTypeCondition::TimedPromoteReleaseCondition(
14832 v.into()
14833 )
14834 );
14835 self
14836 }
14837}
14838
14839impl wkt::message::Message for AutomationRuleCondition {
14840 fn typename() -> &'static str {
14841 "type.googleapis.com/google.cloud.deploy.v1.AutomationRuleCondition"
14842 }
14843}
14844
14845pub mod automation_rule_condition {
14847 #[allow(unused_imports)]
14848 use super::*;
14849
14850 #[derive(Clone, Debug, PartialEq)]
14852 #[non_exhaustive]
14853 pub enum RuleTypeCondition {
14854 TimedPromoteReleaseCondition(std::boxed::Box<crate::model::TimedPromoteReleaseCondition>),
14857 }
14858}
14859
14860#[derive(Clone, Default, PartialEq)]
14863#[non_exhaustive]
14864pub struct TimedPromoteReleaseCondition {
14865 pub next_promotion_time: std::option::Option<wkt::Timestamp>,
14867
14868 pub targets_list: std::vec::Vec<crate::model::timed_promote_release_condition::Targets>,
14870
14871 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14872}
14873
14874impl TimedPromoteReleaseCondition {
14875 pub fn new() -> Self {
14876 std::default::Default::default()
14877 }
14878
14879 pub fn set_next_promotion_time<T>(mut self, v: T) -> Self
14881 where
14882 T: std::convert::Into<wkt::Timestamp>,
14883 {
14884 self.next_promotion_time = std::option::Option::Some(v.into());
14885 self
14886 }
14887
14888 pub fn set_or_clear_next_promotion_time<T>(mut self, v: std::option::Option<T>) -> Self
14890 where
14891 T: std::convert::Into<wkt::Timestamp>,
14892 {
14893 self.next_promotion_time = v.map(|x| x.into());
14894 self
14895 }
14896
14897 pub fn set_targets_list<T, V>(mut self, v: T) -> Self
14899 where
14900 T: std::iter::IntoIterator<Item = V>,
14901 V: std::convert::Into<crate::model::timed_promote_release_condition::Targets>,
14902 {
14903 use std::iter::Iterator;
14904 self.targets_list = v.into_iter().map(|i| i.into()).collect();
14905 self
14906 }
14907}
14908
14909impl wkt::message::Message for TimedPromoteReleaseCondition {
14910 fn typename() -> &'static str {
14911 "type.googleapis.com/google.cloud.deploy.v1.TimedPromoteReleaseCondition"
14912 }
14913}
14914
14915pub mod timed_promote_release_condition {
14917 #[allow(unused_imports)]
14918 use super::*;
14919
14920 #[derive(Clone, Default, PartialEq)]
14922 #[non_exhaustive]
14923 pub struct Targets {
14924 pub source_target_id: std::string::String,
14926
14927 pub destination_target_id: std::string::String,
14929
14930 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14931 }
14932
14933 impl Targets {
14934 pub fn new() -> Self {
14935 std::default::Default::default()
14936 }
14937
14938 pub fn set_source_target_id<T: std::convert::Into<std::string::String>>(
14940 mut self,
14941 v: T,
14942 ) -> Self {
14943 self.source_target_id = v.into();
14944 self
14945 }
14946
14947 pub fn set_destination_target_id<T: std::convert::Into<std::string::String>>(
14949 mut self,
14950 v: T,
14951 ) -> Self {
14952 self.destination_target_id = v.into();
14953 self
14954 }
14955 }
14956
14957 impl wkt::message::Message for Targets {
14958 fn typename() -> &'static str {
14959 "type.googleapis.com/google.cloud.deploy.v1.TimedPromoteReleaseCondition.Targets"
14960 }
14961 }
14962}
14963
14964#[derive(Clone, Default, PartialEq)]
14966#[non_exhaustive]
14967pub struct CreateAutomationRequest {
14968 pub parent: std::string::String,
14972
14973 pub automation_id: std::string::String,
14975
14976 pub automation: std::option::Option<crate::model::Automation>,
14978
14979 pub request_id: std::string::String,
14993
14994 pub validate_only: bool,
14997
14998 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14999}
15000
15001impl CreateAutomationRequest {
15002 pub fn new() -> Self {
15003 std::default::Default::default()
15004 }
15005
15006 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15008 self.parent = v.into();
15009 self
15010 }
15011
15012 pub fn set_automation_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15014 self.automation_id = v.into();
15015 self
15016 }
15017
15018 pub fn set_automation<T>(mut self, v: T) -> Self
15020 where
15021 T: std::convert::Into<crate::model::Automation>,
15022 {
15023 self.automation = std::option::Option::Some(v.into());
15024 self
15025 }
15026
15027 pub fn set_or_clear_automation<T>(mut self, v: std::option::Option<T>) -> Self
15029 where
15030 T: std::convert::Into<crate::model::Automation>,
15031 {
15032 self.automation = v.map(|x| x.into());
15033 self
15034 }
15035
15036 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15038 self.request_id = v.into();
15039 self
15040 }
15041
15042 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
15044 self.validate_only = v.into();
15045 self
15046 }
15047}
15048
15049impl wkt::message::Message for CreateAutomationRequest {
15050 fn typename() -> &'static str {
15051 "type.googleapis.com/google.cloud.deploy.v1.CreateAutomationRequest"
15052 }
15053}
15054
15055#[derive(Clone, Default, PartialEq)]
15057#[non_exhaustive]
15058pub struct UpdateAutomationRequest {
15059 pub update_mask: std::option::Option<wkt::FieldMask>,
15065
15066 pub automation: std::option::Option<crate::model::Automation>,
15068
15069 pub request_id: std::string::String,
15083
15084 pub allow_missing: bool,
15087
15088 pub validate_only: bool,
15091
15092 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15093}
15094
15095impl UpdateAutomationRequest {
15096 pub fn new() -> Self {
15097 std::default::Default::default()
15098 }
15099
15100 pub fn set_update_mask<T>(mut self, v: T) -> Self
15102 where
15103 T: std::convert::Into<wkt::FieldMask>,
15104 {
15105 self.update_mask = std::option::Option::Some(v.into());
15106 self
15107 }
15108
15109 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
15111 where
15112 T: std::convert::Into<wkt::FieldMask>,
15113 {
15114 self.update_mask = v.map(|x| x.into());
15115 self
15116 }
15117
15118 pub fn set_automation<T>(mut self, v: T) -> Self
15120 where
15121 T: std::convert::Into<crate::model::Automation>,
15122 {
15123 self.automation = std::option::Option::Some(v.into());
15124 self
15125 }
15126
15127 pub fn set_or_clear_automation<T>(mut self, v: std::option::Option<T>) -> Self
15129 where
15130 T: std::convert::Into<crate::model::Automation>,
15131 {
15132 self.automation = v.map(|x| x.into());
15133 self
15134 }
15135
15136 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15138 self.request_id = v.into();
15139 self
15140 }
15141
15142 pub fn set_allow_missing<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
15144 self.allow_missing = v.into();
15145 self
15146 }
15147
15148 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
15150 self.validate_only = v.into();
15151 self
15152 }
15153}
15154
15155impl wkt::message::Message for UpdateAutomationRequest {
15156 fn typename() -> &'static str {
15157 "type.googleapis.com/google.cloud.deploy.v1.UpdateAutomationRequest"
15158 }
15159}
15160
15161#[derive(Clone, Default, PartialEq)]
15163#[non_exhaustive]
15164pub struct DeleteAutomationRequest {
15165 pub name: std::string::String,
15168
15169 pub request_id: std::string::String,
15183
15184 pub allow_missing: bool,
15187
15188 pub validate_only: bool,
15191
15192 pub etag: std::string::String,
15197
15198 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15199}
15200
15201impl DeleteAutomationRequest {
15202 pub fn new() -> Self {
15203 std::default::Default::default()
15204 }
15205
15206 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15208 self.name = v.into();
15209 self
15210 }
15211
15212 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15214 self.request_id = v.into();
15215 self
15216 }
15217
15218 pub fn set_allow_missing<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
15220 self.allow_missing = v.into();
15221 self
15222 }
15223
15224 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
15226 self.validate_only = v.into();
15227 self
15228 }
15229
15230 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15232 self.etag = v.into();
15233 self
15234 }
15235}
15236
15237impl wkt::message::Message for DeleteAutomationRequest {
15238 fn typename() -> &'static str {
15239 "type.googleapis.com/google.cloud.deploy.v1.DeleteAutomationRequest"
15240 }
15241}
15242
15243#[derive(Clone, Default, PartialEq)]
15245#[non_exhaustive]
15246pub struct ListAutomationsRequest {
15247 pub parent: std::string::String,
15251
15252 pub page_size: i32,
15257
15258 pub page_token: std::string::String,
15264
15265 pub filter: std::string::String,
15268
15269 pub order_by: std::string::String,
15271
15272 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15273}
15274
15275impl ListAutomationsRequest {
15276 pub fn new() -> Self {
15277 std::default::Default::default()
15278 }
15279
15280 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15282 self.parent = v.into();
15283 self
15284 }
15285
15286 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
15288 self.page_size = v.into();
15289 self
15290 }
15291
15292 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15294 self.page_token = v.into();
15295 self
15296 }
15297
15298 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15300 self.filter = v.into();
15301 self
15302 }
15303
15304 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15306 self.order_by = v.into();
15307 self
15308 }
15309}
15310
15311impl wkt::message::Message for ListAutomationsRequest {
15312 fn typename() -> &'static str {
15313 "type.googleapis.com/google.cloud.deploy.v1.ListAutomationsRequest"
15314 }
15315}
15316
15317#[derive(Clone, Default, PartialEq)]
15319#[non_exhaustive]
15320pub struct ListAutomationsResponse {
15321 pub automations: std::vec::Vec<crate::model::Automation>,
15323
15324 pub next_page_token: std::string::String,
15327
15328 pub unreachable: std::vec::Vec<std::string::String>,
15330
15331 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15332}
15333
15334impl ListAutomationsResponse {
15335 pub fn new() -> Self {
15336 std::default::Default::default()
15337 }
15338
15339 pub fn set_automations<T, V>(mut self, v: T) -> Self
15341 where
15342 T: std::iter::IntoIterator<Item = V>,
15343 V: std::convert::Into<crate::model::Automation>,
15344 {
15345 use std::iter::Iterator;
15346 self.automations = v.into_iter().map(|i| i.into()).collect();
15347 self
15348 }
15349
15350 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15352 self.next_page_token = v.into();
15353 self
15354 }
15355
15356 pub fn set_unreachable<T, V>(mut self, v: T) -> Self
15358 where
15359 T: std::iter::IntoIterator<Item = V>,
15360 V: std::convert::Into<std::string::String>,
15361 {
15362 use std::iter::Iterator;
15363 self.unreachable = v.into_iter().map(|i| i.into()).collect();
15364 self
15365 }
15366}
15367
15368impl wkt::message::Message for ListAutomationsResponse {
15369 fn typename() -> &'static str {
15370 "type.googleapis.com/google.cloud.deploy.v1.ListAutomationsResponse"
15371 }
15372}
15373
15374#[doc(hidden)]
15375impl gax::paginator::internal::PageableResponse for ListAutomationsResponse {
15376 type PageItem = crate::model::Automation;
15377
15378 fn items(self) -> std::vec::Vec<Self::PageItem> {
15379 self.automations
15380 }
15381
15382 fn next_page_token(&self) -> std::string::String {
15383 use std::clone::Clone;
15384 self.next_page_token.clone()
15385 }
15386}
15387
15388#[derive(Clone, Default, PartialEq)]
15390#[non_exhaustive]
15391pub struct GetAutomationRequest {
15392 pub name: std::string::String,
15395
15396 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15397}
15398
15399impl GetAutomationRequest {
15400 pub fn new() -> Self {
15401 std::default::Default::default()
15402 }
15403
15404 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15406 self.name = v.into();
15407 self
15408 }
15409}
15410
15411impl wkt::message::Message for GetAutomationRequest {
15412 fn typename() -> &'static str {
15413 "type.googleapis.com/google.cloud.deploy.v1.GetAutomationRequest"
15414 }
15415}
15416
15417#[derive(Clone, Default, PartialEq)]
15422#[non_exhaustive]
15423pub struct AutomationRun {
15424 pub name: std::string::String,
15427
15428 pub create_time: std::option::Option<wkt::Timestamp>,
15430
15431 pub update_time: std::option::Option<wkt::Timestamp>,
15433
15434 pub etag: std::string::String,
15439
15440 pub service_account: std::string::String,
15443
15444 pub automation_snapshot: std::option::Option<crate::model::Automation>,
15447
15448 pub target_id: std::string::String,
15452
15453 pub state: crate::model::automation_run::State,
15455
15456 pub state_description: std::string::String,
15459
15460 pub policy_violation: std::option::Option<crate::model::PolicyViolation>,
15463
15464 pub expire_time: std::option::Option<wkt::Timestamp>,
15467
15468 pub rule_id: std::string::String,
15470
15471 pub automation_id: std::string::String,
15473
15474 pub wait_until_time: std::option::Option<wkt::Timestamp>,
15477
15478 pub operation: std::option::Option<crate::model::automation_run::Operation>,
15480
15481 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15482}
15483
15484impl AutomationRun {
15485 pub fn new() -> Self {
15486 std::default::Default::default()
15487 }
15488
15489 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15491 self.name = v.into();
15492 self
15493 }
15494
15495 pub fn set_create_time<T>(mut self, v: T) -> Self
15497 where
15498 T: std::convert::Into<wkt::Timestamp>,
15499 {
15500 self.create_time = std::option::Option::Some(v.into());
15501 self
15502 }
15503
15504 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
15506 where
15507 T: std::convert::Into<wkt::Timestamp>,
15508 {
15509 self.create_time = v.map(|x| x.into());
15510 self
15511 }
15512
15513 pub fn set_update_time<T>(mut self, v: T) -> Self
15515 where
15516 T: std::convert::Into<wkt::Timestamp>,
15517 {
15518 self.update_time = std::option::Option::Some(v.into());
15519 self
15520 }
15521
15522 pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
15524 where
15525 T: std::convert::Into<wkt::Timestamp>,
15526 {
15527 self.update_time = v.map(|x| x.into());
15528 self
15529 }
15530
15531 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15533 self.etag = v.into();
15534 self
15535 }
15536
15537 pub fn set_service_account<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15539 self.service_account = v.into();
15540 self
15541 }
15542
15543 pub fn set_automation_snapshot<T>(mut self, v: T) -> Self
15545 where
15546 T: std::convert::Into<crate::model::Automation>,
15547 {
15548 self.automation_snapshot = std::option::Option::Some(v.into());
15549 self
15550 }
15551
15552 pub fn set_or_clear_automation_snapshot<T>(mut self, v: std::option::Option<T>) -> Self
15554 where
15555 T: std::convert::Into<crate::model::Automation>,
15556 {
15557 self.automation_snapshot = v.map(|x| x.into());
15558 self
15559 }
15560
15561 pub fn set_target_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15563 self.target_id = v.into();
15564 self
15565 }
15566
15567 pub fn set_state<T: std::convert::Into<crate::model::automation_run::State>>(
15569 mut self,
15570 v: T,
15571 ) -> Self {
15572 self.state = v.into();
15573 self
15574 }
15575
15576 pub fn set_state_description<T: std::convert::Into<std::string::String>>(
15578 mut self,
15579 v: T,
15580 ) -> Self {
15581 self.state_description = v.into();
15582 self
15583 }
15584
15585 pub fn set_policy_violation<T>(mut self, v: T) -> Self
15587 where
15588 T: std::convert::Into<crate::model::PolicyViolation>,
15589 {
15590 self.policy_violation = std::option::Option::Some(v.into());
15591 self
15592 }
15593
15594 pub fn set_or_clear_policy_violation<T>(mut self, v: std::option::Option<T>) -> Self
15596 where
15597 T: std::convert::Into<crate::model::PolicyViolation>,
15598 {
15599 self.policy_violation = v.map(|x| x.into());
15600 self
15601 }
15602
15603 pub fn set_expire_time<T>(mut self, v: T) -> Self
15605 where
15606 T: std::convert::Into<wkt::Timestamp>,
15607 {
15608 self.expire_time = std::option::Option::Some(v.into());
15609 self
15610 }
15611
15612 pub fn set_or_clear_expire_time<T>(mut self, v: std::option::Option<T>) -> Self
15614 where
15615 T: std::convert::Into<wkt::Timestamp>,
15616 {
15617 self.expire_time = v.map(|x| x.into());
15618 self
15619 }
15620
15621 pub fn set_rule_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15623 self.rule_id = v.into();
15624 self
15625 }
15626
15627 pub fn set_automation_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15629 self.automation_id = v.into();
15630 self
15631 }
15632
15633 pub fn set_wait_until_time<T>(mut self, v: T) -> Self
15635 where
15636 T: std::convert::Into<wkt::Timestamp>,
15637 {
15638 self.wait_until_time = std::option::Option::Some(v.into());
15639 self
15640 }
15641
15642 pub fn set_or_clear_wait_until_time<T>(mut self, v: std::option::Option<T>) -> Self
15644 where
15645 T: std::convert::Into<wkt::Timestamp>,
15646 {
15647 self.wait_until_time = v.map(|x| x.into());
15648 self
15649 }
15650
15651 pub fn set_operation<
15656 T: std::convert::Into<std::option::Option<crate::model::automation_run::Operation>>,
15657 >(
15658 mut self,
15659 v: T,
15660 ) -> Self {
15661 self.operation = v.into();
15662 self
15663 }
15664
15665 pub fn promote_release_operation(
15669 &self,
15670 ) -> std::option::Option<&std::boxed::Box<crate::model::PromoteReleaseOperation>> {
15671 #[allow(unreachable_patterns)]
15672 self.operation.as_ref().and_then(|v| match v {
15673 crate::model::automation_run::Operation::PromoteReleaseOperation(v) => {
15674 std::option::Option::Some(v)
15675 }
15676 _ => std::option::Option::None,
15677 })
15678 }
15679
15680 pub fn set_promote_release_operation<
15686 T: std::convert::Into<std::boxed::Box<crate::model::PromoteReleaseOperation>>,
15687 >(
15688 mut self,
15689 v: T,
15690 ) -> Self {
15691 self.operation = std::option::Option::Some(
15692 crate::model::automation_run::Operation::PromoteReleaseOperation(v.into()),
15693 );
15694 self
15695 }
15696
15697 pub fn advance_rollout_operation(
15701 &self,
15702 ) -> std::option::Option<&std::boxed::Box<crate::model::AdvanceRolloutOperation>> {
15703 #[allow(unreachable_patterns)]
15704 self.operation.as_ref().and_then(|v| match v {
15705 crate::model::automation_run::Operation::AdvanceRolloutOperation(v) => {
15706 std::option::Option::Some(v)
15707 }
15708 _ => std::option::Option::None,
15709 })
15710 }
15711
15712 pub fn set_advance_rollout_operation<
15718 T: std::convert::Into<std::boxed::Box<crate::model::AdvanceRolloutOperation>>,
15719 >(
15720 mut self,
15721 v: T,
15722 ) -> Self {
15723 self.operation = std::option::Option::Some(
15724 crate::model::automation_run::Operation::AdvanceRolloutOperation(v.into()),
15725 );
15726 self
15727 }
15728
15729 pub fn repair_rollout_operation(
15733 &self,
15734 ) -> std::option::Option<&std::boxed::Box<crate::model::RepairRolloutOperation>> {
15735 #[allow(unreachable_patterns)]
15736 self.operation.as_ref().and_then(|v| match v {
15737 crate::model::automation_run::Operation::RepairRolloutOperation(v) => {
15738 std::option::Option::Some(v)
15739 }
15740 _ => std::option::Option::None,
15741 })
15742 }
15743
15744 pub fn set_repair_rollout_operation<
15750 T: std::convert::Into<std::boxed::Box<crate::model::RepairRolloutOperation>>,
15751 >(
15752 mut self,
15753 v: T,
15754 ) -> Self {
15755 self.operation = std::option::Option::Some(
15756 crate::model::automation_run::Operation::RepairRolloutOperation(v.into()),
15757 );
15758 self
15759 }
15760
15761 pub fn timed_promote_release_operation(
15765 &self,
15766 ) -> std::option::Option<&std::boxed::Box<crate::model::TimedPromoteReleaseOperation>> {
15767 #[allow(unreachable_patterns)]
15768 self.operation.as_ref().and_then(|v| match v {
15769 crate::model::automation_run::Operation::TimedPromoteReleaseOperation(v) => {
15770 std::option::Option::Some(v)
15771 }
15772 _ => std::option::Option::None,
15773 })
15774 }
15775
15776 pub fn set_timed_promote_release_operation<
15782 T: std::convert::Into<std::boxed::Box<crate::model::TimedPromoteReleaseOperation>>,
15783 >(
15784 mut self,
15785 v: T,
15786 ) -> Self {
15787 self.operation = std::option::Option::Some(
15788 crate::model::automation_run::Operation::TimedPromoteReleaseOperation(v.into()),
15789 );
15790 self
15791 }
15792}
15793
15794impl wkt::message::Message for AutomationRun {
15795 fn typename() -> &'static str {
15796 "type.googleapis.com/google.cloud.deploy.v1.AutomationRun"
15797 }
15798}
15799
15800pub mod automation_run {
15802 #[allow(unused_imports)]
15803 use super::*;
15804
15805 #[derive(Clone, Debug, PartialEq)]
15821 #[non_exhaustive]
15822 pub enum State {
15823 Unspecified,
15825 Succeeded,
15827 Cancelled,
15829 Failed,
15831 InProgress,
15833 Pending,
15835 Aborted,
15837 UnknownValue(state::UnknownValue),
15842 }
15843
15844 #[doc(hidden)]
15845 pub mod state {
15846 #[allow(unused_imports)]
15847 use super::*;
15848 #[derive(Clone, Debug, PartialEq)]
15849 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
15850 }
15851
15852 impl State {
15853 pub fn value(&self) -> std::option::Option<i32> {
15858 match self {
15859 Self::Unspecified => std::option::Option::Some(0),
15860 Self::Succeeded => std::option::Option::Some(1),
15861 Self::Cancelled => std::option::Option::Some(2),
15862 Self::Failed => std::option::Option::Some(3),
15863 Self::InProgress => std::option::Option::Some(4),
15864 Self::Pending => std::option::Option::Some(5),
15865 Self::Aborted => std::option::Option::Some(6),
15866 Self::UnknownValue(u) => u.0.value(),
15867 }
15868 }
15869
15870 pub fn name(&self) -> std::option::Option<&str> {
15875 match self {
15876 Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
15877 Self::Succeeded => std::option::Option::Some("SUCCEEDED"),
15878 Self::Cancelled => std::option::Option::Some("CANCELLED"),
15879 Self::Failed => std::option::Option::Some("FAILED"),
15880 Self::InProgress => std::option::Option::Some("IN_PROGRESS"),
15881 Self::Pending => std::option::Option::Some("PENDING"),
15882 Self::Aborted => std::option::Option::Some("ABORTED"),
15883 Self::UnknownValue(u) => u.0.name(),
15884 }
15885 }
15886 }
15887
15888 impl std::default::Default for State {
15889 fn default() -> Self {
15890 use std::convert::From;
15891 Self::from(0)
15892 }
15893 }
15894
15895 impl std::fmt::Display for State {
15896 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
15897 wkt::internal::display_enum(f, self.name(), self.value())
15898 }
15899 }
15900
15901 impl std::convert::From<i32> for State {
15902 fn from(value: i32) -> Self {
15903 match value {
15904 0 => Self::Unspecified,
15905 1 => Self::Succeeded,
15906 2 => Self::Cancelled,
15907 3 => Self::Failed,
15908 4 => Self::InProgress,
15909 5 => Self::Pending,
15910 6 => Self::Aborted,
15911 _ => Self::UnknownValue(state::UnknownValue(
15912 wkt::internal::UnknownEnumValue::Integer(value),
15913 )),
15914 }
15915 }
15916 }
15917
15918 impl std::convert::From<&str> for State {
15919 fn from(value: &str) -> Self {
15920 use std::string::ToString;
15921 match value {
15922 "STATE_UNSPECIFIED" => Self::Unspecified,
15923 "SUCCEEDED" => Self::Succeeded,
15924 "CANCELLED" => Self::Cancelled,
15925 "FAILED" => Self::Failed,
15926 "IN_PROGRESS" => Self::InProgress,
15927 "PENDING" => Self::Pending,
15928 "ABORTED" => Self::Aborted,
15929 _ => Self::UnknownValue(state::UnknownValue(
15930 wkt::internal::UnknownEnumValue::String(value.to_string()),
15931 )),
15932 }
15933 }
15934 }
15935
15936 impl serde::ser::Serialize for State {
15937 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
15938 where
15939 S: serde::Serializer,
15940 {
15941 match self {
15942 Self::Unspecified => serializer.serialize_i32(0),
15943 Self::Succeeded => serializer.serialize_i32(1),
15944 Self::Cancelled => serializer.serialize_i32(2),
15945 Self::Failed => serializer.serialize_i32(3),
15946 Self::InProgress => serializer.serialize_i32(4),
15947 Self::Pending => serializer.serialize_i32(5),
15948 Self::Aborted => serializer.serialize_i32(6),
15949 Self::UnknownValue(u) => u.0.serialize(serializer),
15950 }
15951 }
15952 }
15953
15954 impl<'de> serde::de::Deserialize<'de> for State {
15955 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
15956 where
15957 D: serde::Deserializer<'de>,
15958 {
15959 deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
15960 ".google.cloud.deploy.v1.AutomationRun.State",
15961 ))
15962 }
15963 }
15964
15965 #[derive(Clone, Debug, PartialEq)]
15967 #[non_exhaustive]
15968 pub enum Operation {
15969 PromoteReleaseOperation(std::boxed::Box<crate::model::PromoteReleaseOperation>),
15971 AdvanceRolloutOperation(std::boxed::Box<crate::model::AdvanceRolloutOperation>),
15973 RepairRolloutOperation(std::boxed::Box<crate::model::RepairRolloutOperation>),
15975 TimedPromoteReleaseOperation(std::boxed::Box<crate::model::TimedPromoteReleaseOperation>),
15978 }
15979}
15980
15981#[derive(Clone, Default, PartialEq)]
15983#[non_exhaustive]
15984pub struct PromoteReleaseOperation {
15985 pub target_id: std::string::String,
15989
15990 pub wait: std::option::Option<wkt::Duration>,
15992
15993 pub rollout: std::string::String,
15995
15996 pub phase: std::string::String,
15998
15999 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16000}
16001
16002impl PromoteReleaseOperation {
16003 pub fn new() -> Self {
16004 std::default::Default::default()
16005 }
16006
16007 pub fn set_target_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16009 self.target_id = v.into();
16010 self
16011 }
16012
16013 pub fn set_wait<T>(mut self, v: T) -> Self
16015 where
16016 T: std::convert::Into<wkt::Duration>,
16017 {
16018 self.wait = std::option::Option::Some(v.into());
16019 self
16020 }
16021
16022 pub fn set_or_clear_wait<T>(mut self, v: std::option::Option<T>) -> Self
16024 where
16025 T: std::convert::Into<wkt::Duration>,
16026 {
16027 self.wait = v.map(|x| x.into());
16028 self
16029 }
16030
16031 pub fn set_rollout<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16033 self.rollout = v.into();
16034 self
16035 }
16036
16037 pub fn set_phase<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16039 self.phase = v.into();
16040 self
16041 }
16042}
16043
16044impl wkt::message::Message for PromoteReleaseOperation {
16045 fn typename() -> &'static str {
16046 "type.googleapis.com/google.cloud.deploy.v1.PromoteReleaseOperation"
16047 }
16048}
16049
16050#[derive(Clone, Default, PartialEq)]
16052#[non_exhaustive]
16053pub struct AdvanceRolloutOperation {
16054 pub source_phase: std::string::String,
16056
16057 pub wait: std::option::Option<wkt::Duration>,
16059
16060 pub rollout: std::string::String,
16062
16063 pub destination_phase: std::string::String,
16065
16066 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16067}
16068
16069impl AdvanceRolloutOperation {
16070 pub fn new() -> Self {
16071 std::default::Default::default()
16072 }
16073
16074 pub fn set_source_phase<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16076 self.source_phase = v.into();
16077 self
16078 }
16079
16080 pub fn set_wait<T>(mut self, v: T) -> Self
16082 where
16083 T: std::convert::Into<wkt::Duration>,
16084 {
16085 self.wait = std::option::Option::Some(v.into());
16086 self
16087 }
16088
16089 pub fn set_or_clear_wait<T>(mut self, v: std::option::Option<T>) -> Self
16091 where
16092 T: std::convert::Into<wkt::Duration>,
16093 {
16094 self.wait = v.map(|x| x.into());
16095 self
16096 }
16097
16098 pub fn set_rollout<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16100 self.rollout = v.into();
16101 self
16102 }
16103
16104 pub fn set_destination_phase<T: std::convert::Into<std::string::String>>(
16106 mut self,
16107 v: T,
16108 ) -> Self {
16109 self.destination_phase = v.into();
16110 self
16111 }
16112}
16113
16114impl wkt::message::Message for AdvanceRolloutOperation {
16115 fn typename() -> &'static str {
16116 "type.googleapis.com/google.cloud.deploy.v1.AdvanceRolloutOperation"
16117 }
16118}
16119
16120#[derive(Clone, Default, PartialEq)]
16122#[non_exhaustive]
16123pub struct RepairRolloutOperation {
16124 pub rollout: std::string::String,
16126
16127 pub current_repair_phase_index: i64,
16129
16130 pub repair_phases: std::vec::Vec<crate::model::RepairPhase>,
16133
16134 pub phase_id: std::string::String,
16137
16138 pub job_id: std::string::String,
16140
16141 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16142}
16143
16144impl RepairRolloutOperation {
16145 pub fn new() -> Self {
16146 std::default::Default::default()
16147 }
16148
16149 pub fn set_rollout<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16151 self.rollout = v.into();
16152 self
16153 }
16154
16155 pub fn set_current_repair_phase_index<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
16157 self.current_repair_phase_index = v.into();
16158 self
16159 }
16160
16161 pub fn set_repair_phases<T, V>(mut self, v: T) -> Self
16163 where
16164 T: std::iter::IntoIterator<Item = V>,
16165 V: std::convert::Into<crate::model::RepairPhase>,
16166 {
16167 use std::iter::Iterator;
16168 self.repair_phases = v.into_iter().map(|i| i.into()).collect();
16169 self
16170 }
16171
16172 pub fn set_phase_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16174 self.phase_id = v.into();
16175 self
16176 }
16177
16178 pub fn set_job_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16180 self.job_id = v.into();
16181 self
16182 }
16183}
16184
16185impl wkt::message::Message for RepairRolloutOperation {
16186 fn typename() -> &'static str {
16187 "type.googleapis.com/google.cloud.deploy.v1.RepairRolloutOperation"
16188 }
16189}
16190
16191#[derive(Clone, Default, PartialEq)]
16193#[non_exhaustive]
16194pub struct TimedPromoteReleaseOperation {
16195 pub target_id: std::string::String,
16199
16200 pub release: std::string::String,
16202
16203 pub phase: std::string::String,
16205
16206 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16207}
16208
16209impl TimedPromoteReleaseOperation {
16210 pub fn new() -> Self {
16211 std::default::Default::default()
16212 }
16213
16214 pub fn set_target_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16216 self.target_id = v.into();
16217 self
16218 }
16219
16220 pub fn set_release<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16222 self.release = v.into();
16223 self
16224 }
16225
16226 pub fn set_phase<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16228 self.phase = v.into();
16229 self
16230 }
16231}
16232
16233impl wkt::message::Message for TimedPromoteReleaseOperation {
16234 fn typename() -> &'static str {
16235 "type.googleapis.com/google.cloud.deploy.v1.TimedPromoteReleaseOperation"
16236 }
16237}
16238
16239#[derive(Clone, Default, PartialEq)]
16242#[non_exhaustive]
16243pub struct RepairPhase {
16244 pub repair_phase: std::option::Option<crate::model::repair_phase::RepairPhase>,
16246
16247 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16248}
16249
16250impl RepairPhase {
16251 pub fn new() -> Self {
16252 std::default::Default::default()
16253 }
16254
16255 pub fn set_repair_phase<
16260 T: std::convert::Into<std::option::Option<crate::model::repair_phase::RepairPhase>>,
16261 >(
16262 mut self,
16263 v: T,
16264 ) -> Self {
16265 self.repair_phase = v.into();
16266 self
16267 }
16268
16269 pub fn retry(&self) -> std::option::Option<&std::boxed::Box<crate::model::RetryPhase>> {
16273 #[allow(unreachable_patterns)]
16274 self.repair_phase.as_ref().and_then(|v| match v {
16275 crate::model::repair_phase::RepairPhase::Retry(v) => std::option::Option::Some(v),
16276 _ => std::option::Option::None,
16277 })
16278 }
16279
16280 pub fn set_retry<T: std::convert::Into<std::boxed::Box<crate::model::RetryPhase>>>(
16286 mut self,
16287 v: T,
16288 ) -> Self {
16289 self.repair_phase =
16290 std::option::Option::Some(crate::model::repair_phase::RepairPhase::Retry(v.into()));
16291 self
16292 }
16293
16294 pub fn rollback(&self) -> std::option::Option<&std::boxed::Box<crate::model::RollbackAttempt>> {
16298 #[allow(unreachable_patterns)]
16299 self.repair_phase.as_ref().and_then(|v| match v {
16300 crate::model::repair_phase::RepairPhase::Rollback(v) => std::option::Option::Some(v),
16301 _ => std::option::Option::None,
16302 })
16303 }
16304
16305 pub fn set_rollback<T: std::convert::Into<std::boxed::Box<crate::model::RollbackAttempt>>>(
16311 mut self,
16312 v: T,
16313 ) -> Self {
16314 self.repair_phase =
16315 std::option::Option::Some(crate::model::repair_phase::RepairPhase::Rollback(v.into()));
16316 self
16317 }
16318}
16319
16320impl wkt::message::Message for RepairPhase {
16321 fn typename() -> &'static str {
16322 "type.googleapis.com/google.cloud.deploy.v1.RepairPhase"
16323 }
16324}
16325
16326pub mod repair_phase {
16328 #[allow(unused_imports)]
16329 use super::*;
16330
16331 #[derive(Clone, Debug, PartialEq)]
16333 #[non_exhaustive]
16334 pub enum RepairPhase {
16335 Retry(std::boxed::Box<crate::model::RetryPhase>),
16337 Rollback(std::boxed::Box<crate::model::RollbackAttempt>),
16339 }
16340}
16341
16342#[derive(Clone, Default, PartialEq)]
16345#[non_exhaustive]
16346pub struct RetryPhase {
16347 pub total_attempts: i64,
16349
16350 pub backoff_mode: crate::model::BackoffMode,
16353
16354 pub attempts: std::vec::Vec<crate::model::RetryAttempt>,
16356
16357 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16358}
16359
16360impl RetryPhase {
16361 pub fn new() -> Self {
16362 std::default::Default::default()
16363 }
16364
16365 pub fn set_total_attempts<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
16367 self.total_attempts = v.into();
16368 self
16369 }
16370
16371 pub fn set_backoff_mode<T: std::convert::Into<crate::model::BackoffMode>>(
16373 mut self,
16374 v: T,
16375 ) -> Self {
16376 self.backoff_mode = v.into();
16377 self
16378 }
16379
16380 pub fn set_attempts<T, V>(mut self, v: T) -> Self
16382 where
16383 T: std::iter::IntoIterator<Item = V>,
16384 V: std::convert::Into<crate::model::RetryAttempt>,
16385 {
16386 use std::iter::Iterator;
16387 self.attempts = v.into_iter().map(|i| i.into()).collect();
16388 self
16389 }
16390}
16391
16392impl wkt::message::Message for RetryPhase {
16393 fn typename() -> &'static str {
16394 "type.googleapis.com/google.cloud.deploy.v1.RetryPhase"
16395 }
16396}
16397
16398#[derive(Clone, Default, PartialEq)]
16400#[non_exhaustive]
16401pub struct RetryAttempt {
16402 pub attempt: i64,
16404
16405 pub wait: std::option::Option<wkt::Duration>,
16407
16408 pub state: crate::model::RepairState,
16410
16411 pub state_desc: std::string::String,
16413
16414 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16415}
16416
16417impl RetryAttempt {
16418 pub fn new() -> Self {
16419 std::default::Default::default()
16420 }
16421
16422 pub fn set_attempt<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
16424 self.attempt = v.into();
16425 self
16426 }
16427
16428 pub fn set_wait<T>(mut self, v: T) -> Self
16430 where
16431 T: std::convert::Into<wkt::Duration>,
16432 {
16433 self.wait = std::option::Option::Some(v.into());
16434 self
16435 }
16436
16437 pub fn set_or_clear_wait<T>(mut self, v: std::option::Option<T>) -> Self
16439 where
16440 T: std::convert::Into<wkt::Duration>,
16441 {
16442 self.wait = v.map(|x| x.into());
16443 self
16444 }
16445
16446 pub fn set_state<T: std::convert::Into<crate::model::RepairState>>(mut self, v: T) -> Self {
16448 self.state = v.into();
16449 self
16450 }
16451
16452 pub fn set_state_desc<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16454 self.state_desc = v.into();
16455 self
16456 }
16457}
16458
16459impl wkt::message::Message for RetryAttempt {
16460 fn typename() -> &'static str {
16461 "type.googleapis.com/google.cloud.deploy.v1.RetryAttempt"
16462 }
16463}
16464
16465#[derive(Clone, Default, PartialEq)]
16467#[non_exhaustive]
16468pub struct RollbackAttempt {
16469 pub destination_phase: std::string::String,
16471
16472 pub rollout_id: std::string::String,
16474
16475 pub state: crate::model::RepairState,
16477
16478 pub state_desc: std::string::String,
16480
16481 pub disable_rollback_if_rollout_pending: bool,
16483
16484 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16485}
16486
16487impl RollbackAttempt {
16488 pub fn new() -> Self {
16489 std::default::Default::default()
16490 }
16491
16492 pub fn set_destination_phase<T: std::convert::Into<std::string::String>>(
16494 mut self,
16495 v: T,
16496 ) -> Self {
16497 self.destination_phase = v.into();
16498 self
16499 }
16500
16501 pub fn set_rollout_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16503 self.rollout_id = v.into();
16504 self
16505 }
16506
16507 pub fn set_state<T: std::convert::Into<crate::model::RepairState>>(mut self, v: T) -> Self {
16509 self.state = v.into();
16510 self
16511 }
16512
16513 pub fn set_state_desc<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16515 self.state_desc = v.into();
16516 self
16517 }
16518
16519 pub fn set_disable_rollback_if_rollout_pending<T: std::convert::Into<bool>>(
16521 mut self,
16522 v: T,
16523 ) -> Self {
16524 self.disable_rollback_if_rollout_pending = v.into();
16525 self
16526 }
16527}
16528
16529impl wkt::message::Message for RollbackAttempt {
16530 fn typename() -> &'static str {
16531 "type.googleapis.com/google.cloud.deploy.v1.RollbackAttempt"
16532 }
16533}
16534
16535#[derive(Clone, Default, PartialEq)]
16537#[non_exhaustive]
16538pub struct ListAutomationRunsRequest {
16539 pub parent: std::string::String,
16543
16544 pub page_size: i32,
16549
16550 pub page_token: std::string::String,
16556
16557 pub filter: std::string::String,
16560
16561 pub order_by: std::string::String,
16563
16564 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16565}
16566
16567impl ListAutomationRunsRequest {
16568 pub fn new() -> Self {
16569 std::default::Default::default()
16570 }
16571
16572 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16574 self.parent = v.into();
16575 self
16576 }
16577
16578 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
16580 self.page_size = v.into();
16581 self
16582 }
16583
16584 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16586 self.page_token = v.into();
16587 self
16588 }
16589
16590 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16592 self.filter = v.into();
16593 self
16594 }
16595
16596 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16598 self.order_by = v.into();
16599 self
16600 }
16601}
16602
16603impl wkt::message::Message for ListAutomationRunsRequest {
16604 fn typename() -> &'static str {
16605 "type.googleapis.com/google.cloud.deploy.v1.ListAutomationRunsRequest"
16606 }
16607}
16608
16609#[derive(Clone, Default, PartialEq)]
16611#[non_exhaustive]
16612pub struct ListAutomationRunsResponse {
16613 pub automation_runs: std::vec::Vec<crate::model::AutomationRun>,
16615
16616 pub next_page_token: std::string::String,
16619
16620 pub unreachable: std::vec::Vec<std::string::String>,
16622
16623 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16624}
16625
16626impl ListAutomationRunsResponse {
16627 pub fn new() -> Self {
16628 std::default::Default::default()
16629 }
16630
16631 pub fn set_automation_runs<T, V>(mut self, v: T) -> Self
16633 where
16634 T: std::iter::IntoIterator<Item = V>,
16635 V: std::convert::Into<crate::model::AutomationRun>,
16636 {
16637 use std::iter::Iterator;
16638 self.automation_runs = v.into_iter().map(|i| i.into()).collect();
16639 self
16640 }
16641
16642 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16644 self.next_page_token = v.into();
16645 self
16646 }
16647
16648 pub fn set_unreachable<T, V>(mut self, v: T) -> Self
16650 where
16651 T: std::iter::IntoIterator<Item = V>,
16652 V: std::convert::Into<std::string::String>,
16653 {
16654 use std::iter::Iterator;
16655 self.unreachable = v.into_iter().map(|i| i.into()).collect();
16656 self
16657 }
16658}
16659
16660impl wkt::message::Message for ListAutomationRunsResponse {
16661 fn typename() -> &'static str {
16662 "type.googleapis.com/google.cloud.deploy.v1.ListAutomationRunsResponse"
16663 }
16664}
16665
16666#[doc(hidden)]
16667impl gax::paginator::internal::PageableResponse for ListAutomationRunsResponse {
16668 type PageItem = crate::model::AutomationRun;
16669
16670 fn items(self) -> std::vec::Vec<Self::PageItem> {
16671 self.automation_runs
16672 }
16673
16674 fn next_page_token(&self) -> std::string::String {
16675 use std::clone::Clone;
16676 self.next_page_token.clone()
16677 }
16678}
16679
16680#[derive(Clone, Default, PartialEq)]
16682#[non_exhaustive]
16683pub struct GetAutomationRunRequest {
16684 pub name: std::string::String,
16687
16688 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16689}
16690
16691impl GetAutomationRunRequest {
16692 pub fn new() -> Self {
16693 std::default::Default::default()
16694 }
16695
16696 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16698 self.name = v.into();
16699 self
16700 }
16701}
16702
16703impl wkt::message::Message for GetAutomationRunRequest {
16704 fn typename() -> &'static str {
16705 "type.googleapis.com/google.cloud.deploy.v1.GetAutomationRunRequest"
16706 }
16707}
16708
16709#[derive(Clone, Default, PartialEq)]
16711#[non_exhaustive]
16712pub struct CancelAutomationRunRequest {
16713 pub name: std::string::String,
16716
16717 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16718}
16719
16720impl CancelAutomationRunRequest {
16721 pub fn new() -> Self {
16722 std::default::Default::default()
16723 }
16724
16725 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16727 self.name = v.into();
16728 self
16729 }
16730}
16731
16732impl wkt::message::Message for CancelAutomationRunRequest {
16733 fn typename() -> &'static str {
16734 "type.googleapis.com/google.cloud.deploy.v1.CancelAutomationRunRequest"
16735 }
16736}
16737
16738#[derive(Clone, Default, PartialEq)]
16740#[non_exhaustive]
16741pub struct CancelAutomationRunResponse {
16742 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16743}
16744
16745impl CancelAutomationRunResponse {
16746 pub fn new() -> Self {
16747 std::default::Default::default()
16748 }
16749}
16750
16751impl wkt::message::Message for CancelAutomationRunResponse {
16752 fn typename() -> &'static str {
16753 "type.googleapis.com/google.cloud.deploy.v1.CancelAutomationRunResponse"
16754 }
16755}
16756
16757#[derive(Clone, Default, PartialEq)]
16761#[non_exhaustive]
16762pub struct CustomTargetTypeNotificationEvent {
16763 pub message: std::string::String,
16765
16766 pub custom_target_type_uid: std::string::String,
16768
16769 pub custom_target_type: std::string::String,
16771
16772 pub r#type: crate::model::Type,
16774
16775 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16776}
16777
16778impl CustomTargetTypeNotificationEvent {
16779 pub fn new() -> Self {
16780 std::default::Default::default()
16781 }
16782
16783 pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16785 self.message = v.into();
16786 self
16787 }
16788
16789 pub fn set_custom_target_type_uid<T: std::convert::Into<std::string::String>>(
16791 mut self,
16792 v: T,
16793 ) -> Self {
16794 self.custom_target_type_uid = v.into();
16795 self
16796 }
16797
16798 pub fn set_custom_target_type<T: std::convert::Into<std::string::String>>(
16800 mut self,
16801 v: T,
16802 ) -> Self {
16803 self.custom_target_type = v.into();
16804 self
16805 }
16806
16807 pub fn set_type<T: std::convert::Into<crate::model::Type>>(mut self, v: T) -> Self {
16809 self.r#type = v.into();
16810 self
16811 }
16812}
16813
16814impl wkt::message::Message for CustomTargetTypeNotificationEvent {
16815 fn typename() -> &'static str {
16816 "type.googleapis.com/google.cloud.deploy.v1.CustomTargetTypeNotificationEvent"
16817 }
16818}
16819
16820#[derive(Clone, Default, PartialEq)]
16824#[non_exhaustive]
16825pub struct DeliveryPipelineNotificationEvent {
16826 pub message: std::string::String,
16828
16829 pub pipeline_uid: std::string::String,
16831
16832 pub delivery_pipeline: std::string::String,
16834
16835 pub r#type: crate::model::Type,
16837
16838 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16839}
16840
16841impl DeliveryPipelineNotificationEvent {
16842 pub fn new() -> Self {
16843 std::default::Default::default()
16844 }
16845
16846 pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16848 self.message = v.into();
16849 self
16850 }
16851
16852 pub fn set_pipeline_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16854 self.pipeline_uid = v.into();
16855 self
16856 }
16857
16858 pub fn set_delivery_pipeline<T: std::convert::Into<std::string::String>>(
16860 mut self,
16861 v: T,
16862 ) -> Self {
16863 self.delivery_pipeline = v.into();
16864 self
16865 }
16866
16867 pub fn set_type<T: std::convert::Into<crate::model::Type>>(mut self, v: T) -> Self {
16869 self.r#type = v.into();
16870 self
16871 }
16872}
16873
16874impl wkt::message::Message for DeliveryPipelineNotificationEvent {
16875 fn typename() -> &'static str {
16876 "type.googleapis.com/google.cloud.deploy.v1.DeliveryPipelineNotificationEvent"
16877 }
16878}
16879
16880#[derive(Clone, Default, PartialEq)]
16883#[non_exhaustive]
16884pub struct DeployPolicyEvaluationEvent {
16885 pub message: std::string::String,
16887
16888 pub rule_type: std::string::String,
16890
16891 pub rule: std::string::String,
16893
16894 pub pipeline_uid: std::string::String,
16896
16897 pub delivery_pipeline: std::string::String,
16899
16900 pub target_uid: std::string::String,
16903
16904 pub target: std::string::String,
16907
16908 pub invoker: crate::model::deploy_policy::Invoker,
16910
16911 pub deploy_policy: std::string::String,
16913
16914 pub deploy_policy_uid: std::string::String,
16916
16917 pub allowed: bool,
16923
16924 pub verdict: crate::model::deploy_policy_evaluation_event::PolicyVerdict,
16926
16927 pub overrides:
16930 std::vec::Vec<crate::model::deploy_policy_evaluation_event::PolicyVerdictOverride>,
16931
16932 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16933}
16934
16935impl DeployPolicyEvaluationEvent {
16936 pub fn new() -> Self {
16937 std::default::Default::default()
16938 }
16939
16940 pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16942 self.message = v.into();
16943 self
16944 }
16945
16946 pub fn set_rule_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16948 self.rule_type = v.into();
16949 self
16950 }
16951
16952 pub fn set_rule<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16954 self.rule = v.into();
16955 self
16956 }
16957
16958 pub fn set_pipeline_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16960 self.pipeline_uid = v.into();
16961 self
16962 }
16963
16964 pub fn set_delivery_pipeline<T: std::convert::Into<std::string::String>>(
16966 mut self,
16967 v: T,
16968 ) -> Self {
16969 self.delivery_pipeline = v.into();
16970 self
16971 }
16972
16973 pub fn set_target_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16975 self.target_uid = v.into();
16976 self
16977 }
16978
16979 pub fn set_target<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16981 self.target = v.into();
16982 self
16983 }
16984
16985 pub fn set_invoker<T: std::convert::Into<crate::model::deploy_policy::Invoker>>(
16987 mut self,
16988 v: T,
16989 ) -> Self {
16990 self.invoker = v.into();
16991 self
16992 }
16993
16994 pub fn set_deploy_policy<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16996 self.deploy_policy = v.into();
16997 self
16998 }
16999
17000 pub fn set_deploy_policy_uid<T: std::convert::Into<std::string::String>>(
17002 mut self,
17003 v: T,
17004 ) -> Self {
17005 self.deploy_policy_uid = v.into();
17006 self
17007 }
17008
17009 pub fn set_allowed<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
17011 self.allowed = v.into();
17012 self
17013 }
17014
17015 pub fn set_verdict<
17017 T: std::convert::Into<crate::model::deploy_policy_evaluation_event::PolicyVerdict>,
17018 >(
17019 mut self,
17020 v: T,
17021 ) -> Self {
17022 self.verdict = v.into();
17023 self
17024 }
17025
17026 pub fn set_overrides<T, V>(mut self, v: T) -> Self
17028 where
17029 T: std::iter::IntoIterator<Item = V>,
17030 V: std::convert::Into<crate::model::deploy_policy_evaluation_event::PolicyVerdictOverride>,
17031 {
17032 use std::iter::Iterator;
17033 self.overrides = v.into_iter().map(|i| i.into()).collect();
17034 self
17035 }
17036}
17037
17038impl wkt::message::Message for DeployPolicyEvaluationEvent {
17039 fn typename() -> &'static str {
17040 "type.googleapis.com/google.cloud.deploy.v1.DeployPolicyEvaluationEvent"
17041 }
17042}
17043
17044pub mod deploy_policy_evaluation_event {
17046 #[allow(unused_imports)]
17047 use super::*;
17048
17049 #[derive(Clone, Debug, PartialEq)]
17065 #[non_exhaustive]
17066 pub enum PolicyVerdict {
17067 Unspecified,
17069 AllowedByPolicy,
17073 DeniedByPolicy,
17075 UnknownValue(policy_verdict::UnknownValue),
17080 }
17081
17082 #[doc(hidden)]
17083 pub mod policy_verdict {
17084 #[allow(unused_imports)]
17085 use super::*;
17086 #[derive(Clone, Debug, PartialEq)]
17087 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
17088 }
17089
17090 impl PolicyVerdict {
17091 pub fn value(&self) -> std::option::Option<i32> {
17096 match self {
17097 Self::Unspecified => std::option::Option::Some(0),
17098 Self::AllowedByPolicy => std::option::Option::Some(1),
17099 Self::DeniedByPolicy => std::option::Option::Some(2),
17100 Self::UnknownValue(u) => u.0.value(),
17101 }
17102 }
17103
17104 pub fn name(&self) -> std::option::Option<&str> {
17109 match self {
17110 Self::Unspecified => std::option::Option::Some("POLICY_VERDICT_UNSPECIFIED"),
17111 Self::AllowedByPolicy => std::option::Option::Some("ALLOWED_BY_POLICY"),
17112 Self::DeniedByPolicy => std::option::Option::Some("DENIED_BY_POLICY"),
17113 Self::UnknownValue(u) => u.0.name(),
17114 }
17115 }
17116 }
17117
17118 impl std::default::Default for PolicyVerdict {
17119 fn default() -> Self {
17120 use std::convert::From;
17121 Self::from(0)
17122 }
17123 }
17124
17125 impl std::fmt::Display for PolicyVerdict {
17126 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
17127 wkt::internal::display_enum(f, self.name(), self.value())
17128 }
17129 }
17130
17131 impl std::convert::From<i32> for PolicyVerdict {
17132 fn from(value: i32) -> Self {
17133 match value {
17134 0 => Self::Unspecified,
17135 1 => Self::AllowedByPolicy,
17136 2 => Self::DeniedByPolicy,
17137 _ => Self::UnknownValue(policy_verdict::UnknownValue(
17138 wkt::internal::UnknownEnumValue::Integer(value),
17139 )),
17140 }
17141 }
17142 }
17143
17144 impl std::convert::From<&str> for PolicyVerdict {
17145 fn from(value: &str) -> Self {
17146 use std::string::ToString;
17147 match value {
17148 "POLICY_VERDICT_UNSPECIFIED" => Self::Unspecified,
17149 "ALLOWED_BY_POLICY" => Self::AllowedByPolicy,
17150 "DENIED_BY_POLICY" => Self::DeniedByPolicy,
17151 _ => Self::UnknownValue(policy_verdict::UnknownValue(
17152 wkt::internal::UnknownEnumValue::String(value.to_string()),
17153 )),
17154 }
17155 }
17156 }
17157
17158 impl serde::ser::Serialize for PolicyVerdict {
17159 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
17160 where
17161 S: serde::Serializer,
17162 {
17163 match self {
17164 Self::Unspecified => serializer.serialize_i32(0),
17165 Self::AllowedByPolicy => serializer.serialize_i32(1),
17166 Self::DeniedByPolicy => serializer.serialize_i32(2),
17167 Self::UnknownValue(u) => u.0.serialize(serializer),
17168 }
17169 }
17170 }
17171
17172 impl<'de> serde::de::Deserialize<'de> for PolicyVerdict {
17173 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
17174 where
17175 D: serde::Deserializer<'de>,
17176 {
17177 deserializer.deserialize_any(wkt::internal::EnumVisitor::<PolicyVerdict>::new(
17178 ".google.cloud.deploy.v1.DeployPolicyEvaluationEvent.PolicyVerdict",
17179 ))
17180 }
17181 }
17182
17183 #[derive(Clone, Debug, PartialEq)]
17200 #[non_exhaustive]
17201 pub enum PolicyVerdictOverride {
17202 Unspecified,
17204 PolicyOverridden,
17206 PolicySuspended,
17208 UnknownValue(policy_verdict_override::UnknownValue),
17213 }
17214
17215 #[doc(hidden)]
17216 pub mod policy_verdict_override {
17217 #[allow(unused_imports)]
17218 use super::*;
17219 #[derive(Clone, Debug, PartialEq)]
17220 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
17221 }
17222
17223 impl PolicyVerdictOverride {
17224 pub fn value(&self) -> std::option::Option<i32> {
17229 match self {
17230 Self::Unspecified => std::option::Option::Some(0),
17231 Self::PolicyOverridden => std::option::Option::Some(1),
17232 Self::PolicySuspended => std::option::Option::Some(2),
17233 Self::UnknownValue(u) => u.0.value(),
17234 }
17235 }
17236
17237 pub fn name(&self) -> std::option::Option<&str> {
17242 match self {
17243 Self::Unspecified => {
17244 std::option::Option::Some("POLICY_VERDICT_OVERRIDE_UNSPECIFIED")
17245 }
17246 Self::PolicyOverridden => std::option::Option::Some("POLICY_OVERRIDDEN"),
17247 Self::PolicySuspended => std::option::Option::Some("POLICY_SUSPENDED"),
17248 Self::UnknownValue(u) => u.0.name(),
17249 }
17250 }
17251 }
17252
17253 impl std::default::Default for PolicyVerdictOverride {
17254 fn default() -> Self {
17255 use std::convert::From;
17256 Self::from(0)
17257 }
17258 }
17259
17260 impl std::fmt::Display for PolicyVerdictOverride {
17261 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
17262 wkt::internal::display_enum(f, self.name(), self.value())
17263 }
17264 }
17265
17266 impl std::convert::From<i32> for PolicyVerdictOverride {
17267 fn from(value: i32) -> Self {
17268 match value {
17269 0 => Self::Unspecified,
17270 1 => Self::PolicyOverridden,
17271 2 => Self::PolicySuspended,
17272 _ => Self::UnknownValue(policy_verdict_override::UnknownValue(
17273 wkt::internal::UnknownEnumValue::Integer(value),
17274 )),
17275 }
17276 }
17277 }
17278
17279 impl std::convert::From<&str> for PolicyVerdictOverride {
17280 fn from(value: &str) -> Self {
17281 use std::string::ToString;
17282 match value {
17283 "POLICY_VERDICT_OVERRIDE_UNSPECIFIED" => Self::Unspecified,
17284 "POLICY_OVERRIDDEN" => Self::PolicyOverridden,
17285 "POLICY_SUSPENDED" => Self::PolicySuspended,
17286 _ => Self::UnknownValue(policy_verdict_override::UnknownValue(
17287 wkt::internal::UnknownEnumValue::String(value.to_string()),
17288 )),
17289 }
17290 }
17291 }
17292
17293 impl serde::ser::Serialize for PolicyVerdictOverride {
17294 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
17295 where
17296 S: serde::Serializer,
17297 {
17298 match self {
17299 Self::Unspecified => serializer.serialize_i32(0),
17300 Self::PolicyOverridden => serializer.serialize_i32(1),
17301 Self::PolicySuspended => serializer.serialize_i32(2),
17302 Self::UnknownValue(u) => u.0.serialize(serializer),
17303 }
17304 }
17305 }
17306
17307 impl<'de> serde::de::Deserialize<'de> for PolicyVerdictOverride {
17308 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
17309 where
17310 D: serde::Deserializer<'de>,
17311 {
17312 deserializer.deserialize_any(wkt::internal::EnumVisitor::<PolicyVerdictOverride>::new(
17313 ".google.cloud.deploy.v1.DeployPolicyEvaluationEvent.PolicyVerdictOverride",
17314 ))
17315 }
17316 }
17317}
17318
17319#[derive(Clone, Default, PartialEq)]
17323#[non_exhaustive]
17324pub struct DeployPolicyNotificationEvent {
17325 pub message: std::string::String,
17328
17329 pub deploy_policy: std::string::String,
17331
17332 pub deploy_policy_uid: std::string::String,
17334
17335 pub r#type: crate::model::Type,
17337
17338 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17339}
17340
17341impl DeployPolicyNotificationEvent {
17342 pub fn new() -> Self {
17343 std::default::Default::default()
17344 }
17345
17346 pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17348 self.message = v.into();
17349 self
17350 }
17351
17352 pub fn set_deploy_policy<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17354 self.deploy_policy = v.into();
17355 self
17356 }
17357
17358 pub fn set_deploy_policy_uid<T: std::convert::Into<std::string::String>>(
17360 mut self,
17361 v: T,
17362 ) -> Self {
17363 self.deploy_policy_uid = v.into();
17364 self
17365 }
17366
17367 pub fn set_type<T: std::convert::Into<crate::model::Type>>(mut self, v: T) -> Self {
17369 self.r#type = v.into();
17370 self
17371 }
17372}
17373
17374impl wkt::message::Message for DeployPolicyNotificationEvent {
17375 fn typename() -> &'static str {
17376 "type.googleapis.com/google.cloud.deploy.v1.DeployPolicyNotificationEvent"
17377 }
17378}
17379
17380#[derive(Clone, Default, PartialEq)]
17384#[non_exhaustive]
17385pub struct JobRunNotificationEvent {
17386 pub message: std::string::String,
17388
17389 pub job_run: std::string::String,
17391
17392 pub pipeline_uid: std::string::String,
17394
17395 pub release_uid: std::string::String,
17397
17398 pub release: std::string::String,
17400
17401 pub rollout_uid: std::string::String,
17403
17404 pub rollout: std::string::String,
17406
17407 pub target_id: std::string::String,
17409
17410 pub r#type: crate::model::Type,
17412
17413 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17414}
17415
17416impl JobRunNotificationEvent {
17417 pub fn new() -> Self {
17418 std::default::Default::default()
17419 }
17420
17421 pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17423 self.message = v.into();
17424 self
17425 }
17426
17427 pub fn set_job_run<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17429 self.job_run = v.into();
17430 self
17431 }
17432
17433 pub fn set_pipeline_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17435 self.pipeline_uid = v.into();
17436 self
17437 }
17438
17439 pub fn set_release_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17441 self.release_uid = v.into();
17442 self
17443 }
17444
17445 pub fn set_release<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17447 self.release = v.into();
17448 self
17449 }
17450
17451 pub fn set_rollout_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17453 self.rollout_uid = v.into();
17454 self
17455 }
17456
17457 pub fn set_rollout<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17459 self.rollout = v.into();
17460 self
17461 }
17462
17463 pub fn set_target_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17465 self.target_id = v.into();
17466 self
17467 }
17468
17469 pub fn set_type<T: std::convert::Into<crate::model::Type>>(mut self, v: T) -> Self {
17471 self.r#type = v.into();
17472 self
17473 }
17474}
17475
17476impl wkt::message::Message for JobRunNotificationEvent {
17477 fn typename() -> &'static str {
17478 "type.googleapis.com/google.cloud.deploy.v1.JobRunNotificationEvent"
17479 }
17480}
17481
17482#[derive(Clone, Default, PartialEq)]
17486#[non_exhaustive]
17487pub struct ReleaseNotificationEvent {
17488 pub message: std::string::String,
17490
17491 pub pipeline_uid: std::string::String,
17493
17494 pub release_uid: std::string::String,
17496
17497 pub release: std::string::String,
17499
17500 pub r#type: crate::model::Type,
17502
17503 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17504}
17505
17506impl ReleaseNotificationEvent {
17507 pub fn new() -> Self {
17508 std::default::Default::default()
17509 }
17510
17511 pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17513 self.message = v.into();
17514 self
17515 }
17516
17517 pub fn set_pipeline_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17519 self.pipeline_uid = v.into();
17520 self
17521 }
17522
17523 pub fn set_release_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17525 self.release_uid = v.into();
17526 self
17527 }
17528
17529 pub fn set_release<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17531 self.release = v.into();
17532 self
17533 }
17534
17535 pub fn set_type<T: std::convert::Into<crate::model::Type>>(mut self, v: T) -> Self {
17537 self.r#type = v.into();
17538 self
17539 }
17540}
17541
17542impl wkt::message::Message for ReleaseNotificationEvent {
17543 fn typename() -> &'static str {
17544 "type.googleapis.com/google.cloud.deploy.v1.ReleaseNotificationEvent"
17545 }
17546}
17547
17548#[derive(Clone, Default, PartialEq)]
17551#[non_exhaustive]
17552pub struct ReleaseRenderEvent {
17553 pub message: std::string::String,
17556
17557 pub pipeline_uid: std::string::String,
17559
17560 pub release: std::string::String,
17564
17565 pub r#type: crate::model::Type,
17567
17568 pub release_render_state: crate::model::release::RenderState,
17570
17571 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17572}
17573
17574impl ReleaseRenderEvent {
17575 pub fn new() -> Self {
17576 std::default::Default::default()
17577 }
17578
17579 pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17581 self.message = v.into();
17582 self
17583 }
17584
17585 pub fn set_pipeline_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17587 self.pipeline_uid = v.into();
17588 self
17589 }
17590
17591 pub fn set_release<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17593 self.release = v.into();
17594 self
17595 }
17596
17597 pub fn set_type<T: std::convert::Into<crate::model::Type>>(mut self, v: T) -> Self {
17599 self.r#type = v.into();
17600 self
17601 }
17602
17603 pub fn set_release_render_state<T: std::convert::Into<crate::model::release::RenderState>>(
17605 mut self,
17606 v: T,
17607 ) -> Self {
17608 self.release_render_state = v.into();
17609 self
17610 }
17611}
17612
17613impl wkt::message::Message for ReleaseRenderEvent {
17614 fn typename() -> &'static str {
17615 "type.googleapis.com/google.cloud.deploy.v1.ReleaseRenderEvent"
17616 }
17617}
17618
17619#[derive(Clone, Default, PartialEq)]
17623#[non_exhaustive]
17624pub struct RolloutNotificationEvent {
17625 pub message: std::string::String,
17627
17628 pub pipeline_uid: std::string::String,
17630
17631 pub release_uid: std::string::String,
17633
17634 pub release: std::string::String,
17636
17637 pub rollout_uid: std::string::String,
17639
17640 pub rollout: std::string::String,
17642
17643 pub target_id: std::string::String,
17645
17646 pub r#type: crate::model::Type,
17648
17649 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17650}
17651
17652impl RolloutNotificationEvent {
17653 pub fn new() -> Self {
17654 std::default::Default::default()
17655 }
17656
17657 pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17659 self.message = v.into();
17660 self
17661 }
17662
17663 pub fn set_pipeline_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17665 self.pipeline_uid = v.into();
17666 self
17667 }
17668
17669 pub fn set_release_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17671 self.release_uid = v.into();
17672 self
17673 }
17674
17675 pub fn set_release<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17677 self.release = v.into();
17678 self
17679 }
17680
17681 pub fn set_rollout_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17683 self.rollout_uid = v.into();
17684 self
17685 }
17686
17687 pub fn set_rollout<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17689 self.rollout = v.into();
17690 self
17691 }
17692
17693 pub fn set_target_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17695 self.target_id = v.into();
17696 self
17697 }
17698
17699 pub fn set_type<T: std::convert::Into<crate::model::Type>>(mut self, v: T) -> Self {
17701 self.r#type = v.into();
17702 self
17703 }
17704}
17705
17706impl wkt::message::Message for RolloutNotificationEvent {
17707 fn typename() -> &'static str {
17708 "type.googleapis.com/google.cloud.deploy.v1.RolloutNotificationEvent"
17709 }
17710}
17711
17712#[derive(Clone, Default, PartialEq)]
17715#[non_exhaustive]
17716pub struct RolloutUpdateEvent {
17717 pub message: std::string::String,
17719
17720 pub pipeline_uid: std::string::String,
17722
17723 pub release_uid: std::string::String,
17725
17726 pub release: std::string::String,
17728
17729 pub rollout: std::string::String,
17733
17734 pub target_id: std::string::String,
17736
17737 pub r#type: crate::model::Type,
17739
17740 pub rollout_update_type: crate::model::rollout_update_event::RolloutUpdateType,
17742
17743 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17744}
17745
17746impl RolloutUpdateEvent {
17747 pub fn new() -> Self {
17748 std::default::Default::default()
17749 }
17750
17751 pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17753 self.message = v.into();
17754 self
17755 }
17756
17757 pub fn set_pipeline_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17759 self.pipeline_uid = v.into();
17760 self
17761 }
17762
17763 pub fn set_release_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17765 self.release_uid = v.into();
17766 self
17767 }
17768
17769 pub fn set_release<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17771 self.release = v.into();
17772 self
17773 }
17774
17775 pub fn set_rollout<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17777 self.rollout = v.into();
17778 self
17779 }
17780
17781 pub fn set_target_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17783 self.target_id = v.into();
17784 self
17785 }
17786
17787 pub fn set_type<T: std::convert::Into<crate::model::Type>>(mut self, v: T) -> Self {
17789 self.r#type = v.into();
17790 self
17791 }
17792
17793 pub fn set_rollout_update_type<
17795 T: std::convert::Into<crate::model::rollout_update_event::RolloutUpdateType>,
17796 >(
17797 mut self,
17798 v: T,
17799 ) -> Self {
17800 self.rollout_update_type = v.into();
17801 self
17802 }
17803}
17804
17805impl wkt::message::Message for RolloutUpdateEvent {
17806 fn typename() -> &'static str {
17807 "type.googleapis.com/google.cloud.deploy.v1.RolloutUpdateEvent"
17808 }
17809}
17810
17811pub mod rollout_update_event {
17813 #[allow(unused_imports)]
17814 use super::*;
17815
17816 #[derive(Clone, Debug, PartialEq)]
17832 #[non_exhaustive]
17833 pub enum RolloutUpdateType {
17834 Unspecified,
17836 Pending,
17838 PendingRelease,
17840 InProgress,
17842 Cancelling,
17844 Cancelled,
17846 Halted,
17848 Succeeded,
17850 Failed,
17852 ApprovalRequired,
17854 Approved,
17856 Rejected,
17858 AdvanceRequired,
17860 Advanced,
17862 UnknownValue(rollout_update_type::UnknownValue),
17867 }
17868
17869 #[doc(hidden)]
17870 pub mod rollout_update_type {
17871 #[allow(unused_imports)]
17872 use super::*;
17873 #[derive(Clone, Debug, PartialEq)]
17874 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
17875 }
17876
17877 impl RolloutUpdateType {
17878 pub fn value(&self) -> std::option::Option<i32> {
17883 match self {
17884 Self::Unspecified => std::option::Option::Some(0),
17885 Self::Pending => std::option::Option::Some(1),
17886 Self::PendingRelease => std::option::Option::Some(2),
17887 Self::InProgress => std::option::Option::Some(3),
17888 Self::Cancelling => std::option::Option::Some(4),
17889 Self::Cancelled => std::option::Option::Some(5),
17890 Self::Halted => std::option::Option::Some(6),
17891 Self::Succeeded => std::option::Option::Some(7),
17892 Self::Failed => std::option::Option::Some(8),
17893 Self::ApprovalRequired => std::option::Option::Some(9),
17894 Self::Approved => std::option::Option::Some(10),
17895 Self::Rejected => std::option::Option::Some(11),
17896 Self::AdvanceRequired => std::option::Option::Some(12),
17897 Self::Advanced => std::option::Option::Some(13),
17898 Self::UnknownValue(u) => u.0.value(),
17899 }
17900 }
17901
17902 pub fn name(&self) -> std::option::Option<&str> {
17907 match self {
17908 Self::Unspecified => std::option::Option::Some("ROLLOUT_UPDATE_TYPE_UNSPECIFIED"),
17909 Self::Pending => std::option::Option::Some("PENDING"),
17910 Self::PendingRelease => std::option::Option::Some("PENDING_RELEASE"),
17911 Self::InProgress => std::option::Option::Some("IN_PROGRESS"),
17912 Self::Cancelling => std::option::Option::Some("CANCELLING"),
17913 Self::Cancelled => std::option::Option::Some("CANCELLED"),
17914 Self::Halted => std::option::Option::Some("HALTED"),
17915 Self::Succeeded => std::option::Option::Some("SUCCEEDED"),
17916 Self::Failed => std::option::Option::Some("FAILED"),
17917 Self::ApprovalRequired => std::option::Option::Some("APPROVAL_REQUIRED"),
17918 Self::Approved => std::option::Option::Some("APPROVED"),
17919 Self::Rejected => std::option::Option::Some("REJECTED"),
17920 Self::AdvanceRequired => std::option::Option::Some("ADVANCE_REQUIRED"),
17921 Self::Advanced => std::option::Option::Some("ADVANCED"),
17922 Self::UnknownValue(u) => u.0.name(),
17923 }
17924 }
17925 }
17926
17927 impl std::default::Default for RolloutUpdateType {
17928 fn default() -> Self {
17929 use std::convert::From;
17930 Self::from(0)
17931 }
17932 }
17933
17934 impl std::fmt::Display for RolloutUpdateType {
17935 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
17936 wkt::internal::display_enum(f, self.name(), self.value())
17937 }
17938 }
17939
17940 impl std::convert::From<i32> for RolloutUpdateType {
17941 fn from(value: i32) -> Self {
17942 match value {
17943 0 => Self::Unspecified,
17944 1 => Self::Pending,
17945 2 => Self::PendingRelease,
17946 3 => Self::InProgress,
17947 4 => Self::Cancelling,
17948 5 => Self::Cancelled,
17949 6 => Self::Halted,
17950 7 => Self::Succeeded,
17951 8 => Self::Failed,
17952 9 => Self::ApprovalRequired,
17953 10 => Self::Approved,
17954 11 => Self::Rejected,
17955 12 => Self::AdvanceRequired,
17956 13 => Self::Advanced,
17957 _ => Self::UnknownValue(rollout_update_type::UnknownValue(
17958 wkt::internal::UnknownEnumValue::Integer(value),
17959 )),
17960 }
17961 }
17962 }
17963
17964 impl std::convert::From<&str> for RolloutUpdateType {
17965 fn from(value: &str) -> Self {
17966 use std::string::ToString;
17967 match value {
17968 "ROLLOUT_UPDATE_TYPE_UNSPECIFIED" => Self::Unspecified,
17969 "PENDING" => Self::Pending,
17970 "PENDING_RELEASE" => Self::PendingRelease,
17971 "IN_PROGRESS" => Self::InProgress,
17972 "CANCELLING" => Self::Cancelling,
17973 "CANCELLED" => Self::Cancelled,
17974 "HALTED" => Self::Halted,
17975 "SUCCEEDED" => Self::Succeeded,
17976 "FAILED" => Self::Failed,
17977 "APPROVAL_REQUIRED" => Self::ApprovalRequired,
17978 "APPROVED" => Self::Approved,
17979 "REJECTED" => Self::Rejected,
17980 "ADVANCE_REQUIRED" => Self::AdvanceRequired,
17981 "ADVANCED" => Self::Advanced,
17982 _ => Self::UnknownValue(rollout_update_type::UnknownValue(
17983 wkt::internal::UnknownEnumValue::String(value.to_string()),
17984 )),
17985 }
17986 }
17987 }
17988
17989 impl serde::ser::Serialize for RolloutUpdateType {
17990 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
17991 where
17992 S: serde::Serializer,
17993 {
17994 match self {
17995 Self::Unspecified => serializer.serialize_i32(0),
17996 Self::Pending => serializer.serialize_i32(1),
17997 Self::PendingRelease => serializer.serialize_i32(2),
17998 Self::InProgress => serializer.serialize_i32(3),
17999 Self::Cancelling => serializer.serialize_i32(4),
18000 Self::Cancelled => serializer.serialize_i32(5),
18001 Self::Halted => serializer.serialize_i32(6),
18002 Self::Succeeded => serializer.serialize_i32(7),
18003 Self::Failed => serializer.serialize_i32(8),
18004 Self::ApprovalRequired => serializer.serialize_i32(9),
18005 Self::Approved => serializer.serialize_i32(10),
18006 Self::Rejected => serializer.serialize_i32(11),
18007 Self::AdvanceRequired => serializer.serialize_i32(12),
18008 Self::Advanced => serializer.serialize_i32(13),
18009 Self::UnknownValue(u) => u.0.serialize(serializer),
18010 }
18011 }
18012 }
18013
18014 impl<'de> serde::de::Deserialize<'de> for RolloutUpdateType {
18015 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
18016 where
18017 D: serde::Deserializer<'de>,
18018 {
18019 deserializer.deserialize_any(wkt::internal::EnumVisitor::<RolloutUpdateType>::new(
18020 ".google.cloud.deploy.v1.RolloutUpdateEvent.RolloutUpdateType",
18021 ))
18022 }
18023 }
18024}
18025
18026#[derive(Clone, Default, PartialEq)]
18030#[non_exhaustive]
18031pub struct TargetNotificationEvent {
18032 pub message: std::string::String,
18034
18035 pub target: std::string::String,
18037
18038 pub r#type: crate::model::Type,
18040
18041 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18042}
18043
18044impl TargetNotificationEvent {
18045 pub fn new() -> Self {
18046 std::default::Default::default()
18047 }
18048
18049 pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18051 self.message = v.into();
18052 self
18053 }
18054
18055 pub fn set_target<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18057 self.target = v.into();
18058 self
18059 }
18060
18061 pub fn set_type<T: std::convert::Into<crate::model::Type>>(mut self, v: T) -> Self {
18063 self.r#type = v.into();
18064 self
18065 }
18066}
18067
18068impl wkt::message::Message for TargetNotificationEvent {
18069 fn typename() -> &'static str {
18070 "type.googleapis.com/google.cloud.deploy.v1.TargetNotificationEvent"
18071 }
18072}
18073
18074#[derive(Clone, Debug, PartialEq)]
18090#[non_exhaustive]
18091pub enum SkaffoldSupportState {
18092 Unspecified,
18094 Supported,
18096 MaintenanceMode,
18098 Unsupported,
18100 UnknownValue(skaffold_support_state::UnknownValue),
18105}
18106
18107#[doc(hidden)]
18108pub mod skaffold_support_state {
18109 #[allow(unused_imports)]
18110 use super::*;
18111 #[derive(Clone, Debug, PartialEq)]
18112 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
18113}
18114
18115impl SkaffoldSupportState {
18116 pub fn value(&self) -> std::option::Option<i32> {
18121 match self {
18122 Self::Unspecified => std::option::Option::Some(0),
18123 Self::Supported => std::option::Option::Some(1),
18124 Self::MaintenanceMode => std::option::Option::Some(2),
18125 Self::Unsupported => std::option::Option::Some(3),
18126 Self::UnknownValue(u) => u.0.value(),
18127 }
18128 }
18129
18130 pub fn name(&self) -> std::option::Option<&str> {
18135 match self {
18136 Self::Unspecified => std::option::Option::Some("SKAFFOLD_SUPPORT_STATE_UNSPECIFIED"),
18137 Self::Supported => std::option::Option::Some("SKAFFOLD_SUPPORT_STATE_SUPPORTED"),
18138 Self::MaintenanceMode => {
18139 std::option::Option::Some("SKAFFOLD_SUPPORT_STATE_MAINTENANCE_MODE")
18140 }
18141 Self::Unsupported => std::option::Option::Some("SKAFFOLD_SUPPORT_STATE_UNSUPPORTED"),
18142 Self::UnknownValue(u) => u.0.name(),
18143 }
18144 }
18145}
18146
18147impl std::default::Default for SkaffoldSupportState {
18148 fn default() -> Self {
18149 use std::convert::From;
18150 Self::from(0)
18151 }
18152}
18153
18154impl std::fmt::Display for SkaffoldSupportState {
18155 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
18156 wkt::internal::display_enum(f, self.name(), self.value())
18157 }
18158}
18159
18160impl std::convert::From<i32> for SkaffoldSupportState {
18161 fn from(value: i32) -> Self {
18162 match value {
18163 0 => Self::Unspecified,
18164 1 => Self::Supported,
18165 2 => Self::MaintenanceMode,
18166 3 => Self::Unsupported,
18167 _ => Self::UnknownValue(skaffold_support_state::UnknownValue(
18168 wkt::internal::UnknownEnumValue::Integer(value),
18169 )),
18170 }
18171 }
18172}
18173
18174impl std::convert::From<&str> for SkaffoldSupportState {
18175 fn from(value: &str) -> Self {
18176 use std::string::ToString;
18177 match value {
18178 "SKAFFOLD_SUPPORT_STATE_UNSPECIFIED" => Self::Unspecified,
18179 "SKAFFOLD_SUPPORT_STATE_SUPPORTED" => Self::Supported,
18180 "SKAFFOLD_SUPPORT_STATE_MAINTENANCE_MODE" => Self::MaintenanceMode,
18181 "SKAFFOLD_SUPPORT_STATE_UNSUPPORTED" => Self::Unsupported,
18182 _ => Self::UnknownValue(skaffold_support_state::UnknownValue(
18183 wkt::internal::UnknownEnumValue::String(value.to_string()),
18184 )),
18185 }
18186 }
18187}
18188
18189impl serde::ser::Serialize for SkaffoldSupportState {
18190 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
18191 where
18192 S: serde::Serializer,
18193 {
18194 match self {
18195 Self::Unspecified => serializer.serialize_i32(0),
18196 Self::Supported => serializer.serialize_i32(1),
18197 Self::MaintenanceMode => serializer.serialize_i32(2),
18198 Self::Unsupported => serializer.serialize_i32(3),
18199 Self::UnknownValue(u) => u.0.serialize(serializer),
18200 }
18201 }
18202}
18203
18204impl<'de> serde::de::Deserialize<'de> for SkaffoldSupportState {
18205 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
18206 where
18207 D: serde::Deserializer<'de>,
18208 {
18209 deserializer.deserialize_any(wkt::internal::EnumVisitor::<SkaffoldSupportState>::new(
18210 ".google.cloud.deploy.v1.SkaffoldSupportState",
18211 ))
18212 }
18213}
18214
18215#[derive(Clone, Debug, PartialEq)]
18231#[non_exhaustive]
18232pub enum BackoffMode {
18233 Unspecified,
18235 Linear,
18237 Exponential,
18239 UnknownValue(backoff_mode::UnknownValue),
18244}
18245
18246#[doc(hidden)]
18247pub mod backoff_mode {
18248 #[allow(unused_imports)]
18249 use super::*;
18250 #[derive(Clone, Debug, PartialEq)]
18251 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
18252}
18253
18254impl BackoffMode {
18255 pub fn value(&self) -> std::option::Option<i32> {
18260 match self {
18261 Self::Unspecified => std::option::Option::Some(0),
18262 Self::Linear => std::option::Option::Some(1),
18263 Self::Exponential => std::option::Option::Some(2),
18264 Self::UnknownValue(u) => u.0.value(),
18265 }
18266 }
18267
18268 pub fn name(&self) -> std::option::Option<&str> {
18273 match self {
18274 Self::Unspecified => std::option::Option::Some("BACKOFF_MODE_UNSPECIFIED"),
18275 Self::Linear => std::option::Option::Some("BACKOFF_MODE_LINEAR"),
18276 Self::Exponential => std::option::Option::Some("BACKOFF_MODE_EXPONENTIAL"),
18277 Self::UnknownValue(u) => u.0.name(),
18278 }
18279 }
18280}
18281
18282impl std::default::Default for BackoffMode {
18283 fn default() -> Self {
18284 use std::convert::From;
18285 Self::from(0)
18286 }
18287}
18288
18289impl std::fmt::Display for BackoffMode {
18290 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
18291 wkt::internal::display_enum(f, self.name(), self.value())
18292 }
18293}
18294
18295impl std::convert::From<i32> for BackoffMode {
18296 fn from(value: i32) -> Self {
18297 match value {
18298 0 => Self::Unspecified,
18299 1 => Self::Linear,
18300 2 => Self::Exponential,
18301 _ => Self::UnknownValue(backoff_mode::UnknownValue(
18302 wkt::internal::UnknownEnumValue::Integer(value),
18303 )),
18304 }
18305 }
18306}
18307
18308impl std::convert::From<&str> for BackoffMode {
18309 fn from(value: &str) -> Self {
18310 use std::string::ToString;
18311 match value {
18312 "BACKOFF_MODE_UNSPECIFIED" => Self::Unspecified,
18313 "BACKOFF_MODE_LINEAR" => Self::Linear,
18314 "BACKOFF_MODE_EXPONENTIAL" => Self::Exponential,
18315 _ => Self::UnknownValue(backoff_mode::UnknownValue(
18316 wkt::internal::UnknownEnumValue::String(value.to_string()),
18317 )),
18318 }
18319 }
18320}
18321
18322impl serde::ser::Serialize for BackoffMode {
18323 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
18324 where
18325 S: serde::Serializer,
18326 {
18327 match self {
18328 Self::Unspecified => serializer.serialize_i32(0),
18329 Self::Linear => serializer.serialize_i32(1),
18330 Self::Exponential => serializer.serialize_i32(2),
18331 Self::UnknownValue(u) => u.0.serialize(serializer),
18332 }
18333 }
18334}
18335
18336impl<'de> serde::de::Deserialize<'de> for BackoffMode {
18337 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
18338 where
18339 D: serde::Deserializer<'de>,
18340 {
18341 deserializer.deserialize_any(wkt::internal::EnumVisitor::<BackoffMode>::new(
18342 ".google.cloud.deploy.v1.BackoffMode",
18343 ))
18344 }
18345}
18346
18347#[derive(Clone, Debug, PartialEq)]
18363#[non_exhaustive]
18364pub enum RepairState {
18365 Unspecified,
18367 Succeeded,
18369 Cancelled,
18371 Failed,
18373 InProgress,
18375 Pending,
18377 Aborted,
18379 UnknownValue(repair_state::UnknownValue),
18384}
18385
18386#[doc(hidden)]
18387pub mod repair_state {
18388 #[allow(unused_imports)]
18389 use super::*;
18390 #[derive(Clone, Debug, PartialEq)]
18391 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
18392}
18393
18394impl RepairState {
18395 pub fn value(&self) -> std::option::Option<i32> {
18400 match self {
18401 Self::Unspecified => std::option::Option::Some(0),
18402 Self::Succeeded => std::option::Option::Some(1),
18403 Self::Cancelled => std::option::Option::Some(2),
18404 Self::Failed => std::option::Option::Some(3),
18405 Self::InProgress => std::option::Option::Some(4),
18406 Self::Pending => std::option::Option::Some(5),
18407 Self::Aborted => std::option::Option::Some(7),
18408 Self::UnknownValue(u) => u.0.value(),
18409 }
18410 }
18411
18412 pub fn name(&self) -> std::option::Option<&str> {
18417 match self {
18418 Self::Unspecified => std::option::Option::Some("REPAIR_STATE_UNSPECIFIED"),
18419 Self::Succeeded => std::option::Option::Some("REPAIR_STATE_SUCCEEDED"),
18420 Self::Cancelled => std::option::Option::Some("REPAIR_STATE_CANCELLED"),
18421 Self::Failed => std::option::Option::Some("REPAIR_STATE_FAILED"),
18422 Self::InProgress => std::option::Option::Some("REPAIR_STATE_IN_PROGRESS"),
18423 Self::Pending => std::option::Option::Some("REPAIR_STATE_PENDING"),
18424 Self::Aborted => std::option::Option::Some("REPAIR_STATE_ABORTED"),
18425 Self::UnknownValue(u) => u.0.name(),
18426 }
18427 }
18428}
18429
18430impl std::default::Default for RepairState {
18431 fn default() -> Self {
18432 use std::convert::From;
18433 Self::from(0)
18434 }
18435}
18436
18437impl std::fmt::Display for RepairState {
18438 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
18439 wkt::internal::display_enum(f, self.name(), self.value())
18440 }
18441}
18442
18443impl std::convert::From<i32> for RepairState {
18444 fn from(value: i32) -> Self {
18445 match value {
18446 0 => Self::Unspecified,
18447 1 => Self::Succeeded,
18448 2 => Self::Cancelled,
18449 3 => Self::Failed,
18450 4 => Self::InProgress,
18451 5 => Self::Pending,
18452 7 => Self::Aborted,
18453 _ => Self::UnknownValue(repair_state::UnknownValue(
18454 wkt::internal::UnknownEnumValue::Integer(value),
18455 )),
18456 }
18457 }
18458}
18459
18460impl std::convert::From<&str> for RepairState {
18461 fn from(value: &str) -> Self {
18462 use std::string::ToString;
18463 match value {
18464 "REPAIR_STATE_UNSPECIFIED" => Self::Unspecified,
18465 "REPAIR_STATE_SUCCEEDED" => Self::Succeeded,
18466 "REPAIR_STATE_CANCELLED" => Self::Cancelled,
18467 "REPAIR_STATE_FAILED" => Self::Failed,
18468 "REPAIR_STATE_IN_PROGRESS" => Self::InProgress,
18469 "REPAIR_STATE_PENDING" => Self::Pending,
18470 "REPAIR_STATE_ABORTED" => Self::Aborted,
18471 _ => Self::UnknownValue(repair_state::UnknownValue(
18472 wkt::internal::UnknownEnumValue::String(value.to_string()),
18473 )),
18474 }
18475 }
18476}
18477
18478impl serde::ser::Serialize for RepairState {
18479 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
18480 where
18481 S: serde::Serializer,
18482 {
18483 match self {
18484 Self::Unspecified => serializer.serialize_i32(0),
18485 Self::Succeeded => serializer.serialize_i32(1),
18486 Self::Cancelled => serializer.serialize_i32(2),
18487 Self::Failed => serializer.serialize_i32(3),
18488 Self::InProgress => serializer.serialize_i32(4),
18489 Self::Pending => serializer.serialize_i32(5),
18490 Self::Aborted => serializer.serialize_i32(7),
18491 Self::UnknownValue(u) => u.0.serialize(serializer),
18492 }
18493 }
18494}
18495
18496impl<'de> serde::de::Deserialize<'de> for RepairState {
18497 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
18498 where
18499 D: serde::Deserializer<'de>,
18500 {
18501 deserializer.deserialize_any(wkt::internal::EnumVisitor::<RepairState>::new(
18502 ".google.cloud.deploy.v1.RepairState",
18503 ))
18504 }
18505}
18506
18507#[derive(Clone, Debug, PartialEq)]
18523#[non_exhaustive]
18524pub enum Type {
18525 Unspecified,
18527 PubsubNotificationFailure,
18529 ResourceStateChange,
18531 ProcessAborted,
18533 RestrictionViolated,
18535 ResourceDeleted,
18537 RolloutUpdate,
18539 DeployPolicyEvaluation,
18541 #[deprecated]
18543 RenderStatuesChange,
18544 UnknownValue(r#type::UnknownValue),
18549}
18550
18551#[doc(hidden)]
18552pub mod r#type {
18553 #[allow(unused_imports)]
18554 use super::*;
18555 #[derive(Clone, Debug, PartialEq)]
18556 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
18557}
18558
18559impl Type {
18560 pub fn value(&self) -> std::option::Option<i32> {
18565 match self {
18566 Self::Unspecified => std::option::Option::Some(0),
18567 Self::PubsubNotificationFailure => std::option::Option::Some(1),
18568 Self::ResourceStateChange => std::option::Option::Some(3),
18569 Self::ProcessAborted => std::option::Option::Some(4),
18570 Self::RestrictionViolated => std::option::Option::Some(5),
18571 Self::ResourceDeleted => std::option::Option::Some(6),
18572 Self::RolloutUpdate => std::option::Option::Some(7),
18573 Self::DeployPolicyEvaluation => std::option::Option::Some(8),
18574 Self::RenderStatuesChange => std::option::Option::Some(2),
18575 Self::UnknownValue(u) => u.0.value(),
18576 }
18577 }
18578
18579 pub fn name(&self) -> std::option::Option<&str> {
18584 match self {
18585 Self::Unspecified => std::option::Option::Some("TYPE_UNSPECIFIED"),
18586 Self::PubsubNotificationFailure => {
18587 std::option::Option::Some("TYPE_PUBSUB_NOTIFICATION_FAILURE")
18588 }
18589 Self::ResourceStateChange => std::option::Option::Some("TYPE_RESOURCE_STATE_CHANGE"),
18590 Self::ProcessAborted => std::option::Option::Some("TYPE_PROCESS_ABORTED"),
18591 Self::RestrictionViolated => std::option::Option::Some("TYPE_RESTRICTION_VIOLATED"),
18592 Self::ResourceDeleted => std::option::Option::Some("TYPE_RESOURCE_DELETED"),
18593 Self::RolloutUpdate => std::option::Option::Some("TYPE_ROLLOUT_UPDATE"),
18594 Self::DeployPolicyEvaluation => {
18595 std::option::Option::Some("TYPE_DEPLOY_POLICY_EVALUATION")
18596 }
18597 Self::RenderStatuesChange => std::option::Option::Some("TYPE_RENDER_STATUES_CHANGE"),
18598 Self::UnknownValue(u) => u.0.name(),
18599 }
18600 }
18601}
18602
18603impl std::default::Default for Type {
18604 fn default() -> Self {
18605 use std::convert::From;
18606 Self::from(0)
18607 }
18608}
18609
18610impl std::fmt::Display for Type {
18611 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
18612 wkt::internal::display_enum(f, self.name(), self.value())
18613 }
18614}
18615
18616impl std::convert::From<i32> for Type {
18617 fn from(value: i32) -> Self {
18618 match value {
18619 0 => Self::Unspecified,
18620 1 => Self::PubsubNotificationFailure,
18621 2 => Self::RenderStatuesChange,
18622 3 => Self::ResourceStateChange,
18623 4 => Self::ProcessAborted,
18624 5 => Self::RestrictionViolated,
18625 6 => Self::ResourceDeleted,
18626 7 => Self::RolloutUpdate,
18627 8 => Self::DeployPolicyEvaluation,
18628 _ => Self::UnknownValue(r#type::UnknownValue(
18629 wkt::internal::UnknownEnumValue::Integer(value),
18630 )),
18631 }
18632 }
18633}
18634
18635impl std::convert::From<&str> for Type {
18636 fn from(value: &str) -> Self {
18637 use std::string::ToString;
18638 match value {
18639 "TYPE_UNSPECIFIED" => Self::Unspecified,
18640 "TYPE_PUBSUB_NOTIFICATION_FAILURE" => Self::PubsubNotificationFailure,
18641 "TYPE_RESOURCE_STATE_CHANGE" => Self::ResourceStateChange,
18642 "TYPE_PROCESS_ABORTED" => Self::ProcessAborted,
18643 "TYPE_RESTRICTION_VIOLATED" => Self::RestrictionViolated,
18644 "TYPE_RESOURCE_DELETED" => Self::ResourceDeleted,
18645 "TYPE_ROLLOUT_UPDATE" => Self::RolloutUpdate,
18646 "TYPE_DEPLOY_POLICY_EVALUATION" => Self::DeployPolicyEvaluation,
18647 "TYPE_RENDER_STATUES_CHANGE" => Self::RenderStatuesChange,
18648 _ => Self::UnknownValue(r#type::UnknownValue(
18649 wkt::internal::UnknownEnumValue::String(value.to_string()),
18650 )),
18651 }
18652 }
18653}
18654
18655impl serde::ser::Serialize for Type {
18656 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
18657 where
18658 S: serde::Serializer,
18659 {
18660 match self {
18661 Self::Unspecified => serializer.serialize_i32(0),
18662 Self::PubsubNotificationFailure => serializer.serialize_i32(1),
18663 Self::ResourceStateChange => serializer.serialize_i32(3),
18664 Self::ProcessAborted => serializer.serialize_i32(4),
18665 Self::RestrictionViolated => serializer.serialize_i32(5),
18666 Self::ResourceDeleted => serializer.serialize_i32(6),
18667 Self::RolloutUpdate => serializer.serialize_i32(7),
18668 Self::DeployPolicyEvaluation => serializer.serialize_i32(8),
18669 Self::RenderStatuesChange => serializer.serialize_i32(2),
18670 Self::UnknownValue(u) => u.0.serialize(serializer),
18671 }
18672 }
18673}
18674
18675impl<'de> serde::de::Deserialize<'de> for Type {
18676 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
18677 where
18678 D: serde::Deserializer<'de>,
18679 {
18680 deserializer.deserialize_any(wkt::internal::EnumVisitor::<Type>::new(
18681 ".google.cloud.deploy.v1.Type",
18682 ))
18683 }
18684}