1#![allow(rustdoc::redundant_explicit_links)]
18#![allow(rustdoc::broken_intra_doc_links)]
19#![no_implicit_prelude]
20extern crate api;
21extern crate async_trait;
22extern crate bytes;
23extern crate gax;
24extern crate gaxi;
25extern crate iam_v1;
26extern crate lazy_static;
27extern crate longrunning;
28extern crate lro;
29extern crate reqwest;
30extern crate rpc;
31extern crate serde;
32extern crate serde_json;
33extern crate serde_with;
34extern crate std;
35extern crate tracing;
36extern crate wkt;
37
38#[serde_with::serde_as]
40#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
41#[serde(default, rename_all = "camelCase")]
42#[non_exhaustive]
43pub struct SubmitBuildRequest {
44 #[serde(skip_serializing_if = "std::string::String::is_empty")]
49 pub parent: std::string::String,
50
51 #[serde(skip_serializing_if = "std::string::String::is_empty")]
53 pub image_uri: std::string::String,
54
55 #[serde(skip_serializing_if = "std::string::String::is_empty")]
58 pub service_account: std::string::String,
59
60 #[serde(skip_serializing_if = "std::string::String::is_empty")]
67 pub worker_pool: std::string::String,
68
69 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
71 pub tags: std::vec::Vec<std::string::String>,
72
73 #[serde(flatten, skip_serializing_if = "std::option::Option::is_none")]
75 pub source: std::option::Option<crate::model::submit_build_request::Source>,
76
77 #[serde(flatten, skip_serializing_if = "std::option::Option::is_none")]
79 pub build_type: std::option::Option<crate::model::submit_build_request::BuildType>,
80
81 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
82 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
83}
84
85impl SubmitBuildRequest {
86 pub fn new() -> Self {
87 std::default::Default::default()
88 }
89
90 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
92 self.parent = v.into();
93 self
94 }
95
96 pub fn set_image_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
98 self.image_uri = v.into();
99 self
100 }
101
102 pub fn set_service_account<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
104 self.service_account = v.into();
105 self
106 }
107
108 pub fn set_worker_pool<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
110 self.worker_pool = v.into();
111 self
112 }
113
114 pub fn set_tags<T, V>(mut self, v: T) -> Self
116 where
117 T: std::iter::IntoIterator<Item = V>,
118 V: std::convert::Into<std::string::String>,
119 {
120 use std::iter::Iterator;
121 self.tags = v.into_iter().map(|i| i.into()).collect();
122 self
123 }
124
125 pub fn set_source<
130 T: std::convert::Into<std::option::Option<crate::model::submit_build_request::Source>>,
131 >(
132 mut self,
133 v: T,
134 ) -> Self {
135 self.source = v.into();
136 self
137 }
138
139 pub fn storage_source(
143 &self,
144 ) -> std::option::Option<&std::boxed::Box<crate::model::StorageSource>> {
145 #[allow(unreachable_patterns)]
146 self.source.as_ref().and_then(|v| match v {
147 crate::model::submit_build_request::Source::StorageSource(v) => {
148 std::option::Option::Some(v)
149 }
150 _ => std::option::Option::None,
151 })
152 }
153
154 pub fn set_storage_source<
160 T: std::convert::Into<std::boxed::Box<crate::model::StorageSource>>,
161 >(
162 mut self,
163 v: T,
164 ) -> Self {
165 self.source = std::option::Option::Some(
166 crate::model::submit_build_request::Source::StorageSource(v.into()),
167 );
168 self
169 }
170
171 pub fn set_build_type<
176 T: std::convert::Into<std::option::Option<crate::model::submit_build_request::BuildType>>,
177 >(
178 mut self,
179 v: T,
180 ) -> Self {
181 self.build_type = v.into();
182 self
183 }
184
185 pub fn buildpack_build(
189 &self,
190 ) -> std::option::Option<&std::boxed::Box<crate::model::submit_build_request::BuildpacksBuild>>
191 {
192 #[allow(unreachable_patterns)]
193 self.build_type.as_ref().and_then(|v| match v {
194 crate::model::submit_build_request::BuildType::BuildpackBuild(v) => {
195 std::option::Option::Some(v)
196 }
197 _ => std::option::Option::None,
198 })
199 }
200
201 pub fn docker_build(
205 &self,
206 ) -> std::option::Option<&std::boxed::Box<crate::model::submit_build_request::DockerBuild>>
207 {
208 #[allow(unreachable_patterns)]
209 self.build_type.as_ref().and_then(|v| match v {
210 crate::model::submit_build_request::BuildType::DockerBuild(v) => {
211 std::option::Option::Some(v)
212 }
213 _ => std::option::Option::None,
214 })
215 }
216
217 pub fn set_buildpack_build<
223 T: std::convert::Into<std::boxed::Box<crate::model::submit_build_request::BuildpacksBuild>>,
224 >(
225 mut self,
226 v: T,
227 ) -> Self {
228 self.build_type = std::option::Option::Some(
229 crate::model::submit_build_request::BuildType::BuildpackBuild(v.into()),
230 );
231 self
232 }
233
234 pub fn set_docker_build<
240 T: std::convert::Into<std::boxed::Box<crate::model::submit_build_request::DockerBuild>>,
241 >(
242 mut self,
243 v: T,
244 ) -> Self {
245 self.build_type = std::option::Option::Some(
246 crate::model::submit_build_request::BuildType::DockerBuild(v.into()),
247 );
248 self
249 }
250}
251
252impl wkt::message::Message for SubmitBuildRequest {
253 fn typename() -> &'static str {
254 "type.googleapis.com/google.cloud.run.v2.SubmitBuildRequest"
255 }
256}
257
258pub mod submit_build_request {
260 #[allow(unused_imports)]
261 use super::*;
262
263 #[serde_with::serde_as]
265 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
266 #[serde(default, rename_all = "camelCase")]
267 #[non_exhaustive]
268 pub struct DockerBuild {
269 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
270 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
271 }
272
273 impl DockerBuild {
274 pub fn new() -> Self {
275 std::default::Default::default()
276 }
277 }
278
279 impl wkt::message::Message for DockerBuild {
280 fn typename() -> &'static str {
281 "type.googleapis.com/google.cloud.run.v2.SubmitBuildRequest.DockerBuild"
282 }
283 }
284
285 #[serde_with::serde_as]
287 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
288 #[serde(default, rename_all = "camelCase")]
289 #[non_exhaustive]
290 pub struct BuildpacksBuild {
291 #[serde(skip_serializing_if = "std::string::String::is_empty")]
293 pub runtime: std::string::String,
294
295 #[serde(skip_serializing_if = "std::string::String::is_empty")]
298 pub function_target: std::string::String,
299
300 #[serde(skip_serializing_if = "std::string::String::is_empty")]
306 pub cache_image_uri: std::string::String,
307
308 #[serde(skip_serializing_if = "std::string::String::is_empty")]
310 pub base_image: std::string::String,
311
312 #[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
314 pub environment_variables:
315 std::collections::HashMap<std::string::String, std::string::String>,
316
317 pub enable_automatic_updates: bool,
321
322 #[serde(skip_serializing_if = "std::string::String::is_empty")]
326 pub project_descriptor: std::string::String,
327
328 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
329 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
330 }
331
332 impl BuildpacksBuild {
333 pub fn new() -> Self {
334 std::default::Default::default()
335 }
336
337 pub fn set_runtime<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
339 self.runtime = v.into();
340 self
341 }
342
343 pub fn set_function_target<T: std::convert::Into<std::string::String>>(
345 mut self,
346 v: T,
347 ) -> Self {
348 self.function_target = v.into();
349 self
350 }
351
352 pub fn set_cache_image_uri<T: std::convert::Into<std::string::String>>(
354 mut self,
355 v: T,
356 ) -> Self {
357 self.cache_image_uri = v.into();
358 self
359 }
360
361 pub fn set_base_image<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
363 self.base_image = v.into();
364 self
365 }
366
367 pub fn set_enable_automatic_updates<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
369 self.enable_automatic_updates = v.into();
370 self
371 }
372
373 pub fn set_project_descriptor<T: std::convert::Into<std::string::String>>(
375 mut self,
376 v: T,
377 ) -> Self {
378 self.project_descriptor = v.into();
379 self
380 }
381
382 pub fn set_environment_variables<T, K, V>(mut self, v: T) -> Self
384 where
385 T: std::iter::IntoIterator<Item = (K, V)>,
386 K: std::convert::Into<std::string::String>,
387 V: std::convert::Into<std::string::String>,
388 {
389 use std::iter::Iterator;
390 self.environment_variables = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
391 self
392 }
393 }
394
395 impl wkt::message::Message for BuildpacksBuild {
396 fn typename() -> &'static str {
397 "type.googleapis.com/google.cloud.run.v2.SubmitBuildRequest.BuildpacksBuild"
398 }
399 }
400
401 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
403 #[serde(rename_all = "camelCase")]
404 #[non_exhaustive]
405 pub enum Source {
406 StorageSource(std::boxed::Box<crate::model::StorageSource>),
408 }
409
410 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
412 #[serde(rename_all = "camelCase")]
413 #[non_exhaustive]
414 pub enum BuildType {
415 BuildpackBuild(std::boxed::Box<crate::model::submit_build_request::BuildpacksBuild>),
417 DockerBuild(std::boxed::Box<crate::model::submit_build_request::DockerBuild>),
419 }
420}
421
422#[serde_with::serde_as]
424#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
425#[serde(default, rename_all = "camelCase")]
426#[non_exhaustive]
427pub struct SubmitBuildResponse {
428 #[serde(skip_serializing_if = "std::option::Option::is_none")]
430 pub build_operation: std::option::Option<longrunning::model::Operation>,
431
432 #[serde(skip_serializing_if = "std::string::String::is_empty")]
435 pub base_image_uri: std::string::String,
436
437 #[serde(skip_serializing_if = "std::string::String::is_empty")]
439 pub base_image_warning: std::string::String,
440
441 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
442 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
443}
444
445impl SubmitBuildResponse {
446 pub fn new() -> Self {
447 std::default::Default::default()
448 }
449
450 pub fn set_build_operation<
452 T: std::convert::Into<std::option::Option<longrunning::model::Operation>>,
453 >(
454 mut self,
455 v: T,
456 ) -> Self {
457 self.build_operation = v.into();
458 self
459 }
460
461 pub fn set_base_image_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
463 self.base_image_uri = v.into();
464 self
465 }
466
467 pub fn set_base_image_warning<T: std::convert::Into<std::string::String>>(
469 mut self,
470 v: T,
471 ) -> Self {
472 self.base_image_warning = v.into();
473 self
474 }
475}
476
477impl wkt::message::Message for SubmitBuildResponse {
478 fn typename() -> &'static str {
479 "type.googleapis.com/google.cloud.run.v2.SubmitBuildResponse"
480 }
481}
482
483#[serde_with::serde_as]
485#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
486#[serde(default, rename_all = "camelCase")]
487#[non_exhaustive]
488pub struct StorageSource {
489 #[serde(skip_serializing_if = "std::string::String::is_empty")]
493 pub bucket: std::string::String,
494
495 #[serde(skip_serializing_if = "std::string::String::is_empty")]
500 pub object: std::string::String,
501
502 #[serde_as(as = "serde_with::DisplayFromStr")]
505 pub generation: i64,
506
507 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
508 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
509}
510
511impl StorageSource {
512 pub fn new() -> Self {
513 std::default::Default::default()
514 }
515
516 pub fn set_bucket<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
518 self.bucket = v.into();
519 self
520 }
521
522 pub fn set_object<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
524 self.object = v.into();
525 self
526 }
527
528 pub fn set_generation<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
530 self.generation = v.into();
531 self
532 }
533}
534
535impl wkt::message::Message for StorageSource {
536 fn typename() -> &'static str {
537 "type.googleapis.com/google.cloud.run.v2.StorageSource"
538 }
539}
540
541#[serde_with::serde_as]
543#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
544#[serde(default, rename_all = "camelCase")]
545#[non_exhaustive]
546pub struct Condition {
547 #[serde(rename = "type")]
554 #[serde(skip_serializing_if = "std::string::String::is_empty")]
555 pub r#type: std::string::String,
556
557 pub state: crate::model::condition::State,
559
560 #[serde(skip_serializing_if = "std::string::String::is_empty")]
562 pub message: std::string::String,
563
564 #[serde(skip_serializing_if = "std::option::Option::is_none")]
566 pub last_transition_time: std::option::Option<wkt::Timestamp>,
567
568 pub severity: crate::model::condition::Severity,
570
571 #[serde(flatten, skip_serializing_if = "std::option::Option::is_none")]
575 pub reasons: std::option::Option<crate::model::condition::Reasons>,
576
577 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
578 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
579}
580
581impl Condition {
582 pub fn new() -> Self {
583 std::default::Default::default()
584 }
585
586 pub fn set_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
588 self.r#type = v.into();
589 self
590 }
591
592 pub fn set_state<T: std::convert::Into<crate::model::condition::State>>(
594 mut self,
595 v: T,
596 ) -> Self {
597 self.state = v.into();
598 self
599 }
600
601 pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
603 self.message = v.into();
604 self
605 }
606
607 pub fn set_last_transition_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
609 mut self,
610 v: T,
611 ) -> Self {
612 self.last_transition_time = v.into();
613 self
614 }
615
616 pub fn set_severity<T: std::convert::Into<crate::model::condition::Severity>>(
618 mut self,
619 v: T,
620 ) -> Self {
621 self.severity = v.into();
622 self
623 }
624
625 pub fn set_reasons<
630 T: std::convert::Into<std::option::Option<crate::model::condition::Reasons>>,
631 >(
632 mut self,
633 v: T,
634 ) -> Self {
635 self.reasons = v.into();
636 self
637 }
638
639 pub fn reason(&self) -> std::option::Option<&crate::model::condition::CommonReason> {
643 #[allow(unreachable_patterns)]
644 self.reasons.as_ref().and_then(|v| match v {
645 crate::model::condition::Reasons::Reason(v) => std::option::Option::Some(v),
646 _ => std::option::Option::None,
647 })
648 }
649
650 pub fn revision_reason(&self) -> std::option::Option<&crate::model::condition::RevisionReason> {
654 #[allow(unreachable_patterns)]
655 self.reasons.as_ref().and_then(|v| match v {
656 crate::model::condition::Reasons::RevisionReason(v) => std::option::Option::Some(v),
657 _ => std::option::Option::None,
658 })
659 }
660
661 pub fn execution_reason(
665 &self,
666 ) -> std::option::Option<&crate::model::condition::ExecutionReason> {
667 #[allow(unreachable_patterns)]
668 self.reasons.as_ref().and_then(|v| match v {
669 crate::model::condition::Reasons::ExecutionReason(v) => std::option::Option::Some(v),
670 _ => std::option::Option::None,
671 })
672 }
673
674 pub fn set_reason<T: std::convert::Into<crate::model::condition::CommonReason>>(
680 mut self,
681 v: T,
682 ) -> Self {
683 self.reasons =
684 std::option::Option::Some(crate::model::condition::Reasons::Reason(v.into()));
685 self
686 }
687
688 pub fn set_revision_reason<T: std::convert::Into<crate::model::condition::RevisionReason>>(
694 mut self,
695 v: T,
696 ) -> Self {
697 self.reasons =
698 std::option::Option::Some(crate::model::condition::Reasons::RevisionReason(v.into()));
699 self
700 }
701
702 pub fn set_execution_reason<T: std::convert::Into<crate::model::condition::ExecutionReason>>(
708 mut self,
709 v: T,
710 ) -> Self {
711 self.reasons =
712 std::option::Option::Some(crate::model::condition::Reasons::ExecutionReason(v.into()));
713 self
714 }
715}
716
717impl wkt::message::Message for Condition {
718 fn typename() -> &'static str {
719 "type.googleapis.com/google.cloud.run.v2.Condition"
720 }
721}
722
723pub mod condition {
725 #[allow(unused_imports)]
726 use super::*;
727
728 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
730 pub struct State(i32);
731
732 impl State {
733 pub const STATE_UNSPECIFIED: State = State::new(0);
735
736 pub const CONDITION_PENDING: State = State::new(1);
738
739 pub const CONDITION_RECONCILING: State = State::new(2);
741
742 pub const CONDITION_FAILED: State = State::new(3);
744
745 pub const CONDITION_SUCCEEDED: State = State::new(4);
747
748 pub(crate) const fn new(value: i32) -> Self {
750 Self(value)
751 }
752
753 pub fn value(&self) -> i32 {
755 self.0
756 }
757
758 pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
760 match self.0 {
761 0 => std::borrow::Cow::Borrowed("STATE_UNSPECIFIED"),
762 1 => std::borrow::Cow::Borrowed("CONDITION_PENDING"),
763 2 => std::borrow::Cow::Borrowed("CONDITION_RECONCILING"),
764 3 => std::borrow::Cow::Borrowed("CONDITION_FAILED"),
765 4 => std::borrow::Cow::Borrowed("CONDITION_SUCCEEDED"),
766 _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
767 }
768 }
769
770 pub fn from_str_name(name: &str) -> std::option::Option<Self> {
772 match name {
773 "STATE_UNSPECIFIED" => std::option::Option::Some(Self::STATE_UNSPECIFIED),
774 "CONDITION_PENDING" => std::option::Option::Some(Self::CONDITION_PENDING),
775 "CONDITION_RECONCILING" => std::option::Option::Some(Self::CONDITION_RECONCILING),
776 "CONDITION_FAILED" => std::option::Option::Some(Self::CONDITION_FAILED),
777 "CONDITION_SUCCEEDED" => std::option::Option::Some(Self::CONDITION_SUCCEEDED),
778 _ => std::option::Option::None,
779 }
780 }
781 }
782
783 impl std::convert::From<i32> for State {
784 fn from(value: i32) -> Self {
785 Self::new(value)
786 }
787 }
788
789 impl std::default::Default for State {
790 fn default() -> Self {
791 Self::new(0)
792 }
793 }
794
795 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
797 pub struct Severity(i32);
798
799 impl Severity {
800 pub const SEVERITY_UNSPECIFIED: Severity = Severity::new(0);
802
803 pub const ERROR: Severity = Severity::new(1);
805
806 pub const WARNING: Severity = Severity::new(2);
808
809 pub const INFO: Severity = Severity::new(3);
811
812 pub(crate) const fn new(value: i32) -> Self {
814 Self(value)
815 }
816
817 pub fn value(&self) -> i32 {
819 self.0
820 }
821
822 pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
824 match self.0 {
825 0 => std::borrow::Cow::Borrowed("SEVERITY_UNSPECIFIED"),
826 1 => std::borrow::Cow::Borrowed("ERROR"),
827 2 => std::borrow::Cow::Borrowed("WARNING"),
828 3 => std::borrow::Cow::Borrowed("INFO"),
829 _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
830 }
831 }
832
833 pub fn from_str_name(name: &str) -> std::option::Option<Self> {
835 match name {
836 "SEVERITY_UNSPECIFIED" => std::option::Option::Some(Self::SEVERITY_UNSPECIFIED),
837 "ERROR" => std::option::Option::Some(Self::ERROR),
838 "WARNING" => std::option::Option::Some(Self::WARNING),
839 "INFO" => std::option::Option::Some(Self::INFO),
840 _ => std::option::Option::None,
841 }
842 }
843 }
844
845 impl std::convert::From<i32> for Severity {
846 fn from(value: i32) -> Self {
847 Self::new(value)
848 }
849 }
850
851 impl std::default::Default for Severity {
852 fn default() -> Self {
853 Self::new(0)
854 }
855 }
856
857 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
859 pub struct CommonReason(i32);
860
861 impl CommonReason {
862 pub const COMMON_REASON_UNDEFINED: CommonReason = CommonReason::new(0);
864
865 pub const UNKNOWN: CommonReason = CommonReason::new(1);
867
868 pub const REVISION_FAILED: CommonReason = CommonReason::new(3);
870
871 pub const PROGRESS_DEADLINE_EXCEEDED: CommonReason = CommonReason::new(4);
873
874 pub const CONTAINER_MISSING: CommonReason = CommonReason::new(6);
876
877 pub const CONTAINER_PERMISSION_DENIED: CommonReason = CommonReason::new(7);
879
880 pub const CONTAINER_IMAGE_UNAUTHORIZED: CommonReason = CommonReason::new(8);
882
883 pub const CONTAINER_IMAGE_AUTHORIZATION_CHECK_FAILED: CommonReason = CommonReason::new(9);
885
886 pub const ENCRYPTION_KEY_PERMISSION_DENIED: CommonReason = CommonReason::new(10);
888
889 pub const ENCRYPTION_KEY_CHECK_FAILED: CommonReason = CommonReason::new(11);
891
892 pub const SECRETS_ACCESS_CHECK_FAILED: CommonReason = CommonReason::new(12);
894
895 pub const WAITING_FOR_OPERATION: CommonReason = CommonReason::new(13);
897
898 pub const IMMEDIATE_RETRY: CommonReason = CommonReason::new(14);
900
901 pub const POSTPONED_RETRY: CommonReason = CommonReason::new(15);
903
904 pub const INTERNAL: CommonReason = CommonReason::new(16);
906
907 pub(crate) const fn new(value: i32) -> Self {
909 Self(value)
910 }
911
912 pub fn value(&self) -> i32 {
914 self.0
915 }
916
917 pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
919 match self.0 {
920 0 => std::borrow::Cow::Borrowed("COMMON_REASON_UNDEFINED"),
921 1 => std::borrow::Cow::Borrowed("UNKNOWN"),
922 3 => std::borrow::Cow::Borrowed("REVISION_FAILED"),
923 4 => std::borrow::Cow::Borrowed("PROGRESS_DEADLINE_EXCEEDED"),
924 6 => std::borrow::Cow::Borrowed("CONTAINER_MISSING"),
925 7 => std::borrow::Cow::Borrowed("CONTAINER_PERMISSION_DENIED"),
926 8 => std::borrow::Cow::Borrowed("CONTAINER_IMAGE_UNAUTHORIZED"),
927 9 => std::borrow::Cow::Borrowed("CONTAINER_IMAGE_AUTHORIZATION_CHECK_FAILED"),
928 10 => std::borrow::Cow::Borrowed("ENCRYPTION_KEY_PERMISSION_DENIED"),
929 11 => std::borrow::Cow::Borrowed("ENCRYPTION_KEY_CHECK_FAILED"),
930 12 => std::borrow::Cow::Borrowed("SECRETS_ACCESS_CHECK_FAILED"),
931 13 => std::borrow::Cow::Borrowed("WAITING_FOR_OPERATION"),
932 14 => std::borrow::Cow::Borrowed("IMMEDIATE_RETRY"),
933 15 => std::borrow::Cow::Borrowed("POSTPONED_RETRY"),
934 16 => std::borrow::Cow::Borrowed("INTERNAL"),
935 _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
936 }
937 }
938
939 pub fn from_str_name(name: &str) -> std::option::Option<Self> {
941 match name {
942 "COMMON_REASON_UNDEFINED" => {
943 std::option::Option::Some(Self::COMMON_REASON_UNDEFINED)
944 }
945 "UNKNOWN" => std::option::Option::Some(Self::UNKNOWN),
946 "REVISION_FAILED" => std::option::Option::Some(Self::REVISION_FAILED),
947 "PROGRESS_DEADLINE_EXCEEDED" => {
948 std::option::Option::Some(Self::PROGRESS_DEADLINE_EXCEEDED)
949 }
950 "CONTAINER_MISSING" => std::option::Option::Some(Self::CONTAINER_MISSING),
951 "CONTAINER_PERMISSION_DENIED" => {
952 std::option::Option::Some(Self::CONTAINER_PERMISSION_DENIED)
953 }
954 "CONTAINER_IMAGE_UNAUTHORIZED" => {
955 std::option::Option::Some(Self::CONTAINER_IMAGE_UNAUTHORIZED)
956 }
957 "CONTAINER_IMAGE_AUTHORIZATION_CHECK_FAILED" => {
958 std::option::Option::Some(Self::CONTAINER_IMAGE_AUTHORIZATION_CHECK_FAILED)
959 }
960 "ENCRYPTION_KEY_PERMISSION_DENIED" => {
961 std::option::Option::Some(Self::ENCRYPTION_KEY_PERMISSION_DENIED)
962 }
963 "ENCRYPTION_KEY_CHECK_FAILED" => {
964 std::option::Option::Some(Self::ENCRYPTION_KEY_CHECK_FAILED)
965 }
966 "SECRETS_ACCESS_CHECK_FAILED" => {
967 std::option::Option::Some(Self::SECRETS_ACCESS_CHECK_FAILED)
968 }
969 "WAITING_FOR_OPERATION" => std::option::Option::Some(Self::WAITING_FOR_OPERATION),
970 "IMMEDIATE_RETRY" => std::option::Option::Some(Self::IMMEDIATE_RETRY),
971 "POSTPONED_RETRY" => std::option::Option::Some(Self::POSTPONED_RETRY),
972 "INTERNAL" => std::option::Option::Some(Self::INTERNAL),
973 _ => std::option::Option::None,
974 }
975 }
976 }
977
978 impl std::convert::From<i32> for CommonReason {
979 fn from(value: i32) -> Self {
980 Self::new(value)
981 }
982 }
983
984 impl std::default::Default for CommonReason {
985 fn default() -> Self {
986 Self::new(0)
987 }
988 }
989
990 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
992 pub struct RevisionReason(i32);
993
994 impl RevisionReason {
995 pub const REVISION_REASON_UNDEFINED: RevisionReason = RevisionReason::new(0);
997
998 pub const PENDING: RevisionReason = RevisionReason::new(1);
1000
1001 pub const RESERVE: RevisionReason = RevisionReason::new(2);
1003
1004 pub const RETIRED: RevisionReason = RevisionReason::new(3);
1006
1007 pub const RETIRING: RevisionReason = RevisionReason::new(4);
1009
1010 pub const RECREATING: RevisionReason = RevisionReason::new(5);
1012
1013 pub const HEALTH_CHECK_CONTAINER_ERROR: RevisionReason = RevisionReason::new(6);
1015
1016 pub const CUSTOMIZED_PATH_RESPONSE_PENDING: RevisionReason = RevisionReason::new(7);
1019
1020 pub const MIN_INSTANCES_NOT_PROVISIONED: RevisionReason = RevisionReason::new(8);
1024
1025 pub const ACTIVE_REVISION_LIMIT_REACHED: RevisionReason = RevisionReason::new(9);
1027
1028 pub const NO_DEPLOYMENT: RevisionReason = RevisionReason::new(10);
1032
1033 pub const HEALTH_CHECK_SKIPPED: RevisionReason = RevisionReason::new(11);
1036
1037 pub const MIN_INSTANCES_WARMING: RevisionReason = RevisionReason::new(12);
1040
1041 pub(crate) const fn new(value: i32) -> Self {
1043 Self(value)
1044 }
1045
1046 pub fn value(&self) -> i32 {
1048 self.0
1049 }
1050
1051 pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
1053 match self.0 {
1054 0 => std::borrow::Cow::Borrowed("REVISION_REASON_UNDEFINED"),
1055 1 => std::borrow::Cow::Borrowed("PENDING"),
1056 2 => std::borrow::Cow::Borrowed("RESERVE"),
1057 3 => std::borrow::Cow::Borrowed("RETIRED"),
1058 4 => std::borrow::Cow::Borrowed("RETIRING"),
1059 5 => std::borrow::Cow::Borrowed("RECREATING"),
1060 6 => std::borrow::Cow::Borrowed("HEALTH_CHECK_CONTAINER_ERROR"),
1061 7 => std::borrow::Cow::Borrowed("CUSTOMIZED_PATH_RESPONSE_PENDING"),
1062 8 => std::borrow::Cow::Borrowed("MIN_INSTANCES_NOT_PROVISIONED"),
1063 9 => std::borrow::Cow::Borrowed("ACTIVE_REVISION_LIMIT_REACHED"),
1064 10 => std::borrow::Cow::Borrowed("NO_DEPLOYMENT"),
1065 11 => std::borrow::Cow::Borrowed("HEALTH_CHECK_SKIPPED"),
1066 12 => std::borrow::Cow::Borrowed("MIN_INSTANCES_WARMING"),
1067 _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
1068 }
1069 }
1070
1071 pub fn from_str_name(name: &str) -> std::option::Option<Self> {
1073 match name {
1074 "REVISION_REASON_UNDEFINED" => {
1075 std::option::Option::Some(Self::REVISION_REASON_UNDEFINED)
1076 }
1077 "PENDING" => std::option::Option::Some(Self::PENDING),
1078 "RESERVE" => std::option::Option::Some(Self::RESERVE),
1079 "RETIRED" => std::option::Option::Some(Self::RETIRED),
1080 "RETIRING" => std::option::Option::Some(Self::RETIRING),
1081 "RECREATING" => std::option::Option::Some(Self::RECREATING),
1082 "HEALTH_CHECK_CONTAINER_ERROR" => {
1083 std::option::Option::Some(Self::HEALTH_CHECK_CONTAINER_ERROR)
1084 }
1085 "CUSTOMIZED_PATH_RESPONSE_PENDING" => {
1086 std::option::Option::Some(Self::CUSTOMIZED_PATH_RESPONSE_PENDING)
1087 }
1088 "MIN_INSTANCES_NOT_PROVISIONED" => {
1089 std::option::Option::Some(Self::MIN_INSTANCES_NOT_PROVISIONED)
1090 }
1091 "ACTIVE_REVISION_LIMIT_REACHED" => {
1092 std::option::Option::Some(Self::ACTIVE_REVISION_LIMIT_REACHED)
1093 }
1094 "NO_DEPLOYMENT" => std::option::Option::Some(Self::NO_DEPLOYMENT),
1095 "HEALTH_CHECK_SKIPPED" => std::option::Option::Some(Self::HEALTH_CHECK_SKIPPED),
1096 "MIN_INSTANCES_WARMING" => std::option::Option::Some(Self::MIN_INSTANCES_WARMING),
1097 _ => std::option::Option::None,
1098 }
1099 }
1100 }
1101
1102 impl std::convert::From<i32> for RevisionReason {
1103 fn from(value: i32) -> Self {
1104 Self::new(value)
1105 }
1106 }
1107
1108 impl std::default::Default for RevisionReason {
1109 fn default() -> Self {
1110 Self::new(0)
1111 }
1112 }
1113
1114 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
1116 pub struct ExecutionReason(i32);
1117
1118 impl ExecutionReason {
1119 pub const EXECUTION_REASON_UNDEFINED: ExecutionReason = ExecutionReason::new(0);
1121
1122 pub const JOB_STATUS_SERVICE_POLLING_ERROR: ExecutionReason = ExecutionReason::new(1);
1124
1125 pub const NON_ZERO_EXIT_CODE: ExecutionReason = ExecutionReason::new(2);
1128
1129 pub const CANCELLED: ExecutionReason = ExecutionReason::new(3);
1131
1132 pub const CANCELLING: ExecutionReason = ExecutionReason::new(4);
1134
1135 pub const DELETED: ExecutionReason = ExecutionReason::new(5);
1137
1138 pub(crate) const fn new(value: i32) -> Self {
1140 Self(value)
1141 }
1142
1143 pub fn value(&self) -> i32 {
1145 self.0
1146 }
1147
1148 pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
1150 match self.0 {
1151 0 => std::borrow::Cow::Borrowed("EXECUTION_REASON_UNDEFINED"),
1152 1 => std::borrow::Cow::Borrowed("JOB_STATUS_SERVICE_POLLING_ERROR"),
1153 2 => std::borrow::Cow::Borrowed("NON_ZERO_EXIT_CODE"),
1154 3 => std::borrow::Cow::Borrowed("CANCELLED"),
1155 4 => std::borrow::Cow::Borrowed("CANCELLING"),
1156 5 => std::borrow::Cow::Borrowed("DELETED"),
1157 _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
1158 }
1159 }
1160
1161 pub fn from_str_name(name: &str) -> std::option::Option<Self> {
1163 match name {
1164 "EXECUTION_REASON_UNDEFINED" => {
1165 std::option::Option::Some(Self::EXECUTION_REASON_UNDEFINED)
1166 }
1167 "JOB_STATUS_SERVICE_POLLING_ERROR" => {
1168 std::option::Option::Some(Self::JOB_STATUS_SERVICE_POLLING_ERROR)
1169 }
1170 "NON_ZERO_EXIT_CODE" => std::option::Option::Some(Self::NON_ZERO_EXIT_CODE),
1171 "CANCELLED" => std::option::Option::Some(Self::CANCELLED),
1172 "CANCELLING" => std::option::Option::Some(Self::CANCELLING),
1173 "DELETED" => std::option::Option::Some(Self::DELETED),
1174 _ => std::option::Option::None,
1175 }
1176 }
1177 }
1178
1179 impl std::convert::From<i32> for ExecutionReason {
1180 fn from(value: i32) -> Self {
1181 Self::new(value)
1182 }
1183 }
1184
1185 impl std::default::Default for ExecutionReason {
1186 fn default() -> Self {
1187 Self::new(0)
1188 }
1189 }
1190
1191 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
1195 #[serde(rename_all = "camelCase")]
1196 #[non_exhaustive]
1197 pub enum Reasons {
1198 Reason(crate::model::condition::CommonReason),
1200 RevisionReason(crate::model::condition::RevisionReason),
1202 ExecutionReason(crate::model::condition::ExecutionReason),
1204 }
1205}
1206
1207#[serde_with::serde_as]
1209#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1210#[serde(default, rename_all = "camelCase")]
1211#[non_exhaustive]
1212pub struct GetExecutionRequest {
1213 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1218 pub name: std::string::String,
1219
1220 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1221 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1222}
1223
1224impl GetExecutionRequest {
1225 pub fn new() -> Self {
1226 std::default::Default::default()
1227 }
1228
1229 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1231 self.name = v.into();
1232 self
1233 }
1234}
1235
1236impl wkt::message::Message for GetExecutionRequest {
1237 fn typename() -> &'static str {
1238 "type.googleapis.com/google.cloud.run.v2.GetExecutionRequest"
1239 }
1240}
1241
1242#[serde_with::serde_as]
1244#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1245#[serde(default, rename_all = "camelCase")]
1246#[non_exhaustive]
1247pub struct ListExecutionsRequest {
1248 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1253 pub parent: std::string::String,
1254
1255 pub page_size: i32,
1257
1258 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1261 pub page_token: std::string::String,
1262
1263 pub show_deleted: bool,
1265
1266 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1267 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1268}
1269
1270impl ListExecutionsRequest {
1271 pub fn new() -> Self {
1272 std::default::Default::default()
1273 }
1274
1275 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1277 self.parent = v.into();
1278 self
1279 }
1280
1281 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1283 self.page_size = v.into();
1284 self
1285 }
1286
1287 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1289 self.page_token = v.into();
1290 self
1291 }
1292
1293 pub fn set_show_deleted<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1295 self.show_deleted = v.into();
1296 self
1297 }
1298}
1299
1300impl wkt::message::Message for ListExecutionsRequest {
1301 fn typename() -> &'static str {
1302 "type.googleapis.com/google.cloud.run.v2.ListExecutionsRequest"
1303 }
1304}
1305
1306#[serde_with::serde_as]
1308#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1309#[serde(default, rename_all = "camelCase")]
1310#[non_exhaustive]
1311pub struct ListExecutionsResponse {
1312 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
1314 pub executions: std::vec::Vec<crate::model::Execution>,
1315
1316 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1319 pub next_page_token: std::string::String,
1320
1321 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1322 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1323}
1324
1325impl ListExecutionsResponse {
1326 pub fn new() -> Self {
1327 std::default::Default::default()
1328 }
1329
1330 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1332 self.next_page_token = v.into();
1333 self
1334 }
1335
1336 pub fn set_executions<T, V>(mut self, v: T) -> Self
1338 where
1339 T: std::iter::IntoIterator<Item = V>,
1340 V: std::convert::Into<crate::model::Execution>,
1341 {
1342 use std::iter::Iterator;
1343 self.executions = v.into_iter().map(|i| i.into()).collect();
1344 self
1345 }
1346}
1347
1348impl wkt::message::Message for ListExecutionsResponse {
1349 fn typename() -> &'static str {
1350 "type.googleapis.com/google.cloud.run.v2.ListExecutionsResponse"
1351 }
1352}
1353
1354#[doc(hidden)]
1355impl gax::paginator::internal::PageableResponse for ListExecutionsResponse {
1356 type PageItem = crate::model::Execution;
1357
1358 fn items(self) -> std::vec::Vec<Self::PageItem> {
1359 self.executions
1360 }
1361
1362 fn next_page_token(&self) -> std::string::String {
1363 use std::clone::Clone;
1364 self.next_page_token.clone()
1365 }
1366}
1367
1368#[serde_with::serde_as]
1370#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1371#[serde(default, rename_all = "camelCase")]
1372#[non_exhaustive]
1373pub struct DeleteExecutionRequest {
1374 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1379 pub name: std::string::String,
1380
1381 pub validate_only: bool,
1384
1385 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1388 pub etag: std::string::String,
1389
1390 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1391 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1392}
1393
1394impl DeleteExecutionRequest {
1395 pub fn new() -> Self {
1396 std::default::Default::default()
1397 }
1398
1399 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1401 self.name = v.into();
1402 self
1403 }
1404
1405 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1407 self.validate_only = v.into();
1408 self
1409 }
1410
1411 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1413 self.etag = v.into();
1414 self
1415 }
1416}
1417
1418impl wkt::message::Message for DeleteExecutionRequest {
1419 fn typename() -> &'static str {
1420 "type.googleapis.com/google.cloud.run.v2.DeleteExecutionRequest"
1421 }
1422}
1423
1424#[serde_with::serde_as]
1426#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1427#[serde(default, rename_all = "camelCase")]
1428#[non_exhaustive]
1429pub struct CancelExecutionRequest {
1430 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1435 pub name: std::string::String,
1436
1437 pub validate_only: bool,
1440
1441 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1444 pub etag: std::string::String,
1445
1446 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1447 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1448}
1449
1450impl CancelExecutionRequest {
1451 pub fn new() -> Self {
1452 std::default::Default::default()
1453 }
1454
1455 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1457 self.name = v.into();
1458 self
1459 }
1460
1461 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1463 self.validate_only = v.into();
1464 self
1465 }
1466
1467 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1469 self.etag = v.into();
1470 self
1471 }
1472}
1473
1474impl wkt::message::Message for CancelExecutionRequest {
1475 fn typename() -> &'static str {
1476 "type.googleapis.com/google.cloud.run.v2.CancelExecutionRequest"
1477 }
1478}
1479
1480#[serde_with::serde_as]
1484#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1485#[serde(default, rename_all = "camelCase")]
1486#[non_exhaustive]
1487pub struct Execution {
1488 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1490 pub name: std::string::String,
1491
1492 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1496 pub uid: std::string::String,
1497
1498 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1500 pub creator: std::string::String,
1501
1502 #[serde_as(as = "serde_with::DisplayFromStr")]
1505 pub generation: i64,
1506
1507 #[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
1514 pub labels: std::collections::HashMap<std::string::String, std::string::String>,
1515
1516 #[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
1521 pub annotations: std::collections::HashMap<std::string::String, std::string::String>,
1522
1523 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1527 pub create_time: std::option::Option<wkt::Timestamp>,
1528
1529 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1533 pub start_time: std::option::Option<wkt::Timestamp>,
1534
1535 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1538 pub completion_time: std::option::Option<wkt::Timestamp>,
1539
1540 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1542 pub update_time: std::option::Option<wkt::Timestamp>,
1543
1544 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1547 pub delete_time: std::option::Option<wkt::Timestamp>,
1548
1549 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1553 pub expire_time: std::option::Option<wkt::Timestamp>,
1554
1555 pub launch_stage: api::model::LaunchStage,
1565
1566 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1568 pub job: std::string::String,
1569
1570 pub parallelism: i32,
1576
1577 pub task_count: i32,
1581
1582 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1584 pub template: std::option::Option<crate::model::TaskTemplate>,
1585
1586 pub reconciling: bool,
1590
1591 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
1595 pub conditions: std::vec::Vec<crate::model::Condition>,
1596
1597 #[serde_as(as = "serde_with::DisplayFromStr")]
1601 pub observed_generation: i64,
1602
1603 pub running_count: i32,
1605
1606 pub succeeded_count: i32,
1608
1609 pub failed_count: i32,
1611
1612 pub cancelled_count: i32,
1614
1615 pub retried_count: i32,
1617
1618 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1621 pub log_uri: std::string::String,
1622
1623 pub satisfies_pzs: bool,
1625
1626 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1629 pub etag: std::string::String,
1630
1631 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1632 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1633}
1634
1635impl Execution {
1636 pub fn new() -> Self {
1637 std::default::Default::default()
1638 }
1639
1640 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1642 self.name = v.into();
1643 self
1644 }
1645
1646 pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1648 self.uid = v.into();
1649 self
1650 }
1651
1652 pub fn set_creator<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1654 self.creator = v.into();
1655 self
1656 }
1657
1658 pub fn set_generation<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
1660 self.generation = v.into();
1661 self
1662 }
1663
1664 pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
1666 mut self,
1667 v: T,
1668 ) -> Self {
1669 self.create_time = v.into();
1670 self
1671 }
1672
1673 pub fn set_start_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
1675 mut self,
1676 v: T,
1677 ) -> Self {
1678 self.start_time = v.into();
1679 self
1680 }
1681
1682 pub fn set_completion_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
1684 mut self,
1685 v: T,
1686 ) -> Self {
1687 self.completion_time = v.into();
1688 self
1689 }
1690
1691 pub fn set_update_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
1693 mut self,
1694 v: T,
1695 ) -> Self {
1696 self.update_time = v.into();
1697 self
1698 }
1699
1700 pub fn set_delete_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
1702 mut self,
1703 v: T,
1704 ) -> Self {
1705 self.delete_time = v.into();
1706 self
1707 }
1708
1709 pub fn set_expire_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
1711 mut self,
1712 v: T,
1713 ) -> Self {
1714 self.expire_time = v.into();
1715 self
1716 }
1717
1718 pub fn set_launch_stage<T: std::convert::Into<api::model::LaunchStage>>(
1720 mut self,
1721 v: T,
1722 ) -> Self {
1723 self.launch_stage = v.into();
1724 self
1725 }
1726
1727 pub fn set_job<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1729 self.job = v.into();
1730 self
1731 }
1732
1733 pub fn set_parallelism<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1735 self.parallelism = v.into();
1736 self
1737 }
1738
1739 pub fn set_task_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1741 self.task_count = v.into();
1742 self
1743 }
1744
1745 pub fn set_template<T: std::convert::Into<std::option::Option<crate::model::TaskTemplate>>>(
1747 mut self,
1748 v: T,
1749 ) -> Self {
1750 self.template = v.into();
1751 self
1752 }
1753
1754 pub fn set_reconciling<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1756 self.reconciling = v.into();
1757 self
1758 }
1759
1760 pub fn set_observed_generation<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
1762 self.observed_generation = v.into();
1763 self
1764 }
1765
1766 pub fn set_running_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1768 self.running_count = v.into();
1769 self
1770 }
1771
1772 pub fn set_succeeded_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1774 self.succeeded_count = v.into();
1775 self
1776 }
1777
1778 pub fn set_failed_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1780 self.failed_count = v.into();
1781 self
1782 }
1783
1784 pub fn set_cancelled_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1786 self.cancelled_count = v.into();
1787 self
1788 }
1789
1790 pub fn set_retried_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1792 self.retried_count = v.into();
1793 self
1794 }
1795
1796 pub fn set_log_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1798 self.log_uri = v.into();
1799 self
1800 }
1801
1802 pub fn set_satisfies_pzs<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1804 self.satisfies_pzs = v.into();
1805 self
1806 }
1807
1808 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1810 self.etag = v.into();
1811 self
1812 }
1813
1814 pub fn set_conditions<T, V>(mut self, v: T) -> Self
1816 where
1817 T: std::iter::IntoIterator<Item = V>,
1818 V: std::convert::Into<crate::model::Condition>,
1819 {
1820 use std::iter::Iterator;
1821 self.conditions = v.into_iter().map(|i| i.into()).collect();
1822 self
1823 }
1824
1825 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
1827 where
1828 T: std::iter::IntoIterator<Item = (K, V)>,
1829 K: std::convert::Into<std::string::String>,
1830 V: std::convert::Into<std::string::String>,
1831 {
1832 use std::iter::Iterator;
1833 self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
1834 self
1835 }
1836
1837 pub fn set_annotations<T, K, V>(mut self, v: T) -> Self
1839 where
1840 T: std::iter::IntoIterator<Item = (K, V)>,
1841 K: std::convert::Into<std::string::String>,
1842 V: std::convert::Into<std::string::String>,
1843 {
1844 use std::iter::Iterator;
1845 self.annotations = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
1846 self
1847 }
1848}
1849
1850impl wkt::message::Message for Execution {
1851 fn typename() -> &'static str {
1852 "type.googleapis.com/google.cloud.run.v2.Execution"
1853 }
1854}
1855
1856#[serde_with::serde_as]
1859#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1860#[serde(default, rename_all = "camelCase")]
1861#[non_exhaustive]
1862pub struct ExecutionTemplate {
1863 #[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
1871 pub labels: std::collections::HashMap<std::string::String, std::string::String>,
1872
1873 #[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
1877 pub annotations: std::collections::HashMap<std::string::String, std::string::String>,
1878
1879 pub parallelism: i32,
1887
1888 pub task_count: i32,
1892
1893 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1896 pub template: std::option::Option<crate::model::TaskTemplate>,
1897
1898 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1899 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1900}
1901
1902impl ExecutionTemplate {
1903 pub fn new() -> Self {
1904 std::default::Default::default()
1905 }
1906
1907 pub fn set_parallelism<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1909 self.parallelism = v.into();
1910 self
1911 }
1912
1913 pub fn set_task_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1915 self.task_count = v.into();
1916 self
1917 }
1918
1919 pub fn set_template<T: std::convert::Into<std::option::Option<crate::model::TaskTemplate>>>(
1921 mut self,
1922 v: T,
1923 ) -> Self {
1924 self.template = v.into();
1925 self
1926 }
1927
1928 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
1930 where
1931 T: std::iter::IntoIterator<Item = (K, V)>,
1932 K: std::convert::Into<std::string::String>,
1933 V: std::convert::Into<std::string::String>,
1934 {
1935 use std::iter::Iterator;
1936 self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
1937 self
1938 }
1939
1940 pub fn set_annotations<T, K, V>(mut self, v: T) -> Self
1942 where
1943 T: std::iter::IntoIterator<Item = (K, V)>,
1944 K: std::convert::Into<std::string::String>,
1945 V: std::convert::Into<std::string::String>,
1946 {
1947 use std::iter::Iterator;
1948 self.annotations = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
1949 self
1950 }
1951}
1952
1953impl wkt::message::Message for ExecutionTemplate {
1954 fn typename() -> &'static str {
1955 "type.googleapis.com/google.cloud.run.v2.ExecutionTemplate"
1956 }
1957}
1958
1959#[serde_with::serde_as]
1961#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1962#[serde(default, rename_all = "camelCase")]
1963#[non_exhaustive]
1964pub struct CreateJobRequest {
1965 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1969 pub parent: std::string::String,
1970
1971 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1973 pub job: std::option::Option<crate::model::Job>,
1974
1975 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1978 pub job_id: std::string::String,
1979
1980 pub validate_only: bool,
1983
1984 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1985 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1986}
1987
1988impl CreateJobRequest {
1989 pub fn new() -> Self {
1990 std::default::Default::default()
1991 }
1992
1993 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1995 self.parent = v.into();
1996 self
1997 }
1998
1999 pub fn set_job<T: std::convert::Into<std::option::Option<crate::model::Job>>>(
2001 mut self,
2002 v: T,
2003 ) -> Self {
2004 self.job = v.into();
2005 self
2006 }
2007
2008 pub fn set_job_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2010 self.job_id = v.into();
2011 self
2012 }
2013
2014 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2016 self.validate_only = v.into();
2017 self
2018 }
2019}
2020
2021impl wkt::message::Message for CreateJobRequest {
2022 fn typename() -> &'static str {
2023 "type.googleapis.com/google.cloud.run.v2.CreateJobRequest"
2024 }
2025}
2026
2027#[serde_with::serde_as]
2029#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2030#[serde(default, rename_all = "camelCase")]
2031#[non_exhaustive]
2032pub struct GetJobRequest {
2033 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2037 pub name: std::string::String,
2038
2039 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2040 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2041}
2042
2043impl GetJobRequest {
2044 pub fn new() -> Self {
2045 std::default::Default::default()
2046 }
2047
2048 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2050 self.name = v.into();
2051 self
2052 }
2053}
2054
2055impl wkt::message::Message for GetJobRequest {
2056 fn typename() -> &'static str {
2057 "type.googleapis.com/google.cloud.run.v2.GetJobRequest"
2058 }
2059}
2060
2061#[serde_with::serde_as]
2063#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2064#[serde(default, rename_all = "camelCase")]
2065#[non_exhaustive]
2066pub struct UpdateJobRequest {
2067 #[serde(skip_serializing_if = "std::option::Option::is_none")]
2069 pub job: std::option::Option<crate::model::Job>,
2070
2071 pub validate_only: bool,
2074
2075 pub allow_missing: bool,
2079
2080 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2081 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2082}
2083
2084impl UpdateJobRequest {
2085 pub fn new() -> Self {
2086 std::default::Default::default()
2087 }
2088
2089 pub fn set_job<T: std::convert::Into<std::option::Option<crate::model::Job>>>(
2091 mut self,
2092 v: T,
2093 ) -> Self {
2094 self.job = v.into();
2095 self
2096 }
2097
2098 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2100 self.validate_only = v.into();
2101 self
2102 }
2103
2104 pub fn set_allow_missing<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2106 self.allow_missing = v.into();
2107 self
2108 }
2109}
2110
2111impl wkt::message::Message for UpdateJobRequest {
2112 fn typename() -> &'static str {
2113 "type.googleapis.com/google.cloud.run.v2.UpdateJobRequest"
2114 }
2115}
2116
2117#[serde_with::serde_as]
2119#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2120#[serde(default, rename_all = "camelCase")]
2121#[non_exhaustive]
2122pub struct ListJobsRequest {
2123 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2127 pub parent: std::string::String,
2128
2129 pub page_size: i32,
2131
2132 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2135 pub page_token: std::string::String,
2136
2137 pub show_deleted: bool,
2139
2140 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2141 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2142}
2143
2144impl ListJobsRequest {
2145 pub fn new() -> Self {
2146 std::default::Default::default()
2147 }
2148
2149 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2151 self.parent = v.into();
2152 self
2153 }
2154
2155 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2157 self.page_size = v.into();
2158 self
2159 }
2160
2161 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2163 self.page_token = v.into();
2164 self
2165 }
2166
2167 pub fn set_show_deleted<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2169 self.show_deleted = v.into();
2170 self
2171 }
2172}
2173
2174impl wkt::message::Message for ListJobsRequest {
2175 fn typename() -> &'static str {
2176 "type.googleapis.com/google.cloud.run.v2.ListJobsRequest"
2177 }
2178}
2179
2180#[serde_with::serde_as]
2182#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2183#[serde(default, rename_all = "camelCase")]
2184#[non_exhaustive]
2185pub struct ListJobsResponse {
2186 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
2188 pub jobs: std::vec::Vec<crate::model::Job>,
2189
2190 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2193 pub next_page_token: std::string::String,
2194
2195 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2196 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2197}
2198
2199impl ListJobsResponse {
2200 pub fn new() -> Self {
2201 std::default::Default::default()
2202 }
2203
2204 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2206 self.next_page_token = v.into();
2207 self
2208 }
2209
2210 pub fn set_jobs<T, V>(mut self, v: T) -> Self
2212 where
2213 T: std::iter::IntoIterator<Item = V>,
2214 V: std::convert::Into<crate::model::Job>,
2215 {
2216 use std::iter::Iterator;
2217 self.jobs = v.into_iter().map(|i| i.into()).collect();
2218 self
2219 }
2220}
2221
2222impl wkt::message::Message for ListJobsResponse {
2223 fn typename() -> &'static str {
2224 "type.googleapis.com/google.cloud.run.v2.ListJobsResponse"
2225 }
2226}
2227
2228#[doc(hidden)]
2229impl gax::paginator::internal::PageableResponse for ListJobsResponse {
2230 type PageItem = crate::model::Job;
2231
2232 fn items(self) -> std::vec::Vec<Self::PageItem> {
2233 self.jobs
2234 }
2235
2236 fn next_page_token(&self) -> std::string::String {
2237 use std::clone::Clone;
2238 self.next_page_token.clone()
2239 }
2240}
2241
2242#[serde_with::serde_as]
2244#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2245#[serde(default, rename_all = "camelCase")]
2246#[non_exhaustive]
2247pub struct DeleteJobRequest {
2248 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2252 pub name: std::string::String,
2253
2254 pub validate_only: bool,
2257
2258 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2261 pub etag: std::string::String,
2262
2263 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2264 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2265}
2266
2267impl DeleteJobRequest {
2268 pub fn new() -> Self {
2269 std::default::Default::default()
2270 }
2271
2272 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2274 self.name = 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 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2286 self.etag = v.into();
2287 self
2288 }
2289}
2290
2291impl wkt::message::Message for DeleteJobRequest {
2292 fn typename() -> &'static str {
2293 "type.googleapis.com/google.cloud.run.v2.DeleteJobRequest"
2294 }
2295}
2296
2297#[serde_with::serde_as]
2299#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2300#[serde(default, rename_all = "camelCase")]
2301#[non_exhaustive]
2302pub struct RunJobRequest {
2303 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2307 pub name: std::string::String,
2308
2309 pub validate_only: bool,
2312
2313 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2316 pub etag: std::string::String,
2317
2318 #[serde(skip_serializing_if = "std::option::Option::is_none")]
2321 pub overrides: std::option::Option<crate::model::run_job_request::Overrides>,
2322
2323 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2324 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2325}
2326
2327impl RunJobRequest {
2328 pub fn new() -> Self {
2329 std::default::Default::default()
2330 }
2331
2332 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2334 self.name = v.into();
2335 self
2336 }
2337
2338 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2340 self.validate_only = v.into();
2341 self
2342 }
2343
2344 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2346 self.etag = v.into();
2347 self
2348 }
2349
2350 pub fn set_overrides<
2352 T: std::convert::Into<std::option::Option<crate::model::run_job_request::Overrides>>,
2353 >(
2354 mut self,
2355 v: T,
2356 ) -> Self {
2357 self.overrides = v.into();
2358 self
2359 }
2360}
2361
2362impl wkt::message::Message for RunJobRequest {
2363 fn typename() -> &'static str {
2364 "type.googleapis.com/google.cloud.run.v2.RunJobRequest"
2365 }
2366}
2367
2368pub mod run_job_request {
2370 #[allow(unused_imports)]
2371 use super::*;
2372
2373 #[serde_with::serde_as]
2375 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2376 #[serde(default, rename_all = "camelCase")]
2377 #[non_exhaustive]
2378 pub struct Overrides {
2379 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
2381 pub container_overrides:
2382 std::vec::Vec<crate::model::run_job_request::overrides::ContainerOverride>,
2383
2384 pub task_count: i32,
2387
2388 #[serde(skip_serializing_if = "std::option::Option::is_none")]
2392 pub timeout: std::option::Option<wkt::Duration>,
2393
2394 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2395 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2396 }
2397
2398 impl Overrides {
2399 pub fn new() -> Self {
2400 std::default::Default::default()
2401 }
2402
2403 pub fn set_task_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2405 self.task_count = v.into();
2406 self
2407 }
2408
2409 pub fn set_timeout<T: std::convert::Into<std::option::Option<wkt::Duration>>>(
2411 mut self,
2412 v: T,
2413 ) -> Self {
2414 self.timeout = v.into();
2415 self
2416 }
2417
2418 pub fn set_container_overrides<T, V>(mut self, v: T) -> Self
2420 where
2421 T: std::iter::IntoIterator<Item = V>,
2422 V: std::convert::Into<crate::model::run_job_request::overrides::ContainerOverride>,
2423 {
2424 use std::iter::Iterator;
2425 self.container_overrides = v.into_iter().map(|i| i.into()).collect();
2426 self
2427 }
2428 }
2429
2430 impl wkt::message::Message for Overrides {
2431 fn typename() -> &'static str {
2432 "type.googleapis.com/google.cloud.run.v2.RunJobRequest.Overrides"
2433 }
2434 }
2435
2436 pub mod overrides {
2438 #[allow(unused_imports)]
2439 use super::*;
2440
2441 #[serde_with::serde_as]
2443 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2444 #[serde(default, rename_all = "camelCase")]
2445 #[non_exhaustive]
2446 pub struct ContainerOverride {
2447 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2449 pub name: std::string::String,
2450
2451 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
2454 pub args: std::vec::Vec<std::string::String>,
2455
2456 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
2459 pub env: std::vec::Vec<crate::model::EnvVar>,
2460
2461 pub clear_args: bool,
2463
2464 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2465 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2466 }
2467
2468 impl ContainerOverride {
2469 pub fn new() -> Self {
2470 std::default::Default::default()
2471 }
2472
2473 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2475 self.name = v.into();
2476 self
2477 }
2478
2479 pub fn set_clear_args<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2481 self.clear_args = v.into();
2482 self
2483 }
2484
2485 pub fn set_args<T, V>(mut self, v: T) -> Self
2487 where
2488 T: std::iter::IntoIterator<Item = V>,
2489 V: std::convert::Into<std::string::String>,
2490 {
2491 use std::iter::Iterator;
2492 self.args = v.into_iter().map(|i| i.into()).collect();
2493 self
2494 }
2495
2496 pub fn set_env<T, V>(mut self, v: T) -> Self
2498 where
2499 T: std::iter::IntoIterator<Item = V>,
2500 V: std::convert::Into<crate::model::EnvVar>,
2501 {
2502 use std::iter::Iterator;
2503 self.env = v.into_iter().map(|i| i.into()).collect();
2504 self
2505 }
2506 }
2507
2508 impl wkt::message::Message for ContainerOverride {
2509 fn typename() -> &'static str {
2510 "type.googleapis.com/google.cloud.run.v2.RunJobRequest.Overrides.ContainerOverride"
2511 }
2512 }
2513 }
2514}
2515
2516#[serde_with::serde_as]
2519#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2520#[serde(default, rename_all = "camelCase")]
2521#[non_exhaustive]
2522pub struct Job {
2523 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2528 pub name: std::string::String,
2529
2530 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2534 pub uid: std::string::String,
2535
2536 #[serde_as(as = "serde_with::DisplayFromStr")]
2539 pub generation: i64,
2540
2541 #[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
2549 pub labels: std::collections::HashMap<std::string::String, std::string::String>,
2550
2551 #[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
2556 pub annotations: std::collections::HashMap<std::string::String, std::string::String>,
2557
2558 #[serde(skip_serializing_if = "std::option::Option::is_none")]
2560 pub create_time: std::option::Option<wkt::Timestamp>,
2561
2562 #[serde(skip_serializing_if = "std::option::Option::is_none")]
2564 pub update_time: std::option::Option<wkt::Timestamp>,
2565
2566 #[serde(skip_serializing_if = "std::option::Option::is_none")]
2569 pub delete_time: std::option::Option<wkt::Timestamp>,
2570
2571 #[serde(skip_serializing_if = "std::option::Option::is_none")]
2574 pub expire_time: std::option::Option<wkt::Timestamp>,
2575
2576 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2578 pub creator: std::string::String,
2579
2580 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2582 pub last_modifier: std::string::String,
2583
2584 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2586 pub client: std::string::String,
2587
2588 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2590 pub client_version: std::string::String,
2591
2592 pub launch_stage: api::model::LaunchStage,
2603
2604 #[serde(skip_serializing_if = "std::option::Option::is_none")]
2606 pub binary_authorization: std::option::Option<crate::model::BinaryAuthorization>,
2607
2608 #[serde(skip_serializing_if = "std::option::Option::is_none")]
2610 pub template: std::option::Option<crate::model::ExecutionTemplate>,
2611
2612 #[serde_as(as = "serde_with::DisplayFromStr")]
2615 pub observed_generation: i64,
2616
2617 #[serde(skip_serializing_if = "std::option::Option::is_none")]
2620 pub terminal_condition: std::option::Option<crate::model::Condition>,
2621
2622 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
2627 pub conditions: std::vec::Vec<crate::model::Condition>,
2628
2629 pub execution_count: i32,
2631
2632 #[serde(skip_serializing_if = "std::option::Option::is_none")]
2634 pub latest_created_execution: std::option::Option<crate::model::ExecutionReference>,
2635
2636 pub reconciling: bool,
2658
2659 pub satisfies_pzs: bool,
2661
2662 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2665 pub etag: std::string::String,
2666
2667 #[serde(flatten, skip_serializing_if = "std::option::Option::is_none")]
2668 pub create_execution: std::option::Option<crate::model::job::CreateExecution>,
2669
2670 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2671 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2672}
2673
2674impl Job {
2675 pub fn new() -> Self {
2676 std::default::Default::default()
2677 }
2678
2679 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2681 self.name = v.into();
2682 self
2683 }
2684
2685 pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2687 self.uid = v.into();
2688 self
2689 }
2690
2691 pub fn set_generation<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
2693 self.generation = v.into();
2694 self
2695 }
2696
2697 pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
2699 mut self,
2700 v: T,
2701 ) -> Self {
2702 self.create_time = v.into();
2703 self
2704 }
2705
2706 pub fn set_update_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
2708 mut self,
2709 v: T,
2710 ) -> Self {
2711 self.update_time = v.into();
2712 self
2713 }
2714
2715 pub fn set_delete_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
2717 mut self,
2718 v: T,
2719 ) -> Self {
2720 self.delete_time = v.into();
2721 self
2722 }
2723
2724 pub fn set_expire_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
2726 mut self,
2727 v: T,
2728 ) -> Self {
2729 self.expire_time = v.into();
2730 self
2731 }
2732
2733 pub fn set_creator<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2735 self.creator = v.into();
2736 self
2737 }
2738
2739 pub fn set_last_modifier<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2741 self.last_modifier = v.into();
2742 self
2743 }
2744
2745 pub fn set_client<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2747 self.client = v.into();
2748 self
2749 }
2750
2751 pub fn set_client_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2753 self.client_version = v.into();
2754 self
2755 }
2756
2757 pub fn set_launch_stage<T: std::convert::Into<api::model::LaunchStage>>(
2759 mut self,
2760 v: T,
2761 ) -> Self {
2762 self.launch_stage = v.into();
2763 self
2764 }
2765
2766 pub fn set_binary_authorization<
2768 T: std::convert::Into<std::option::Option<crate::model::BinaryAuthorization>>,
2769 >(
2770 mut self,
2771 v: T,
2772 ) -> Self {
2773 self.binary_authorization = v.into();
2774 self
2775 }
2776
2777 pub fn set_template<
2779 T: std::convert::Into<std::option::Option<crate::model::ExecutionTemplate>>,
2780 >(
2781 mut self,
2782 v: T,
2783 ) -> Self {
2784 self.template = v.into();
2785 self
2786 }
2787
2788 pub fn set_observed_generation<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
2790 self.observed_generation = v.into();
2791 self
2792 }
2793
2794 pub fn set_terminal_condition<
2796 T: std::convert::Into<std::option::Option<crate::model::Condition>>,
2797 >(
2798 mut self,
2799 v: T,
2800 ) -> Self {
2801 self.terminal_condition = v.into();
2802 self
2803 }
2804
2805 pub fn set_execution_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2807 self.execution_count = v.into();
2808 self
2809 }
2810
2811 pub fn set_latest_created_execution<
2813 T: std::convert::Into<std::option::Option<crate::model::ExecutionReference>>,
2814 >(
2815 mut self,
2816 v: T,
2817 ) -> Self {
2818 self.latest_created_execution = v.into();
2819 self
2820 }
2821
2822 pub fn set_reconciling<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2824 self.reconciling = v.into();
2825 self
2826 }
2827
2828 pub fn set_satisfies_pzs<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2830 self.satisfies_pzs = v.into();
2831 self
2832 }
2833
2834 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2836 self.etag = v.into();
2837 self
2838 }
2839
2840 pub fn set_conditions<T, V>(mut self, v: T) -> Self
2842 where
2843 T: std::iter::IntoIterator<Item = V>,
2844 V: std::convert::Into<crate::model::Condition>,
2845 {
2846 use std::iter::Iterator;
2847 self.conditions = v.into_iter().map(|i| i.into()).collect();
2848 self
2849 }
2850
2851 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
2853 where
2854 T: std::iter::IntoIterator<Item = (K, V)>,
2855 K: std::convert::Into<std::string::String>,
2856 V: std::convert::Into<std::string::String>,
2857 {
2858 use std::iter::Iterator;
2859 self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
2860 self
2861 }
2862
2863 pub fn set_annotations<T, K, V>(mut self, v: T) -> Self
2865 where
2866 T: std::iter::IntoIterator<Item = (K, V)>,
2867 K: std::convert::Into<std::string::String>,
2868 V: std::convert::Into<std::string::String>,
2869 {
2870 use std::iter::Iterator;
2871 self.annotations = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
2872 self
2873 }
2874
2875 pub fn set_create_execution<
2880 T: std::convert::Into<std::option::Option<crate::model::job::CreateExecution>>,
2881 >(
2882 mut self,
2883 v: T,
2884 ) -> Self {
2885 self.create_execution = v.into();
2886 self
2887 }
2888
2889 pub fn start_execution_token(&self) -> std::option::Option<&std::string::String> {
2893 #[allow(unreachable_patterns)]
2894 self.create_execution.as_ref().and_then(|v| match v {
2895 crate::model::job::CreateExecution::StartExecutionToken(v) => {
2896 std::option::Option::Some(v)
2897 }
2898 _ => std::option::Option::None,
2899 })
2900 }
2901
2902 pub fn run_execution_token(&self) -> std::option::Option<&std::string::String> {
2906 #[allow(unreachable_patterns)]
2907 self.create_execution.as_ref().and_then(|v| match v {
2908 crate::model::job::CreateExecution::RunExecutionToken(v) => {
2909 std::option::Option::Some(v)
2910 }
2911 _ => std::option::Option::None,
2912 })
2913 }
2914
2915 pub fn set_start_execution_token<T: std::convert::Into<std::string::String>>(
2921 mut self,
2922 v: T,
2923 ) -> Self {
2924 self.create_execution = std::option::Option::Some(
2925 crate::model::job::CreateExecution::StartExecutionToken(v.into()),
2926 );
2927 self
2928 }
2929
2930 pub fn set_run_execution_token<T: std::convert::Into<std::string::String>>(
2936 mut self,
2937 v: T,
2938 ) -> Self {
2939 self.create_execution = std::option::Option::Some(
2940 crate::model::job::CreateExecution::RunExecutionToken(v.into()),
2941 );
2942 self
2943 }
2944}
2945
2946impl wkt::message::Message for Job {
2947 fn typename() -> &'static str {
2948 "type.googleapis.com/google.cloud.run.v2.Job"
2949 }
2950}
2951
2952pub mod job {
2954 #[allow(unused_imports)]
2955 use super::*;
2956
2957 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
2958 #[serde(rename_all = "camelCase")]
2959 #[non_exhaustive]
2960 pub enum CreateExecution {
2961 StartExecutionToken(std::string::String),
2965 RunExecutionToken(std::string::String),
2969 }
2970}
2971
2972#[serde_with::serde_as]
2975#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2976#[serde(default, rename_all = "camelCase")]
2977#[non_exhaustive]
2978pub struct ExecutionReference {
2979 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2981 pub name: std::string::String,
2982
2983 #[serde(skip_serializing_if = "std::option::Option::is_none")]
2985 pub create_time: std::option::Option<wkt::Timestamp>,
2986
2987 #[serde(skip_serializing_if = "std::option::Option::is_none")]
2989 pub completion_time: std::option::Option<wkt::Timestamp>,
2990
2991 #[serde(skip_serializing_if = "std::option::Option::is_none")]
2994 pub delete_time: std::option::Option<wkt::Timestamp>,
2995
2996 pub completion_status: crate::model::execution_reference::CompletionStatus,
2998
2999 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3000 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3001}
3002
3003impl ExecutionReference {
3004 pub fn new() -> Self {
3005 std::default::Default::default()
3006 }
3007
3008 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3010 self.name = v.into();
3011 self
3012 }
3013
3014 pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
3016 mut self,
3017 v: T,
3018 ) -> Self {
3019 self.create_time = v.into();
3020 self
3021 }
3022
3023 pub fn set_completion_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
3025 mut self,
3026 v: T,
3027 ) -> Self {
3028 self.completion_time = v.into();
3029 self
3030 }
3031
3032 pub fn set_delete_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
3034 mut self,
3035 v: T,
3036 ) -> Self {
3037 self.delete_time = v.into();
3038 self
3039 }
3040
3041 pub fn set_completion_status<
3043 T: std::convert::Into<crate::model::execution_reference::CompletionStatus>,
3044 >(
3045 mut self,
3046 v: T,
3047 ) -> Self {
3048 self.completion_status = v.into();
3049 self
3050 }
3051}
3052
3053impl wkt::message::Message for ExecutionReference {
3054 fn typename() -> &'static str {
3055 "type.googleapis.com/google.cloud.run.v2.ExecutionReference"
3056 }
3057}
3058
3059pub mod execution_reference {
3061 #[allow(unused_imports)]
3062 use super::*;
3063
3064 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
3066 pub struct CompletionStatus(i32);
3067
3068 impl CompletionStatus {
3069 pub const COMPLETION_STATUS_UNSPECIFIED: CompletionStatus = CompletionStatus::new(0);
3071
3072 pub const EXECUTION_SUCCEEDED: CompletionStatus = CompletionStatus::new(1);
3074
3075 pub const EXECUTION_FAILED: CompletionStatus = CompletionStatus::new(2);
3077
3078 pub const EXECUTION_RUNNING: CompletionStatus = CompletionStatus::new(3);
3080
3081 pub const EXECUTION_PENDING: CompletionStatus = CompletionStatus::new(4);
3083
3084 pub const EXECUTION_CANCELLED: CompletionStatus = CompletionStatus::new(5);
3086
3087 pub(crate) const fn new(value: i32) -> Self {
3089 Self(value)
3090 }
3091
3092 pub fn value(&self) -> i32 {
3094 self.0
3095 }
3096
3097 pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
3099 match self.0 {
3100 0 => std::borrow::Cow::Borrowed("COMPLETION_STATUS_UNSPECIFIED"),
3101 1 => std::borrow::Cow::Borrowed("EXECUTION_SUCCEEDED"),
3102 2 => std::borrow::Cow::Borrowed("EXECUTION_FAILED"),
3103 3 => std::borrow::Cow::Borrowed("EXECUTION_RUNNING"),
3104 4 => std::borrow::Cow::Borrowed("EXECUTION_PENDING"),
3105 5 => std::borrow::Cow::Borrowed("EXECUTION_CANCELLED"),
3106 _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
3107 }
3108 }
3109
3110 pub fn from_str_name(name: &str) -> std::option::Option<Self> {
3112 match name {
3113 "COMPLETION_STATUS_UNSPECIFIED" => {
3114 std::option::Option::Some(Self::COMPLETION_STATUS_UNSPECIFIED)
3115 }
3116 "EXECUTION_SUCCEEDED" => std::option::Option::Some(Self::EXECUTION_SUCCEEDED),
3117 "EXECUTION_FAILED" => std::option::Option::Some(Self::EXECUTION_FAILED),
3118 "EXECUTION_RUNNING" => std::option::Option::Some(Self::EXECUTION_RUNNING),
3119 "EXECUTION_PENDING" => std::option::Option::Some(Self::EXECUTION_PENDING),
3120 "EXECUTION_CANCELLED" => std::option::Option::Some(Self::EXECUTION_CANCELLED),
3121 _ => std::option::Option::None,
3122 }
3123 }
3124 }
3125
3126 impl std::convert::From<i32> for CompletionStatus {
3127 fn from(value: i32) -> Self {
3128 Self::new(value)
3129 }
3130 }
3131
3132 impl std::default::Default for CompletionStatus {
3133 fn default() -> Self {
3134 Self::new(0)
3135 }
3136 }
3137}
3138
3139#[serde_with::serde_as]
3145#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3146#[serde(default, rename_all = "camelCase")]
3147#[non_exhaustive]
3148pub struct Container {
3149 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3151 pub name: std::string::String,
3152
3153 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3157 pub image: std::string::String,
3158
3159 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
3162 pub command: std::vec::Vec<std::string::String>,
3163
3164 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
3167 pub args: std::vec::Vec<std::string::String>,
3168
3169 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
3171 pub env: std::vec::Vec<crate::model::EnvVar>,
3172
3173 #[serde(skip_serializing_if = "std::option::Option::is_none")]
3175 pub resources: std::option::Option<crate::model::ResourceRequirements>,
3176
3177 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
3184 pub ports: std::vec::Vec<crate::model::ContainerPort>,
3185
3186 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
3188 pub volume_mounts: std::vec::Vec<crate::model::VolumeMount>,
3189
3190 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3194 pub working_dir: std::string::String,
3195
3196 #[serde(skip_serializing_if = "std::option::Option::is_none")]
3199 pub liveness_probe: std::option::Option<crate::model::Probe>,
3200
3201 #[serde(skip_serializing_if = "std::option::Option::is_none")]
3206 pub startup_probe: std::option::Option<crate::model::Probe>,
3207
3208 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
3210 pub depends_on: std::vec::Vec<std::string::String>,
3211
3212 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3215 pub base_image_uri: std::string::String,
3216
3217 #[serde(skip_serializing_if = "std::option::Option::is_none")]
3219 pub build_info: std::option::Option<crate::model::BuildInfo>,
3220
3221 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3222 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3223}
3224
3225impl Container {
3226 pub fn new() -> Self {
3227 std::default::Default::default()
3228 }
3229
3230 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3232 self.name = v.into();
3233 self
3234 }
3235
3236 pub fn set_image<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3238 self.image = v.into();
3239 self
3240 }
3241
3242 pub fn set_resources<
3244 T: std::convert::Into<std::option::Option<crate::model::ResourceRequirements>>,
3245 >(
3246 mut self,
3247 v: T,
3248 ) -> Self {
3249 self.resources = v.into();
3250 self
3251 }
3252
3253 pub fn set_working_dir<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3255 self.working_dir = v.into();
3256 self
3257 }
3258
3259 pub fn set_liveness_probe<T: std::convert::Into<std::option::Option<crate::model::Probe>>>(
3261 mut self,
3262 v: T,
3263 ) -> Self {
3264 self.liveness_probe = v.into();
3265 self
3266 }
3267
3268 pub fn set_startup_probe<T: std::convert::Into<std::option::Option<crate::model::Probe>>>(
3270 mut self,
3271 v: T,
3272 ) -> Self {
3273 self.startup_probe = v.into();
3274 self
3275 }
3276
3277 pub fn set_base_image_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3279 self.base_image_uri = v.into();
3280 self
3281 }
3282
3283 pub fn set_build_info<T: std::convert::Into<std::option::Option<crate::model::BuildInfo>>>(
3285 mut self,
3286 v: T,
3287 ) -> Self {
3288 self.build_info = v.into();
3289 self
3290 }
3291
3292 pub fn set_command<T, V>(mut self, v: T) -> Self
3294 where
3295 T: std::iter::IntoIterator<Item = V>,
3296 V: std::convert::Into<std::string::String>,
3297 {
3298 use std::iter::Iterator;
3299 self.command = v.into_iter().map(|i| i.into()).collect();
3300 self
3301 }
3302
3303 pub fn set_args<T, V>(mut self, v: T) -> Self
3305 where
3306 T: std::iter::IntoIterator<Item = V>,
3307 V: std::convert::Into<std::string::String>,
3308 {
3309 use std::iter::Iterator;
3310 self.args = v.into_iter().map(|i| i.into()).collect();
3311 self
3312 }
3313
3314 pub fn set_env<T, V>(mut self, v: T) -> Self
3316 where
3317 T: std::iter::IntoIterator<Item = V>,
3318 V: std::convert::Into<crate::model::EnvVar>,
3319 {
3320 use std::iter::Iterator;
3321 self.env = v.into_iter().map(|i| i.into()).collect();
3322 self
3323 }
3324
3325 pub fn set_ports<T, V>(mut self, v: T) -> Self
3327 where
3328 T: std::iter::IntoIterator<Item = V>,
3329 V: std::convert::Into<crate::model::ContainerPort>,
3330 {
3331 use std::iter::Iterator;
3332 self.ports = v.into_iter().map(|i| i.into()).collect();
3333 self
3334 }
3335
3336 pub fn set_volume_mounts<T, V>(mut self, v: T) -> Self
3338 where
3339 T: std::iter::IntoIterator<Item = V>,
3340 V: std::convert::Into<crate::model::VolumeMount>,
3341 {
3342 use std::iter::Iterator;
3343 self.volume_mounts = v.into_iter().map(|i| i.into()).collect();
3344 self
3345 }
3346
3347 pub fn set_depends_on<T, V>(mut self, v: T) -> Self
3349 where
3350 T: std::iter::IntoIterator<Item = V>,
3351 V: std::convert::Into<std::string::String>,
3352 {
3353 use std::iter::Iterator;
3354 self.depends_on = v.into_iter().map(|i| i.into()).collect();
3355 self
3356 }
3357}
3358
3359impl wkt::message::Message for Container {
3360 fn typename() -> &'static str {
3361 "type.googleapis.com/google.cloud.run.v2.Container"
3362 }
3363}
3364
3365#[serde_with::serde_as]
3367#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3368#[serde(default, rename_all = "camelCase")]
3369#[non_exhaustive]
3370pub struct ResourceRequirements {
3371 #[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
3373 pub limits: std::collections::HashMap<std::string::String, std::string::String>,
3374
3375 pub cpu_idle: bool,
3379
3380 pub startup_cpu_boost: bool,
3384
3385 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3386 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3387}
3388
3389impl ResourceRequirements {
3390 pub fn new() -> Self {
3391 std::default::Default::default()
3392 }
3393
3394 pub fn set_cpu_idle<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
3396 self.cpu_idle = v.into();
3397 self
3398 }
3399
3400 pub fn set_startup_cpu_boost<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
3402 self.startup_cpu_boost = v.into();
3403 self
3404 }
3405
3406 pub fn set_limits<T, K, V>(mut self, v: T) -> Self
3408 where
3409 T: std::iter::IntoIterator<Item = (K, V)>,
3410 K: std::convert::Into<std::string::String>,
3411 V: std::convert::Into<std::string::String>,
3412 {
3413 use std::iter::Iterator;
3414 self.limits = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
3415 self
3416 }
3417}
3418
3419impl wkt::message::Message for ResourceRequirements {
3420 fn typename() -> &'static str {
3421 "type.googleapis.com/google.cloud.run.v2.ResourceRequirements"
3422 }
3423}
3424
3425#[serde_with::serde_as]
3427#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3428#[serde(default, rename_all = "camelCase")]
3429#[non_exhaustive]
3430pub struct EnvVar {
3431 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3434 pub name: std::string::String,
3435
3436 #[serde(flatten, skip_serializing_if = "std::option::Option::is_none")]
3437 pub values: std::option::Option<crate::model::env_var::Values>,
3438
3439 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3440 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3441}
3442
3443impl EnvVar {
3444 pub fn new() -> Self {
3445 std::default::Default::default()
3446 }
3447
3448 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3450 self.name = v.into();
3451 self
3452 }
3453
3454 pub fn set_values<T: std::convert::Into<std::option::Option<crate::model::env_var::Values>>>(
3459 mut self,
3460 v: T,
3461 ) -> Self {
3462 self.values = v.into();
3463 self
3464 }
3465
3466 pub fn value(&self) -> std::option::Option<&std::string::String> {
3470 #[allow(unreachable_patterns)]
3471 self.values.as_ref().and_then(|v| match v {
3472 crate::model::env_var::Values::Value(v) => std::option::Option::Some(v),
3473 _ => std::option::Option::None,
3474 })
3475 }
3476
3477 pub fn value_source(
3481 &self,
3482 ) -> std::option::Option<&std::boxed::Box<crate::model::EnvVarSource>> {
3483 #[allow(unreachable_patterns)]
3484 self.values.as_ref().and_then(|v| match v {
3485 crate::model::env_var::Values::ValueSource(v) => std::option::Option::Some(v),
3486 _ => std::option::Option::None,
3487 })
3488 }
3489
3490 pub fn set_value<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3496 self.values = std::option::Option::Some(crate::model::env_var::Values::Value(v.into()));
3497 self
3498 }
3499
3500 pub fn set_value_source<T: std::convert::Into<std::boxed::Box<crate::model::EnvVarSource>>>(
3506 mut self,
3507 v: T,
3508 ) -> Self {
3509 self.values =
3510 std::option::Option::Some(crate::model::env_var::Values::ValueSource(v.into()));
3511 self
3512 }
3513}
3514
3515impl wkt::message::Message for EnvVar {
3516 fn typename() -> &'static str {
3517 "type.googleapis.com/google.cloud.run.v2.EnvVar"
3518 }
3519}
3520
3521pub mod env_var {
3523 #[allow(unused_imports)]
3524 use super::*;
3525
3526 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
3527 #[serde(rename_all = "camelCase")]
3528 #[non_exhaustive]
3529 pub enum Values {
3530 Value(std::string::String),
3534 ValueSource(std::boxed::Box<crate::model::EnvVarSource>),
3536 }
3537}
3538
3539#[serde_with::serde_as]
3541#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3542#[serde(default, rename_all = "camelCase")]
3543#[non_exhaustive]
3544pub struct EnvVarSource {
3545 #[serde(skip_serializing_if = "std::option::Option::is_none")]
3547 pub secret_key_ref: std::option::Option<crate::model::SecretKeySelector>,
3548
3549 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3550 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3551}
3552
3553impl EnvVarSource {
3554 pub fn new() -> Self {
3555 std::default::Default::default()
3556 }
3557
3558 pub fn set_secret_key_ref<
3560 T: std::convert::Into<std::option::Option<crate::model::SecretKeySelector>>,
3561 >(
3562 mut self,
3563 v: T,
3564 ) -> Self {
3565 self.secret_key_ref = v.into();
3566 self
3567 }
3568}
3569
3570impl wkt::message::Message for EnvVarSource {
3571 fn typename() -> &'static str {
3572 "type.googleapis.com/google.cloud.run.v2.EnvVarSource"
3573 }
3574}
3575
3576#[serde_with::serde_as]
3578#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3579#[serde(default, rename_all = "camelCase")]
3580#[non_exhaustive]
3581pub struct SecretKeySelector {
3582 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3587 pub secret: std::string::String,
3588
3589 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3593 pub version: std::string::String,
3594
3595 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3596 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3597}
3598
3599impl SecretKeySelector {
3600 pub fn new() -> Self {
3601 std::default::Default::default()
3602 }
3603
3604 pub fn set_secret<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3606 self.secret = v.into();
3607 self
3608 }
3609
3610 pub fn set_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3612 self.version = v.into();
3613 self
3614 }
3615}
3616
3617impl wkt::message::Message for SecretKeySelector {
3618 fn typename() -> &'static str {
3619 "type.googleapis.com/google.cloud.run.v2.SecretKeySelector"
3620 }
3621}
3622
3623#[serde_with::serde_as]
3625#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3626#[serde(default, rename_all = "camelCase")]
3627#[non_exhaustive]
3628pub struct ContainerPort {
3629 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3632 pub name: std::string::String,
3633
3634 pub container_port: i32,
3637
3638 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3639 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3640}
3641
3642impl ContainerPort {
3643 pub fn new() -> Self {
3644 std::default::Default::default()
3645 }
3646
3647 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3649 self.name = v.into();
3650 self
3651 }
3652
3653 pub fn set_container_port<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3655 self.container_port = v.into();
3656 self
3657 }
3658}
3659
3660impl wkt::message::Message for ContainerPort {
3661 fn typename() -> &'static str {
3662 "type.googleapis.com/google.cloud.run.v2.ContainerPort"
3663 }
3664}
3665
3666#[serde_with::serde_as]
3668#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3669#[serde(default, rename_all = "camelCase")]
3670#[non_exhaustive]
3671pub struct VolumeMount {
3672 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3674 pub name: std::string::String,
3675
3676 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3682 pub mount_path: std::string::String,
3683
3684 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3685 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3686}
3687
3688impl VolumeMount {
3689 pub fn new() -> Self {
3690 std::default::Default::default()
3691 }
3692
3693 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3695 self.name = v.into();
3696 self
3697 }
3698
3699 pub fn set_mount_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3701 self.mount_path = v.into();
3702 self
3703 }
3704}
3705
3706impl wkt::message::Message for VolumeMount {
3707 fn typename() -> &'static str {
3708 "type.googleapis.com/google.cloud.run.v2.VolumeMount"
3709 }
3710}
3711
3712#[serde_with::serde_as]
3714#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3715#[serde(default, rename_all = "camelCase")]
3716#[non_exhaustive]
3717pub struct Volume {
3718 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3720 pub name: std::string::String,
3721
3722 #[serde(flatten, skip_serializing_if = "std::option::Option::is_none")]
3723 pub volume_type: std::option::Option<crate::model::volume::VolumeType>,
3724
3725 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3726 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3727}
3728
3729impl Volume {
3730 pub fn new() -> Self {
3731 std::default::Default::default()
3732 }
3733
3734 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3736 self.name = v.into();
3737 self
3738 }
3739
3740 pub fn set_volume_type<
3745 T: std::convert::Into<std::option::Option<crate::model::volume::VolumeType>>,
3746 >(
3747 mut self,
3748 v: T,
3749 ) -> Self {
3750 self.volume_type = v.into();
3751 self
3752 }
3753
3754 pub fn secret(
3758 &self,
3759 ) -> std::option::Option<&std::boxed::Box<crate::model::SecretVolumeSource>> {
3760 #[allow(unreachable_patterns)]
3761 self.volume_type.as_ref().and_then(|v| match v {
3762 crate::model::volume::VolumeType::Secret(v) => std::option::Option::Some(v),
3763 _ => std::option::Option::None,
3764 })
3765 }
3766
3767 pub fn cloud_sql_instance(
3771 &self,
3772 ) -> std::option::Option<&std::boxed::Box<crate::model::CloudSqlInstance>> {
3773 #[allow(unreachable_patterns)]
3774 self.volume_type.as_ref().and_then(|v| match v {
3775 crate::model::volume::VolumeType::CloudSqlInstance(v) => std::option::Option::Some(v),
3776 _ => std::option::Option::None,
3777 })
3778 }
3779
3780 pub fn empty_dir(
3784 &self,
3785 ) -> std::option::Option<&std::boxed::Box<crate::model::EmptyDirVolumeSource>> {
3786 #[allow(unreachable_patterns)]
3787 self.volume_type.as_ref().and_then(|v| match v {
3788 crate::model::volume::VolumeType::EmptyDir(v) => std::option::Option::Some(v),
3789 _ => std::option::Option::None,
3790 })
3791 }
3792
3793 pub fn nfs(&self) -> std::option::Option<&std::boxed::Box<crate::model::NFSVolumeSource>> {
3797 #[allow(unreachable_patterns)]
3798 self.volume_type.as_ref().and_then(|v| match v {
3799 crate::model::volume::VolumeType::Nfs(v) => std::option::Option::Some(v),
3800 _ => std::option::Option::None,
3801 })
3802 }
3803
3804 pub fn gcs(&self) -> std::option::Option<&std::boxed::Box<crate::model::GCSVolumeSource>> {
3808 #[allow(unreachable_patterns)]
3809 self.volume_type.as_ref().and_then(|v| match v {
3810 crate::model::volume::VolumeType::Gcs(v) => std::option::Option::Some(v),
3811 _ => std::option::Option::None,
3812 })
3813 }
3814
3815 pub fn set_secret<T: std::convert::Into<std::boxed::Box<crate::model::SecretVolumeSource>>>(
3821 mut self,
3822 v: T,
3823 ) -> Self {
3824 self.volume_type =
3825 std::option::Option::Some(crate::model::volume::VolumeType::Secret(v.into()));
3826 self
3827 }
3828
3829 pub fn set_cloud_sql_instance<
3835 T: std::convert::Into<std::boxed::Box<crate::model::CloudSqlInstance>>,
3836 >(
3837 mut self,
3838 v: T,
3839 ) -> Self {
3840 self.volume_type =
3841 std::option::Option::Some(crate::model::volume::VolumeType::CloudSqlInstance(v.into()));
3842 self
3843 }
3844
3845 pub fn set_empty_dir<
3851 T: std::convert::Into<std::boxed::Box<crate::model::EmptyDirVolumeSource>>,
3852 >(
3853 mut self,
3854 v: T,
3855 ) -> Self {
3856 self.volume_type =
3857 std::option::Option::Some(crate::model::volume::VolumeType::EmptyDir(v.into()));
3858 self
3859 }
3860
3861 pub fn set_nfs<T: std::convert::Into<std::boxed::Box<crate::model::NFSVolumeSource>>>(
3867 mut self,
3868 v: T,
3869 ) -> Self {
3870 self.volume_type =
3871 std::option::Option::Some(crate::model::volume::VolumeType::Nfs(v.into()));
3872 self
3873 }
3874
3875 pub fn set_gcs<T: std::convert::Into<std::boxed::Box<crate::model::GCSVolumeSource>>>(
3881 mut self,
3882 v: T,
3883 ) -> Self {
3884 self.volume_type =
3885 std::option::Option::Some(crate::model::volume::VolumeType::Gcs(v.into()));
3886 self
3887 }
3888}
3889
3890impl wkt::message::Message for Volume {
3891 fn typename() -> &'static str {
3892 "type.googleapis.com/google.cloud.run.v2.Volume"
3893 }
3894}
3895
3896pub mod volume {
3898 #[allow(unused_imports)]
3899 use super::*;
3900
3901 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
3902 #[serde(rename_all = "camelCase")]
3903 #[non_exhaustive]
3904 pub enum VolumeType {
3905 Secret(std::boxed::Box<crate::model::SecretVolumeSource>),
3907 CloudSqlInstance(std::boxed::Box<crate::model::CloudSqlInstance>),
3911 EmptyDir(std::boxed::Box<crate::model::EmptyDirVolumeSource>),
3913 Nfs(std::boxed::Box<crate::model::NFSVolumeSource>),
3915 Gcs(std::boxed::Box<crate::model::GCSVolumeSource>),
3917 }
3918}
3919
3920#[serde_with::serde_as]
3924#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3925#[serde(default, rename_all = "camelCase")]
3926#[non_exhaustive]
3927pub struct SecretVolumeSource {
3928 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3933 pub secret: std::string::String,
3934
3935 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
3941 pub items: std::vec::Vec<crate::model::VersionToPath>,
3942
3943 pub default_mode: i32,
3961
3962 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3963 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3964}
3965
3966impl SecretVolumeSource {
3967 pub fn new() -> Self {
3968 std::default::Default::default()
3969 }
3970
3971 pub fn set_secret<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3973 self.secret = v.into();
3974 self
3975 }
3976
3977 pub fn set_default_mode<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3979 self.default_mode = v.into();
3980 self
3981 }
3982
3983 pub fn set_items<T, V>(mut self, v: T) -> Self
3985 where
3986 T: std::iter::IntoIterator<Item = V>,
3987 V: std::convert::Into<crate::model::VersionToPath>,
3988 {
3989 use std::iter::Iterator;
3990 self.items = v.into_iter().map(|i| i.into()).collect();
3991 self
3992 }
3993}
3994
3995impl wkt::message::Message for SecretVolumeSource {
3996 fn typename() -> &'static str {
3997 "type.googleapis.com/google.cloud.run.v2.SecretVolumeSource"
3998 }
3999}
4000
4001#[serde_with::serde_as]
4004#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4005#[serde(default, rename_all = "camelCase")]
4006#[non_exhaustive]
4007pub struct VersionToPath {
4008 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4010 pub path: std::string::String,
4011
4012 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4016 pub version: std::string::String,
4017
4018 pub mode: i32,
4033
4034 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4035 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4036}
4037
4038impl VersionToPath {
4039 pub fn new() -> Self {
4040 std::default::Default::default()
4041 }
4042
4043 pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4045 self.path = v.into();
4046 self
4047 }
4048
4049 pub fn set_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4051 self.version = v.into();
4052 self
4053 }
4054
4055 pub fn set_mode<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4057 self.mode = v.into();
4058 self
4059 }
4060}
4061
4062impl wkt::message::Message for VersionToPath {
4063 fn typename() -> &'static str {
4064 "type.googleapis.com/google.cloud.run.v2.VersionToPath"
4065 }
4066}
4067
4068#[serde_with::serde_as]
4073#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4074#[serde(default, rename_all = "camelCase")]
4075#[non_exhaustive]
4076pub struct CloudSqlInstance {
4077 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
4083 pub instances: std::vec::Vec<std::string::String>,
4084
4085 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4086 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4087}
4088
4089impl CloudSqlInstance {
4090 pub fn new() -> Self {
4091 std::default::Default::default()
4092 }
4093
4094 pub fn set_instances<T, V>(mut self, v: T) -> Self
4096 where
4097 T: std::iter::IntoIterator<Item = V>,
4098 V: std::convert::Into<std::string::String>,
4099 {
4100 use std::iter::Iterator;
4101 self.instances = v.into_iter().map(|i| i.into()).collect();
4102 self
4103 }
4104}
4105
4106impl wkt::message::Message for CloudSqlInstance {
4107 fn typename() -> &'static str {
4108 "type.googleapis.com/google.cloud.run.v2.CloudSqlInstance"
4109 }
4110}
4111
4112#[serde_with::serde_as]
4116#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4117#[serde(default, rename_all = "camelCase")]
4118#[non_exhaustive]
4119pub struct EmptyDirVolumeSource {
4120 pub medium: crate::model::empty_dir_volume_source::Medium,
4124
4125 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4135 pub size_limit: std::string::String,
4136
4137 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4138 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4139}
4140
4141impl EmptyDirVolumeSource {
4142 pub fn new() -> Self {
4143 std::default::Default::default()
4144 }
4145
4146 pub fn set_medium<T: std::convert::Into<crate::model::empty_dir_volume_source::Medium>>(
4148 mut self,
4149 v: T,
4150 ) -> Self {
4151 self.medium = v.into();
4152 self
4153 }
4154
4155 pub fn set_size_limit<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4157 self.size_limit = v.into();
4158 self
4159 }
4160}
4161
4162impl wkt::message::Message for EmptyDirVolumeSource {
4163 fn typename() -> &'static str {
4164 "type.googleapis.com/google.cloud.run.v2.EmptyDirVolumeSource"
4165 }
4166}
4167
4168pub mod empty_dir_volume_source {
4170 #[allow(unused_imports)]
4171 use super::*;
4172
4173 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
4175 pub struct Medium(i32);
4176
4177 impl Medium {
4178 pub const MEDIUM_UNSPECIFIED: Medium = Medium::new(0);
4181
4182 pub const MEMORY: Medium = Medium::new(1);
4184
4185 pub(crate) const fn new(value: i32) -> Self {
4187 Self(value)
4188 }
4189
4190 pub fn value(&self) -> i32 {
4192 self.0
4193 }
4194
4195 pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
4197 match self.0 {
4198 0 => std::borrow::Cow::Borrowed("MEDIUM_UNSPECIFIED"),
4199 1 => std::borrow::Cow::Borrowed("MEMORY"),
4200 _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
4201 }
4202 }
4203
4204 pub fn from_str_name(name: &str) -> std::option::Option<Self> {
4206 match name {
4207 "MEDIUM_UNSPECIFIED" => std::option::Option::Some(Self::MEDIUM_UNSPECIFIED),
4208 "MEMORY" => std::option::Option::Some(Self::MEMORY),
4209 _ => std::option::Option::None,
4210 }
4211 }
4212 }
4213
4214 impl std::convert::From<i32> for Medium {
4215 fn from(value: i32) -> Self {
4216 Self::new(value)
4217 }
4218 }
4219
4220 impl std::default::Default for Medium {
4221 fn default() -> Self {
4222 Self::new(0)
4223 }
4224 }
4225}
4226
4227#[serde_with::serde_as]
4229#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4230#[serde(default, rename_all = "camelCase")]
4231#[non_exhaustive]
4232pub struct NFSVolumeSource {
4233 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4235 pub server: std::string::String,
4236
4237 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4239 pub path: std::string::String,
4240
4241 pub read_only: bool,
4243
4244 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4245 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4246}
4247
4248impl NFSVolumeSource {
4249 pub fn new() -> Self {
4250 std::default::Default::default()
4251 }
4252
4253 pub fn set_server<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4255 self.server = v.into();
4256 self
4257 }
4258
4259 pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4261 self.path = v.into();
4262 self
4263 }
4264
4265 pub fn set_read_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4267 self.read_only = v.into();
4268 self
4269 }
4270}
4271
4272impl wkt::message::Message for NFSVolumeSource {
4273 fn typename() -> &'static str {
4274 "type.googleapis.com/google.cloud.run.v2.NFSVolumeSource"
4275 }
4276}
4277
4278#[serde_with::serde_as]
4281#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4282#[serde(default, rename_all = "camelCase")]
4283#[non_exhaustive]
4284pub struct GCSVolumeSource {
4285 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4287 pub bucket: std::string::String,
4288
4289 pub read_only: bool,
4291
4292 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
4295 pub mount_options: std::vec::Vec<std::string::String>,
4296
4297 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4298 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4299}
4300
4301impl GCSVolumeSource {
4302 pub fn new() -> Self {
4303 std::default::Default::default()
4304 }
4305
4306 pub fn set_bucket<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4308 self.bucket = v.into();
4309 self
4310 }
4311
4312 pub fn set_read_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4314 self.read_only = v.into();
4315 self
4316 }
4317
4318 pub fn set_mount_options<T, V>(mut self, v: T) -> Self
4320 where
4321 T: std::iter::IntoIterator<Item = V>,
4322 V: std::convert::Into<std::string::String>,
4323 {
4324 use std::iter::Iterator;
4325 self.mount_options = v.into_iter().map(|i| i.into()).collect();
4326 self
4327 }
4328}
4329
4330impl wkt::message::Message for GCSVolumeSource {
4331 fn typename() -> &'static str {
4332 "type.googleapis.com/google.cloud.run.v2.GCSVolumeSource"
4333 }
4334}
4335
4336#[serde_with::serde_as]
4339#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4340#[serde(default, rename_all = "camelCase")]
4341#[non_exhaustive]
4342pub struct Probe {
4343 pub initial_delay_seconds: i32,
4347
4348 pub timeout_seconds: i32,
4352
4353 pub period_seconds: i32,
4358
4359 pub failure_threshold: i32,
4362
4363 #[serde(flatten, skip_serializing_if = "std::option::Option::is_none")]
4364 pub probe_type: std::option::Option<crate::model::probe::ProbeType>,
4365
4366 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4367 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4368}
4369
4370impl Probe {
4371 pub fn new() -> Self {
4372 std::default::Default::default()
4373 }
4374
4375 pub fn set_initial_delay_seconds<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4377 self.initial_delay_seconds = v.into();
4378 self
4379 }
4380
4381 pub fn set_timeout_seconds<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4383 self.timeout_seconds = v.into();
4384 self
4385 }
4386
4387 pub fn set_period_seconds<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4389 self.period_seconds = v.into();
4390 self
4391 }
4392
4393 pub fn set_failure_threshold<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4395 self.failure_threshold = v.into();
4396 self
4397 }
4398
4399 pub fn set_probe_type<
4404 T: std::convert::Into<std::option::Option<crate::model::probe::ProbeType>>,
4405 >(
4406 mut self,
4407 v: T,
4408 ) -> Self {
4409 self.probe_type = v.into();
4410 self
4411 }
4412
4413 pub fn http_get(&self) -> std::option::Option<&std::boxed::Box<crate::model::HTTPGetAction>> {
4417 #[allow(unreachable_patterns)]
4418 self.probe_type.as_ref().and_then(|v| match v {
4419 crate::model::probe::ProbeType::HttpGet(v) => std::option::Option::Some(v),
4420 _ => std::option::Option::None,
4421 })
4422 }
4423
4424 pub fn tcp_socket(
4428 &self,
4429 ) -> std::option::Option<&std::boxed::Box<crate::model::TCPSocketAction>> {
4430 #[allow(unreachable_patterns)]
4431 self.probe_type.as_ref().and_then(|v| match v {
4432 crate::model::probe::ProbeType::TcpSocket(v) => std::option::Option::Some(v),
4433 _ => std::option::Option::None,
4434 })
4435 }
4436
4437 pub fn grpc(&self) -> std::option::Option<&std::boxed::Box<crate::model::GRPCAction>> {
4441 #[allow(unreachable_patterns)]
4442 self.probe_type.as_ref().and_then(|v| match v {
4443 crate::model::probe::ProbeType::Grpc(v) => std::option::Option::Some(v),
4444 _ => std::option::Option::None,
4445 })
4446 }
4447
4448 pub fn set_http_get<T: std::convert::Into<std::boxed::Box<crate::model::HTTPGetAction>>>(
4454 mut self,
4455 v: T,
4456 ) -> Self {
4457 self.probe_type =
4458 std::option::Option::Some(crate::model::probe::ProbeType::HttpGet(v.into()));
4459 self
4460 }
4461
4462 pub fn set_tcp_socket<T: std::convert::Into<std::boxed::Box<crate::model::TCPSocketAction>>>(
4468 mut self,
4469 v: T,
4470 ) -> Self {
4471 self.probe_type =
4472 std::option::Option::Some(crate::model::probe::ProbeType::TcpSocket(v.into()));
4473 self
4474 }
4475
4476 pub fn set_grpc<T: std::convert::Into<std::boxed::Box<crate::model::GRPCAction>>>(
4482 mut self,
4483 v: T,
4484 ) -> Self {
4485 self.probe_type = std::option::Option::Some(crate::model::probe::ProbeType::Grpc(v.into()));
4486 self
4487 }
4488}
4489
4490impl wkt::message::Message for Probe {
4491 fn typename() -> &'static str {
4492 "type.googleapis.com/google.cloud.run.v2.Probe"
4493 }
4494}
4495
4496pub mod probe {
4498 #[allow(unused_imports)]
4499 use super::*;
4500
4501 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
4502 #[serde(rename_all = "camelCase")]
4503 #[non_exhaustive]
4504 pub enum ProbeType {
4505 HttpGet(std::boxed::Box<crate::model::HTTPGetAction>),
4508 TcpSocket(std::boxed::Box<crate::model::TCPSocketAction>),
4511 Grpc(std::boxed::Box<crate::model::GRPCAction>),
4514 }
4515}
4516
4517#[serde_with::serde_as]
4519#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4520#[serde(default, rename_all = "camelCase")]
4521#[non_exhaustive]
4522pub struct HTTPGetAction {
4523 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4525 pub path: std::string::String,
4526
4527 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
4530 pub http_headers: std::vec::Vec<crate::model::HTTPHeader>,
4531
4532 pub port: i32,
4536
4537 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4538 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4539}
4540
4541impl HTTPGetAction {
4542 pub fn new() -> Self {
4543 std::default::Default::default()
4544 }
4545
4546 pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4548 self.path = v.into();
4549 self
4550 }
4551
4552 pub fn set_port<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4554 self.port = v.into();
4555 self
4556 }
4557
4558 pub fn set_http_headers<T, V>(mut self, v: T) -> Self
4560 where
4561 T: std::iter::IntoIterator<Item = V>,
4562 V: std::convert::Into<crate::model::HTTPHeader>,
4563 {
4564 use std::iter::Iterator;
4565 self.http_headers = v.into_iter().map(|i| i.into()).collect();
4566 self
4567 }
4568}
4569
4570impl wkt::message::Message for HTTPGetAction {
4571 fn typename() -> &'static str {
4572 "type.googleapis.com/google.cloud.run.v2.HTTPGetAction"
4573 }
4574}
4575
4576#[serde_with::serde_as]
4578#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4579#[serde(default, rename_all = "camelCase")]
4580#[non_exhaustive]
4581pub struct HTTPHeader {
4582 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4584 pub name: std::string::String,
4585
4586 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4588 pub value: std::string::String,
4589
4590 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4591 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4592}
4593
4594impl HTTPHeader {
4595 pub fn new() -> Self {
4596 std::default::Default::default()
4597 }
4598
4599 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4601 self.name = v.into();
4602 self
4603 }
4604
4605 pub fn set_value<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4607 self.value = v.into();
4608 self
4609 }
4610}
4611
4612impl wkt::message::Message for HTTPHeader {
4613 fn typename() -> &'static str {
4614 "type.googleapis.com/google.cloud.run.v2.HTTPHeader"
4615 }
4616}
4617
4618#[serde_with::serde_as]
4620#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4621#[serde(default, rename_all = "camelCase")]
4622#[non_exhaustive]
4623pub struct TCPSocketAction {
4624 pub port: i32,
4628
4629 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4630 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4631}
4632
4633impl TCPSocketAction {
4634 pub fn new() -> Self {
4635 std::default::Default::default()
4636 }
4637
4638 pub fn set_port<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4640 self.port = v.into();
4641 self
4642 }
4643}
4644
4645impl wkt::message::Message for TCPSocketAction {
4646 fn typename() -> &'static str {
4647 "type.googleapis.com/google.cloud.run.v2.TCPSocketAction"
4648 }
4649}
4650
4651#[serde_with::serde_as]
4653#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4654#[serde(default, rename_all = "camelCase")]
4655#[non_exhaustive]
4656pub struct GRPCAction {
4657 pub port: i32,
4661
4662 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4667 pub service: std::string::String,
4668
4669 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4670 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4671}
4672
4673impl GRPCAction {
4674 pub fn new() -> Self {
4675 std::default::Default::default()
4676 }
4677
4678 pub fn set_port<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4680 self.port = v.into();
4681 self
4682 }
4683
4684 pub fn set_service<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4686 self.service = v.into();
4687 self
4688 }
4689}
4690
4691impl wkt::message::Message for GRPCAction {
4692 fn typename() -> &'static str {
4693 "type.googleapis.com/google.cloud.run.v2.GRPCAction"
4694 }
4695}
4696
4697#[serde_with::serde_as]
4699#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4700#[serde(default, rename_all = "camelCase")]
4701#[non_exhaustive]
4702pub struct BuildInfo {
4703 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4706 pub function_target: std::string::String,
4707
4708 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4710 pub source_location: std::string::String,
4711
4712 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4713 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4714}
4715
4716impl BuildInfo {
4717 pub fn new() -> Self {
4718 std::default::Default::default()
4719 }
4720
4721 pub fn set_function_target<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4723 self.function_target = v.into();
4724 self
4725 }
4726
4727 pub fn set_source_location<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4729 self.source_location = v.into();
4730 self
4731 }
4732}
4733
4734impl wkt::message::Message for BuildInfo {
4735 fn typename() -> &'static str {
4736 "type.googleapis.com/google.cloud.run.v2.BuildInfo"
4737 }
4738}
4739
4740#[serde_with::serde_as]
4742#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4743#[serde(default, rename_all = "camelCase")]
4744#[non_exhaustive]
4745pub struct GetRevisionRequest {
4746 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4750 pub name: std::string::String,
4751
4752 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4753 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4754}
4755
4756impl GetRevisionRequest {
4757 pub fn new() -> Self {
4758 std::default::Default::default()
4759 }
4760
4761 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4763 self.name = v.into();
4764 self
4765 }
4766}
4767
4768impl wkt::message::Message for GetRevisionRequest {
4769 fn typename() -> &'static str {
4770 "type.googleapis.com/google.cloud.run.v2.GetRevisionRequest"
4771 }
4772}
4773
4774#[serde_with::serde_as]
4776#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4777#[serde(default, rename_all = "camelCase")]
4778#[non_exhaustive]
4779pub struct ListRevisionsRequest {
4780 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4785 pub parent: std::string::String,
4786
4787 pub page_size: i32,
4789
4790 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4793 pub page_token: std::string::String,
4794
4795 pub show_deleted: bool,
4797
4798 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4799 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4800}
4801
4802impl ListRevisionsRequest {
4803 pub fn new() -> Self {
4804 std::default::Default::default()
4805 }
4806
4807 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4809 self.parent = v.into();
4810 self
4811 }
4812
4813 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4815 self.page_size = v.into();
4816 self
4817 }
4818
4819 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4821 self.page_token = v.into();
4822 self
4823 }
4824
4825 pub fn set_show_deleted<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4827 self.show_deleted = v.into();
4828 self
4829 }
4830}
4831
4832impl wkt::message::Message for ListRevisionsRequest {
4833 fn typename() -> &'static str {
4834 "type.googleapis.com/google.cloud.run.v2.ListRevisionsRequest"
4835 }
4836}
4837
4838#[serde_with::serde_as]
4840#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4841#[serde(default, rename_all = "camelCase")]
4842#[non_exhaustive]
4843pub struct ListRevisionsResponse {
4844 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
4846 pub revisions: std::vec::Vec<crate::model::Revision>,
4847
4848 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4851 pub next_page_token: std::string::String,
4852
4853 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4854 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4855}
4856
4857impl ListRevisionsResponse {
4858 pub fn new() -> Self {
4859 std::default::Default::default()
4860 }
4861
4862 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4864 self.next_page_token = v.into();
4865 self
4866 }
4867
4868 pub fn set_revisions<T, V>(mut self, v: T) -> Self
4870 where
4871 T: std::iter::IntoIterator<Item = V>,
4872 V: std::convert::Into<crate::model::Revision>,
4873 {
4874 use std::iter::Iterator;
4875 self.revisions = v.into_iter().map(|i| i.into()).collect();
4876 self
4877 }
4878}
4879
4880impl wkt::message::Message for ListRevisionsResponse {
4881 fn typename() -> &'static str {
4882 "type.googleapis.com/google.cloud.run.v2.ListRevisionsResponse"
4883 }
4884}
4885
4886#[doc(hidden)]
4887impl gax::paginator::internal::PageableResponse for ListRevisionsResponse {
4888 type PageItem = crate::model::Revision;
4889
4890 fn items(self) -> std::vec::Vec<Self::PageItem> {
4891 self.revisions
4892 }
4893
4894 fn next_page_token(&self) -> std::string::String {
4895 use std::clone::Clone;
4896 self.next_page_token.clone()
4897 }
4898}
4899
4900#[serde_with::serde_as]
4904#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4905#[serde(default, rename_all = "camelCase")]
4906#[non_exhaustive]
4907pub struct DeleteRevisionRequest {
4908 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4912 pub name: std::string::String,
4913
4914 pub validate_only: bool,
4917
4918 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4921 pub etag: std::string::String,
4922
4923 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4924 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4925}
4926
4927impl DeleteRevisionRequest {
4928 pub fn new() -> Self {
4929 std::default::Default::default()
4930 }
4931
4932 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4934 self.name = v.into();
4935 self
4936 }
4937
4938 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4940 self.validate_only = v.into();
4941 self
4942 }
4943
4944 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4946 self.etag = v.into();
4947 self
4948 }
4949}
4950
4951impl wkt::message::Message for DeleteRevisionRequest {
4952 fn typename() -> &'static str {
4953 "type.googleapis.com/google.cloud.run.v2.DeleteRevisionRequest"
4954 }
4955}
4956
4957#[serde_with::serde_as]
4961#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4962#[serde(default, rename_all = "camelCase")]
4963#[non_exhaustive]
4964pub struct Revision {
4965 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4967 pub name: std::string::String,
4968
4969 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4973 pub uid: std::string::String,
4974
4975 #[serde_as(as = "serde_with::DisplayFromStr")]
4978 pub generation: i64,
4979
4980 #[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
4987 pub labels: std::collections::HashMap<std::string::String, std::string::String>,
4988
4989 #[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
4994 pub annotations: std::collections::HashMap<std::string::String, std::string::String>,
4995
4996 #[serde(skip_serializing_if = "std::option::Option::is_none")]
4998 pub create_time: std::option::Option<wkt::Timestamp>,
4999
5000 #[serde(skip_serializing_if = "std::option::Option::is_none")]
5002 pub update_time: std::option::Option<wkt::Timestamp>,
5003
5004 #[serde(skip_serializing_if = "std::option::Option::is_none")]
5007 pub delete_time: std::option::Option<wkt::Timestamp>,
5008
5009 #[serde(skip_serializing_if = "std::option::Option::is_none")]
5013 pub expire_time: std::option::Option<wkt::Timestamp>,
5014
5015 pub launch_stage: api::model::LaunchStage,
5025
5026 #[serde(skip_serializing_if = "std::string::String::is_empty")]
5028 pub service: std::string::String,
5029
5030 #[serde(skip_serializing_if = "std::option::Option::is_none")]
5032 pub scaling: std::option::Option<crate::model::RevisionScaling>,
5033
5034 #[serde(skip_serializing_if = "std::option::Option::is_none")]
5037 pub vpc_access: std::option::Option<crate::model::VpcAccess>,
5038
5039 pub max_instance_request_concurrency: i32,
5041
5042 #[serde(skip_serializing_if = "std::option::Option::is_none")]
5044 pub timeout: std::option::Option<wkt::Duration>,
5045
5046 #[serde(skip_serializing_if = "std::string::String::is_empty")]
5050 pub service_account: std::string::String,
5051
5052 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
5055 pub containers: std::vec::Vec<crate::model::Container>,
5056
5057 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
5059 pub volumes: std::vec::Vec<crate::model::Volume>,
5060
5061 pub execution_environment: crate::model::ExecutionEnvironment,
5063
5064 #[serde(skip_serializing_if = "std::string::String::is_empty")]
5068 pub encryption_key: std::string::String,
5069
5070 #[serde(skip_serializing_if = "std::option::Option::is_none")]
5072 pub service_mesh: std::option::Option<crate::model::ServiceMesh>,
5073
5074 pub encryption_key_revocation_action: crate::model::EncryptionKeyRevocationAction,
5076
5077 #[serde(skip_serializing_if = "std::option::Option::is_none")]
5080 pub encryption_key_shutdown_duration: std::option::Option<wkt::Duration>,
5081
5082 pub reconciling: bool,
5086
5087 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
5091 pub conditions: std::vec::Vec<crate::model::Condition>,
5092
5093 #[serde_as(as = "serde_with::DisplayFromStr")]
5097 pub observed_generation: i64,
5098
5099 #[serde(skip_serializing_if = "std::string::String::is_empty")]
5101 pub log_uri: std::string::String,
5102
5103 pub satisfies_pzs: bool,
5105
5106 pub session_affinity: bool,
5108
5109 #[serde(skip_serializing_if = "std::option::Option::is_none")]
5111 pub scaling_status: std::option::Option<crate::model::RevisionScalingStatus>,
5112
5113 #[serde(skip_serializing_if = "std::option::Option::is_none")]
5115 pub node_selector: std::option::Option<crate::model::NodeSelector>,
5116
5117 #[serde(skip_serializing_if = "std::string::String::is_empty")]
5120 pub etag: std::string::String,
5121
5122 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
5123 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5124}
5125
5126impl Revision {
5127 pub fn new() -> Self {
5128 std::default::Default::default()
5129 }
5130
5131 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5133 self.name = v.into();
5134 self
5135 }
5136
5137 pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5139 self.uid = v.into();
5140 self
5141 }
5142
5143 pub fn set_generation<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
5145 self.generation = v.into();
5146 self
5147 }
5148
5149 pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
5151 mut self,
5152 v: T,
5153 ) -> Self {
5154 self.create_time = v.into();
5155 self
5156 }
5157
5158 pub fn set_update_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
5160 mut self,
5161 v: T,
5162 ) -> Self {
5163 self.update_time = v.into();
5164 self
5165 }
5166
5167 pub fn set_delete_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
5169 mut self,
5170 v: T,
5171 ) -> Self {
5172 self.delete_time = v.into();
5173 self
5174 }
5175
5176 pub fn set_expire_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
5178 mut self,
5179 v: T,
5180 ) -> Self {
5181 self.expire_time = v.into();
5182 self
5183 }
5184
5185 pub fn set_launch_stage<T: std::convert::Into<api::model::LaunchStage>>(
5187 mut self,
5188 v: T,
5189 ) -> Self {
5190 self.launch_stage = v.into();
5191 self
5192 }
5193
5194 pub fn set_service<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5196 self.service = v.into();
5197 self
5198 }
5199
5200 pub fn set_scaling<
5202 T: std::convert::Into<std::option::Option<crate::model::RevisionScaling>>,
5203 >(
5204 mut self,
5205 v: T,
5206 ) -> Self {
5207 self.scaling = v.into();
5208 self
5209 }
5210
5211 pub fn set_vpc_access<T: std::convert::Into<std::option::Option<crate::model::VpcAccess>>>(
5213 mut self,
5214 v: T,
5215 ) -> Self {
5216 self.vpc_access = v.into();
5217 self
5218 }
5219
5220 pub fn set_max_instance_request_concurrency<T: std::convert::Into<i32>>(
5222 mut self,
5223 v: T,
5224 ) -> Self {
5225 self.max_instance_request_concurrency = v.into();
5226 self
5227 }
5228
5229 pub fn set_timeout<T: std::convert::Into<std::option::Option<wkt::Duration>>>(
5231 mut self,
5232 v: T,
5233 ) -> Self {
5234 self.timeout = v.into();
5235 self
5236 }
5237
5238 pub fn set_service_account<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5240 self.service_account = v.into();
5241 self
5242 }
5243
5244 pub fn set_execution_environment<T: std::convert::Into<crate::model::ExecutionEnvironment>>(
5246 mut self,
5247 v: T,
5248 ) -> Self {
5249 self.execution_environment = v.into();
5250 self
5251 }
5252
5253 pub fn set_encryption_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5255 self.encryption_key = v.into();
5256 self
5257 }
5258
5259 pub fn set_service_mesh<
5261 T: std::convert::Into<std::option::Option<crate::model::ServiceMesh>>,
5262 >(
5263 mut self,
5264 v: T,
5265 ) -> Self {
5266 self.service_mesh = v.into();
5267 self
5268 }
5269
5270 pub fn set_encryption_key_revocation_action<
5272 T: std::convert::Into<crate::model::EncryptionKeyRevocationAction>,
5273 >(
5274 mut self,
5275 v: T,
5276 ) -> Self {
5277 self.encryption_key_revocation_action = v.into();
5278 self
5279 }
5280
5281 pub fn set_encryption_key_shutdown_duration<
5283 T: std::convert::Into<std::option::Option<wkt::Duration>>,
5284 >(
5285 mut self,
5286 v: T,
5287 ) -> Self {
5288 self.encryption_key_shutdown_duration = v.into();
5289 self
5290 }
5291
5292 pub fn set_reconciling<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5294 self.reconciling = v.into();
5295 self
5296 }
5297
5298 pub fn set_observed_generation<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
5300 self.observed_generation = v.into();
5301 self
5302 }
5303
5304 pub fn set_log_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5306 self.log_uri = v.into();
5307 self
5308 }
5309
5310 pub fn set_satisfies_pzs<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5312 self.satisfies_pzs = v.into();
5313 self
5314 }
5315
5316 pub fn set_session_affinity<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5318 self.session_affinity = v.into();
5319 self
5320 }
5321
5322 pub fn set_scaling_status<
5324 T: std::convert::Into<std::option::Option<crate::model::RevisionScalingStatus>>,
5325 >(
5326 mut self,
5327 v: T,
5328 ) -> Self {
5329 self.scaling_status = v.into();
5330 self
5331 }
5332
5333 pub fn set_node_selector<
5335 T: std::convert::Into<std::option::Option<crate::model::NodeSelector>>,
5336 >(
5337 mut self,
5338 v: T,
5339 ) -> Self {
5340 self.node_selector = v.into();
5341 self
5342 }
5343
5344 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5346 self.etag = v.into();
5347 self
5348 }
5349
5350 pub fn set_containers<T, V>(mut self, v: T) -> Self
5352 where
5353 T: std::iter::IntoIterator<Item = V>,
5354 V: std::convert::Into<crate::model::Container>,
5355 {
5356 use std::iter::Iterator;
5357 self.containers = v.into_iter().map(|i| i.into()).collect();
5358 self
5359 }
5360
5361 pub fn set_volumes<T, V>(mut self, v: T) -> Self
5363 where
5364 T: std::iter::IntoIterator<Item = V>,
5365 V: std::convert::Into<crate::model::Volume>,
5366 {
5367 use std::iter::Iterator;
5368 self.volumes = v.into_iter().map(|i| i.into()).collect();
5369 self
5370 }
5371
5372 pub fn set_conditions<T, V>(mut self, v: T) -> Self
5374 where
5375 T: std::iter::IntoIterator<Item = V>,
5376 V: std::convert::Into<crate::model::Condition>,
5377 {
5378 use std::iter::Iterator;
5379 self.conditions = v.into_iter().map(|i| i.into()).collect();
5380 self
5381 }
5382
5383 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
5385 where
5386 T: std::iter::IntoIterator<Item = (K, V)>,
5387 K: std::convert::Into<std::string::String>,
5388 V: std::convert::Into<std::string::String>,
5389 {
5390 use std::iter::Iterator;
5391 self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
5392 self
5393 }
5394
5395 pub fn set_annotations<T, K, V>(mut self, v: T) -> Self
5397 where
5398 T: std::iter::IntoIterator<Item = (K, V)>,
5399 K: std::convert::Into<std::string::String>,
5400 V: std::convert::Into<std::string::String>,
5401 {
5402 use std::iter::Iterator;
5403 self.annotations = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
5404 self
5405 }
5406}
5407
5408impl wkt::message::Message for Revision {
5409 fn typename() -> &'static str {
5410 "type.googleapis.com/google.cloud.run.v2.Revision"
5411 }
5412}
5413
5414#[serde_with::serde_as]
5417#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5418#[serde(default, rename_all = "camelCase")]
5419#[non_exhaustive]
5420pub struct RevisionTemplate {
5421 #[serde(skip_serializing_if = "std::string::String::is_empty")]
5424 pub revision: std::string::String,
5425
5426 #[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
5433 pub labels: std::collections::HashMap<std::string::String, std::string::String>,
5434
5435 #[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
5439 pub annotations: std::collections::HashMap<std::string::String, std::string::String>,
5440
5441 #[serde(skip_serializing_if = "std::option::Option::is_none")]
5443 pub scaling: std::option::Option<crate::model::RevisionScaling>,
5444
5445 #[serde(skip_serializing_if = "std::option::Option::is_none")]
5449 pub vpc_access: std::option::Option<crate::model::VpcAccess>,
5450
5451 #[serde(skip_serializing_if = "std::option::Option::is_none")]
5453 pub timeout: std::option::Option<wkt::Duration>,
5454
5455 #[serde(skip_serializing_if = "std::string::String::is_empty")]
5460 pub service_account: std::string::String,
5461
5462 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
5465 pub containers: std::vec::Vec<crate::model::Container>,
5466
5467 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
5469 pub volumes: std::vec::Vec<crate::model::Volume>,
5470
5471 pub execution_environment: crate::model::ExecutionEnvironment,
5473
5474 #[serde(skip_serializing_if = "std::string::String::is_empty")]
5478 pub encryption_key: std::string::String,
5479
5480 pub max_instance_request_concurrency: i32,
5484
5485 #[serde(skip_serializing_if = "std::option::Option::is_none")]
5487 pub service_mesh: std::option::Option<crate::model::ServiceMesh>,
5488
5489 pub encryption_key_revocation_action: crate::model::EncryptionKeyRevocationAction,
5491
5492 #[serde(skip_serializing_if = "std::option::Option::is_none")]
5495 pub encryption_key_shutdown_duration: std::option::Option<wkt::Duration>,
5496
5497 pub session_affinity: bool,
5499
5500 pub health_check_disabled: bool,
5502
5503 #[serde(skip_serializing_if = "std::option::Option::is_none")]
5505 pub node_selector: std::option::Option<crate::model::NodeSelector>,
5506
5507 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
5508 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5509}
5510
5511impl RevisionTemplate {
5512 pub fn new() -> Self {
5513 std::default::Default::default()
5514 }
5515
5516 pub fn set_revision<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5518 self.revision = v.into();
5519 self
5520 }
5521
5522 pub fn set_scaling<
5524 T: std::convert::Into<std::option::Option<crate::model::RevisionScaling>>,
5525 >(
5526 mut self,
5527 v: T,
5528 ) -> Self {
5529 self.scaling = v.into();
5530 self
5531 }
5532
5533 pub fn set_vpc_access<T: std::convert::Into<std::option::Option<crate::model::VpcAccess>>>(
5535 mut self,
5536 v: T,
5537 ) -> Self {
5538 self.vpc_access = v.into();
5539 self
5540 }
5541
5542 pub fn set_timeout<T: std::convert::Into<std::option::Option<wkt::Duration>>>(
5544 mut self,
5545 v: T,
5546 ) -> Self {
5547 self.timeout = v.into();
5548 self
5549 }
5550
5551 pub fn set_service_account<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5553 self.service_account = v.into();
5554 self
5555 }
5556
5557 pub fn set_execution_environment<T: std::convert::Into<crate::model::ExecutionEnvironment>>(
5559 mut self,
5560 v: T,
5561 ) -> Self {
5562 self.execution_environment = v.into();
5563 self
5564 }
5565
5566 pub fn set_encryption_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5568 self.encryption_key = v.into();
5569 self
5570 }
5571
5572 pub fn set_max_instance_request_concurrency<T: std::convert::Into<i32>>(
5574 mut self,
5575 v: T,
5576 ) -> Self {
5577 self.max_instance_request_concurrency = v.into();
5578 self
5579 }
5580
5581 pub fn set_service_mesh<
5583 T: std::convert::Into<std::option::Option<crate::model::ServiceMesh>>,
5584 >(
5585 mut self,
5586 v: T,
5587 ) -> Self {
5588 self.service_mesh = v.into();
5589 self
5590 }
5591
5592 pub fn set_encryption_key_revocation_action<
5594 T: std::convert::Into<crate::model::EncryptionKeyRevocationAction>,
5595 >(
5596 mut self,
5597 v: T,
5598 ) -> Self {
5599 self.encryption_key_revocation_action = v.into();
5600 self
5601 }
5602
5603 pub fn set_encryption_key_shutdown_duration<
5605 T: std::convert::Into<std::option::Option<wkt::Duration>>,
5606 >(
5607 mut self,
5608 v: T,
5609 ) -> Self {
5610 self.encryption_key_shutdown_duration = v.into();
5611 self
5612 }
5613
5614 pub fn set_session_affinity<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5616 self.session_affinity = v.into();
5617 self
5618 }
5619
5620 pub fn set_health_check_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5622 self.health_check_disabled = v.into();
5623 self
5624 }
5625
5626 pub fn set_node_selector<
5628 T: std::convert::Into<std::option::Option<crate::model::NodeSelector>>,
5629 >(
5630 mut self,
5631 v: T,
5632 ) -> Self {
5633 self.node_selector = v.into();
5634 self
5635 }
5636
5637 pub fn set_containers<T, V>(mut self, v: T) -> Self
5639 where
5640 T: std::iter::IntoIterator<Item = V>,
5641 V: std::convert::Into<crate::model::Container>,
5642 {
5643 use std::iter::Iterator;
5644 self.containers = v.into_iter().map(|i| i.into()).collect();
5645 self
5646 }
5647
5648 pub fn set_volumes<T, V>(mut self, v: T) -> Self
5650 where
5651 T: std::iter::IntoIterator<Item = V>,
5652 V: std::convert::Into<crate::model::Volume>,
5653 {
5654 use std::iter::Iterator;
5655 self.volumes = v.into_iter().map(|i| i.into()).collect();
5656 self
5657 }
5658
5659 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
5661 where
5662 T: std::iter::IntoIterator<Item = (K, V)>,
5663 K: std::convert::Into<std::string::String>,
5664 V: std::convert::Into<std::string::String>,
5665 {
5666 use std::iter::Iterator;
5667 self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
5668 self
5669 }
5670
5671 pub fn set_annotations<T, K, V>(mut self, v: T) -> Self
5673 where
5674 T: std::iter::IntoIterator<Item = (K, V)>,
5675 K: std::convert::Into<std::string::String>,
5676 V: std::convert::Into<std::string::String>,
5677 {
5678 use std::iter::Iterator;
5679 self.annotations = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
5680 self
5681 }
5682}
5683
5684impl wkt::message::Message for RevisionTemplate {
5685 fn typename() -> &'static str {
5686 "type.googleapis.com/google.cloud.run.v2.RevisionTemplate"
5687 }
5688}
5689
5690#[serde_with::serde_as]
5692#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5693#[serde(default, rename_all = "camelCase")]
5694#[non_exhaustive]
5695pub struct CreateServiceRequest {
5696 #[serde(skip_serializing_if = "std::string::String::is_empty")]
5700 pub parent: std::string::String,
5701
5702 #[serde(skip_serializing_if = "std::option::Option::is_none")]
5704 pub service: std::option::Option<crate::model::Service>,
5705
5706 #[serde(skip_serializing_if = "std::string::String::is_empty")]
5710 pub service_id: std::string::String,
5711
5712 pub validate_only: bool,
5715
5716 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
5717 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5718}
5719
5720impl CreateServiceRequest {
5721 pub fn new() -> Self {
5722 std::default::Default::default()
5723 }
5724
5725 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5727 self.parent = v.into();
5728 self
5729 }
5730
5731 pub fn set_service<T: std::convert::Into<std::option::Option<crate::model::Service>>>(
5733 mut self,
5734 v: T,
5735 ) -> Self {
5736 self.service = v.into();
5737 self
5738 }
5739
5740 pub fn set_service_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5742 self.service_id = v.into();
5743 self
5744 }
5745
5746 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5748 self.validate_only = v.into();
5749 self
5750 }
5751}
5752
5753impl wkt::message::Message for CreateServiceRequest {
5754 fn typename() -> &'static str {
5755 "type.googleapis.com/google.cloud.run.v2.CreateServiceRequest"
5756 }
5757}
5758
5759#[serde_with::serde_as]
5761#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5762#[serde(default, rename_all = "camelCase")]
5763#[non_exhaustive]
5764pub struct UpdateServiceRequest {
5765 #[serde(skip_serializing_if = "std::option::Option::is_none")]
5767 pub update_mask: std::option::Option<wkt::FieldMask>,
5768
5769 #[serde(skip_serializing_if = "std::option::Option::is_none")]
5771 pub service: std::option::Option<crate::model::Service>,
5772
5773 pub validate_only: bool,
5776
5777 pub allow_missing: bool,
5781
5782 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
5783 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5784}
5785
5786impl UpdateServiceRequest {
5787 pub fn new() -> Self {
5788 std::default::Default::default()
5789 }
5790
5791 pub fn set_update_mask<T: std::convert::Into<std::option::Option<wkt::FieldMask>>>(
5793 mut self,
5794 v: T,
5795 ) -> Self {
5796 self.update_mask = v.into();
5797 self
5798 }
5799
5800 pub fn set_service<T: std::convert::Into<std::option::Option<crate::model::Service>>>(
5802 mut self,
5803 v: T,
5804 ) -> Self {
5805 self.service = v.into();
5806 self
5807 }
5808
5809 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5811 self.validate_only = v.into();
5812 self
5813 }
5814
5815 pub fn set_allow_missing<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5817 self.allow_missing = v.into();
5818 self
5819 }
5820}
5821
5822impl wkt::message::Message for UpdateServiceRequest {
5823 fn typename() -> &'static str {
5824 "type.googleapis.com/google.cloud.run.v2.UpdateServiceRequest"
5825 }
5826}
5827
5828#[serde_with::serde_as]
5830#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5831#[serde(default, rename_all = "camelCase")]
5832#[non_exhaustive]
5833pub struct ListServicesRequest {
5834 #[serde(skip_serializing_if = "std::string::String::is_empty")]
5839 pub parent: std::string::String,
5840
5841 pub page_size: i32,
5843
5844 #[serde(skip_serializing_if = "std::string::String::is_empty")]
5847 pub page_token: std::string::String,
5848
5849 pub show_deleted: bool,
5851
5852 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
5853 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5854}
5855
5856impl ListServicesRequest {
5857 pub fn new() -> Self {
5858 std::default::Default::default()
5859 }
5860
5861 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5863 self.parent = v.into();
5864 self
5865 }
5866
5867 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
5869 self.page_size = v.into();
5870 self
5871 }
5872
5873 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5875 self.page_token = v.into();
5876 self
5877 }
5878
5879 pub fn set_show_deleted<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5881 self.show_deleted = v.into();
5882 self
5883 }
5884}
5885
5886impl wkt::message::Message for ListServicesRequest {
5887 fn typename() -> &'static str {
5888 "type.googleapis.com/google.cloud.run.v2.ListServicesRequest"
5889 }
5890}
5891
5892#[serde_with::serde_as]
5894#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5895#[serde(default, rename_all = "camelCase")]
5896#[non_exhaustive]
5897pub struct ListServicesResponse {
5898 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
5900 pub services: std::vec::Vec<crate::model::Service>,
5901
5902 #[serde(skip_serializing_if = "std::string::String::is_empty")]
5905 pub next_page_token: std::string::String,
5906
5907 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
5908 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5909}
5910
5911impl ListServicesResponse {
5912 pub fn new() -> Self {
5913 std::default::Default::default()
5914 }
5915
5916 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5918 self.next_page_token = v.into();
5919 self
5920 }
5921
5922 pub fn set_services<T, V>(mut self, v: T) -> Self
5924 where
5925 T: std::iter::IntoIterator<Item = V>,
5926 V: std::convert::Into<crate::model::Service>,
5927 {
5928 use std::iter::Iterator;
5929 self.services = v.into_iter().map(|i| i.into()).collect();
5930 self
5931 }
5932}
5933
5934impl wkt::message::Message for ListServicesResponse {
5935 fn typename() -> &'static str {
5936 "type.googleapis.com/google.cloud.run.v2.ListServicesResponse"
5937 }
5938}
5939
5940#[doc(hidden)]
5941impl gax::paginator::internal::PageableResponse for ListServicesResponse {
5942 type PageItem = crate::model::Service;
5943
5944 fn items(self) -> std::vec::Vec<Self::PageItem> {
5945 self.services
5946 }
5947
5948 fn next_page_token(&self) -> std::string::String {
5949 use std::clone::Clone;
5950 self.next_page_token.clone()
5951 }
5952}
5953
5954#[serde_with::serde_as]
5956#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5957#[serde(default, rename_all = "camelCase")]
5958#[non_exhaustive]
5959pub struct GetServiceRequest {
5960 #[serde(skip_serializing_if = "std::string::String::is_empty")]
5964 pub name: std::string::String,
5965
5966 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
5967 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5968}
5969
5970impl GetServiceRequest {
5971 pub fn new() -> Self {
5972 std::default::Default::default()
5973 }
5974
5975 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5977 self.name = v.into();
5978 self
5979 }
5980}
5981
5982impl wkt::message::Message for GetServiceRequest {
5983 fn typename() -> &'static str {
5984 "type.googleapis.com/google.cloud.run.v2.GetServiceRequest"
5985 }
5986}
5987
5988#[serde_with::serde_as]
5990#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5991#[serde(default, rename_all = "camelCase")]
5992#[non_exhaustive]
5993pub struct DeleteServiceRequest {
5994 #[serde(skip_serializing_if = "std::string::String::is_empty")]
5998 pub name: std::string::String,
5999
6000 pub validate_only: bool,
6003
6004 #[serde(skip_serializing_if = "std::string::String::is_empty")]
6007 pub etag: std::string::String,
6008
6009 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
6010 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6011}
6012
6013impl DeleteServiceRequest {
6014 pub fn new() -> Self {
6015 std::default::Default::default()
6016 }
6017
6018 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6020 self.name = v.into();
6021 self
6022 }
6023
6024 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6026 self.validate_only = v.into();
6027 self
6028 }
6029
6030 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6032 self.etag = v.into();
6033 self
6034 }
6035}
6036
6037impl wkt::message::Message for DeleteServiceRequest {
6038 fn typename() -> &'static str {
6039 "type.googleapis.com/google.cloud.run.v2.DeleteServiceRequest"
6040 }
6041}
6042
6043#[serde_with::serde_as]
6049#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
6050#[serde(default, rename_all = "camelCase")]
6051#[non_exhaustive]
6052pub struct Service {
6053 #[serde(skip_serializing_if = "std::string::String::is_empty")]
6060 pub name: std::string::String,
6061
6062 #[serde(skip_serializing_if = "std::string::String::is_empty")]
6065 pub description: std::string::String,
6066
6067 #[serde(skip_serializing_if = "std::string::String::is_empty")]
6071 pub uid: std::string::String,
6072
6073 #[serde_as(as = "serde_with::DisplayFromStr")]
6078 pub generation: i64,
6079
6080 #[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
6087 pub labels: std::collections::HashMap<std::string::String, std::string::String>,
6088
6089 #[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
6093 pub annotations: std::collections::HashMap<std::string::String, std::string::String>,
6094
6095 #[serde(skip_serializing_if = "std::option::Option::is_none")]
6097 pub create_time: std::option::Option<wkt::Timestamp>,
6098
6099 #[serde(skip_serializing_if = "std::option::Option::is_none")]
6101 pub update_time: std::option::Option<wkt::Timestamp>,
6102
6103 #[serde(skip_serializing_if = "std::option::Option::is_none")]
6106 pub delete_time: std::option::Option<wkt::Timestamp>,
6107
6108 #[serde(skip_serializing_if = "std::option::Option::is_none")]
6111 pub expire_time: std::option::Option<wkt::Timestamp>,
6112
6113 #[serde(skip_serializing_if = "std::string::String::is_empty")]
6115 pub creator: std::string::String,
6116
6117 #[serde(skip_serializing_if = "std::string::String::is_empty")]
6119 pub last_modifier: std::string::String,
6120
6121 #[serde(skip_serializing_if = "std::string::String::is_empty")]
6123 pub client: std::string::String,
6124
6125 #[serde(skip_serializing_if = "std::string::String::is_empty")]
6127 pub client_version: std::string::String,
6128
6129 pub ingress: crate::model::IngressTraffic,
6133
6134 pub launch_stage: api::model::LaunchStage,
6145
6146 #[serde(skip_serializing_if = "std::option::Option::is_none")]
6148 pub binary_authorization: std::option::Option<crate::model::BinaryAuthorization>,
6149
6150 #[serde(skip_serializing_if = "std::option::Option::is_none")]
6152 pub template: std::option::Option<crate::model::RevisionTemplate>,
6153
6154 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
6158 pub traffic: std::vec::Vec<crate::model::TrafficTarget>,
6159
6160 #[serde(skip_serializing_if = "std::option::Option::is_none")]
6162 pub scaling: std::option::Option<crate::model::ServiceScaling>,
6163
6164 pub invoker_iam_disabled: bool,
6169
6170 pub default_uri_disabled: bool,
6172
6173 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
6175 pub urls: std::vec::Vec<std::string::String>,
6176
6177 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
6183 pub custom_audiences: std::vec::Vec<std::string::String>,
6184
6185 #[serde_as(as = "serde_with::DisplayFromStr")]
6191 pub observed_generation: i64,
6192
6193 #[serde(skip_serializing_if = "std::option::Option::is_none")]
6198 pub terminal_condition: std::option::Option<crate::model::Condition>,
6199
6200 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
6205 pub conditions: std::vec::Vec<crate::model::Condition>,
6206
6207 #[serde(skip_serializing_if = "std::string::String::is_empty")]
6211 pub latest_ready_revision: std::string::String,
6212
6213 #[serde(skip_serializing_if = "std::string::String::is_empty")]
6217 pub latest_created_revision: std::string::String,
6218
6219 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
6223 pub traffic_statuses: std::vec::Vec<crate::model::TrafficTargetStatus>,
6224
6225 #[serde(skip_serializing_if = "std::string::String::is_empty")]
6227 pub uri: std::string::String,
6228
6229 pub satisfies_pzs: bool,
6231
6232 #[serde(skip_serializing_if = "std::option::Option::is_none")]
6234 pub build_config: std::option::Option<crate::model::BuildConfig>,
6235
6236 pub reconciling: bool,
6259
6260 #[serde(skip_serializing_if = "std::string::String::is_empty")]
6263 pub etag: std::string::String,
6264
6265 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
6266 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6267}
6268
6269impl Service {
6270 pub fn new() -> Self {
6271 std::default::Default::default()
6272 }
6273
6274 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6276 self.name = v.into();
6277 self
6278 }
6279
6280 pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6282 self.description = v.into();
6283 self
6284 }
6285
6286 pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6288 self.uid = v.into();
6289 self
6290 }
6291
6292 pub fn set_generation<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
6294 self.generation = v.into();
6295 self
6296 }
6297
6298 pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
6300 mut self,
6301 v: T,
6302 ) -> Self {
6303 self.create_time = v.into();
6304 self
6305 }
6306
6307 pub fn set_update_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
6309 mut self,
6310 v: T,
6311 ) -> Self {
6312 self.update_time = v.into();
6313 self
6314 }
6315
6316 pub fn set_delete_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
6318 mut self,
6319 v: T,
6320 ) -> Self {
6321 self.delete_time = v.into();
6322 self
6323 }
6324
6325 pub fn set_expire_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
6327 mut self,
6328 v: T,
6329 ) -> Self {
6330 self.expire_time = v.into();
6331 self
6332 }
6333
6334 pub fn set_creator<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6336 self.creator = v.into();
6337 self
6338 }
6339
6340 pub fn set_last_modifier<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6342 self.last_modifier = v.into();
6343 self
6344 }
6345
6346 pub fn set_client<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6348 self.client = v.into();
6349 self
6350 }
6351
6352 pub fn set_client_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6354 self.client_version = v.into();
6355 self
6356 }
6357
6358 pub fn set_ingress<T: std::convert::Into<crate::model::IngressTraffic>>(
6360 mut self,
6361 v: T,
6362 ) -> Self {
6363 self.ingress = v.into();
6364 self
6365 }
6366
6367 pub fn set_launch_stage<T: std::convert::Into<api::model::LaunchStage>>(
6369 mut self,
6370 v: T,
6371 ) -> Self {
6372 self.launch_stage = v.into();
6373 self
6374 }
6375
6376 pub fn set_binary_authorization<
6378 T: std::convert::Into<std::option::Option<crate::model::BinaryAuthorization>>,
6379 >(
6380 mut self,
6381 v: T,
6382 ) -> Self {
6383 self.binary_authorization = v.into();
6384 self
6385 }
6386
6387 pub fn set_template<
6389 T: std::convert::Into<std::option::Option<crate::model::RevisionTemplate>>,
6390 >(
6391 mut self,
6392 v: T,
6393 ) -> Self {
6394 self.template = v.into();
6395 self
6396 }
6397
6398 pub fn set_scaling<T: std::convert::Into<std::option::Option<crate::model::ServiceScaling>>>(
6400 mut self,
6401 v: T,
6402 ) -> Self {
6403 self.scaling = v.into();
6404 self
6405 }
6406
6407 pub fn set_invoker_iam_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6409 self.invoker_iam_disabled = v.into();
6410 self
6411 }
6412
6413 pub fn set_default_uri_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6415 self.default_uri_disabled = v.into();
6416 self
6417 }
6418
6419 pub fn set_observed_generation<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
6421 self.observed_generation = v.into();
6422 self
6423 }
6424
6425 pub fn set_terminal_condition<
6427 T: std::convert::Into<std::option::Option<crate::model::Condition>>,
6428 >(
6429 mut self,
6430 v: T,
6431 ) -> Self {
6432 self.terminal_condition = v.into();
6433 self
6434 }
6435
6436 pub fn set_latest_ready_revision<T: std::convert::Into<std::string::String>>(
6438 mut self,
6439 v: T,
6440 ) -> Self {
6441 self.latest_ready_revision = v.into();
6442 self
6443 }
6444
6445 pub fn set_latest_created_revision<T: std::convert::Into<std::string::String>>(
6447 mut self,
6448 v: T,
6449 ) -> Self {
6450 self.latest_created_revision = v.into();
6451 self
6452 }
6453
6454 pub fn set_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6456 self.uri = v.into();
6457 self
6458 }
6459
6460 pub fn set_satisfies_pzs<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6462 self.satisfies_pzs = v.into();
6463 self
6464 }
6465
6466 pub fn set_build_config<
6468 T: std::convert::Into<std::option::Option<crate::model::BuildConfig>>,
6469 >(
6470 mut self,
6471 v: T,
6472 ) -> Self {
6473 self.build_config = v.into();
6474 self
6475 }
6476
6477 pub fn set_reconciling<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6479 self.reconciling = v.into();
6480 self
6481 }
6482
6483 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6485 self.etag = v.into();
6486 self
6487 }
6488
6489 pub fn set_traffic<T, V>(mut self, v: T) -> Self
6491 where
6492 T: std::iter::IntoIterator<Item = V>,
6493 V: std::convert::Into<crate::model::TrafficTarget>,
6494 {
6495 use std::iter::Iterator;
6496 self.traffic = v.into_iter().map(|i| i.into()).collect();
6497 self
6498 }
6499
6500 pub fn set_urls<T, V>(mut self, v: T) -> Self
6502 where
6503 T: std::iter::IntoIterator<Item = V>,
6504 V: std::convert::Into<std::string::String>,
6505 {
6506 use std::iter::Iterator;
6507 self.urls = v.into_iter().map(|i| i.into()).collect();
6508 self
6509 }
6510
6511 pub fn set_custom_audiences<T, V>(mut self, v: T) -> Self
6513 where
6514 T: std::iter::IntoIterator<Item = V>,
6515 V: std::convert::Into<std::string::String>,
6516 {
6517 use std::iter::Iterator;
6518 self.custom_audiences = v.into_iter().map(|i| i.into()).collect();
6519 self
6520 }
6521
6522 pub fn set_conditions<T, V>(mut self, v: T) -> Self
6524 where
6525 T: std::iter::IntoIterator<Item = V>,
6526 V: std::convert::Into<crate::model::Condition>,
6527 {
6528 use std::iter::Iterator;
6529 self.conditions = v.into_iter().map(|i| i.into()).collect();
6530 self
6531 }
6532
6533 pub fn set_traffic_statuses<T, V>(mut self, v: T) -> Self
6535 where
6536 T: std::iter::IntoIterator<Item = V>,
6537 V: std::convert::Into<crate::model::TrafficTargetStatus>,
6538 {
6539 use std::iter::Iterator;
6540 self.traffic_statuses = v.into_iter().map(|i| i.into()).collect();
6541 self
6542 }
6543
6544 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
6546 where
6547 T: std::iter::IntoIterator<Item = (K, V)>,
6548 K: std::convert::Into<std::string::String>,
6549 V: std::convert::Into<std::string::String>,
6550 {
6551 use std::iter::Iterator;
6552 self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
6553 self
6554 }
6555
6556 pub fn set_annotations<T, K, V>(mut self, v: T) -> Self
6558 where
6559 T: std::iter::IntoIterator<Item = (K, V)>,
6560 K: std::convert::Into<std::string::String>,
6561 V: std::convert::Into<std::string::String>,
6562 {
6563 use std::iter::Iterator;
6564 self.annotations = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
6565 self
6566 }
6567}
6568
6569impl wkt::message::Message for Service {
6570 fn typename() -> &'static str {
6571 "type.googleapis.com/google.cloud.run.v2.Service"
6572 }
6573}
6574
6575#[serde_with::serde_as]
6577#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
6578#[serde(default, rename_all = "camelCase")]
6579#[non_exhaustive]
6580pub struct RevisionScalingStatus {
6581 pub desired_min_instance_count: i32,
6583
6584 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
6585 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6586}
6587
6588impl RevisionScalingStatus {
6589 pub fn new() -> Self {
6590 std::default::Default::default()
6591 }
6592
6593 pub fn set_desired_min_instance_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6595 self.desired_min_instance_count = v.into();
6596 self
6597 }
6598}
6599
6600impl wkt::message::Message for RevisionScalingStatus {
6601 fn typename() -> &'static str {
6602 "type.googleapis.com/google.cloud.run.v2.RevisionScalingStatus"
6603 }
6604}
6605
6606#[serde_with::serde_as]
6608#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
6609#[serde(default, rename_all = "camelCase")]
6610#[non_exhaustive]
6611pub struct GetTaskRequest {
6612 #[serde(skip_serializing_if = "std::string::String::is_empty")]
6616 pub name: std::string::String,
6617
6618 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
6619 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6620}
6621
6622impl GetTaskRequest {
6623 pub fn new() -> Self {
6624 std::default::Default::default()
6625 }
6626
6627 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6629 self.name = v.into();
6630 self
6631 }
6632}
6633
6634impl wkt::message::Message for GetTaskRequest {
6635 fn typename() -> &'static str {
6636 "type.googleapis.com/google.cloud.run.v2.GetTaskRequest"
6637 }
6638}
6639
6640#[serde_with::serde_as]
6642#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
6643#[serde(default, rename_all = "camelCase")]
6644#[non_exhaustive]
6645pub struct ListTasksRequest {
6646 #[serde(skip_serializing_if = "std::string::String::is_empty")]
6651 pub parent: std::string::String,
6652
6653 pub page_size: i32,
6655
6656 #[serde(skip_serializing_if = "std::string::String::is_empty")]
6659 pub page_token: std::string::String,
6660
6661 pub show_deleted: bool,
6663
6664 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
6665 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6666}
6667
6668impl ListTasksRequest {
6669 pub fn new() -> Self {
6670 std::default::Default::default()
6671 }
6672
6673 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6675 self.parent = v.into();
6676 self
6677 }
6678
6679 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6681 self.page_size = v.into();
6682 self
6683 }
6684
6685 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6687 self.page_token = v.into();
6688 self
6689 }
6690
6691 pub fn set_show_deleted<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6693 self.show_deleted = v.into();
6694 self
6695 }
6696}
6697
6698impl wkt::message::Message for ListTasksRequest {
6699 fn typename() -> &'static str {
6700 "type.googleapis.com/google.cloud.run.v2.ListTasksRequest"
6701 }
6702}
6703
6704#[serde_with::serde_as]
6706#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
6707#[serde(default, rename_all = "camelCase")]
6708#[non_exhaustive]
6709pub struct ListTasksResponse {
6710 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
6712 pub tasks: std::vec::Vec<crate::model::Task>,
6713
6714 #[serde(skip_serializing_if = "std::string::String::is_empty")]
6717 pub next_page_token: std::string::String,
6718
6719 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
6720 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6721}
6722
6723impl ListTasksResponse {
6724 pub fn new() -> Self {
6725 std::default::Default::default()
6726 }
6727
6728 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6730 self.next_page_token = v.into();
6731 self
6732 }
6733
6734 pub fn set_tasks<T, V>(mut self, v: T) -> Self
6736 where
6737 T: std::iter::IntoIterator<Item = V>,
6738 V: std::convert::Into<crate::model::Task>,
6739 {
6740 use std::iter::Iterator;
6741 self.tasks = v.into_iter().map(|i| i.into()).collect();
6742 self
6743 }
6744}
6745
6746impl wkt::message::Message for ListTasksResponse {
6747 fn typename() -> &'static str {
6748 "type.googleapis.com/google.cloud.run.v2.ListTasksResponse"
6749 }
6750}
6751
6752#[doc(hidden)]
6753impl gax::paginator::internal::PageableResponse for ListTasksResponse {
6754 type PageItem = crate::model::Task;
6755
6756 fn items(self) -> std::vec::Vec<Self::PageItem> {
6757 self.tasks
6758 }
6759
6760 fn next_page_token(&self) -> std::string::String {
6761 use std::clone::Clone;
6762 self.next_page_token.clone()
6763 }
6764}
6765
6766#[serde_with::serde_as]
6768#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
6769#[serde(default, rename_all = "camelCase")]
6770#[non_exhaustive]
6771pub struct Task {
6772 #[serde(skip_serializing_if = "std::string::String::is_empty")]
6774 pub name: std::string::String,
6775
6776 #[serde(skip_serializing_if = "std::string::String::is_empty")]
6780 pub uid: std::string::String,
6781
6782 #[serde_as(as = "serde_with::DisplayFromStr")]
6785 pub generation: i64,
6786
6787 #[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
6794 pub labels: std::collections::HashMap<std::string::String, std::string::String>,
6795
6796 #[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
6801 pub annotations: std::collections::HashMap<std::string::String, std::string::String>,
6802
6803 #[serde(skip_serializing_if = "std::option::Option::is_none")]
6807 pub create_time: std::option::Option<wkt::Timestamp>,
6808
6809 #[serde(skip_serializing_if = "std::option::Option::is_none")]
6813 pub scheduled_time: std::option::Option<wkt::Timestamp>,
6814
6815 #[serde(skip_serializing_if = "std::option::Option::is_none")]
6819 pub start_time: std::option::Option<wkt::Timestamp>,
6820
6821 #[serde(skip_serializing_if = "std::option::Option::is_none")]
6824 pub completion_time: std::option::Option<wkt::Timestamp>,
6825
6826 #[serde(skip_serializing_if = "std::option::Option::is_none")]
6828 pub update_time: std::option::Option<wkt::Timestamp>,
6829
6830 #[serde(skip_serializing_if = "std::option::Option::is_none")]
6833 pub delete_time: std::option::Option<wkt::Timestamp>,
6834
6835 #[serde(skip_serializing_if = "std::option::Option::is_none")]
6839 pub expire_time: std::option::Option<wkt::Timestamp>,
6840
6841 #[serde(skip_serializing_if = "std::string::String::is_empty")]
6843 pub job: std::string::String,
6844
6845 #[serde(skip_serializing_if = "std::string::String::is_empty")]
6847 pub execution: std::string::String,
6848
6849 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
6852 pub containers: std::vec::Vec<crate::model::Container>,
6853
6854 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
6856 pub volumes: std::vec::Vec<crate::model::Volume>,
6857
6858 pub max_retries: i32,
6860
6861 #[serde(skip_serializing_if = "std::option::Option::is_none")]
6865 pub timeout: std::option::Option<wkt::Duration>,
6866
6867 #[serde(skip_serializing_if = "std::string::String::is_empty")]
6872 pub service_account: std::string::String,
6873
6874 pub execution_environment: crate::model::ExecutionEnvironment,
6876
6877 pub reconciling: bool,
6881
6882 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
6885 pub conditions: std::vec::Vec<crate::model::Condition>,
6886
6887 #[serde_as(as = "serde_with::DisplayFromStr")]
6890 pub observed_generation: i64,
6891
6892 pub index: i32,
6894
6895 pub retried: i32,
6898
6899 #[serde(skip_serializing_if = "std::option::Option::is_none")]
6901 pub last_attempt_result: std::option::Option<crate::model::TaskAttemptResult>,
6902
6903 #[serde(skip_serializing_if = "std::string::String::is_empty")]
6907 pub encryption_key: std::string::String,
6908
6909 #[serde(skip_serializing_if = "std::option::Option::is_none")]
6913 pub vpc_access: std::option::Option<crate::model::VpcAccess>,
6914
6915 #[serde(skip_serializing_if = "std::string::String::is_empty")]
6918 pub log_uri: std::string::String,
6919
6920 pub satisfies_pzs: bool,
6922
6923 #[serde(skip_serializing_if = "std::string::String::is_empty")]
6926 pub etag: std::string::String,
6927
6928 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
6929 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6930}
6931
6932impl Task {
6933 pub fn new() -> Self {
6934 std::default::Default::default()
6935 }
6936
6937 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6939 self.name = v.into();
6940 self
6941 }
6942
6943 pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6945 self.uid = v.into();
6946 self
6947 }
6948
6949 pub fn set_generation<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
6951 self.generation = v.into();
6952 self
6953 }
6954
6955 pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
6957 mut self,
6958 v: T,
6959 ) -> Self {
6960 self.create_time = v.into();
6961 self
6962 }
6963
6964 pub fn set_scheduled_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
6966 mut self,
6967 v: T,
6968 ) -> Self {
6969 self.scheduled_time = v.into();
6970 self
6971 }
6972
6973 pub fn set_start_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
6975 mut self,
6976 v: T,
6977 ) -> Self {
6978 self.start_time = v.into();
6979 self
6980 }
6981
6982 pub fn set_completion_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
6984 mut self,
6985 v: T,
6986 ) -> Self {
6987 self.completion_time = v.into();
6988 self
6989 }
6990
6991 pub fn set_update_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
6993 mut self,
6994 v: T,
6995 ) -> Self {
6996 self.update_time = v.into();
6997 self
6998 }
6999
7000 pub fn set_delete_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
7002 mut self,
7003 v: T,
7004 ) -> Self {
7005 self.delete_time = v.into();
7006 self
7007 }
7008
7009 pub fn set_expire_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
7011 mut self,
7012 v: T,
7013 ) -> Self {
7014 self.expire_time = v.into();
7015 self
7016 }
7017
7018 pub fn set_job<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7020 self.job = v.into();
7021 self
7022 }
7023
7024 pub fn set_execution<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7026 self.execution = v.into();
7027 self
7028 }
7029
7030 pub fn set_max_retries<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
7032 self.max_retries = v.into();
7033 self
7034 }
7035
7036 pub fn set_timeout<T: std::convert::Into<std::option::Option<wkt::Duration>>>(
7038 mut self,
7039 v: T,
7040 ) -> Self {
7041 self.timeout = v.into();
7042 self
7043 }
7044
7045 pub fn set_service_account<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7047 self.service_account = v.into();
7048 self
7049 }
7050
7051 pub fn set_execution_environment<T: std::convert::Into<crate::model::ExecutionEnvironment>>(
7053 mut self,
7054 v: T,
7055 ) -> Self {
7056 self.execution_environment = v.into();
7057 self
7058 }
7059
7060 pub fn set_reconciling<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
7062 self.reconciling = v.into();
7063 self
7064 }
7065
7066 pub fn set_observed_generation<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
7068 self.observed_generation = v.into();
7069 self
7070 }
7071
7072 pub fn set_index<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
7074 self.index = v.into();
7075 self
7076 }
7077
7078 pub fn set_retried<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
7080 self.retried = v.into();
7081 self
7082 }
7083
7084 pub fn set_last_attempt_result<
7086 T: std::convert::Into<std::option::Option<crate::model::TaskAttemptResult>>,
7087 >(
7088 mut self,
7089 v: T,
7090 ) -> Self {
7091 self.last_attempt_result = v.into();
7092 self
7093 }
7094
7095 pub fn set_encryption_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7097 self.encryption_key = v.into();
7098 self
7099 }
7100
7101 pub fn set_vpc_access<T: std::convert::Into<std::option::Option<crate::model::VpcAccess>>>(
7103 mut self,
7104 v: T,
7105 ) -> Self {
7106 self.vpc_access = v.into();
7107 self
7108 }
7109
7110 pub fn set_log_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7112 self.log_uri = v.into();
7113 self
7114 }
7115
7116 pub fn set_satisfies_pzs<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
7118 self.satisfies_pzs = v.into();
7119 self
7120 }
7121
7122 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7124 self.etag = v.into();
7125 self
7126 }
7127
7128 pub fn set_containers<T, V>(mut self, v: T) -> Self
7130 where
7131 T: std::iter::IntoIterator<Item = V>,
7132 V: std::convert::Into<crate::model::Container>,
7133 {
7134 use std::iter::Iterator;
7135 self.containers = v.into_iter().map(|i| i.into()).collect();
7136 self
7137 }
7138
7139 pub fn set_volumes<T, V>(mut self, v: T) -> Self
7141 where
7142 T: std::iter::IntoIterator<Item = V>,
7143 V: std::convert::Into<crate::model::Volume>,
7144 {
7145 use std::iter::Iterator;
7146 self.volumes = v.into_iter().map(|i| i.into()).collect();
7147 self
7148 }
7149
7150 pub fn set_conditions<T, V>(mut self, v: T) -> Self
7152 where
7153 T: std::iter::IntoIterator<Item = V>,
7154 V: std::convert::Into<crate::model::Condition>,
7155 {
7156 use std::iter::Iterator;
7157 self.conditions = v.into_iter().map(|i| i.into()).collect();
7158 self
7159 }
7160
7161 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
7163 where
7164 T: std::iter::IntoIterator<Item = (K, V)>,
7165 K: std::convert::Into<std::string::String>,
7166 V: std::convert::Into<std::string::String>,
7167 {
7168 use std::iter::Iterator;
7169 self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
7170 self
7171 }
7172
7173 pub fn set_annotations<T, K, V>(mut self, v: T) -> Self
7175 where
7176 T: std::iter::IntoIterator<Item = (K, V)>,
7177 K: std::convert::Into<std::string::String>,
7178 V: std::convert::Into<std::string::String>,
7179 {
7180 use std::iter::Iterator;
7181 self.annotations = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
7182 self
7183 }
7184}
7185
7186impl wkt::message::Message for Task {
7187 fn typename() -> &'static str {
7188 "type.googleapis.com/google.cloud.run.v2.Task"
7189 }
7190}
7191
7192#[serde_with::serde_as]
7194#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
7195#[serde(default, rename_all = "camelCase")]
7196#[non_exhaustive]
7197pub struct TaskAttemptResult {
7198 #[serde(skip_serializing_if = "std::option::Option::is_none")]
7201 pub status: std::option::Option<rpc::model::Status>,
7202
7203 pub exit_code: i32,
7208
7209 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
7210 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7211}
7212
7213impl TaskAttemptResult {
7214 pub fn new() -> Self {
7215 std::default::Default::default()
7216 }
7217
7218 pub fn set_status<T: std::convert::Into<std::option::Option<rpc::model::Status>>>(
7220 mut self,
7221 v: T,
7222 ) -> Self {
7223 self.status = v.into();
7224 self
7225 }
7226
7227 pub fn set_exit_code<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
7229 self.exit_code = v.into();
7230 self
7231 }
7232}
7233
7234impl wkt::message::Message for TaskAttemptResult {
7235 fn typename() -> &'static str {
7236 "type.googleapis.com/google.cloud.run.v2.TaskAttemptResult"
7237 }
7238}
7239
7240#[serde_with::serde_as]
7243#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
7244#[serde(default, rename_all = "camelCase")]
7245#[non_exhaustive]
7246pub struct TaskTemplate {
7247 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
7250 pub containers: std::vec::Vec<crate::model::Container>,
7251
7252 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
7254 pub volumes: std::vec::Vec<crate::model::Volume>,
7255
7256 #[serde(skip_serializing_if = "std::option::Option::is_none")]
7261 pub timeout: std::option::Option<wkt::Duration>,
7262
7263 #[serde(skip_serializing_if = "std::string::String::is_empty")]
7268 pub service_account: std::string::String,
7269
7270 pub execution_environment: crate::model::ExecutionEnvironment,
7272
7273 #[serde(skip_serializing_if = "std::string::String::is_empty")]
7277 pub encryption_key: std::string::String,
7278
7279 #[serde(skip_serializing_if = "std::option::Option::is_none")]
7283 pub vpc_access: std::option::Option<crate::model::VpcAccess>,
7284
7285 #[serde(flatten, skip_serializing_if = "std::option::Option::is_none")]
7286 pub retries: std::option::Option<crate::model::task_template::Retries>,
7287
7288 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
7289 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7290}
7291
7292impl TaskTemplate {
7293 pub fn new() -> Self {
7294 std::default::Default::default()
7295 }
7296
7297 pub fn set_timeout<T: std::convert::Into<std::option::Option<wkt::Duration>>>(
7299 mut self,
7300 v: T,
7301 ) -> Self {
7302 self.timeout = v.into();
7303 self
7304 }
7305
7306 pub fn set_service_account<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7308 self.service_account = v.into();
7309 self
7310 }
7311
7312 pub fn set_execution_environment<T: std::convert::Into<crate::model::ExecutionEnvironment>>(
7314 mut self,
7315 v: T,
7316 ) -> Self {
7317 self.execution_environment = v.into();
7318 self
7319 }
7320
7321 pub fn set_encryption_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7323 self.encryption_key = v.into();
7324 self
7325 }
7326
7327 pub fn set_vpc_access<T: std::convert::Into<std::option::Option<crate::model::VpcAccess>>>(
7329 mut self,
7330 v: T,
7331 ) -> Self {
7332 self.vpc_access = v.into();
7333 self
7334 }
7335
7336 pub fn set_containers<T, V>(mut self, v: T) -> Self
7338 where
7339 T: std::iter::IntoIterator<Item = V>,
7340 V: std::convert::Into<crate::model::Container>,
7341 {
7342 use std::iter::Iterator;
7343 self.containers = v.into_iter().map(|i| i.into()).collect();
7344 self
7345 }
7346
7347 pub fn set_volumes<T, V>(mut self, v: T) -> Self
7349 where
7350 T: std::iter::IntoIterator<Item = V>,
7351 V: std::convert::Into<crate::model::Volume>,
7352 {
7353 use std::iter::Iterator;
7354 self.volumes = v.into_iter().map(|i| i.into()).collect();
7355 self
7356 }
7357
7358 pub fn set_retries<
7363 T: std::convert::Into<std::option::Option<crate::model::task_template::Retries>>,
7364 >(
7365 mut self,
7366 v: T,
7367 ) -> Self {
7368 self.retries = v.into();
7369 self
7370 }
7371
7372 pub fn max_retries(&self) -> std::option::Option<&i32> {
7376 #[allow(unreachable_patterns)]
7377 self.retries.as_ref().and_then(|v| match v {
7378 crate::model::task_template::Retries::MaxRetries(v) => std::option::Option::Some(v),
7379 _ => std::option::Option::None,
7380 })
7381 }
7382
7383 pub fn set_max_retries<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
7389 self.retries =
7390 std::option::Option::Some(crate::model::task_template::Retries::MaxRetries(v.into()));
7391 self
7392 }
7393}
7394
7395impl wkt::message::Message for TaskTemplate {
7396 fn typename() -> &'static str {
7397 "type.googleapis.com/google.cloud.run.v2.TaskTemplate"
7398 }
7399}
7400
7401pub mod task_template {
7403 #[allow(unused_imports)]
7404 use super::*;
7405
7406 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
7407 #[serde(rename_all = "camelCase")]
7408 #[non_exhaustive]
7409 pub enum Retries {
7410 MaxRetries(i32),
7413 }
7414}
7415
7416#[serde_with::serde_as]
7419#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
7420#[serde(default, rename_all = "camelCase")]
7421#[non_exhaustive]
7422pub struct TrafficTarget {
7423 #[serde(rename = "type")]
7425 pub r#type: crate::model::TrafficTargetAllocationType,
7426
7427 #[serde(skip_serializing_if = "std::string::String::is_empty")]
7430 pub revision: std::string::String,
7431
7432 pub percent: i32,
7435
7436 #[serde(skip_serializing_if = "std::string::String::is_empty")]
7439 pub tag: std::string::String,
7440
7441 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
7442 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7443}
7444
7445impl TrafficTarget {
7446 pub fn new() -> Self {
7447 std::default::Default::default()
7448 }
7449
7450 pub fn set_type<T: std::convert::Into<crate::model::TrafficTargetAllocationType>>(
7452 mut self,
7453 v: T,
7454 ) -> Self {
7455 self.r#type = v.into();
7456 self
7457 }
7458
7459 pub fn set_revision<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7461 self.revision = v.into();
7462 self
7463 }
7464
7465 pub fn set_percent<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
7467 self.percent = v.into();
7468 self
7469 }
7470
7471 pub fn set_tag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7473 self.tag = v.into();
7474 self
7475 }
7476}
7477
7478impl wkt::message::Message for TrafficTarget {
7479 fn typename() -> &'static str {
7480 "type.googleapis.com/google.cloud.run.v2.TrafficTarget"
7481 }
7482}
7483
7484#[serde_with::serde_as]
7486#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
7487#[serde(default, rename_all = "camelCase")]
7488#[non_exhaustive]
7489pub struct TrafficTargetStatus {
7490 #[serde(rename = "type")]
7492 pub r#type: crate::model::TrafficTargetAllocationType,
7493
7494 #[serde(skip_serializing_if = "std::string::String::is_empty")]
7496 pub revision: std::string::String,
7497
7498 pub percent: i32,
7500
7501 #[serde(skip_serializing_if = "std::string::String::is_empty")]
7503 pub tag: std::string::String,
7504
7505 #[serde(skip_serializing_if = "std::string::String::is_empty")]
7507 pub uri: std::string::String,
7508
7509 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
7510 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7511}
7512
7513impl TrafficTargetStatus {
7514 pub fn new() -> Self {
7515 std::default::Default::default()
7516 }
7517
7518 pub fn set_type<T: std::convert::Into<crate::model::TrafficTargetAllocationType>>(
7520 mut self,
7521 v: T,
7522 ) -> Self {
7523 self.r#type = v.into();
7524 self
7525 }
7526
7527 pub fn set_revision<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7529 self.revision = v.into();
7530 self
7531 }
7532
7533 pub fn set_percent<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
7535 self.percent = v.into();
7536 self
7537 }
7538
7539 pub fn set_tag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7541 self.tag = v.into();
7542 self
7543 }
7544
7545 pub fn set_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7547 self.uri = v.into();
7548 self
7549 }
7550}
7551
7552impl wkt::message::Message for TrafficTargetStatus {
7553 fn typename() -> &'static str {
7554 "type.googleapis.com/google.cloud.run.v2.TrafficTargetStatus"
7555 }
7556}
7557
7558#[serde_with::serde_as]
7561#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
7562#[serde(default, rename_all = "camelCase")]
7563#[non_exhaustive]
7564pub struct VpcAccess {
7565 #[serde(skip_serializing_if = "std::string::String::is_empty")]
7571 pub connector: std::string::String,
7572
7573 pub egress: crate::model::vpc_access::VpcEgress,
7576
7577 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
7580 pub network_interfaces: std::vec::Vec<crate::model::vpc_access::NetworkInterface>,
7581
7582 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
7583 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7584}
7585
7586impl VpcAccess {
7587 pub fn new() -> Self {
7588 std::default::Default::default()
7589 }
7590
7591 pub fn set_connector<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7593 self.connector = v.into();
7594 self
7595 }
7596
7597 pub fn set_egress<T: std::convert::Into<crate::model::vpc_access::VpcEgress>>(
7599 mut self,
7600 v: T,
7601 ) -> Self {
7602 self.egress = v.into();
7603 self
7604 }
7605
7606 pub fn set_network_interfaces<T, V>(mut self, v: T) -> Self
7608 where
7609 T: std::iter::IntoIterator<Item = V>,
7610 V: std::convert::Into<crate::model::vpc_access::NetworkInterface>,
7611 {
7612 use std::iter::Iterator;
7613 self.network_interfaces = v.into_iter().map(|i| i.into()).collect();
7614 self
7615 }
7616}
7617
7618impl wkt::message::Message for VpcAccess {
7619 fn typename() -> &'static str {
7620 "type.googleapis.com/google.cloud.run.v2.VpcAccess"
7621 }
7622}
7623
7624pub mod vpc_access {
7626 #[allow(unused_imports)]
7627 use super::*;
7628
7629 #[serde_with::serde_as]
7631 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
7632 #[serde(default, rename_all = "camelCase")]
7633 #[non_exhaustive]
7634 pub struct NetworkInterface {
7635 #[serde(skip_serializing_if = "std::string::String::is_empty")]
7641 pub network: std::string::String,
7642
7643 #[serde(skip_serializing_if = "std::string::String::is_empty")]
7649 pub subnetwork: std::string::String,
7650
7651 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
7653 pub tags: std::vec::Vec<std::string::String>,
7654
7655 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
7656 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7657 }
7658
7659 impl NetworkInterface {
7660 pub fn new() -> Self {
7661 std::default::Default::default()
7662 }
7663
7664 pub fn set_network<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7666 self.network = v.into();
7667 self
7668 }
7669
7670 pub fn set_subnetwork<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7672 self.subnetwork = v.into();
7673 self
7674 }
7675
7676 pub fn set_tags<T, V>(mut self, v: T) -> Self
7678 where
7679 T: std::iter::IntoIterator<Item = V>,
7680 V: std::convert::Into<std::string::String>,
7681 {
7682 use std::iter::Iterator;
7683 self.tags = v.into_iter().map(|i| i.into()).collect();
7684 self
7685 }
7686 }
7687
7688 impl wkt::message::Message for NetworkInterface {
7689 fn typename() -> &'static str {
7690 "type.googleapis.com/google.cloud.run.v2.VpcAccess.NetworkInterface"
7691 }
7692 }
7693
7694 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
7696 pub struct VpcEgress(i32);
7697
7698 impl VpcEgress {
7699 pub const VPC_EGRESS_UNSPECIFIED: VpcEgress = VpcEgress::new(0);
7701
7702 pub const ALL_TRAFFIC: VpcEgress = VpcEgress::new(1);
7704
7705 pub const PRIVATE_RANGES_ONLY: VpcEgress = VpcEgress::new(2);
7707
7708 pub(crate) const fn new(value: i32) -> Self {
7710 Self(value)
7711 }
7712
7713 pub fn value(&self) -> i32 {
7715 self.0
7716 }
7717
7718 pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
7720 match self.0 {
7721 0 => std::borrow::Cow::Borrowed("VPC_EGRESS_UNSPECIFIED"),
7722 1 => std::borrow::Cow::Borrowed("ALL_TRAFFIC"),
7723 2 => std::borrow::Cow::Borrowed("PRIVATE_RANGES_ONLY"),
7724 _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
7725 }
7726 }
7727
7728 pub fn from_str_name(name: &str) -> std::option::Option<Self> {
7730 match name {
7731 "VPC_EGRESS_UNSPECIFIED" => std::option::Option::Some(Self::VPC_EGRESS_UNSPECIFIED),
7732 "ALL_TRAFFIC" => std::option::Option::Some(Self::ALL_TRAFFIC),
7733 "PRIVATE_RANGES_ONLY" => std::option::Option::Some(Self::PRIVATE_RANGES_ONLY),
7734 _ => std::option::Option::None,
7735 }
7736 }
7737 }
7738
7739 impl std::convert::From<i32> for VpcEgress {
7740 fn from(value: i32) -> Self {
7741 Self::new(value)
7742 }
7743 }
7744
7745 impl std::default::Default for VpcEgress {
7746 fn default() -> Self {
7747 Self::new(0)
7748 }
7749 }
7750}
7751
7752#[serde_with::serde_as]
7754#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
7755#[serde(default, rename_all = "camelCase")]
7756#[non_exhaustive]
7757pub struct BinaryAuthorization {
7758 #[serde(skip_serializing_if = "std::string::String::is_empty")]
7763 pub breakglass_justification: std::string::String,
7764
7765 #[serde(flatten, skip_serializing_if = "std::option::Option::is_none")]
7766 pub binauthz_method: std::option::Option<crate::model::binary_authorization::BinauthzMethod>,
7767
7768 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
7769 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7770}
7771
7772impl BinaryAuthorization {
7773 pub fn new() -> Self {
7774 std::default::Default::default()
7775 }
7776
7777 pub fn set_breakglass_justification<T: std::convert::Into<std::string::String>>(
7779 mut self,
7780 v: T,
7781 ) -> Self {
7782 self.breakglass_justification = v.into();
7783 self
7784 }
7785
7786 pub fn set_binauthz_method<
7791 T: std::convert::Into<std::option::Option<crate::model::binary_authorization::BinauthzMethod>>,
7792 >(
7793 mut self,
7794 v: T,
7795 ) -> Self {
7796 self.binauthz_method = v.into();
7797 self
7798 }
7799
7800 pub fn use_default(&self) -> std::option::Option<&bool> {
7804 #[allow(unreachable_patterns)]
7805 self.binauthz_method.as_ref().and_then(|v| match v {
7806 crate::model::binary_authorization::BinauthzMethod::UseDefault(v) => {
7807 std::option::Option::Some(v)
7808 }
7809 _ => std::option::Option::None,
7810 })
7811 }
7812
7813 pub fn policy(&self) -> std::option::Option<&std::string::String> {
7817 #[allow(unreachable_patterns)]
7818 self.binauthz_method.as_ref().and_then(|v| match v {
7819 crate::model::binary_authorization::BinauthzMethod::Policy(v) => {
7820 std::option::Option::Some(v)
7821 }
7822 _ => std::option::Option::None,
7823 })
7824 }
7825
7826 pub fn set_use_default<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
7832 self.binauthz_method = std::option::Option::Some(
7833 crate::model::binary_authorization::BinauthzMethod::UseDefault(v.into()),
7834 );
7835 self
7836 }
7837
7838 pub fn set_policy<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7844 self.binauthz_method = std::option::Option::Some(
7845 crate::model::binary_authorization::BinauthzMethod::Policy(v.into()),
7846 );
7847 self
7848 }
7849}
7850
7851impl wkt::message::Message for BinaryAuthorization {
7852 fn typename() -> &'static str {
7853 "type.googleapis.com/google.cloud.run.v2.BinaryAuthorization"
7854 }
7855}
7856
7857pub mod binary_authorization {
7859 #[allow(unused_imports)]
7860 use super::*;
7861
7862 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
7863 #[serde(rename_all = "camelCase")]
7864 #[non_exhaustive]
7865 pub enum BinauthzMethod {
7866 UseDefault(bool),
7869 Policy(std::string::String),
7872 }
7873}
7874
7875#[serde_with::serde_as]
7877#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
7878#[serde(default, rename_all = "camelCase")]
7879#[non_exhaustive]
7880pub struct RevisionScaling {
7881 pub min_instance_count: i32,
7884
7885 pub max_instance_count: i32,
7890
7891 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
7892 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7893}
7894
7895impl RevisionScaling {
7896 pub fn new() -> Self {
7897 std::default::Default::default()
7898 }
7899
7900 pub fn set_min_instance_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
7902 self.min_instance_count = v.into();
7903 self
7904 }
7905
7906 pub fn set_max_instance_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
7908 self.max_instance_count = v.into();
7909 self
7910 }
7911}
7912
7913impl wkt::message::Message for RevisionScaling {
7914 fn typename() -> &'static str {
7915 "type.googleapis.com/google.cloud.run.v2.RevisionScaling"
7916 }
7917}
7918
7919#[serde_with::serde_as]
7922#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
7923#[serde(default, rename_all = "camelCase")]
7924#[non_exhaustive]
7925pub struct ServiceMesh {
7926 #[serde(skip_serializing_if = "std::string::String::is_empty")]
7930 pub mesh: std::string::String,
7931
7932 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
7933 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7934}
7935
7936impl ServiceMesh {
7937 pub fn new() -> Self {
7938 std::default::Default::default()
7939 }
7940
7941 pub fn set_mesh<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7943 self.mesh = v.into();
7944 self
7945 }
7946}
7947
7948impl wkt::message::Message for ServiceMesh {
7949 fn typename() -> &'static str {
7950 "type.googleapis.com/google.cloud.run.v2.ServiceMesh"
7951 }
7952}
7953
7954#[serde_with::serde_as]
7957#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
7958#[serde(default, rename_all = "camelCase")]
7959#[non_exhaustive]
7960pub struct ServiceScaling {
7961 pub min_instance_count: i32,
7965
7966 pub scaling_mode: crate::model::service_scaling::ScalingMode,
7968
7969 #[serde(skip_serializing_if = "std::option::Option::is_none")]
7973 pub manual_instance_count: std::option::Option<i32>,
7974
7975 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
7976 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7977}
7978
7979impl ServiceScaling {
7980 pub fn new() -> Self {
7981 std::default::Default::default()
7982 }
7983
7984 pub fn set_min_instance_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
7986 self.min_instance_count = v.into();
7987 self
7988 }
7989
7990 pub fn set_scaling_mode<T: std::convert::Into<crate::model::service_scaling::ScalingMode>>(
7992 mut self,
7993 v: T,
7994 ) -> Self {
7995 self.scaling_mode = v.into();
7996 self
7997 }
7998
7999 pub fn set_manual_instance_count<T: std::convert::Into<std::option::Option<i32>>>(
8001 mut self,
8002 v: T,
8003 ) -> Self {
8004 self.manual_instance_count = v.into();
8005 self
8006 }
8007}
8008
8009impl wkt::message::Message for ServiceScaling {
8010 fn typename() -> &'static str {
8011 "type.googleapis.com/google.cloud.run.v2.ServiceScaling"
8012 }
8013}
8014
8015pub mod service_scaling {
8017 #[allow(unused_imports)]
8018 use super::*;
8019
8020 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
8023 pub struct ScalingMode(i32);
8024
8025 impl ScalingMode {
8026 pub const SCALING_MODE_UNSPECIFIED: ScalingMode = ScalingMode::new(0);
8028
8029 pub const AUTOMATIC: ScalingMode = ScalingMode::new(1);
8031
8032 pub const MANUAL: ScalingMode = ScalingMode::new(2);
8034
8035 pub(crate) const fn new(value: i32) -> Self {
8037 Self(value)
8038 }
8039
8040 pub fn value(&self) -> i32 {
8042 self.0
8043 }
8044
8045 pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
8047 match self.0 {
8048 0 => std::borrow::Cow::Borrowed("SCALING_MODE_UNSPECIFIED"),
8049 1 => std::borrow::Cow::Borrowed("AUTOMATIC"),
8050 2 => std::borrow::Cow::Borrowed("MANUAL"),
8051 _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
8052 }
8053 }
8054
8055 pub fn from_str_name(name: &str) -> std::option::Option<Self> {
8057 match name {
8058 "SCALING_MODE_UNSPECIFIED" => {
8059 std::option::Option::Some(Self::SCALING_MODE_UNSPECIFIED)
8060 }
8061 "AUTOMATIC" => std::option::Option::Some(Self::AUTOMATIC),
8062 "MANUAL" => std::option::Option::Some(Self::MANUAL),
8063 _ => std::option::Option::None,
8064 }
8065 }
8066 }
8067
8068 impl std::convert::From<i32> for ScalingMode {
8069 fn from(value: i32) -> Self {
8070 Self::new(value)
8071 }
8072 }
8073
8074 impl std::default::Default for ScalingMode {
8075 fn default() -> Self {
8076 Self::new(0)
8077 }
8078 }
8079}
8080
8081#[serde_with::serde_as]
8083#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
8084#[serde(default, rename_all = "camelCase")]
8085#[non_exhaustive]
8086pub struct NodeSelector {
8087 #[serde(skip_serializing_if = "std::string::String::is_empty")]
8089 pub accelerator: std::string::String,
8090
8091 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
8092 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8093}
8094
8095impl NodeSelector {
8096 pub fn new() -> Self {
8097 std::default::Default::default()
8098 }
8099
8100 pub fn set_accelerator<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8102 self.accelerator = v.into();
8103 self
8104 }
8105}
8106
8107impl wkt::message::Message for NodeSelector {
8108 fn typename() -> &'static str {
8109 "type.googleapis.com/google.cloud.run.v2.NodeSelector"
8110 }
8111}
8112
8113#[serde_with::serde_as]
8116#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
8117#[serde(default, rename_all = "camelCase")]
8118#[non_exhaustive]
8119pub struct BuildConfig {
8120 #[serde(skip_serializing_if = "std::string::String::is_empty")]
8123 pub name: std::string::String,
8124
8125 #[serde(skip_serializing_if = "std::string::String::is_empty")]
8127 pub source_location: std::string::String,
8128
8129 #[serde(skip_serializing_if = "std::string::String::is_empty")]
8134 pub function_target: std::string::String,
8135
8136 #[serde(skip_serializing_if = "std::string::String::is_empty")]
8138 pub image_uri: std::string::String,
8139
8140 #[serde(skip_serializing_if = "std::string::String::is_empty")]
8142 pub base_image: std::string::String,
8143
8144 pub enable_automatic_updates: bool,
8147
8148 #[serde(skip_serializing_if = "std::string::String::is_empty")]
8155 pub worker_pool: std::string::String,
8156
8157 #[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
8159 pub environment_variables: std::collections::HashMap<std::string::String, std::string::String>,
8160
8161 #[serde(skip_serializing_if = "std::string::String::is_empty")]
8165 pub service_account: std::string::String,
8166
8167 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
8168 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8169}
8170
8171impl BuildConfig {
8172 pub fn new() -> Self {
8173 std::default::Default::default()
8174 }
8175
8176 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8178 self.name = v.into();
8179 self
8180 }
8181
8182 pub fn set_source_location<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8184 self.source_location = v.into();
8185 self
8186 }
8187
8188 pub fn set_function_target<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8190 self.function_target = v.into();
8191 self
8192 }
8193
8194 pub fn set_image_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8196 self.image_uri = v.into();
8197 self
8198 }
8199
8200 pub fn set_base_image<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8202 self.base_image = v.into();
8203 self
8204 }
8205
8206 pub fn set_enable_automatic_updates<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
8208 self.enable_automatic_updates = v.into();
8209 self
8210 }
8211
8212 pub fn set_worker_pool<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8214 self.worker_pool = v.into();
8215 self
8216 }
8217
8218 pub fn set_service_account<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8220 self.service_account = v.into();
8221 self
8222 }
8223
8224 pub fn set_environment_variables<T, K, V>(mut self, v: T) -> Self
8226 where
8227 T: std::iter::IntoIterator<Item = (K, V)>,
8228 K: std::convert::Into<std::string::String>,
8229 V: std::convert::Into<std::string::String>,
8230 {
8231 use std::iter::Iterator;
8232 self.environment_variables = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
8233 self
8234 }
8235}
8236
8237impl wkt::message::Message for BuildConfig {
8238 fn typename() -> &'static str {
8239 "type.googleapis.com/google.cloud.run.v2.BuildConfig"
8240 }
8241}
8242
8243#[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
8245pub struct TrafficTargetAllocationType(i32);
8246
8247impl TrafficTargetAllocationType {
8248 pub const TRAFFIC_TARGET_ALLOCATION_TYPE_UNSPECIFIED: TrafficTargetAllocationType =
8250 TrafficTargetAllocationType::new(0);
8251
8252 pub const TRAFFIC_TARGET_ALLOCATION_TYPE_LATEST: TrafficTargetAllocationType =
8254 TrafficTargetAllocationType::new(1);
8255
8256 pub const TRAFFIC_TARGET_ALLOCATION_TYPE_REVISION: TrafficTargetAllocationType =
8258 TrafficTargetAllocationType::new(2);
8259
8260 pub(crate) const fn new(value: i32) -> Self {
8262 Self(value)
8263 }
8264
8265 pub fn value(&self) -> i32 {
8267 self.0
8268 }
8269
8270 pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
8272 match self.0 {
8273 0 => std::borrow::Cow::Borrowed("TRAFFIC_TARGET_ALLOCATION_TYPE_UNSPECIFIED"),
8274 1 => std::borrow::Cow::Borrowed("TRAFFIC_TARGET_ALLOCATION_TYPE_LATEST"),
8275 2 => std::borrow::Cow::Borrowed("TRAFFIC_TARGET_ALLOCATION_TYPE_REVISION"),
8276 _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
8277 }
8278 }
8279
8280 pub fn from_str_name(name: &str) -> std::option::Option<Self> {
8282 match name {
8283 "TRAFFIC_TARGET_ALLOCATION_TYPE_UNSPECIFIED" => {
8284 std::option::Option::Some(Self::TRAFFIC_TARGET_ALLOCATION_TYPE_UNSPECIFIED)
8285 }
8286 "TRAFFIC_TARGET_ALLOCATION_TYPE_LATEST" => {
8287 std::option::Option::Some(Self::TRAFFIC_TARGET_ALLOCATION_TYPE_LATEST)
8288 }
8289 "TRAFFIC_TARGET_ALLOCATION_TYPE_REVISION" => {
8290 std::option::Option::Some(Self::TRAFFIC_TARGET_ALLOCATION_TYPE_REVISION)
8291 }
8292 _ => std::option::Option::None,
8293 }
8294 }
8295}
8296
8297impl std::convert::From<i32> for TrafficTargetAllocationType {
8298 fn from(value: i32) -> Self {
8299 Self::new(value)
8300 }
8301}
8302
8303impl std::default::Default for TrafficTargetAllocationType {
8304 fn default() -> Self {
8305 Self::new(0)
8306 }
8307}
8308
8309#[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
8311pub struct IngressTraffic(i32);
8312
8313impl IngressTraffic {
8314 pub const INGRESS_TRAFFIC_UNSPECIFIED: IngressTraffic = IngressTraffic::new(0);
8316
8317 pub const INGRESS_TRAFFIC_ALL: IngressTraffic = IngressTraffic::new(1);
8319
8320 pub const INGRESS_TRAFFIC_INTERNAL_ONLY: IngressTraffic = IngressTraffic::new(2);
8322
8323 pub const INGRESS_TRAFFIC_INTERNAL_LOAD_BALANCER: IngressTraffic = IngressTraffic::new(3);
8325
8326 pub const INGRESS_TRAFFIC_NONE: IngressTraffic = IngressTraffic::new(4);
8328
8329 pub(crate) const fn new(value: i32) -> Self {
8331 Self(value)
8332 }
8333
8334 pub fn value(&self) -> i32 {
8336 self.0
8337 }
8338
8339 pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
8341 match self.0 {
8342 0 => std::borrow::Cow::Borrowed("INGRESS_TRAFFIC_UNSPECIFIED"),
8343 1 => std::borrow::Cow::Borrowed("INGRESS_TRAFFIC_ALL"),
8344 2 => std::borrow::Cow::Borrowed("INGRESS_TRAFFIC_INTERNAL_ONLY"),
8345 3 => std::borrow::Cow::Borrowed("INGRESS_TRAFFIC_INTERNAL_LOAD_BALANCER"),
8346 4 => std::borrow::Cow::Borrowed("INGRESS_TRAFFIC_NONE"),
8347 _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
8348 }
8349 }
8350
8351 pub fn from_str_name(name: &str) -> std::option::Option<Self> {
8353 match name {
8354 "INGRESS_TRAFFIC_UNSPECIFIED" => {
8355 std::option::Option::Some(Self::INGRESS_TRAFFIC_UNSPECIFIED)
8356 }
8357 "INGRESS_TRAFFIC_ALL" => std::option::Option::Some(Self::INGRESS_TRAFFIC_ALL),
8358 "INGRESS_TRAFFIC_INTERNAL_ONLY" => {
8359 std::option::Option::Some(Self::INGRESS_TRAFFIC_INTERNAL_ONLY)
8360 }
8361 "INGRESS_TRAFFIC_INTERNAL_LOAD_BALANCER" => {
8362 std::option::Option::Some(Self::INGRESS_TRAFFIC_INTERNAL_LOAD_BALANCER)
8363 }
8364 "INGRESS_TRAFFIC_NONE" => std::option::Option::Some(Self::INGRESS_TRAFFIC_NONE),
8365 _ => std::option::Option::None,
8366 }
8367 }
8368}
8369
8370impl std::convert::From<i32> for IngressTraffic {
8371 fn from(value: i32) -> Self {
8372 Self::new(value)
8373 }
8374}
8375
8376impl std::default::Default for IngressTraffic {
8377 fn default() -> Self {
8378 Self::new(0)
8379 }
8380}
8381
8382#[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
8384pub struct ExecutionEnvironment(i32);
8385
8386impl ExecutionEnvironment {
8387 pub const EXECUTION_ENVIRONMENT_UNSPECIFIED: ExecutionEnvironment =
8389 ExecutionEnvironment::new(0);
8390
8391 pub const EXECUTION_ENVIRONMENT_GEN1: ExecutionEnvironment = ExecutionEnvironment::new(1);
8393
8394 pub const EXECUTION_ENVIRONMENT_GEN2: ExecutionEnvironment = ExecutionEnvironment::new(2);
8396
8397 pub(crate) const fn new(value: i32) -> Self {
8399 Self(value)
8400 }
8401
8402 pub fn value(&self) -> i32 {
8404 self.0
8405 }
8406
8407 pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
8409 match self.0 {
8410 0 => std::borrow::Cow::Borrowed("EXECUTION_ENVIRONMENT_UNSPECIFIED"),
8411 1 => std::borrow::Cow::Borrowed("EXECUTION_ENVIRONMENT_GEN1"),
8412 2 => std::borrow::Cow::Borrowed("EXECUTION_ENVIRONMENT_GEN2"),
8413 _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
8414 }
8415 }
8416
8417 pub fn from_str_name(name: &str) -> std::option::Option<Self> {
8419 match name {
8420 "EXECUTION_ENVIRONMENT_UNSPECIFIED" => {
8421 std::option::Option::Some(Self::EXECUTION_ENVIRONMENT_UNSPECIFIED)
8422 }
8423 "EXECUTION_ENVIRONMENT_GEN1" => {
8424 std::option::Option::Some(Self::EXECUTION_ENVIRONMENT_GEN1)
8425 }
8426 "EXECUTION_ENVIRONMENT_GEN2" => {
8427 std::option::Option::Some(Self::EXECUTION_ENVIRONMENT_GEN2)
8428 }
8429 _ => std::option::Option::None,
8430 }
8431 }
8432}
8433
8434impl std::convert::From<i32> for ExecutionEnvironment {
8435 fn from(value: i32) -> Self {
8436 Self::new(value)
8437 }
8438}
8439
8440impl std::default::Default for ExecutionEnvironment {
8441 fn default() -> Self {
8442 Self::new(0)
8443 }
8444}
8445
8446#[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
8448pub struct EncryptionKeyRevocationAction(i32);
8449
8450impl EncryptionKeyRevocationAction {
8451 pub const ENCRYPTION_KEY_REVOCATION_ACTION_UNSPECIFIED: EncryptionKeyRevocationAction =
8453 EncryptionKeyRevocationAction::new(0);
8454
8455 pub const PREVENT_NEW: EncryptionKeyRevocationAction = EncryptionKeyRevocationAction::new(1);
8457
8458 pub const SHUTDOWN: EncryptionKeyRevocationAction = EncryptionKeyRevocationAction::new(2);
8460
8461 pub(crate) const fn new(value: i32) -> Self {
8463 Self(value)
8464 }
8465
8466 pub fn value(&self) -> i32 {
8468 self.0
8469 }
8470
8471 pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
8473 match self.0 {
8474 0 => std::borrow::Cow::Borrowed("ENCRYPTION_KEY_REVOCATION_ACTION_UNSPECIFIED"),
8475 1 => std::borrow::Cow::Borrowed("PREVENT_NEW"),
8476 2 => std::borrow::Cow::Borrowed("SHUTDOWN"),
8477 _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
8478 }
8479 }
8480
8481 pub fn from_str_name(name: &str) -> std::option::Option<Self> {
8483 match name {
8484 "ENCRYPTION_KEY_REVOCATION_ACTION_UNSPECIFIED" => {
8485 std::option::Option::Some(Self::ENCRYPTION_KEY_REVOCATION_ACTION_UNSPECIFIED)
8486 }
8487 "PREVENT_NEW" => std::option::Option::Some(Self::PREVENT_NEW),
8488 "SHUTDOWN" => std::option::Option::Some(Self::SHUTDOWN),
8489 _ => std::option::Option::None,
8490 }
8491 }
8492}
8493
8494impl std::convert::From<i32> for EncryptionKeyRevocationAction {
8495 fn from(value: i32) -> Self {
8496 Self::new(value)
8497 }
8498}
8499
8500impl std::default::Default for EncryptionKeyRevocationAction {
8501 fn default() -> Self {
8502 Self::new(0)
8503 }
8504}