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 serde;
31extern crate serde_json;
32extern crate serde_with;
33extern crate std;
34extern crate tracing;
35extern crate wkt;
36
37#[serde_with::serde_as]
39#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
40#[serde(default, rename_all = "camelCase")]
41#[non_exhaustive]
42pub struct OperationMetadata {
43 #[serde(skip_serializing_if = "std::option::Option::is_none")]
45 pub create_time: std::option::Option<wkt::Timestamp>,
46
47 #[serde(skip_serializing_if = "std::option::Option::is_none")]
49 pub end_time: std::option::Option<wkt::Timestamp>,
50
51 #[serde(skip_serializing_if = "std::string::String::is_empty")]
53 pub target: std::string::String,
54
55 #[serde(skip_serializing_if = "std::string::String::is_empty")]
57 pub verb: std::string::String,
58
59 #[serde(skip_serializing_if = "std::string::String::is_empty")]
61 pub status_message: std::string::String,
62
63 #[serde(skip_serializing_if = "wkt::internal::is_default")]
71 pub requested_cancellation: bool,
72
73 #[serde(skip_serializing_if = "std::string::String::is_empty")]
75 pub api_version: std::string::String,
76
77 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
78 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
79}
80
81impl OperationMetadata {
82 pub fn new() -> Self {
83 std::default::Default::default()
84 }
85
86 pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
88 mut self,
89 v: T,
90 ) -> Self {
91 self.create_time = v.into();
92 self
93 }
94
95 pub fn set_end_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
97 mut self,
98 v: T,
99 ) -> Self {
100 self.end_time = v.into();
101 self
102 }
103
104 pub fn set_target<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
106 self.target = v.into();
107 self
108 }
109
110 pub fn set_verb<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
112 self.verb = v.into();
113 self
114 }
115
116 pub fn set_status_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
118 self.status_message = v.into();
119 self
120 }
121
122 pub fn set_requested_cancellation<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
124 self.requested_cancellation = v.into();
125 self
126 }
127
128 pub fn set_api_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
130 self.api_version = v.into();
131 self
132 }
133}
134
135impl wkt::message::Message for OperationMetadata {
136 fn typename() -> &'static str {
137 "type.googleapis.com/google.devtools.cloudbuild.v2.OperationMetadata"
138 }
139}
140
141#[serde_with::serde_as]
143#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
144#[serde(default, rename_all = "camelCase")]
145#[non_exhaustive]
146pub struct RunWorkflowCustomOperationMetadata {
147 #[serde(skip_serializing_if = "std::option::Option::is_none")]
149 pub create_time: std::option::Option<wkt::Timestamp>,
150
151 #[serde(skip_serializing_if = "std::option::Option::is_none")]
153 pub end_time: std::option::Option<wkt::Timestamp>,
154
155 #[serde(skip_serializing_if = "std::string::String::is_empty")]
157 pub verb: std::string::String,
158
159 #[serde(skip_serializing_if = "wkt::internal::is_default")]
167 pub requested_cancellation: bool,
168
169 #[serde(skip_serializing_if = "std::string::String::is_empty")]
171 pub api_version: std::string::String,
172
173 #[serde(skip_serializing_if = "std::string::String::is_empty")]
175 pub target: std::string::String,
176
177 #[serde(skip_serializing_if = "std::string::String::is_empty")]
179 pub pipeline_run_id: std::string::String,
180
181 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
182 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
183}
184
185impl RunWorkflowCustomOperationMetadata {
186 pub fn new() -> Self {
187 std::default::Default::default()
188 }
189
190 pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
192 mut self,
193 v: T,
194 ) -> Self {
195 self.create_time = v.into();
196 self
197 }
198
199 pub fn set_end_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
201 mut self,
202 v: T,
203 ) -> Self {
204 self.end_time = v.into();
205 self
206 }
207
208 pub fn set_verb<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
210 self.verb = v.into();
211 self
212 }
213
214 pub fn set_requested_cancellation<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
216 self.requested_cancellation = v.into();
217 self
218 }
219
220 pub fn set_api_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
222 self.api_version = v.into();
223 self
224 }
225
226 pub fn set_target<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
228 self.target = v.into();
229 self
230 }
231
232 pub fn set_pipeline_run_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
234 self.pipeline_run_id = v.into();
235 self
236 }
237}
238
239impl wkt::message::Message for RunWorkflowCustomOperationMetadata {
240 fn typename() -> &'static str {
241 "type.googleapis.com/google.devtools.cloudbuild.v2.RunWorkflowCustomOperationMetadata"
242 }
243}
244
245#[serde_with::serde_as]
248#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
249#[serde(default, rename_all = "camelCase")]
250#[non_exhaustive]
251pub struct Connection {
252 #[serde(skip_serializing_if = "std::string::String::is_empty")]
255 pub name: std::string::String,
256
257 #[serde(skip_serializing_if = "std::option::Option::is_none")]
259 pub create_time: std::option::Option<wkt::Timestamp>,
260
261 #[serde(skip_serializing_if = "std::option::Option::is_none")]
263 pub update_time: std::option::Option<wkt::Timestamp>,
264
265 #[serde(skip_serializing_if = "std::option::Option::is_none")]
267 pub installation_state: std::option::Option<crate::model::InstallationState>,
268
269 #[serde(skip_serializing_if = "wkt::internal::is_default")]
273 pub disabled: bool,
274
275 #[serde(skip_serializing_if = "wkt::internal::is_default")]
278 pub reconciling: bool,
279
280 #[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
282 pub annotations: std::collections::HashMap<std::string::String, std::string::String>,
283
284 #[serde(skip_serializing_if = "std::string::String::is_empty")]
288 pub etag: std::string::String,
289
290 #[serde(flatten, skip_serializing_if = "std::option::Option::is_none")]
292 pub connection_config: std::option::Option<crate::model::connection::ConnectionConfig>,
293
294 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
295 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
296}
297
298impl Connection {
299 pub fn new() -> Self {
300 std::default::Default::default()
301 }
302
303 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
305 self.name = v.into();
306 self
307 }
308
309 pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
311 mut self,
312 v: T,
313 ) -> Self {
314 self.create_time = v.into();
315 self
316 }
317
318 pub fn set_update_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
320 mut self,
321 v: T,
322 ) -> Self {
323 self.update_time = v.into();
324 self
325 }
326
327 pub fn set_installation_state<
329 T: std::convert::Into<std::option::Option<crate::model::InstallationState>>,
330 >(
331 mut self,
332 v: T,
333 ) -> Self {
334 self.installation_state = v.into();
335 self
336 }
337
338 pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
340 self.disabled = v.into();
341 self
342 }
343
344 pub fn set_reconciling<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
346 self.reconciling = v.into();
347 self
348 }
349
350 pub fn set_annotations<T, K, V>(mut self, v: T) -> Self
352 where
353 T: std::iter::IntoIterator<Item = (K, V)>,
354 K: std::convert::Into<std::string::String>,
355 V: std::convert::Into<std::string::String>,
356 {
357 use std::iter::Iterator;
358 self.annotations = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
359 self
360 }
361
362 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
364 self.etag = v.into();
365 self
366 }
367
368 pub fn set_connection_config<
373 T: std::convert::Into<std::option::Option<crate::model::connection::ConnectionConfig>>,
374 >(
375 mut self,
376 v: T,
377 ) -> Self {
378 self.connection_config = v.into();
379 self
380 }
381
382 pub fn github_config(
386 &self,
387 ) -> std::option::Option<&std::boxed::Box<crate::model::GitHubConfig>> {
388 #[allow(unreachable_patterns)]
389 self.connection_config.as_ref().and_then(|v| match v {
390 crate::model::connection::ConnectionConfig::GithubConfig(v) => {
391 std::option::Option::Some(v)
392 }
393 _ => std::option::Option::None,
394 })
395 }
396
397 pub fn set_github_config<T: std::convert::Into<std::boxed::Box<crate::model::GitHubConfig>>>(
403 mut self,
404 v: T,
405 ) -> Self {
406 self.connection_config = std::option::Option::Some(
407 crate::model::connection::ConnectionConfig::GithubConfig(v.into()),
408 );
409 self
410 }
411
412 pub fn github_enterprise_config(
416 &self,
417 ) -> std::option::Option<&std::boxed::Box<crate::model::GitHubEnterpriseConfig>> {
418 #[allow(unreachable_patterns)]
419 self.connection_config.as_ref().and_then(|v| match v {
420 crate::model::connection::ConnectionConfig::GithubEnterpriseConfig(v) => {
421 std::option::Option::Some(v)
422 }
423 _ => std::option::Option::None,
424 })
425 }
426
427 pub fn set_github_enterprise_config<
433 T: std::convert::Into<std::boxed::Box<crate::model::GitHubEnterpriseConfig>>,
434 >(
435 mut self,
436 v: T,
437 ) -> Self {
438 self.connection_config = std::option::Option::Some(
439 crate::model::connection::ConnectionConfig::GithubEnterpriseConfig(v.into()),
440 );
441 self
442 }
443
444 pub fn gitlab_config(
448 &self,
449 ) -> std::option::Option<&std::boxed::Box<crate::model::GitLabConfig>> {
450 #[allow(unreachable_patterns)]
451 self.connection_config.as_ref().and_then(|v| match v {
452 crate::model::connection::ConnectionConfig::GitlabConfig(v) => {
453 std::option::Option::Some(v)
454 }
455 _ => std::option::Option::None,
456 })
457 }
458
459 pub fn set_gitlab_config<T: std::convert::Into<std::boxed::Box<crate::model::GitLabConfig>>>(
465 mut self,
466 v: T,
467 ) -> Self {
468 self.connection_config = std::option::Option::Some(
469 crate::model::connection::ConnectionConfig::GitlabConfig(v.into()),
470 );
471 self
472 }
473
474 pub fn bitbucket_data_center_config(
478 &self,
479 ) -> std::option::Option<&std::boxed::Box<crate::model::BitbucketDataCenterConfig>> {
480 #[allow(unreachable_patterns)]
481 self.connection_config.as_ref().and_then(|v| match v {
482 crate::model::connection::ConnectionConfig::BitbucketDataCenterConfig(v) => {
483 std::option::Option::Some(v)
484 }
485 _ => std::option::Option::None,
486 })
487 }
488
489 pub fn set_bitbucket_data_center_config<
495 T: std::convert::Into<std::boxed::Box<crate::model::BitbucketDataCenterConfig>>,
496 >(
497 mut self,
498 v: T,
499 ) -> Self {
500 self.connection_config = std::option::Option::Some(
501 crate::model::connection::ConnectionConfig::BitbucketDataCenterConfig(v.into()),
502 );
503 self
504 }
505
506 pub fn bitbucket_cloud_config(
510 &self,
511 ) -> std::option::Option<&std::boxed::Box<crate::model::BitbucketCloudConfig>> {
512 #[allow(unreachable_patterns)]
513 self.connection_config.as_ref().and_then(|v| match v {
514 crate::model::connection::ConnectionConfig::BitbucketCloudConfig(v) => {
515 std::option::Option::Some(v)
516 }
517 _ => std::option::Option::None,
518 })
519 }
520
521 pub fn set_bitbucket_cloud_config<
527 T: std::convert::Into<std::boxed::Box<crate::model::BitbucketCloudConfig>>,
528 >(
529 mut self,
530 v: T,
531 ) -> Self {
532 self.connection_config = std::option::Option::Some(
533 crate::model::connection::ConnectionConfig::BitbucketCloudConfig(v.into()),
534 );
535 self
536 }
537}
538
539impl wkt::message::Message for Connection {
540 fn typename() -> &'static str {
541 "type.googleapis.com/google.devtools.cloudbuild.v2.Connection"
542 }
543}
544
545pub mod connection {
547 #[allow(unused_imports)]
548 use super::*;
549
550 #[serde_with::serde_as]
552 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
553 #[serde(rename_all = "camelCase")]
554 #[non_exhaustive]
555 pub enum ConnectionConfig {
556 GithubConfig(std::boxed::Box<crate::model::GitHubConfig>),
558 GithubEnterpriseConfig(std::boxed::Box<crate::model::GitHubEnterpriseConfig>),
560 GitlabConfig(std::boxed::Box<crate::model::GitLabConfig>),
563 BitbucketDataCenterConfig(std::boxed::Box<crate::model::BitbucketDataCenterConfig>),
565 BitbucketCloudConfig(std::boxed::Box<crate::model::BitbucketCloudConfig>),
567 }
568}
569
570#[serde_with::serde_as]
574#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
575#[serde(default, rename_all = "camelCase")]
576#[non_exhaustive]
577pub struct InstallationState {
578 pub stage: crate::model::installation_state::Stage,
580
581 #[serde(skip_serializing_if = "std::string::String::is_empty")]
584 pub message: std::string::String,
585
586 #[serde(skip_serializing_if = "std::string::String::is_empty")]
589 pub action_uri: std::string::String,
590
591 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
592 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
593}
594
595impl InstallationState {
596 pub fn new() -> Self {
597 std::default::Default::default()
598 }
599
600 pub fn set_stage<T: std::convert::Into<crate::model::installation_state::Stage>>(
602 mut self,
603 v: T,
604 ) -> Self {
605 self.stage = v.into();
606 self
607 }
608
609 pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
611 self.message = v.into();
612 self
613 }
614
615 pub fn set_action_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
617 self.action_uri = v.into();
618 self
619 }
620}
621
622impl wkt::message::Message for InstallationState {
623 fn typename() -> &'static str {
624 "type.googleapis.com/google.devtools.cloudbuild.v2.InstallationState"
625 }
626}
627
628pub mod installation_state {
630 #[allow(unused_imports)]
631 use super::*;
632
633 #[derive(Clone, Debug, PartialEq)]
649 #[non_exhaustive]
650 pub enum Stage {
651 Unspecified,
653 PendingCreateApp,
656 PendingUserOauth,
658 PendingInstallApp,
660 Complete,
662 UnknownValue(stage::UnknownValue),
667 }
668
669 #[doc(hidden)]
670 pub mod stage {
671 #[allow(unused_imports)]
672 use super::*;
673 #[derive(Clone, Debug, PartialEq)]
674 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
675 }
676
677 impl Stage {
678 pub fn value(&self) -> std::option::Option<i32> {
683 match self {
684 Self::Unspecified => std::option::Option::Some(0),
685 Self::PendingCreateApp => std::option::Option::Some(1),
686 Self::PendingUserOauth => std::option::Option::Some(2),
687 Self::PendingInstallApp => std::option::Option::Some(3),
688 Self::Complete => std::option::Option::Some(10),
689 Self::UnknownValue(u) => u.0.value(),
690 }
691 }
692
693 pub fn name(&self) -> std::option::Option<&str> {
698 match self {
699 Self::Unspecified => std::option::Option::Some("STAGE_UNSPECIFIED"),
700 Self::PendingCreateApp => std::option::Option::Some("PENDING_CREATE_APP"),
701 Self::PendingUserOauth => std::option::Option::Some("PENDING_USER_OAUTH"),
702 Self::PendingInstallApp => std::option::Option::Some("PENDING_INSTALL_APP"),
703 Self::Complete => std::option::Option::Some("COMPLETE"),
704 Self::UnknownValue(u) => u.0.name(),
705 }
706 }
707 }
708
709 impl std::default::Default for Stage {
710 fn default() -> Self {
711 use std::convert::From;
712 Self::from(0)
713 }
714 }
715
716 impl std::fmt::Display for Stage {
717 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
718 wkt::internal::display_enum(f, self.name(), self.value())
719 }
720 }
721
722 impl std::convert::From<i32> for Stage {
723 fn from(value: i32) -> Self {
724 match value {
725 0 => Self::Unspecified,
726 1 => Self::PendingCreateApp,
727 2 => Self::PendingUserOauth,
728 3 => Self::PendingInstallApp,
729 10 => Self::Complete,
730 _ => Self::UnknownValue(stage::UnknownValue(
731 wkt::internal::UnknownEnumValue::Integer(value),
732 )),
733 }
734 }
735 }
736
737 impl std::convert::From<&str> for Stage {
738 fn from(value: &str) -> Self {
739 use std::string::ToString;
740 match value {
741 "STAGE_UNSPECIFIED" => Self::Unspecified,
742 "PENDING_CREATE_APP" => Self::PendingCreateApp,
743 "PENDING_USER_OAUTH" => Self::PendingUserOauth,
744 "PENDING_INSTALL_APP" => Self::PendingInstallApp,
745 "COMPLETE" => Self::Complete,
746 _ => Self::UnknownValue(stage::UnknownValue(
747 wkt::internal::UnknownEnumValue::String(value.to_string()),
748 )),
749 }
750 }
751 }
752
753 impl serde::ser::Serialize for Stage {
754 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
755 where
756 S: serde::Serializer,
757 {
758 match self {
759 Self::Unspecified => serializer.serialize_i32(0),
760 Self::PendingCreateApp => serializer.serialize_i32(1),
761 Self::PendingUserOauth => serializer.serialize_i32(2),
762 Self::PendingInstallApp => serializer.serialize_i32(3),
763 Self::Complete => serializer.serialize_i32(10),
764 Self::UnknownValue(u) => u.0.serialize(serializer),
765 }
766 }
767 }
768
769 impl<'de> serde::de::Deserialize<'de> for Stage {
770 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
771 where
772 D: serde::Deserializer<'de>,
773 {
774 deserializer.deserialize_any(wkt::internal::EnumVisitor::<Stage>::new(
775 ".google.devtools.cloudbuild.v2.InstallationState.Stage",
776 ))
777 }
778 }
779}
780
781#[serde_with::serde_as]
783#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
784#[serde(default, rename_all = "camelCase")]
785#[non_exhaustive]
786pub struct FetchLinkableRepositoriesRequest {
787 #[serde(skip_serializing_if = "std::string::String::is_empty")]
790 pub connection: std::string::String,
791
792 #[serde(skip_serializing_if = "wkt::internal::is_default")]
794 pub page_size: i32,
795
796 #[serde(skip_serializing_if = "std::string::String::is_empty")]
798 pub page_token: std::string::String,
799
800 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
801 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
802}
803
804impl FetchLinkableRepositoriesRequest {
805 pub fn new() -> Self {
806 std::default::Default::default()
807 }
808
809 pub fn set_connection<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
811 self.connection = v.into();
812 self
813 }
814
815 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
817 self.page_size = v.into();
818 self
819 }
820
821 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
823 self.page_token = v.into();
824 self
825 }
826}
827
828impl wkt::message::Message for FetchLinkableRepositoriesRequest {
829 fn typename() -> &'static str {
830 "type.googleapis.com/google.devtools.cloudbuild.v2.FetchLinkableRepositoriesRequest"
831 }
832}
833
834#[serde_with::serde_as]
836#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
837#[serde(default, rename_all = "camelCase")]
838#[non_exhaustive]
839pub struct FetchLinkableRepositoriesResponse {
840 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
842 pub repositories: std::vec::Vec<crate::model::Repository>,
843
844 #[serde(skip_serializing_if = "std::string::String::is_empty")]
846 pub next_page_token: std::string::String,
847
848 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
849 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
850}
851
852impl FetchLinkableRepositoriesResponse {
853 pub fn new() -> Self {
854 std::default::Default::default()
855 }
856
857 pub fn set_repositories<T, V>(mut self, v: T) -> Self
859 where
860 T: std::iter::IntoIterator<Item = V>,
861 V: std::convert::Into<crate::model::Repository>,
862 {
863 use std::iter::Iterator;
864 self.repositories = v.into_iter().map(|i| i.into()).collect();
865 self
866 }
867
868 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
870 self.next_page_token = v.into();
871 self
872 }
873}
874
875impl wkt::message::Message for FetchLinkableRepositoriesResponse {
876 fn typename() -> &'static str {
877 "type.googleapis.com/google.devtools.cloudbuild.v2.FetchLinkableRepositoriesResponse"
878 }
879}
880
881#[doc(hidden)]
882impl gax::paginator::internal::PageableResponse for FetchLinkableRepositoriesResponse {
883 type PageItem = crate::model::Repository;
884
885 fn items(self) -> std::vec::Vec<Self::PageItem> {
886 self.repositories
887 }
888
889 fn next_page_token(&self) -> std::string::String {
890 use std::clone::Clone;
891 self.next_page_token.clone()
892 }
893}
894
895#[serde_with::serde_as]
897#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
898#[serde(default, rename_all = "camelCase")]
899#[non_exhaustive]
900pub struct GitHubConfig {
901 #[serde(skip_serializing_if = "std::option::Option::is_none")]
905 pub authorizer_credential: std::option::Option<crate::model::OAuthCredential>,
906
907 #[serde(skip_serializing_if = "wkt::internal::is_default")]
909 #[serde_as(as = "serde_with::DisplayFromStr")]
910 pub app_installation_id: i64,
911
912 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
913 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
914}
915
916impl GitHubConfig {
917 pub fn new() -> Self {
918 std::default::Default::default()
919 }
920
921 pub fn set_authorizer_credential<
923 T: std::convert::Into<std::option::Option<crate::model::OAuthCredential>>,
924 >(
925 mut self,
926 v: T,
927 ) -> Self {
928 self.authorizer_credential = v.into();
929 self
930 }
931
932 pub fn set_app_installation_id<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
934 self.app_installation_id = v.into();
935 self
936 }
937}
938
939impl wkt::message::Message for GitHubConfig {
940 fn typename() -> &'static str {
941 "type.googleapis.com/google.devtools.cloudbuild.v2.GitHubConfig"
942 }
943}
944
945#[serde_with::serde_as]
947#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
948#[serde(default, rename_all = "camelCase")]
949#[non_exhaustive]
950pub struct GitHubEnterpriseConfig {
951 #[serde(skip_serializing_if = "std::string::String::is_empty")]
953 pub host_uri: std::string::String,
954
955 #[serde(skip_serializing_if = "std::string::String::is_empty")]
957 pub api_key: std::string::String,
958
959 #[serde(skip_serializing_if = "wkt::internal::is_default")]
961 #[serde_as(as = "serde_with::DisplayFromStr")]
962 pub app_id: i64,
963
964 #[serde(skip_serializing_if = "std::string::String::is_empty")]
966 pub app_slug: std::string::String,
967
968 #[serde(skip_serializing_if = "std::string::String::is_empty")]
971 pub private_key_secret_version: std::string::String,
972
973 #[serde(skip_serializing_if = "std::string::String::is_empty")]
976 pub webhook_secret_secret_version: std::string::String,
977
978 #[serde(skip_serializing_if = "wkt::internal::is_default")]
980 #[serde_as(as = "serde_with::DisplayFromStr")]
981 pub app_installation_id: i64,
982
983 #[serde(skip_serializing_if = "std::option::Option::is_none")]
989 pub service_directory_config: std::option::Option<crate::model::ServiceDirectoryConfig>,
990
991 #[serde(skip_serializing_if = "std::string::String::is_empty")]
993 pub ssl_ca: std::string::String,
994
995 #[serde(skip_serializing_if = "std::string::String::is_empty")]
997 pub server_version: std::string::String,
998
999 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1000 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1001}
1002
1003impl GitHubEnterpriseConfig {
1004 pub fn new() -> Self {
1005 std::default::Default::default()
1006 }
1007
1008 pub fn set_host_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1010 self.host_uri = v.into();
1011 self
1012 }
1013
1014 pub fn set_api_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1016 self.api_key = v.into();
1017 self
1018 }
1019
1020 pub fn set_app_id<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
1022 self.app_id = v.into();
1023 self
1024 }
1025
1026 pub fn set_app_slug<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1028 self.app_slug = v.into();
1029 self
1030 }
1031
1032 pub fn set_private_key_secret_version<T: std::convert::Into<std::string::String>>(
1034 mut self,
1035 v: T,
1036 ) -> Self {
1037 self.private_key_secret_version = v.into();
1038 self
1039 }
1040
1041 pub fn set_webhook_secret_secret_version<T: std::convert::Into<std::string::String>>(
1043 mut self,
1044 v: T,
1045 ) -> Self {
1046 self.webhook_secret_secret_version = v.into();
1047 self
1048 }
1049
1050 pub fn set_app_installation_id<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
1052 self.app_installation_id = v.into();
1053 self
1054 }
1055
1056 pub fn set_service_directory_config<
1058 T: std::convert::Into<std::option::Option<crate::model::ServiceDirectoryConfig>>,
1059 >(
1060 mut self,
1061 v: T,
1062 ) -> Self {
1063 self.service_directory_config = v.into();
1064 self
1065 }
1066
1067 pub fn set_ssl_ca<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1069 self.ssl_ca = v.into();
1070 self
1071 }
1072
1073 pub fn set_server_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1075 self.server_version = v.into();
1076 self
1077 }
1078}
1079
1080impl wkt::message::Message for GitHubEnterpriseConfig {
1081 fn typename() -> &'static str {
1082 "type.googleapis.com/google.devtools.cloudbuild.v2.GitHubEnterpriseConfig"
1083 }
1084}
1085
1086#[serde_with::serde_as]
1089#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1090#[serde(default, rename_all = "camelCase")]
1091#[non_exhaustive]
1092pub struct GitLabConfig {
1093 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1096 pub host_uri: std::string::String,
1097
1098 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1102 pub webhook_secret_secret_version: std::string::String,
1103
1104 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1107 pub read_authorizer_credential: std::option::Option<crate::model::UserCredential>,
1108
1109 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1111 pub authorizer_credential: std::option::Option<crate::model::UserCredential>,
1112
1113 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1119 pub service_directory_config: std::option::Option<crate::model::ServiceDirectoryConfig>,
1120
1121 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1123 pub ssl_ca: std::string::String,
1124
1125 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1128 pub server_version: std::string::String,
1129
1130 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1131 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1132}
1133
1134impl GitLabConfig {
1135 pub fn new() -> Self {
1136 std::default::Default::default()
1137 }
1138
1139 pub fn set_host_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1141 self.host_uri = v.into();
1142 self
1143 }
1144
1145 pub fn set_webhook_secret_secret_version<T: std::convert::Into<std::string::String>>(
1147 mut self,
1148 v: T,
1149 ) -> Self {
1150 self.webhook_secret_secret_version = v.into();
1151 self
1152 }
1153
1154 pub fn set_read_authorizer_credential<
1156 T: std::convert::Into<std::option::Option<crate::model::UserCredential>>,
1157 >(
1158 mut self,
1159 v: T,
1160 ) -> Self {
1161 self.read_authorizer_credential = v.into();
1162 self
1163 }
1164
1165 pub fn set_authorizer_credential<
1167 T: std::convert::Into<std::option::Option<crate::model::UserCredential>>,
1168 >(
1169 mut self,
1170 v: T,
1171 ) -> Self {
1172 self.authorizer_credential = v.into();
1173 self
1174 }
1175
1176 pub fn set_service_directory_config<
1178 T: std::convert::Into<std::option::Option<crate::model::ServiceDirectoryConfig>>,
1179 >(
1180 mut self,
1181 v: T,
1182 ) -> Self {
1183 self.service_directory_config = v.into();
1184 self
1185 }
1186
1187 pub fn set_ssl_ca<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1189 self.ssl_ca = v.into();
1190 self
1191 }
1192
1193 pub fn set_server_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1195 self.server_version = v.into();
1196 self
1197 }
1198}
1199
1200impl wkt::message::Message for GitLabConfig {
1201 fn typename() -> &'static str {
1202 "type.googleapis.com/google.devtools.cloudbuild.v2.GitLabConfig"
1203 }
1204}
1205
1206#[serde_with::serde_as]
1208#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1209#[serde(default, rename_all = "camelCase")]
1210#[non_exhaustive]
1211pub struct BitbucketDataCenterConfig {
1212 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1215 pub host_uri: std::string::String,
1216
1217 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1221 pub webhook_secret_secret_version: std::string::String,
1222
1223 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1225 pub read_authorizer_credential: std::option::Option<crate::model::UserCredential>,
1226
1227 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1229 pub authorizer_credential: std::option::Option<crate::model::UserCredential>,
1230
1231 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1237 pub service_directory_config: std::option::Option<crate::model::ServiceDirectoryConfig>,
1238
1239 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1241 pub ssl_ca: std::string::String,
1242
1243 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1246 pub server_version: std::string::String,
1247
1248 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1249 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1250}
1251
1252impl BitbucketDataCenterConfig {
1253 pub fn new() -> Self {
1254 std::default::Default::default()
1255 }
1256
1257 pub fn set_host_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1259 self.host_uri = v.into();
1260 self
1261 }
1262
1263 pub fn set_webhook_secret_secret_version<T: std::convert::Into<std::string::String>>(
1265 mut self,
1266 v: T,
1267 ) -> Self {
1268 self.webhook_secret_secret_version = v.into();
1269 self
1270 }
1271
1272 pub fn set_read_authorizer_credential<
1274 T: std::convert::Into<std::option::Option<crate::model::UserCredential>>,
1275 >(
1276 mut self,
1277 v: T,
1278 ) -> Self {
1279 self.read_authorizer_credential = v.into();
1280 self
1281 }
1282
1283 pub fn set_authorizer_credential<
1285 T: std::convert::Into<std::option::Option<crate::model::UserCredential>>,
1286 >(
1287 mut self,
1288 v: T,
1289 ) -> Self {
1290 self.authorizer_credential = v.into();
1291 self
1292 }
1293
1294 pub fn set_service_directory_config<
1296 T: std::convert::Into<std::option::Option<crate::model::ServiceDirectoryConfig>>,
1297 >(
1298 mut self,
1299 v: T,
1300 ) -> Self {
1301 self.service_directory_config = v.into();
1302 self
1303 }
1304
1305 pub fn set_ssl_ca<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1307 self.ssl_ca = v.into();
1308 self
1309 }
1310
1311 pub fn set_server_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1313 self.server_version = v.into();
1314 self
1315 }
1316}
1317
1318impl wkt::message::Message for BitbucketDataCenterConfig {
1319 fn typename() -> &'static str {
1320 "type.googleapis.com/google.devtools.cloudbuild.v2.BitbucketDataCenterConfig"
1321 }
1322}
1323
1324#[serde_with::serde_as]
1326#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1327#[serde(default, rename_all = "camelCase")]
1328#[non_exhaustive]
1329pub struct BitbucketCloudConfig {
1330 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1333 pub workspace: std::string::String,
1334
1335 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1338 pub webhook_secret_secret_version: std::string::String,
1339
1340 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1344 pub read_authorizer_credential: std::option::Option<crate::model::UserCredential>,
1345
1346 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1351 pub authorizer_credential: std::option::Option<crate::model::UserCredential>,
1352
1353 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1354 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1355}
1356
1357impl BitbucketCloudConfig {
1358 pub fn new() -> Self {
1359 std::default::Default::default()
1360 }
1361
1362 pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1364 self.workspace = v.into();
1365 self
1366 }
1367
1368 pub fn set_webhook_secret_secret_version<T: std::convert::Into<std::string::String>>(
1370 mut self,
1371 v: T,
1372 ) -> Self {
1373 self.webhook_secret_secret_version = v.into();
1374 self
1375 }
1376
1377 pub fn set_read_authorizer_credential<
1379 T: std::convert::Into<std::option::Option<crate::model::UserCredential>>,
1380 >(
1381 mut self,
1382 v: T,
1383 ) -> Self {
1384 self.read_authorizer_credential = v.into();
1385 self
1386 }
1387
1388 pub fn set_authorizer_credential<
1390 T: std::convert::Into<std::option::Option<crate::model::UserCredential>>,
1391 >(
1392 mut self,
1393 v: T,
1394 ) -> Self {
1395 self.authorizer_credential = v.into();
1396 self
1397 }
1398}
1399
1400impl wkt::message::Message for BitbucketCloudConfig {
1401 fn typename() -> &'static str {
1402 "type.googleapis.com/google.devtools.cloudbuild.v2.BitbucketCloudConfig"
1403 }
1404}
1405
1406#[serde_with::serde_as]
1409#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1410#[serde(default, rename_all = "camelCase")]
1411#[non_exhaustive]
1412pub struct ServiceDirectoryConfig {
1413 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1417 pub service: std::string::String,
1418
1419 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1420 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1421}
1422
1423impl ServiceDirectoryConfig {
1424 pub fn new() -> Self {
1425 std::default::Default::default()
1426 }
1427
1428 pub fn set_service<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1430 self.service = v.into();
1431 self
1432 }
1433}
1434
1435impl wkt::message::Message for ServiceDirectoryConfig {
1436 fn typename() -> &'static str {
1437 "type.googleapis.com/google.devtools.cloudbuild.v2.ServiceDirectoryConfig"
1438 }
1439}
1440
1441#[serde_with::serde_as]
1443#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1444#[serde(default, rename_all = "camelCase")]
1445#[non_exhaustive]
1446pub struct Repository {
1447 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1450 pub name: std::string::String,
1451
1452 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1454 pub remote_uri: std::string::String,
1455
1456 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1458 pub create_time: std::option::Option<wkt::Timestamp>,
1459
1460 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1462 pub update_time: std::option::Option<wkt::Timestamp>,
1463
1464 #[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
1466 pub annotations: std::collections::HashMap<std::string::String, std::string::String>,
1467
1468 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1472 pub etag: std::string::String,
1473
1474 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1476 pub webhook_id: std::string::String,
1477
1478 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1479 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1480}
1481
1482impl Repository {
1483 pub fn new() -> Self {
1484 std::default::Default::default()
1485 }
1486
1487 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1489 self.name = v.into();
1490 self
1491 }
1492
1493 pub fn set_remote_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1495 self.remote_uri = v.into();
1496 self
1497 }
1498
1499 pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
1501 mut self,
1502 v: T,
1503 ) -> Self {
1504 self.create_time = v.into();
1505 self
1506 }
1507
1508 pub fn set_update_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
1510 mut self,
1511 v: T,
1512 ) -> Self {
1513 self.update_time = v.into();
1514 self
1515 }
1516
1517 pub fn set_annotations<T, K, V>(mut self, v: T) -> Self
1519 where
1520 T: std::iter::IntoIterator<Item = (K, V)>,
1521 K: std::convert::Into<std::string::String>,
1522 V: std::convert::Into<std::string::String>,
1523 {
1524 use std::iter::Iterator;
1525 self.annotations = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
1526 self
1527 }
1528
1529 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1531 self.etag = v.into();
1532 self
1533 }
1534
1535 pub fn set_webhook_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1537 self.webhook_id = v.into();
1538 self
1539 }
1540}
1541
1542impl wkt::message::Message for Repository {
1543 fn typename() -> &'static str {
1544 "type.googleapis.com/google.devtools.cloudbuild.v2.Repository"
1545 }
1546}
1547
1548#[serde_with::serde_as]
1551#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1552#[serde(default, rename_all = "camelCase")]
1553#[non_exhaustive]
1554pub struct OAuthCredential {
1555 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1558 pub oauth_token_secret_version: std::string::String,
1559
1560 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1562 pub username: std::string::String,
1563
1564 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1565 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1566}
1567
1568impl OAuthCredential {
1569 pub fn new() -> Self {
1570 std::default::Default::default()
1571 }
1572
1573 pub fn set_oauth_token_secret_version<T: std::convert::Into<std::string::String>>(
1575 mut self,
1576 v: T,
1577 ) -> Self {
1578 self.oauth_token_secret_version = v.into();
1579 self
1580 }
1581
1582 pub fn set_username<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1584 self.username = v.into();
1585 self
1586 }
1587}
1588
1589impl wkt::message::Message for OAuthCredential {
1590 fn typename() -> &'static str {
1591 "type.googleapis.com/google.devtools.cloudbuild.v2.OAuthCredential"
1592 }
1593}
1594
1595#[serde_with::serde_as]
1598#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1599#[serde(default, rename_all = "camelCase")]
1600#[non_exhaustive]
1601pub struct UserCredential {
1602 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1606 pub user_token_secret_version: std::string::String,
1607
1608 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1610 pub username: std::string::String,
1611
1612 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1613 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1614}
1615
1616impl UserCredential {
1617 pub fn new() -> Self {
1618 std::default::Default::default()
1619 }
1620
1621 pub fn set_user_token_secret_version<T: std::convert::Into<std::string::String>>(
1623 mut self,
1624 v: T,
1625 ) -> Self {
1626 self.user_token_secret_version = v.into();
1627 self
1628 }
1629
1630 pub fn set_username<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1632 self.username = v.into();
1633 self
1634 }
1635}
1636
1637impl wkt::message::Message for UserCredential {
1638 fn typename() -> &'static str {
1639 "type.googleapis.com/google.devtools.cloudbuild.v2.UserCredential"
1640 }
1641}
1642
1643#[serde_with::serde_as]
1645#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1646#[serde(default, rename_all = "camelCase")]
1647#[non_exhaustive]
1648pub struct CreateConnectionRequest {
1649 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1652 pub parent: std::string::String,
1653
1654 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1656 pub connection: std::option::Option<crate::model::Connection>,
1657
1658 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1663 pub connection_id: std::string::String,
1664
1665 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1666 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1667}
1668
1669impl CreateConnectionRequest {
1670 pub fn new() -> Self {
1671 std::default::Default::default()
1672 }
1673
1674 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1676 self.parent = v.into();
1677 self
1678 }
1679
1680 pub fn set_connection<T: std::convert::Into<std::option::Option<crate::model::Connection>>>(
1682 mut self,
1683 v: T,
1684 ) -> Self {
1685 self.connection = v.into();
1686 self
1687 }
1688
1689 pub fn set_connection_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1691 self.connection_id = v.into();
1692 self
1693 }
1694}
1695
1696impl wkt::message::Message for CreateConnectionRequest {
1697 fn typename() -> &'static str {
1698 "type.googleapis.com/google.devtools.cloudbuild.v2.CreateConnectionRequest"
1699 }
1700}
1701
1702#[serde_with::serde_as]
1704#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1705#[serde(default, rename_all = "camelCase")]
1706#[non_exhaustive]
1707pub struct GetConnectionRequest {
1708 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1711 pub name: std::string::String,
1712
1713 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1714 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1715}
1716
1717impl GetConnectionRequest {
1718 pub fn new() -> Self {
1719 std::default::Default::default()
1720 }
1721
1722 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1724 self.name = v.into();
1725 self
1726 }
1727}
1728
1729impl wkt::message::Message for GetConnectionRequest {
1730 fn typename() -> &'static str {
1731 "type.googleapis.com/google.devtools.cloudbuild.v2.GetConnectionRequest"
1732 }
1733}
1734
1735#[serde_with::serde_as]
1737#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1738#[serde(default, rename_all = "camelCase")]
1739#[non_exhaustive]
1740pub struct ListConnectionsRequest {
1741 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1744 pub parent: std::string::String,
1745
1746 #[serde(skip_serializing_if = "wkt::internal::is_default")]
1748 pub page_size: i32,
1749
1750 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1752 pub page_token: std::string::String,
1753
1754 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1755 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1756}
1757
1758impl ListConnectionsRequest {
1759 pub fn new() -> Self {
1760 std::default::Default::default()
1761 }
1762
1763 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1765 self.parent = v.into();
1766 self
1767 }
1768
1769 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1771 self.page_size = v.into();
1772 self
1773 }
1774
1775 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1777 self.page_token = v.into();
1778 self
1779 }
1780}
1781
1782impl wkt::message::Message for ListConnectionsRequest {
1783 fn typename() -> &'static str {
1784 "type.googleapis.com/google.devtools.cloudbuild.v2.ListConnectionsRequest"
1785 }
1786}
1787
1788#[serde_with::serde_as]
1790#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1791#[serde(default, rename_all = "camelCase")]
1792#[non_exhaustive]
1793pub struct ListConnectionsResponse {
1794 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
1796 pub connections: std::vec::Vec<crate::model::Connection>,
1797
1798 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1800 pub next_page_token: std::string::String,
1801
1802 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1803 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1804}
1805
1806impl ListConnectionsResponse {
1807 pub fn new() -> Self {
1808 std::default::Default::default()
1809 }
1810
1811 pub fn set_connections<T, V>(mut self, v: T) -> Self
1813 where
1814 T: std::iter::IntoIterator<Item = V>,
1815 V: std::convert::Into<crate::model::Connection>,
1816 {
1817 use std::iter::Iterator;
1818 self.connections = v.into_iter().map(|i| i.into()).collect();
1819 self
1820 }
1821
1822 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1824 self.next_page_token = v.into();
1825 self
1826 }
1827}
1828
1829impl wkt::message::Message for ListConnectionsResponse {
1830 fn typename() -> &'static str {
1831 "type.googleapis.com/google.devtools.cloudbuild.v2.ListConnectionsResponse"
1832 }
1833}
1834
1835#[doc(hidden)]
1836impl gax::paginator::internal::PageableResponse for ListConnectionsResponse {
1837 type PageItem = crate::model::Connection;
1838
1839 fn items(self) -> std::vec::Vec<Self::PageItem> {
1840 self.connections
1841 }
1842
1843 fn next_page_token(&self) -> std::string::String {
1844 use std::clone::Clone;
1845 self.next_page_token.clone()
1846 }
1847}
1848
1849#[serde_with::serde_as]
1851#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1852#[serde(default, rename_all = "camelCase")]
1853#[non_exhaustive]
1854pub struct UpdateConnectionRequest {
1855 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1857 pub connection: std::option::Option<crate::model::Connection>,
1858
1859 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1861 pub update_mask: std::option::Option<wkt::FieldMask>,
1862
1863 #[serde(skip_serializing_if = "wkt::internal::is_default")]
1869 pub allow_missing: bool,
1870
1871 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1875 pub etag: std::string::String,
1876
1877 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1878 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1879}
1880
1881impl UpdateConnectionRequest {
1882 pub fn new() -> Self {
1883 std::default::Default::default()
1884 }
1885
1886 pub fn set_connection<T: std::convert::Into<std::option::Option<crate::model::Connection>>>(
1888 mut self,
1889 v: T,
1890 ) -> Self {
1891 self.connection = v.into();
1892 self
1893 }
1894
1895 pub fn set_update_mask<T: std::convert::Into<std::option::Option<wkt::FieldMask>>>(
1897 mut self,
1898 v: T,
1899 ) -> Self {
1900 self.update_mask = v.into();
1901 self
1902 }
1903
1904 pub fn set_allow_missing<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1906 self.allow_missing = v.into();
1907 self
1908 }
1909
1910 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1912 self.etag = v.into();
1913 self
1914 }
1915}
1916
1917impl wkt::message::Message for UpdateConnectionRequest {
1918 fn typename() -> &'static str {
1919 "type.googleapis.com/google.devtools.cloudbuild.v2.UpdateConnectionRequest"
1920 }
1921}
1922
1923#[serde_with::serde_as]
1925#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1926#[serde(default, rename_all = "camelCase")]
1927#[non_exhaustive]
1928pub struct DeleteConnectionRequest {
1929 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1932 pub name: std::string::String,
1933
1934 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1938 pub etag: std::string::String,
1939
1940 #[serde(skip_serializing_if = "wkt::internal::is_default")]
1942 pub validate_only: bool,
1943
1944 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1945 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1946}
1947
1948impl DeleteConnectionRequest {
1949 pub fn new() -> Self {
1950 std::default::Default::default()
1951 }
1952
1953 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1955 self.name = v.into();
1956 self
1957 }
1958
1959 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1961 self.etag = v.into();
1962 self
1963 }
1964
1965 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1967 self.validate_only = v.into();
1968 self
1969 }
1970}
1971
1972impl wkt::message::Message for DeleteConnectionRequest {
1973 fn typename() -> &'static str {
1974 "type.googleapis.com/google.devtools.cloudbuild.v2.DeleteConnectionRequest"
1975 }
1976}
1977
1978#[serde_with::serde_as]
1980#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1981#[serde(default, rename_all = "camelCase")]
1982#[non_exhaustive]
1983pub struct CreateRepositoryRequest {
1984 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1988 pub parent: std::string::String,
1989
1990 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1992 pub repository: std::option::Option<crate::model::Repository>,
1993
1994 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1999 pub repository_id: std::string::String,
2000
2001 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2002 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2003}
2004
2005impl CreateRepositoryRequest {
2006 pub fn new() -> Self {
2007 std::default::Default::default()
2008 }
2009
2010 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2012 self.parent = v.into();
2013 self
2014 }
2015
2016 pub fn set_repository<T: std::convert::Into<std::option::Option<crate::model::Repository>>>(
2018 mut self,
2019 v: T,
2020 ) -> Self {
2021 self.repository = v.into();
2022 self
2023 }
2024
2025 pub fn set_repository_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2027 self.repository_id = v.into();
2028 self
2029 }
2030}
2031
2032impl wkt::message::Message for CreateRepositoryRequest {
2033 fn typename() -> &'static str {
2034 "type.googleapis.com/google.devtools.cloudbuild.v2.CreateRepositoryRequest"
2035 }
2036}
2037
2038#[serde_with::serde_as]
2040#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2041#[serde(default, rename_all = "camelCase")]
2042#[non_exhaustive]
2043pub struct BatchCreateRepositoriesRequest {
2044 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2049 pub parent: std::string::String,
2050
2051 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
2053 pub requests: std::vec::Vec<crate::model::CreateRepositoryRequest>,
2054
2055 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2056 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2057}
2058
2059impl BatchCreateRepositoriesRequest {
2060 pub fn new() -> Self {
2061 std::default::Default::default()
2062 }
2063
2064 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2066 self.parent = v.into();
2067 self
2068 }
2069
2070 pub fn set_requests<T, V>(mut self, v: T) -> Self
2072 where
2073 T: std::iter::IntoIterator<Item = V>,
2074 V: std::convert::Into<crate::model::CreateRepositoryRequest>,
2075 {
2076 use std::iter::Iterator;
2077 self.requests = v.into_iter().map(|i| i.into()).collect();
2078 self
2079 }
2080}
2081
2082impl wkt::message::Message for BatchCreateRepositoriesRequest {
2083 fn typename() -> &'static str {
2084 "type.googleapis.com/google.devtools.cloudbuild.v2.BatchCreateRepositoriesRequest"
2085 }
2086}
2087
2088#[serde_with::serde_as]
2090#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2091#[serde(default, rename_all = "camelCase")]
2092#[non_exhaustive]
2093pub struct BatchCreateRepositoriesResponse {
2094 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
2096 pub repositories: std::vec::Vec<crate::model::Repository>,
2097
2098 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2099 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2100}
2101
2102impl BatchCreateRepositoriesResponse {
2103 pub fn new() -> Self {
2104 std::default::Default::default()
2105 }
2106
2107 pub fn set_repositories<T, V>(mut self, v: T) -> Self
2109 where
2110 T: std::iter::IntoIterator<Item = V>,
2111 V: std::convert::Into<crate::model::Repository>,
2112 {
2113 use std::iter::Iterator;
2114 self.repositories = v.into_iter().map(|i| i.into()).collect();
2115 self
2116 }
2117}
2118
2119impl wkt::message::Message for BatchCreateRepositoriesResponse {
2120 fn typename() -> &'static str {
2121 "type.googleapis.com/google.devtools.cloudbuild.v2.BatchCreateRepositoriesResponse"
2122 }
2123}
2124
2125#[serde_with::serde_as]
2127#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2128#[serde(default, rename_all = "camelCase")]
2129#[non_exhaustive]
2130pub struct GetRepositoryRequest {
2131 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2134 pub name: std::string::String,
2135
2136 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2137 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2138}
2139
2140impl GetRepositoryRequest {
2141 pub fn new() -> Self {
2142 std::default::Default::default()
2143 }
2144
2145 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2147 self.name = v.into();
2148 self
2149 }
2150}
2151
2152impl wkt::message::Message for GetRepositoryRequest {
2153 fn typename() -> &'static str {
2154 "type.googleapis.com/google.devtools.cloudbuild.v2.GetRepositoryRequest"
2155 }
2156}
2157
2158#[serde_with::serde_as]
2160#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2161#[serde(default, rename_all = "camelCase")]
2162#[non_exhaustive]
2163pub struct ListRepositoriesRequest {
2164 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2167 pub parent: std::string::String,
2168
2169 #[serde(skip_serializing_if = "wkt::internal::is_default")]
2171 pub page_size: i32,
2172
2173 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2175 pub page_token: std::string::String,
2176
2177 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2182 pub filter: std::string::String,
2183
2184 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2185 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2186}
2187
2188impl ListRepositoriesRequest {
2189 pub fn new() -> Self {
2190 std::default::Default::default()
2191 }
2192
2193 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2195 self.parent = v.into();
2196 self
2197 }
2198
2199 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2201 self.page_size = v.into();
2202 self
2203 }
2204
2205 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2207 self.page_token = v.into();
2208 self
2209 }
2210
2211 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2213 self.filter = v.into();
2214 self
2215 }
2216}
2217
2218impl wkt::message::Message for ListRepositoriesRequest {
2219 fn typename() -> &'static str {
2220 "type.googleapis.com/google.devtools.cloudbuild.v2.ListRepositoriesRequest"
2221 }
2222}
2223
2224#[serde_with::serde_as]
2226#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2227#[serde(default, rename_all = "camelCase")]
2228#[non_exhaustive]
2229pub struct ListRepositoriesResponse {
2230 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
2232 pub repositories: std::vec::Vec<crate::model::Repository>,
2233
2234 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2236 pub next_page_token: std::string::String,
2237
2238 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2239 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2240}
2241
2242impl ListRepositoriesResponse {
2243 pub fn new() -> Self {
2244 std::default::Default::default()
2245 }
2246
2247 pub fn set_repositories<T, V>(mut self, v: T) -> Self
2249 where
2250 T: std::iter::IntoIterator<Item = V>,
2251 V: std::convert::Into<crate::model::Repository>,
2252 {
2253 use std::iter::Iterator;
2254 self.repositories = v.into_iter().map(|i| i.into()).collect();
2255 self
2256 }
2257
2258 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2260 self.next_page_token = v.into();
2261 self
2262 }
2263}
2264
2265impl wkt::message::Message for ListRepositoriesResponse {
2266 fn typename() -> &'static str {
2267 "type.googleapis.com/google.devtools.cloudbuild.v2.ListRepositoriesResponse"
2268 }
2269}
2270
2271#[doc(hidden)]
2272impl gax::paginator::internal::PageableResponse for ListRepositoriesResponse {
2273 type PageItem = crate::model::Repository;
2274
2275 fn items(self) -> std::vec::Vec<Self::PageItem> {
2276 self.repositories
2277 }
2278
2279 fn next_page_token(&self) -> std::string::String {
2280 use std::clone::Clone;
2281 self.next_page_token.clone()
2282 }
2283}
2284
2285#[serde_with::serde_as]
2287#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2288#[serde(default, rename_all = "camelCase")]
2289#[non_exhaustive]
2290pub struct DeleteRepositoryRequest {
2291 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2294 pub name: std::string::String,
2295
2296 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2300 pub etag: std::string::String,
2301
2302 #[serde(skip_serializing_if = "wkt::internal::is_default")]
2304 pub validate_only: bool,
2305
2306 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2307 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2308}
2309
2310impl DeleteRepositoryRequest {
2311 pub fn new() -> Self {
2312 std::default::Default::default()
2313 }
2314
2315 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2317 self.name = v.into();
2318 self
2319 }
2320
2321 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2323 self.etag = v.into();
2324 self
2325 }
2326
2327 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2329 self.validate_only = v.into();
2330 self
2331 }
2332}
2333
2334impl wkt::message::Message for DeleteRepositoryRequest {
2335 fn typename() -> &'static str {
2336 "type.googleapis.com/google.devtools.cloudbuild.v2.DeleteRepositoryRequest"
2337 }
2338}
2339
2340#[serde_with::serde_as]
2342#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2343#[serde(default, rename_all = "camelCase")]
2344#[non_exhaustive]
2345pub struct FetchReadWriteTokenRequest {
2346 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2349 pub repository: std::string::String,
2350
2351 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2352 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2353}
2354
2355impl FetchReadWriteTokenRequest {
2356 pub fn new() -> Self {
2357 std::default::Default::default()
2358 }
2359
2360 pub fn set_repository<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2362 self.repository = v.into();
2363 self
2364 }
2365}
2366
2367impl wkt::message::Message for FetchReadWriteTokenRequest {
2368 fn typename() -> &'static str {
2369 "type.googleapis.com/google.devtools.cloudbuild.v2.FetchReadWriteTokenRequest"
2370 }
2371}
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]
2378pub struct FetchReadTokenRequest {
2379 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2382 pub repository: std::string::String,
2383
2384 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2385 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2386}
2387
2388impl FetchReadTokenRequest {
2389 pub fn new() -> Self {
2390 std::default::Default::default()
2391 }
2392
2393 pub fn set_repository<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2395 self.repository = v.into();
2396 self
2397 }
2398}
2399
2400impl wkt::message::Message for FetchReadTokenRequest {
2401 fn typename() -> &'static str {
2402 "type.googleapis.com/google.devtools.cloudbuild.v2.FetchReadTokenRequest"
2403 }
2404}
2405
2406#[serde_with::serde_as]
2408#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2409#[serde(default, rename_all = "camelCase")]
2410#[non_exhaustive]
2411pub struct FetchReadTokenResponse {
2412 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2414 pub token: std::string::String,
2415
2416 #[serde(skip_serializing_if = "std::option::Option::is_none")]
2418 pub expiration_time: std::option::Option<wkt::Timestamp>,
2419
2420 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2421 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2422}
2423
2424impl FetchReadTokenResponse {
2425 pub fn new() -> Self {
2426 std::default::Default::default()
2427 }
2428
2429 pub fn set_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2431 self.token = v.into();
2432 self
2433 }
2434
2435 pub fn set_expiration_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
2437 mut self,
2438 v: T,
2439 ) -> Self {
2440 self.expiration_time = v.into();
2441 self
2442 }
2443}
2444
2445impl wkt::message::Message for FetchReadTokenResponse {
2446 fn typename() -> &'static str {
2447 "type.googleapis.com/google.devtools.cloudbuild.v2.FetchReadTokenResponse"
2448 }
2449}
2450
2451#[serde_with::serde_as]
2453#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2454#[serde(default, rename_all = "camelCase")]
2455#[non_exhaustive]
2456pub struct FetchReadWriteTokenResponse {
2457 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2459 pub token: std::string::String,
2460
2461 #[serde(skip_serializing_if = "std::option::Option::is_none")]
2463 pub expiration_time: std::option::Option<wkt::Timestamp>,
2464
2465 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2466 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2467}
2468
2469impl FetchReadWriteTokenResponse {
2470 pub fn new() -> Self {
2471 std::default::Default::default()
2472 }
2473
2474 pub fn set_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2476 self.token = v.into();
2477 self
2478 }
2479
2480 pub fn set_expiration_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
2482 mut self,
2483 v: T,
2484 ) -> Self {
2485 self.expiration_time = v.into();
2486 self
2487 }
2488}
2489
2490impl wkt::message::Message for FetchReadWriteTokenResponse {
2491 fn typename() -> &'static str {
2492 "type.googleapis.com/google.devtools.cloudbuild.v2.FetchReadWriteTokenResponse"
2493 }
2494}
2495
2496#[serde_with::serde_as]
2498#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2499#[serde(default, rename_all = "camelCase")]
2500#[non_exhaustive]
2501pub struct ProcessWebhookRequest {
2502 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2505 pub parent: std::string::String,
2506
2507 #[serde(skip_serializing_if = "std::option::Option::is_none")]
2509 pub body: std::option::Option<api::model::HttpBody>,
2510
2511 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2514 pub webhook_key: std::string::String,
2515
2516 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2517 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2518}
2519
2520impl ProcessWebhookRequest {
2521 pub fn new() -> Self {
2522 std::default::Default::default()
2523 }
2524
2525 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2527 self.parent = v.into();
2528 self
2529 }
2530
2531 pub fn set_body<T: std::convert::Into<std::option::Option<api::model::HttpBody>>>(
2533 mut self,
2534 v: T,
2535 ) -> Self {
2536 self.body = v.into();
2537 self
2538 }
2539
2540 pub fn set_webhook_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2542 self.webhook_key = v.into();
2543 self
2544 }
2545}
2546
2547impl wkt::message::Message for ProcessWebhookRequest {
2548 fn typename() -> &'static str {
2549 "type.googleapis.com/google.devtools.cloudbuild.v2.ProcessWebhookRequest"
2550 }
2551}
2552
2553#[serde_with::serde_as]
2555#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2556#[serde(default, rename_all = "camelCase")]
2557#[non_exhaustive]
2558pub struct FetchGitRefsRequest {
2559 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2562 pub repository: std::string::String,
2563
2564 pub ref_type: crate::model::fetch_git_refs_request::RefType,
2566
2567 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2568 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2569}
2570
2571impl FetchGitRefsRequest {
2572 pub fn new() -> Self {
2573 std::default::Default::default()
2574 }
2575
2576 pub fn set_repository<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2578 self.repository = v.into();
2579 self
2580 }
2581
2582 pub fn set_ref_type<T: std::convert::Into<crate::model::fetch_git_refs_request::RefType>>(
2584 mut self,
2585 v: T,
2586 ) -> Self {
2587 self.ref_type = v.into();
2588 self
2589 }
2590}
2591
2592impl wkt::message::Message for FetchGitRefsRequest {
2593 fn typename() -> &'static str {
2594 "type.googleapis.com/google.devtools.cloudbuild.v2.FetchGitRefsRequest"
2595 }
2596}
2597
2598pub mod fetch_git_refs_request {
2600 #[allow(unused_imports)]
2601 use super::*;
2602
2603 #[derive(Clone, Debug, PartialEq)]
2619 #[non_exhaustive]
2620 pub enum RefType {
2621 Unspecified,
2623 Tag,
2625 Branch,
2627 UnknownValue(ref_type::UnknownValue),
2632 }
2633
2634 #[doc(hidden)]
2635 pub mod ref_type {
2636 #[allow(unused_imports)]
2637 use super::*;
2638 #[derive(Clone, Debug, PartialEq)]
2639 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
2640 }
2641
2642 impl RefType {
2643 pub fn value(&self) -> std::option::Option<i32> {
2648 match self {
2649 Self::Unspecified => std::option::Option::Some(0),
2650 Self::Tag => std::option::Option::Some(1),
2651 Self::Branch => std::option::Option::Some(2),
2652 Self::UnknownValue(u) => u.0.value(),
2653 }
2654 }
2655
2656 pub fn name(&self) -> std::option::Option<&str> {
2661 match self {
2662 Self::Unspecified => std::option::Option::Some("REF_TYPE_UNSPECIFIED"),
2663 Self::Tag => std::option::Option::Some("TAG"),
2664 Self::Branch => std::option::Option::Some("BRANCH"),
2665 Self::UnknownValue(u) => u.0.name(),
2666 }
2667 }
2668 }
2669
2670 impl std::default::Default for RefType {
2671 fn default() -> Self {
2672 use std::convert::From;
2673 Self::from(0)
2674 }
2675 }
2676
2677 impl std::fmt::Display for RefType {
2678 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
2679 wkt::internal::display_enum(f, self.name(), self.value())
2680 }
2681 }
2682
2683 impl std::convert::From<i32> for RefType {
2684 fn from(value: i32) -> Self {
2685 match value {
2686 0 => Self::Unspecified,
2687 1 => Self::Tag,
2688 2 => Self::Branch,
2689 _ => Self::UnknownValue(ref_type::UnknownValue(
2690 wkt::internal::UnknownEnumValue::Integer(value),
2691 )),
2692 }
2693 }
2694 }
2695
2696 impl std::convert::From<&str> for RefType {
2697 fn from(value: &str) -> Self {
2698 use std::string::ToString;
2699 match value {
2700 "REF_TYPE_UNSPECIFIED" => Self::Unspecified,
2701 "TAG" => Self::Tag,
2702 "BRANCH" => Self::Branch,
2703 _ => Self::UnknownValue(ref_type::UnknownValue(
2704 wkt::internal::UnknownEnumValue::String(value.to_string()),
2705 )),
2706 }
2707 }
2708 }
2709
2710 impl serde::ser::Serialize for RefType {
2711 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2712 where
2713 S: serde::Serializer,
2714 {
2715 match self {
2716 Self::Unspecified => serializer.serialize_i32(0),
2717 Self::Tag => serializer.serialize_i32(1),
2718 Self::Branch => serializer.serialize_i32(2),
2719 Self::UnknownValue(u) => u.0.serialize(serializer),
2720 }
2721 }
2722 }
2723
2724 impl<'de> serde::de::Deserialize<'de> for RefType {
2725 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2726 where
2727 D: serde::Deserializer<'de>,
2728 {
2729 deserializer.deserialize_any(wkt::internal::EnumVisitor::<RefType>::new(
2730 ".google.devtools.cloudbuild.v2.FetchGitRefsRequest.RefType",
2731 ))
2732 }
2733 }
2734}
2735
2736#[serde_with::serde_as]
2738#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2739#[serde(default, rename_all = "camelCase")]
2740#[non_exhaustive]
2741pub struct FetchGitRefsResponse {
2742 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
2744 pub ref_names: std::vec::Vec<std::string::String>,
2745
2746 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2747 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2748}
2749
2750impl FetchGitRefsResponse {
2751 pub fn new() -> Self {
2752 std::default::Default::default()
2753 }
2754
2755 pub fn set_ref_names<T, V>(mut self, v: T) -> Self
2757 where
2758 T: std::iter::IntoIterator<Item = V>,
2759 V: std::convert::Into<std::string::String>,
2760 {
2761 use std::iter::Iterator;
2762 self.ref_names = v.into_iter().map(|i| i.into()).collect();
2763 self
2764 }
2765}
2766
2767impl wkt::message::Message for FetchGitRefsResponse {
2768 fn typename() -> &'static str {
2769 "type.googleapis.com/google.devtools.cloudbuild.v2.FetchGitRefsResponse"
2770 }
2771}