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
37mod debug;
38mod deserialize;
39mod serialize;
40
41#[derive(Clone, Default, PartialEq)]
43#[non_exhaustive]
44pub struct OperationMetadata {
45 pub create_time: std::option::Option<wkt::Timestamp>,
47
48 pub end_time: std::option::Option<wkt::Timestamp>,
50
51 pub target: std::string::String,
53
54 pub verb: std::string::String,
56
57 pub status_message: std::string::String,
59
60 pub requested_cancellation: bool,
68
69 pub api_version: std::string::String,
71
72 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
73}
74
75impl OperationMetadata {
76 pub fn new() -> Self {
77 std::default::Default::default()
78 }
79
80 pub fn set_create_time<T>(mut self, v: T) -> Self
82 where
83 T: std::convert::Into<wkt::Timestamp>,
84 {
85 self.create_time = std::option::Option::Some(v.into());
86 self
87 }
88
89 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
91 where
92 T: std::convert::Into<wkt::Timestamp>,
93 {
94 self.create_time = v.map(|x| x.into());
95 self
96 }
97
98 pub fn set_end_time<T>(mut self, v: T) -> Self
100 where
101 T: std::convert::Into<wkt::Timestamp>,
102 {
103 self.end_time = std::option::Option::Some(v.into());
104 self
105 }
106
107 pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
109 where
110 T: std::convert::Into<wkt::Timestamp>,
111 {
112 self.end_time = v.map(|x| x.into());
113 self
114 }
115
116 pub fn set_target<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
118 self.target = v.into();
119 self
120 }
121
122 pub fn set_verb<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
124 self.verb = v.into();
125 self
126 }
127
128 pub fn set_status_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
130 self.status_message = v.into();
131 self
132 }
133
134 pub fn set_requested_cancellation<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
136 self.requested_cancellation = v.into();
137 self
138 }
139
140 pub fn set_api_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
142 self.api_version = v.into();
143 self
144 }
145}
146
147impl wkt::message::Message for OperationMetadata {
148 fn typename() -> &'static str {
149 "type.googleapis.com/google.devtools.cloudbuild.v2.OperationMetadata"
150 }
151}
152
153#[derive(Clone, Default, PartialEq)]
155#[non_exhaustive]
156pub struct RunWorkflowCustomOperationMetadata {
157 pub create_time: std::option::Option<wkt::Timestamp>,
159
160 pub end_time: std::option::Option<wkt::Timestamp>,
162
163 pub verb: std::string::String,
165
166 pub requested_cancellation: bool,
174
175 pub api_version: std::string::String,
177
178 pub target: std::string::String,
180
181 pub pipeline_run_id: std::string::String,
183
184 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
185}
186
187impl RunWorkflowCustomOperationMetadata {
188 pub fn new() -> Self {
189 std::default::Default::default()
190 }
191
192 pub fn set_create_time<T>(mut self, v: T) -> Self
194 where
195 T: std::convert::Into<wkt::Timestamp>,
196 {
197 self.create_time = std::option::Option::Some(v.into());
198 self
199 }
200
201 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
203 where
204 T: std::convert::Into<wkt::Timestamp>,
205 {
206 self.create_time = v.map(|x| x.into());
207 self
208 }
209
210 pub fn set_end_time<T>(mut self, v: T) -> Self
212 where
213 T: std::convert::Into<wkt::Timestamp>,
214 {
215 self.end_time = std::option::Option::Some(v.into());
216 self
217 }
218
219 pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
221 where
222 T: std::convert::Into<wkt::Timestamp>,
223 {
224 self.end_time = v.map(|x| x.into());
225 self
226 }
227
228 pub fn set_verb<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
230 self.verb = v.into();
231 self
232 }
233
234 pub fn set_requested_cancellation<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
236 self.requested_cancellation = v.into();
237 self
238 }
239
240 pub fn set_api_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
242 self.api_version = v.into();
243 self
244 }
245
246 pub fn set_target<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
248 self.target = v.into();
249 self
250 }
251
252 pub fn set_pipeline_run_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
254 self.pipeline_run_id = v.into();
255 self
256 }
257}
258
259impl wkt::message::Message for RunWorkflowCustomOperationMetadata {
260 fn typename() -> &'static str {
261 "type.googleapis.com/google.devtools.cloudbuild.v2.RunWorkflowCustomOperationMetadata"
262 }
263}
264
265#[derive(Clone, Default, PartialEq)]
268#[non_exhaustive]
269pub struct Connection {
270 pub name: std::string::String,
273
274 pub create_time: std::option::Option<wkt::Timestamp>,
276
277 pub update_time: std::option::Option<wkt::Timestamp>,
279
280 pub installation_state: std::option::Option<crate::model::InstallationState>,
282
283 pub disabled: bool,
287
288 pub reconciling: bool,
291
292 pub annotations: std::collections::HashMap<std::string::String, std::string::String>,
294
295 pub etag: std::string::String,
299
300 pub connection_config: std::option::Option<crate::model::connection::ConnectionConfig>,
302
303 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
304}
305
306impl Connection {
307 pub fn new() -> Self {
308 std::default::Default::default()
309 }
310
311 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
313 self.name = v.into();
314 self
315 }
316
317 pub fn set_create_time<T>(mut self, v: T) -> Self
319 where
320 T: std::convert::Into<wkt::Timestamp>,
321 {
322 self.create_time = std::option::Option::Some(v.into());
323 self
324 }
325
326 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
328 where
329 T: std::convert::Into<wkt::Timestamp>,
330 {
331 self.create_time = v.map(|x| x.into());
332 self
333 }
334
335 pub fn set_update_time<T>(mut self, v: T) -> Self
337 where
338 T: std::convert::Into<wkt::Timestamp>,
339 {
340 self.update_time = std::option::Option::Some(v.into());
341 self
342 }
343
344 pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
346 where
347 T: std::convert::Into<wkt::Timestamp>,
348 {
349 self.update_time = v.map(|x| x.into());
350 self
351 }
352
353 pub fn set_installation_state<T>(mut self, v: T) -> Self
355 where
356 T: std::convert::Into<crate::model::InstallationState>,
357 {
358 self.installation_state = std::option::Option::Some(v.into());
359 self
360 }
361
362 pub fn set_or_clear_installation_state<T>(mut self, v: std::option::Option<T>) -> Self
364 where
365 T: std::convert::Into<crate::model::InstallationState>,
366 {
367 self.installation_state = v.map(|x| x.into());
368 self
369 }
370
371 pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
373 self.disabled = v.into();
374 self
375 }
376
377 pub fn set_reconciling<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
379 self.reconciling = v.into();
380 self
381 }
382
383 pub fn set_annotations<T, K, V>(mut self, v: T) -> Self
385 where
386 T: std::iter::IntoIterator<Item = (K, V)>,
387 K: std::convert::Into<std::string::String>,
388 V: std::convert::Into<std::string::String>,
389 {
390 use std::iter::Iterator;
391 self.annotations = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
392 self
393 }
394
395 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
397 self.etag = v.into();
398 self
399 }
400
401 pub fn set_connection_config<
406 T: std::convert::Into<std::option::Option<crate::model::connection::ConnectionConfig>>,
407 >(
408 mut self,
409 v: T,
410 ) -> Self {
411 self.connection_config = v.into();
412 self
413 }
414
415 pub fn github_config(
419 &self,
420 ) -> std::option::Option<&std::boxed::Box<crate::model::GitHubConfig>> {
421 #[allow(unreachable_patterns)]
422 self.connection_config.as_ref().and_then(|v| match v {
423 crate::model::connection::ConnectionConfig::GithubConfig(v) => {
424 std::option::Option::Some(v)
425 }
426 _ => std::option::Option::None,
427 })
428 }
429
430 pub fn set_github_config<T: std::convert::Into<std::boxed::Box<crate::model::GitHubConfig>>>(
436 mut self,
437 v: T,
438 ) -> Self {
439 self.connection_config = std::option::Option::Some(
440 crate::model::connection::ConnectionConfig::GithubConfig(v.into()),
441 );
442 self
443 }
444
445 pub fn github_enterprise_config(
449 &self,
450 ) -> std::option::Option<&std::boxed::Box<crate::model::GitHubEnterpriseConfig>> {
451 #[allow(unreachable_patterns)]
452 self.connection_config.as_ref().and_then(|v| match v {
453 crate::model::connection::ConnectionConfig::GithubEnterpriseConfig(v) => {
454 std::option::Option::Some(v)
455 }
456 _ => std::option::Option::None,
457 })
458 }
459
460 pub fn set_github_enterprise_config<
466 T: std::convert::Into<std::boxed::Box<crate::model::GitHubEnterpriseConfig>>,
467 >(
468 mut self,
469 v: T,
470 ) -> Self {
471 self.connection_config = std::option::Option::Some(
472 crate::model::connection::ConnectionConfig::GithubEnterpriseConfig(v.into()),
473 );
474 self
475 }
476
477 pub fn gitlab_config(
481 &self,
482 ) -> std::option::Option<&std::boxed::Box<crate::model::GitLabConfig>> {
483 #[allow(unreachable_patterns)]
484 self.connection_config.as_ref().and_then(|v| match v {
485 crate::model::connection::ConnectionConfig::GitlabConfig(v) => {
486 std::option::Option::Some(v)
487 }
488 _ => std::option::Option::None,
489 })
490 }
491
492 pub fn set_gitlab_config<T: std::convert::Into<std::boxed::Box<crate::model::GitLabConfig>>>(
498 mut self,
499 v: T,
500 ) -> Self {
501 self.connection_config = std::option::Option::Some(
502 crate::model::connection::ConnectionConfig::GitlabConfig(v.into()),
503 );
504 self
505 }
506
507 pub fn bitbucket_data_center_config(
511 &self,
512 ) -> std::option::Option<&std::boxed::Box<crate::model::BitbucketDataCenterConfig>> {
513 #[allow(unreachable_patterns)]
514 self.connection_config.as_ref().and_then(|v| match v {
515 crate::model::connection::ConnectionConfig::BitbucketDataCenterConfig(v) => {
516 std::option::Option::Some(v)
517 }
518 _ => std::option::Option::None,
519 })
520 }
521
522 pub fn set_bitbucket_data_center_config<
528 T: std::convert::Into<std::boxed::Box<crate::model::BitbucketDataCenterConfig>>,
529 >(
530 mut self,
531 v: T,
532 ) -> Self {
533 self.connection_config = std::option::Option::Some(
534 crate::model::connection::ConnectionConfig::BitbucketDataCenterConfig(v.into()),
535 );
536 self
537 }
538
539 pub fn bitbucket_cloud_config(
543 &self,
544 ) -> std::option::Option<&std::boxed::Box<crate::model::BitbucketCloudConfig>> {
545 #[allow(unreachable_patterns)]
546 self.connection_config.as_ref().and_then(|v| match v {
547 crate::model::connection::ConnectionConfig::BitbucketCloudConfig(v) => {
548 std::option::Option::Some(v)
549 }
550 _ => std::option::Option::None,
551 })
552 }
553
554 pub fn set_bitbucket_cloud_config<
560 T: std::convert::Into<std::boxed::Box<crate::model::BitbucketCloudConfig>>,
561 >(
562 mut self,
563 v: T,
564 ) -> Self {
565 self.connection_config = std::option::Option::Some(
566 crate::model::connection::ConnectionConfig::BitbucketCloudConfig(v.into()),
567 );
568 self
569 }
570}
571
572impl wkt::message::Message for Connection {
573 fn typename() -> &'static str {
574 "type.googleapis.com/google.devtools.cloudbuild.v2.Connection"
575 }
576}
577
578pub mod connection {
580 #[allow(unused_imports)]
581 use super::*;
582
583 #[derive(Clone, Debug, PartialEq)]
585 #[non_exhaustive]
586 pub enum ConnectionConfig {
587 GithubConfig(std::boxed::Box<crate::model::GitHubConfig>),
589 GithubEnterpriseConfig(std::boxed::Box<crate::model::GitHubEnterpriseConfig>),
591 GitlabConfig(std::boxed::Box<crate::model::GitLabConfig>),
594 BitbucketDataCenterConfig(std::boxed::Box<crate::model::BitbucketDataCenterConfig>),
596 BitbucketCloudConfig(std::boxed::Box<crate::model::BitbucketCloudConfig>),
598 }
599}
600
601#[derive(Clone, Default, PartialEq)]
605#[non_exhaustive]
606pub struct InstallationState {
607 pub stage: crate::model::installation_state::Stage,
609
610 pub message: std::string::String,
613
614 pub action_uri: std::string::String,
617
618 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
619}
620
621impl InstallationState {
622 pub fn new() -> Self {
623 std::default::Default::default()
624 }
625
626 pub fn set_stage<T: std::convert::Into<crate::model::installation_state::Stage>>(
628 mut self,
629 v: T,
630 ) -> Self {
631 self.stage = v.into();
632 self
633 }
634
635 pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
637 self.message = v.into();
638 self
639 }
640
641 pub fn set_action_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
643 self.action_uri = v.into();
644 self
645 }
646}
647
648impl wkt::message::Message for InstallationState {
649 fn typename() -> &'static str {
650 "type.googleapis.com/google.devtools.cloudbuild.v2.InstallationState"
651 }
652}
653
654pub mod installation_state {
656 #[allow(unused_imports)]
657 use super::*;
658
659 #[derive(Clone, Debug, PartialEq)]
675 #[non_exhaustive]
676 pub enum Stage {
677 Unspecified,
679 PendingCreateApp,
682 PendingUserOauth,
684 PendingInstallApp,
686 Complete,
688 UnknownValue(stage::UnknownValue),
693 }
694
695 #[doc(hidden)]
696 pub mod stage {
697 #[allow(unused_imports)]
698 use super::*;
699 #[derive(Clone, Debug, PartialEq)]
700 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
701 }
702
703 impl Stage {
704 pub fn value(&self) -> std::option::Option<i32> {
709 match self {
710 Self::Unspecified => std::option::Option::Some(0),
711 Self::PendingCreateApp => std::option::Option::Some(1),
712 Self::PendingUserOauth => std::option::Option::Some(2),
713 Self::PendingInstallApp => std::option::Option::Some(3),
714 Self::Complete => std::option::Option::Some(10),
715 Self::UnknownValue(u) => u.0.value(),
716 }
717 }
718
719 pub fn name(&self) -> std::option::Option<&str> {
724 match self {
725 Self::Unspecified => std::option::Option::Some("STAGE_UNSPECIFIED"),
726 Self::PendingCreateApp => std::option::Option::Some("PENDING_CREATE_APP"),
727 Self::PendingUserOauth => std::option::Option::Some("PENDING_USER_OAUTH"),
728 Self::PendingInstallApp => std::option::Option::Some("PENDING_INSTALL_APP"),
729 Self::Complete => std::option::Option::Some("COMPLETE"),
730 Self::UnknownValue(u) => u.0.name(),
731 }
732 }
733 }
734
735 impl std::default::Default for Stage {
736 fn default() -> Self {
737 use std::convert::From;
738 Self::from(0)
739 }
740 }
741
742 impl std::fmt::Display for Stage {
743 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
744 wkt::internal::display_enum(f, self.name(), self.value())
745 }
746 }
747
748 impl std::convert::From<i32> for Stage {
749 fn from(value: i32) -> Self {
750 match value {
751 0 => Self::Unspecified,
752 1 => Self::PendingCreateApp,
753 2 => Self::PendingUserOauth,
754 3 => Self::PendingInstallApp,
755 10 => Self::Complete,
756 _ => Self::UnknownValue(stage::UnknownValue(
757 wkt::internal::UnknownEnumValue::Integer(value),
758 )),
759 }
760 }
761 }
762
763 impl std::convert::From<&str> for Stage {
764 fn from(value: &str) -> Self {
765 use std::string::ToString;
766 match value {
767 "STAGE_UNSPECIFIED" => Self::Unspecified,
768 "PENDING_CREATE_APP" => Self::PendingCreateApp,
769 "PENDING_USER_OAUTH" => Self::PendingUserOauth,
770 "PENDING_INSTALL_APP" => Self::PendingInstallApp,
771 "COMPLETE" => Self::Complete,
772 _ => Self::UnknownValue(stage::UnknownValue(
773 wkt::internal::UnknownEnumValue::String(value.to_string()),
774 )),
775 }
776 }
777 }
778
779 impl serde::ser::Serialize for Stage {
780 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
781 where
782 S: serde::Serializer,
783 {
784 match self {
785 Self::Unspecified => serializer.serialize_i32(0),
786 Self::PendingCreateApp => serializer.serialize_i32(1),
787 Self::PendingUserOauth => serializer.serialize_i32(2),
788 Self::PendingInstallApp => serializer.serialize_i32(3),
789 Self::Complete => serializer.serialize_i32(10),
790 Self::UnknownValue(u) => u.0.serialize(serializer),
791 }
792 }
793 }
794
795 impl<'de> serde::de::Deserialize<'de> for Stage {
796 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
797 where
798 D: serde::Deserializer<'de>,
799 {
800 deserializer.deserialize_any(wkt::internal::EnumVisitor::<Stage>::new(
801 ".google.devtools.cloudbuild.v2.InstallationState.Stage",
802 ))
803 }
804 }
805}
806
807#[derive(Clone, Default, PartialEq)]
809#[non_exhaustive]
810pub struct FetchLinkableRepositoriesRequest {
811 pub connection: std::string::String,
814
815 pub page_size: i32,
817
818 pub page_token: std::string::String,
820
821 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
822}
823
824impl FetchLinkableRepositoriesRequest {
825 pub fn new() -> Self {
826 std::default::Default::default()
827 }
828
829 pub fn set_connection<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
831 self.connection = v.into();
832 self
833 }
834
835 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
837 self.page_size = v.into();
838 self
839 }
840
841 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
843 self.page_token = v.into();
844 self
845 }
846}
847
848impl wkt::message::Message for FetchLinkableRepositoriesRequest {
849 fn typename() -> &'static str {
850 "type.googleapis.com/google.devtools.cloudbuild.v2.FetchLinkableRepositoriesRequest"
851 }
852}
853
854#[derive(Clone, Default, PartialEq)]
856#[non_exhaustive]
857pub struct FetchLinkableRepositoriesResponse {
858 pub repositories: std::vec::Vec<crate::model::Repository>,
860
861 pub next_page_token: std::string::String,
863
864 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
865}
866
867impl FetchLinkableRepositoriesResponse {
868 pub fn new() -> Self {
869 std::default::Default::default()
870 }
871
872 pub fn set_repositories<T, V>(mut self, v: T) -> Self
874 where
875 T: std::iter::IntoIterator<Item = V>,
876 V: std::convert::Into<crate::model::Repository>,
877 {
878 use std::iter::Iterator;
879 self.repositories = v.into_iter().map(|i| i.into()).collect();
880 self
881 }
882
883 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
885 self.next_page_token = v.into();
886 self
887 }
888}
889
890impl wkt::message::Message for FetchLinkableRepositoriesResponse {
891 fn typename() -> &'static str {
892 "type.googleapis.com/google.devtools.cloudbuild.v2.FetchLinkableRepositoriesResponse"
893 }
894}
895
896#[doc(hidden)]
897impl gax::paginator::internal::PageableResponse for FetchLinkableRepositoriesResponse {
898 type PageItem = crate::model::Repository;
899
900 fn items(self) -> std::vec::Vec<Self::PageItem> {
901 self.repositories
902 }
903
904 fn next_page_token(&self) -> std::string::String {
905 use std::clone::Clone;
906 self.next_page_token.clone()
907 }
908}
909
910#[derive(Clone, Default, PartialEq)]
912#[non_exhaustive]
913pub struct GitHubConfig {
914 pub authorizer_credential: std::option::Option<crate::model::OAuthCredential>,
918
919 pub app_installation_id: i64,
921
922 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
923}
924
925impl GitHubConfig {
926 pub fn new() -> Self {
927 std::default::Default::default()
928 }
929
930 pub fn set_authorizer_credential<T>(mut self, v: T) -> Self
932 where
933 T: std::convert::Into<crate::model::OAuthCredential>,
934 {
935 self.authorizer_credential = std::option::Option::Some(v.into());
936 self
937 }
938
939 pub fn set_or_clear_authorizer_credential<T>(mut self, v: std::option::Option<T>) -> Self
941 where
942 T: std::convert::Into<crate::model::OAuthCredential>,
943 {
944 self.authorizer_credential = v.map(|x| x.into());
945 self
946 }
947
948 pub fn set_app_installation_id<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
950 self.app_installation_id = v.into();
951 self
952 }
953}
954
955impl wkt::message::Message for GitHubConfig {
956 fn typename() -> &'static str {
957 "type.googleapis.com/google.devtools.cloudbuild.v2.GitHubConfig"
958 }
959}
960
961#[derive(Clone, Default, PartialEq)]
963#[non_exhaustive]
964pub struct GitHubEnterpriseConfig {
965 pub host_uri: std::string::String,
967
968 pub api_key: std::string::String,
970
971 pub app_id: i64,
973
974 pub app_slug: std::string::String,
976
977 pub private_key_secret_version: std::string::String,
980
981 pub webhook_secret_secret_version: std::string::String,
984
985 pub app_installation_id: i64,
987
988 pub service_directory_config: std::option::Option<crate::model::ServiceDirectoryConfig>,
994
995 pub ssl_ca: std::string::String,
997
998 pub server_version: std::string::String,
1000
1001 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1002}
1003
1004impl GitHubEnterpriseConfig {
1005 pub fn new() -> Self {
1006 std::default::Default::default()
1007 }
1008
1009 pub fn set_host_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1011 self.host_uri = v.into();
1012 self
1013 }
1014
1015 pub fn set_api_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1017 self.api_key = v.into();
1018 self
1019 }
1020
1021 pub fn set_app_id<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
1023 self.app_id = v.into();
1024 self
1025 }
1026
1027 pub fn set_app_slug<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1029 self.app_slug = v.into();
1030 self
1031 }
1032
1033 pub fn set_private_key_secret_version<T: std::convert::Into<std::string::String>>(
1035 mut self,
1036 v: T,
1037 ) -> Self {
1038 self.private_key_secret_version = v.into();
1039 self
1040 }
1041
1042 pub fn set_webhook_secret_secret_version<T: std::convert::Into<std::string::String>>(
1044 mut self,
1045 v: T,
1046 ) -> Self {
1047 self.webhook_secret_secret_version = v.into();
1048 self
1049 }
1050
1051 pub fn set_app_installation_id<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
1053 self.app_installation_id = v.into();
1054 self
1055 }
1056
1057 pub fn set_service_directory_config<T>(mut self, v: T) -> Self
1059 where
1060 T: std::convert::Into<crate::model::ServiceDirectoryConfig>,
1061 {
1062 self.service_directory_config = std::option::Option::Some(v.into());
1063 self
1064 }
1065
1066 pub fn set_or_clear_service_directory_config<T>(mut self, v: std::option::Option<T>) -> Self
1068 where
1069 T: std::convert::Into<crate::model::ServiceDirectoryConfig>,
1070 {
1071 self.service_directory_config = v.map(|x| x.into());
1072 self
1073 }
1074
1075 pub fn set_ssl_ca<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1077 self.ssl_ca = v.into();
1078 self
1079 }
1080
1081 pub fn set_server_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1083 self.server_version = v.into();
1084 self
1085 }
1086}
1087
1088impl wkt::message::Message for GitHubEnterpriseConfig {
1089 fn typename() -> &'static str {
1090 "type.googleapis.com/google.devtools.cloudbuild.v2.GitHubEnterpriseConfig"
1091 }
1092}
1093
1094#[derive(Clone, Default, PartialEq)]
1097#[non_exhaustive]
1098pub struct GitLabConfig {
1099 pub host_uri: std::string::String,
1102
1103 pub webhook_secret_secret_version: std::string::String,
1107
1108 pub read_authorizer_credential: std::option::Option<crate::model::UserCredential>,
1111
1112 pub authorizer_credential: std::option::Option<crate::model::UserCredential>,
1114
1115 pub service_directory_config: std::option::Option<crate::model::ServiceDirectoryConfig>,
1121
1122 pub ssl_ca: std::string::String,
1124
1125 pub server_version: std::string::String,
1128
1129 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1130}
1131
1132impl GitLabConfig {
1133 pub fn new() -> Self {
1134 std::default::Default::default()
1135 }
1136
1137 pub fn set_host_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1139 self.host_uri = v.into();
1140 self
1141 }
1142
1143 pub fn set_webhook_secret_secret_version<T: std::convert::Into<std::string::String>>(
1145 mut self,
1146 v: T,
1147 ) -> Self {
1148 self.webhook_secret_secret_version = v.into();
1149 self
1150 }
1151
1152 pub fn set_read_authorizer_credential<T>(mut self, v: T) -> Self
1154 where
1155 T: std::convert::Into<crate::model::UserCredential>,
1156 {
1157 self.read_authorizer_credential = std::option::Option::Some(v.into());
1158 self
1159 }
1160
1161 pub fn set_or_clear_read_authorizer_credential<T>(mut self, v: std::option::Option<T>) -> Self
1163 where
1164 T: std::convert::Into<crate::model::UserCredential>,
1165 {
1166 self.read_authorizer_credential = v.map(|x| x.into());
1167 self
1168 }
1169
1170 pub fn set_authorizer_credential<T>(mut self, v: T) -> Self
1172 where
1173 T: std::convert::Into<crate::model::UserCredential>,
1174 {
1175 self.authorizer_credential = std::option::Option::Some(v.into());
1176 self
1177 }
1178
1179 pub fn set_or_clear_authorizer_credential<T>(mut self, v: std::option::Option<T>) -> Self
1181 where
1182 T: std::convert::Into<crate::model::UserCredential>,
1183 {
1184 self.authorizer_credential = v.map(|x| x.into());
1185 self
1186 }
1187
1188 pub fn set_service_directory_config<T>(mut self, v: T) -> Self
1190 where
1191 T: std::convert::Into<crate::model::ServiceDirectoryConfig>,
1192 {
1193 self.service_directory_config = std::option::Option::Some(v.into());
1194 self
1195 }
1196
1197 pub fn set_or_clear_service_directory_config<T>(mut self, v: std::option::Option<T>) -> Self
1199 where
1200 T: std::convert::Into<crate::model::ServiceDirectoryConfig>,
1201 {
1202 self.service_directory_config = v.map(|x| x.into());
1203 self
1204 }
1205
1206 pub fn set_ssl_ca<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1208 self.ssl_ca = v.into();
1209 self
1210 }
1211
1212 pub fn set_server_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1214 self.server_version = v.into();
1215 self
1216 }
1217}
1218
1219impl wkt::message::Message for GitLabConfig {
1220 fn typename() -> &'static str {
1221 "type.googleapis.com/google.devtools.cloudbuild.v2.GitLabConfig"
1222 }
1223}
1224
1225#[derive(Clone, Default, PartialEq)]
1227#[non_exhaustive]
1228pub struct BitbucketDataCenterConfig {
1229 pub host_uri: std::string::String,
1232
1233 pub webhook_secret_secret_version: std::string::String,
1237
1238 pub read_authorizer_credential: std::option::Option<crate::model::UserCredential>,
1240
1241 pub authorizer_credential: std::option::Option<crate::model::UserCredential>,
1243
1244 pub service_directory_config: std::option::Option<crate::model::ServiceDirectoryConfig>,
1250
1251 pub ssl_ca: std::string::String,
1253
1254 pub server_version: std::string::String,
1257
1258 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1259}
1260
1261impl BitbucketDataCenterConfig {
1262 pub fn new() -> Self {
1263 std::default::Default::default()
1264 }
1265
1266 pub fn set_host_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1268 self.host_uri = v.into();
1269 self
1270 }
1271
1272 pub fn set_webhook_secret_secret_version<T: std::convert::Into<std::string::String>>(
1274 mut self,
1275 v: T,
1276 ) -> Self {
1277 self.webhook_secret_secret_version = v.into();
1278 self
1279 }
1280
1281 pub fn set_read_authorizer_credential<T>(mut self, v: T) -> Self
1283 where
1284 T: std::convert::Into<crate::model::UserCredential>,
1285 {
1286 self.read_authorizer_credential = std::option::Option::Some(v.into());
1287 self
1288 }
1289
1290 pub fn set_or_clear_read_authorizer_credential<T>(mut self, v: std::option::Option<T>) -> Self
1292 where
1293 T: std::convert::Into<crate::model::UserCredential>,
1294 {
1295 self.read_authorizer_credential = v.map(|x| x.into());
1296 self
1297 }
1298
1299 pub fn set_authorizer_credential<T>(mut self, v: T) -> Self
1301 where
1302 T: std::convert::Into<crate::model::UserCredential>,
1303 {
1304 self.authorizer_credential = std::option::Option::Some(v.into());
1305 self
1306 }
1307
1308 pub fn set_or_clear_authorizer_credential<T>(mut self, v: std::option::Option<T>) -> Self
1310 where
1311 T: std::convert::Into<crate::model::UserCredential>,
1312 {
1313 self.authorizer_credential = v.map(|x| x.into());
1314 self
1315 }
1316
1317 pub fn set_service_directory_config<T>(mut self, v: T) -> Self
1319 where
1320 T: std::convert::Into<crate::model::ServiceDirectoryConfig>,
1321 {
1322 self.service_directory_config = std::option::Option::Some(v.into());
1323 self
1324 }
1325
1326 pub fn set_or_clear_service_directory_config<T>(mut self, v: std::option::Option<T>) -> Self
1328 where
1329 T: std::convert::Into<crate::model::ServiceDirectoryConfig>,
1330 {
1331 self.service_directory_config = v.map(|x| x.into());
1332 self
1333 }
1334
1335 pub fn set_ssl_ca<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1337 self.ssl_ca = v.into();
1338 self
1339 }
1340
1341 pub fn set_server_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1343 self.server_version = v.into();
1344 self
1345 }
1346}
1347
1348impl wkt::message::Message for BitbucketDataCenterConfig {
1349 fn typename() -> &'static str {
1350 "type.googleapis.com/google.devtools.cloudbuild.v2.BitbucketDataCenterConfig"
1351 }
1352}
1353
1354#[derive(Clone, Default, PartialEq)]
1356#[non_exhaustive]
1357pub struct BitbucketCloudConfig {
1358 pub workspace: std::string::String,
1361
1362 pub webhook_secret_secret_version: std::string::String,
1365
1366 pub read_authorizer_credential: std::option::Option<crate::model::UserCredential>,
1370
1371 pub authorizer_credential: std::option::Option<crate::model::UserCredential>,
1376
1377 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1378}
1379
1380impl BitbucketCloudConfig {
1381 pub fn new() -> Self {
1382 std::default::Default::default()
1383 }
1384
1385 pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1387 self.workspace = v.into();
1388 self
1389 }
1390
1391 pub fn set_webhook_secret_secret_version<T: std::convert::Into<std::string::String>>(
1393 mut self,
1394 v: T,
1395 ) -> Self {
1396 self.webhook_secret_secret_version = v.into();
1397 self
1398 }
1399
1400 pub fn set_read_authorizer_credential<T>(mut self, v: T) -> Self
1402 where
1403 T: std::convert::Into<crate::model::UserCredential>,
1404 {
1405 self.read_authorizer_credential = std::option::Option::Some(v.into());
1406 self
1407 }
1408
1409 pub fn set_or_clear_read_authorizer_credential<T>(mut self, v: std::option::Option<T>) -> Self
1411 where
1412 T: std::convert::Into<crate::model::UserCredential>,
1413 {
1414 self.read_authorizer_credential = v.map(|x| x.into());
1415 self
1416 }
1417
1418 pub fn set_authorizer_credential<T>(mut self, v: T) -> Self
1420 where
1421 T: std::convert::Into<crate::model::UserCredential>,
1422 {
1423 self.authorizer_credential = std::option::Option::Some(v.into());
1424 self
1425 }
1426
1427 pub fn set_or_clear_authorizer_credential<T>(mut self, v: std::option::Option<T>) -> Self
1429 where
1430 T: std::convert::Into<crate::model::UserCredential>,
1431 {
1432 self.authorizer_credential = v.map(|x| x.into());
1433 self
1434 }
1435}
1436
1437impl wkt::message::Message for BitbucketCloudConfig {
1438 fn typename() -> &'static str {
1439 "type.googleapis.com/google.devtools.cloudbuild.v2.BitbucketCloudConfig"
1440 }
1441}
1442
1443#[derive(Clone, Default, PartialEq)]
1446#[non_exhaustive]
1447pub struct ServiceDirectoryConfig {
1448 pub service: std::string::String,
1452
1453 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1454}
1455
1456impl ServiceDirectoryConfig {
1457 pub fn new() -> Self {
1458 std::default::Default::default()
1459 }
1460
1461 pub fn set_service<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1463 self.service = v.into();
1464 self
1465 }
1466}
1467
1468impl wkt::message::Message for ServiceDirectoryConfig {
1469 fn typename() -> &'static str {
1470 "type.googleapis.com/google.devtools.cloudbuild.v2.ServiceDirectoryConfig"
1471 }
1472}
1473
1474#[derive(Clone, Default, PartialEq)]
1476#[non_exhaustive]
1477pub struct Repository {
1478 pub name: std::string::String,
1481
1482 pub remote_uri: std::string::String,
1484
1485 pub create_time: std::option::Option<wkt::Timestamp>,
1487
1488 pub update_time: std::option::Option<wkt::Timestamp>,
1490
1491 pub annotations: std::collections::HashMap<std::string::String, std::string::String>,
1493
1494 pub etag: std::string::String,
1498
1499 pub webhook_id: std::string::String,
1501
1502 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1503}
1504
1505impl Repository {
1506 pub fn new() -> Self {
1507 std::default::Default::default()
1508 }
1509
1510 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1512 self.name = v.into();
1513 self
1514 }
1515
1516 pub fn set_remote_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1518 self.remote_uri = v.into();
1519 self
1520 }
1521
1522 pub fn set_create_time<T>(mut self, v: T) -> Self
1524 where
1525 T: std::convert::Into<wkt::Timestamp>,
1526 {
1527 self.create_time = std::option::Option::Some(v.into());
1528 self
1529 }
1530
1531 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
1533 where
1534 T: std::convert::Into<wkt::Timestamp>,
1535 {
1536 self.create_time = v.map(|x| x.into());
1537 self
1538 }
1539
1540 pub fn set_update_time<T>(mut self, v: T) -> Self
1542 where
1543 T: std::convert::Into<wkt::Timestamp>,
1544 {
1545 self.update_time = std::option::Option::Some(v.into());
1546 self
1547 }
1548
1549 pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
1551 where
1552 T: std::convert::Into<wkt::Timestamp>,
1553 {
1554 self.update_time = v.map(|x| x.into());
1555 self
1556 }
1557
1558 pub fn set_annotations<T, K, V>(mut self, v: T) -> Self
1560 where
1561 T: std::iter::IntoIterator<Item = (K, V)>,
1562 K: std::convert::Into<std::string::String>,
1563 V: std::convert::Into<std::string::String>,
1564 {
1565 use std::iter::Iterator;
1566 self.annotations = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
1567 self
1568 }
1569
1570 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1572 self.etag = v.into();
1573 self
1574 }
1575
1576 pub fn set_webhook_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1578 self.webhook_id = v.into();
1579 self
1580 }
1581}
1582
1583impl wkt::message::Message for Repository {
1584 fn typename() -> &'static str {
1585 "type.googleapis.com/google.devtools.cloudbuild.v2.Repository"
1586 }
1587}
1588
1589#[derive(Clone, Default, PartialEq)]
1592#[non_exhaustive]
1593pub struct OAuthCredential {
1594 pub oauth_token_secret_version: std::string::String,
1597
1598 pub username: std::string::String,
1600
1601 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1602}
1603
1604impl OAuthCredential {
1605 pub fn new() -> Self {
1606 std::default::Default::default()
1607 }
1608
1609 pub fn set_oauth_token_secret_version<T: std::convert::Into<std::string::String>>(
1611 mut self,
1612 v: T,
1613 ) -> Self {
1614 self.oauth_token_secret_version = v.into();
1615 self
1616 }
1617
1618 pub fn set_username<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1620 self.username = v.into();
1621 self
1622 }
1623}
1624
1625impl wkt::message::Message for OAuthCredential {
1626 fn typename() -> &'static str {
1627 "type.googleapis.com/google.devtools.cloudbuild.v2.OAuthCredential"
1628 }
1629}
1630
1631#[derive(Clone, Default, PartialEq)]
1634#[non_exhaustive]
1635pub struct UserCredential {
1636 pub user_token_secret_version: std::string::String,
1640
1641 pub username: std::string::String,
1643
1644 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1645}
1646
1647impl UserCredential {
1648 pub fn new() -> Self {
1649 std::default::Default::default()
1650 }
1651
1652 pub fn set_user_token_secret_version<T: std::convert::Into<std::string::String>>(
1654 mut self,
1655 v: T,
1656 ) -> Self {
1657 self.user_token_secret_version = v.into();
1658 self
1659 }
1660
1661 pub fn set_username<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1663 self.username = v.into();
1664 self
1665 }
1666}
1667
1668impl wkt::message::Message for UserCredential {
1669 fn typename() -> &'static str {
1670 "type.googleapis.com/google.devtools.cloudbuild.v2.UserCredential"
1671 }
1672}
1673
1674#[derive(Clone, Default, PartialEq)]
1676#[non_exhaustive]
1677pub struct CreateConnectionRequest {
1678 pub parent: std::string::String,
1681
1682 pub connection: std::option::Option<crate::model::Connection>,
1684
1685 pub connection_id: std::string::String,
1690
1691 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1692}
1693
1694impl CreateConnectionRequest {
1695 pub fn new() -> Self {
1696 std::default::Default::default()
1697 }
1698
1699 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1701 self.parent = v.into();
1702 self
1703 }
1704
1705 pub fn set_connection<T>(mut self, v: T) -> Self
1707 where
1708 T: std::convert::Into<crate::model::Connection>,
1709 {
1710 self.connection = std::option::Option::Some(v.into());
1711 self
1712 }
1713
1714 pub fn set_or_clear_connection<T>(mut self, v: std::option::Option<T>) -> Self
1716 where
1717 T: std::convert::Into<crate::model::Connection>,
1718 {
1719 self.connection = v.map(|x| x.into());
1720 self
1721 }
1722
1723 pub fn set_connection_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1725 self.connection_id = v.into();
1726 self
1727 }
1728}
1729
1730impl wkt::message::Message for CreateConnectionRequest {
1731 fn typename() -> &'static str {
1732 "type.googleapis.com/google.devtools.cloudbuild.v2.CreateConnectionRequest"
1733 }
1734}
1735
1736#[derive(Clone, Default, PartialEq)]
1738#[non_exhaustive]
1739pub struct GetConnectionRequest {
1740 pub name: std::string::String,
1743
1744 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1745}
1746
1747impl GetConnectionRequest {
1748 pub fn new() -> Self {
1749 std::default::Default::default()
1750 }
1751
1752 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1754 self.name = v.into();
1755 self
1756 }
1757}
1758
1759impl wkt::message::Message for GetConnectionRequest {
1760 fn typename() -> &'static str {
1761 "type.googleapis.com/google.devtools.cloudbuild.v2.GetConnectionRequest"
1762 }
1763}
1764
1765#[derive(Clone, Default, PartialEq)]
1767#[non_exhaustive]
1768pub struct ListConnectionsRequest {
1769 pub parent: std::string::String,
1772
1773 pub page_size: i32,
1775
1776 pub page_token: std::string::String,
1778
1779 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1780}
1781
1782impl ListConnectionsRequest {
1783 pub fn new() -> Self {
1784 std::default::Default::default()
1785 }
1786
1787 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1789 self.parent = v.into();
1790 self
1791 }
1792
1793 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1795 self.page_size = v.into();
1796 self
1797 }
1798
1799 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1801 self.page_token = v.into();
1802 self
1803 }
1804}
1805
1806impl wkt::message::Message for ListConnectionsRequest {
1807 fn typename() -> &'static str {
1808 "type.googleapis.com/google.devtools.cloudbuild.v2.ListConnectionsRequest"
1809 }
1810}
1811
1812#[derive(Clone, Default, PartialEq)]
1814#[non_exhaustive]
1815pub struct ListConnectionsResponse {
1816 pub connections: std::vec::Vec<crate::model::Connection>,
1818
1819 pub next_page_token: std::string::String,
1821
1822 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1823}
1824
1825impl ListConnectionsResponse {
1826 pub fn new() -> Self {
1827 std::default::Default::default()
1828 }
1829
1830 pub fn set_connections<T, V>(mut self, v: T) -> Self
1832 where
1833 T: std::iter::IntoIterator<Item = V>,
1834 V: std::convert::Into<crate::model::Connection>,
1835 {
1836 use std::iter::Iterator;
1837 self.connections = v.into_iter().map(|i| i.into()).collect();
1838 self
1839 }
1840
1841 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1843 self.next_page_token = v.into();
1844 self
1845 }
1846}
1847
1848impl wkt::message::Message for ListConnectionsResponse {
1849 fn typename() -> &'static str {
1850 "type.googleapis.com/google.devtools.cloudbuild.v2.ListConnectionsResponse"
1851 }
1852}
1853
1854#[doc(hidden)]
1855impl gax::paginator::internal::PageableResponse for ListConnectionsResponse {
1856 type PageItem = crate::model::Connection;
1857
1858 fn items(self) -> std::vec::Vec<Self::PageItem> {
1859 self.connections
1860 }
1861
1862 fn next_page_token(&self) -> std::string::String {
1863 use std::clone::Clone;
1864 self.next_page_token.clone()
1865 }
1866}
1867
1868#[derive(Clone, Default, PartialEq)]
1870#[non_exhaustive]
1871pub struct UpdateConnectionRequest {
1872 pub connection: std::option::Option<crate::model::Connection>,
1874
1875 pub update_mask: std::option::Option<wkt::FieldMask>,
1877
1878 pub allow_missing: bool,
1884
1885 pub etag: std::string::String,
1889
1890 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1891}
1892
1893impl UpdateConnectionRequest {
1894 pub fn new() -> Self {
1895 std::default::Default::default()
1896 }
1897
1898 pub fn set_connection<T>(mut self, v: T) -> Self
1900 where
1901 T: std::convert::Into<crate::model::Connection>,
1902 {
1903 self.connection = std::option::Option::Some(v.into());
1904 self
1905 }
1906
1907 pub fn set_or_clear_connection<T>(mut self, v: std::option::Option<T>) -> Self
1909 where
1910 T: std::convert::Into<crate::model::Connection>,
1911 {
1912 self.connection = v.map(|x| x.into());
1913 self
1914 }
1915
1916 pub fn set_update_mask<T>(mut self, v: T) -> Self
1918 where
1919 T: std::convert::Into<wkt::FieldMask>,
1920 {
1921 self.update_mask = std::option::Option::Some(v.into());
1922 self
1923 }
1924
1925 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
1927 where
1928 T: std::convert::Into<wkt::FieldMask>,
1929 {
1930 self.update_mask = v.map(|x| x.into());
1931 self
1932 }
1933
1934 pub fn set_allow_missing<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1936 self.allow_missing = v.into();
1937 self
1938 }
1939
1940 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1942 self.etag = v.into();
1943 self
1944 }
1945}
1946
1947impl wkt::message::Message for UpdateConnectionRequest {
1948 fn typename() -> &'static str {
1949 "type.googleapis.com/google.devtools.cloudbuild.v2.UpdateConnectionRequest"
1950 }
1951}
1952
1953#[derive(Clone, Default, PartialEq)]
1955#[non_exhaustive]
1956pub struct DeleteConnectionRequest {
1957 pub name: std::string::String,
1960
1961 pub etag: std::string::String,
1965
1966 pub validate_only: bool,
1968
1969 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1970}
1971
1972impl DeleteConnectionRequest {
1973 pub fn new() -> Self {
1974 std::default::Default::default()
1975 }
1976
1977 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1979 self.name = v.into();
1980 self
1981 }
1982
1983 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1985 self.etag = v.into();
1986 self
1987 }
1988
1989 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1991 self.validate_only = v.into();
1992 self
1993 }
1994}
1995
1996impl wkt::message::Message for DeleteConnectionRequest {
1997 fn typename() -> &'static str {
1998 "type.googleapis.com/google.devtools.cloudbuild.v2.DeleteConnectionRequest"
1999 }
2000}
2001
2002#[derive(Clone, Default, PartialEq)]
2004#[non_exhaustive]
2005pub struct CreateRepositoryRequest {
2006 pub parent: std::string::String,
2010
2011 pub repository: std::option::Option<crate::model::Repository>,
2013
2014 pub repository_id: std::string::String,
2019
2020 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2021}
2022
2023impl CreateRepositoryRequest {
2024 pub fn new() -> Self {
2025 std::default::Default::default()
2026 }
2027
2028 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2030 self.parent = v.into();
2031 self
2032 }
2033
2034 pub fn set_repository<T>(mut self, v: T) -> Self
2036 where
2037 T: std::convert::Into<crate::model::Repository>,
2038 {
2039 self.repository = std::option::Option::Some(v.into());
2040 self
2041 }
2042
2043 pub fn set_or_clear_repository<T>(mut self, v: std::option::Option<T>) -> Self
2045 where
2046 T: std::convert::Into<crate::model::Repository>,
2047 {
2048 self.repository = v.map(|x| x.into());
2049 self
2050 }
2051
2052 pub fn set_repository_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2054 self.repository_id = v.into();
2055 self
2056 }
2057}
2058
2059impl wkt::message::Message for CreateRepositoryRequest {
2060 fn typename() -> &'static str {
2061 "type.googleapis.com/google.devtools.cloudbuild.v2.CreateRepositoryRequest"
2062 }
2063}
2064
2065#[derive(Clone, Default, PartialEq)]
2067#[non_exhaustive]
2068pub struct BatchCreateRepositoriesRequest {
2069 pub parent: std::string::String,
2074
2075 pub requests: std::vec::Vec<crate::model::CreateRepositoryRequest>,
2077
2078 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2079}
2080
2081impl BatchCreateRepositoriesRequest {
2082 pub fn new() -> Self {
2083 std::default::Default::default()
2084 }
2085
2086 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2088 self.parent = v.into();
2089 self
2090 }
2091
2092 pub fn set_requests<T, V>(mut self, v: T) -> Self
2094 where
2095 T: std::iter::IntoIterator<Item = V>,
2096 V: std::convert::Into<crate::model::CreateRepositoryRequest>,
2097 {
2098 use std::iter::Iterator;
2099 self.requests = v.into_iter().map(|i| i.into()).collect();
2100 self
2101 }
2102}
2103
2104impl wkt::message::Message for BatchCreateRepositoriesRequest {
2105 fn typename() -> &'static str {
2106 "type.googleapis.com/google.devtools.cloudbuild.v2.BatchCreateRepositoriesRequest"
2107 }
2108}
2109
2110#[derive(Clone, Default, PartialEq)]
2112#[non_exhaustive]
2113pub struct BatchCreateRepositoriesResponse {
2114 pub repositories: std::vec::Vec<crate::model::Repository>,
2116
2117 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2118}
2119
2120impl BatchCreateRepositoriesResponse {
2121 pub fn new() -> Self {
2122 std::default::Default::default()
2123 }
2124
2125 pub fn set_repositories<T, V>(mut self, v: T) -> Self
2127 where
2128 T: std::iter::IntoIterator<Item = V>,
2129 V: std::convert::Into<crate::model::Repository>,
2130 {
2131 use std::iter::Iterator;
2132 self.repositories = v.into_iter().map(|i| i.into()).collect();
2133 self
2134 }
2135}
2136
2137impl wkt::message::Message for BatchCreateRepositoriesResponse {
2138 fn typename() -> &'static str {
2139 "type.googleapis.com/google.devtools.cloudbuild.v2.BatchCreateRepositoriesResponse"
2140 }
2141}
2142
2143#[derive(Clone, Default, PartialEq)]
2145#[non_exhaustive]
2146pub struct GetRepositoryRequest {
2147 pub name: std::string::String,
2150
2151 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2152}
2153
2154impl GetRepositoryRequest {
2155 pub fn new() -> Self {
2156 std::default::Default::default()
2157 }
2158
2159 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2161 self.name = v.into();
2162 self
2163 }
2164}
2165
2166impl wkt::message::Message for GetRepositoryRequest {
2167 fn typename() -> &'static str {
2168 "type.googleapis.com/google.devtools.cloudbuild.v2.GetRepositoryRequest"
2169 }
2170}
2171
2172#[derive(Clone, Default, PartialEq)]
2174#[non_exhaustive]
2175pub struct ListRepositoriesRequest {
2176 pub parent: std::string::String,
2179
2180 pub page_size: i32,
2182
2183 pub page_token: std::string::String,
2185
2186 pub filter: std::string::String,
2191
2192 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2193}
2194
2195impl ListRepositoriesRequest {
2196 pub fn new() -> Self {
2197 std::default::Default::default()
2198 }
2199
2200 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2202 self.parent = v.into();
2203 self
2204 }
2205
2206 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2208 self.page_size = v.into();
2209 self
2210 }
2211
2212 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2214 self.page_token = v.into();
2215 self
2216 }
2217
2218 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2220 self.filter = v.into();
2221 self
2222 }
2223}
2224
2225impl wkt::message::Message for ListRepositoriesRequest {
2226 fn typename() -> &'static str {
2227 "type.googleapis.com/google.devtools.cloudbuild.v2.ListRepositoriesRequest"
2228 }
2229}
2230
2231#[derive(Clone, Default, PartialEq)]
2233#[non_exhaustive]
2234pub struct ListRepositoriesResponse {
2235 pub repositories: std::vec::Vec<crate::model::Repository>,
2237
2238 pub next_page_token: std::string::String,
2240
2241 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2242}
2243
2244impl ListRepositoriesResponse {
2245 pub fn new() -> Self {
2246 std::default::Default::default()
2247 }
2248
2249 pub fn set_repositories<T, V>(mut self, v: T) -> Self
2251 where
2252 T: std::iter::IntoIterator<Item = V>,
2253 V: std::convert::Into<crate::model::Repository>,
2254 {
2255 use std::iter::Iterator;
2256 self.repositories = v.into_iter().map(|i| i.into()).collect();
2257 self
2258 }
2259
2260 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2262 self.next_page_token = v.into();
2263 self
2264 }
2265}
2266
2267impl wkt::message::Message for ListRepositoriesResponse {
2268 fn typename() -> &'static str {
2269 "type.googleapis.com/google.devtools.cloudbuild.v2.ListRepositoriesResponse"
2270 }
2271}
2272
2273#[doc(hidden)]
2274impl gax::paginator::internal::PageableResponse for ListRepositoriesResponse {
2275 type PageItem = crate::model::Repository;
2276
2277 fn items(self) -> std::vec::Vec<Self::PageItem> {
2278 self.repositories
2279 }
2280
2281 fn next_page_token(&self) -> std::string::String {
2282 use std::clone::Clone;
2283 self.next_page_token.clone()
2284 }
2285}
2286
2287#[derive(Clone, Default, PartialEq)]
2289#[non_exhaustive]
2290pub struct DeleteRepositoryRequest {
2291 pub name: std::string::String,
2294
2295 pub etag: std::string::String,
2299
2300 pub validate_only: bool,
2302
2303 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2304}
2305
2306impl DeleteRepositoryRequest {
2307 pub fn new() -> Self {
2308 std::default::Default::default()
2309 }
2310
2311 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2313 self.name = v.into();
2314 self
2315 }
2316
2317 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2319 self.etag = v.into();
2320 self
2321 }
2322
2323 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2325 self.validate_only = v.into();
2326 self
2327 }
2328}
2329
2330impl wkt::message::Message for DeleteRepositoryRequest {
2331 fn typename() -> &'static str {
2332 "type.googleapis.com/google.devtools.cloudbuild.v2.DeleteRepositoryRequest"
2333 }
2334}
2335
2336#[derive(Clone, Default, PartialEq)]
2338#[non_exhaustive]
2339pub struct FetchReadWriteTokenRequest {
2340 pub repository: std::string::String,
2343
2344 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2345}
2346
2347impl FetchReadWriteTokenRequest {
2348 pub fn new() -> Self {
2349 std::default::Default::default()
2350 }
2351
2352 pub fn set_repository<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2354 self.repository = v.into();
2355 self
2356 }
2357}
2358
2359impl wkt::message::Message for FetchReadWriteTokenRequest {
2360 fn typename() -> &'static str {
2361 "type.googleapis.com/google.devtools.cloudbuild.v2.FetchReadWriteTokenRequest"
2362 }
2363}
2364
2365#[derive(Clone, Default, PartialEq)]
2367#[non_exhaustive]
2368pub struct FetchReadTokenRequest {
2369 pub repository: std::string::String,
2372
2373 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2374}
2375
2376impl FetchReadTokenRequest {
2377 pub fn new() -> Self {
2378 std::default::Default::default()
2379 }
2380
2381 pub fn set_repository<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2383 self.repository = v.into();
2384 self
2385 }
2386}
2387
2388impl wkt::message::Message for FetchReadTokenRequest {
2389 fn typename() -> &'static str {
2390 "type.googleapis.com/google.devtools.cloudbuild.v2.FetchReadTokenRequest"
2391 }
2392}
2393
2394#[derive(Clone, Default, PartialEq)]
2396#[non_exhaustive]
2397pub struct FetchReadTokenResponse {
2398 pub token: std::string::String,
2400
2401 pub expiration_time: std::option::Option<wkt::Timestamp>,
2403
2404 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2405}
2406
2407impl FetchReadTokenResponse {
2408 pub fn new() -> Self {
2409 std::default::Default::default()
2410 }
2411
2412 pub fn set_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2414 self.token = v.into();
2415 self
2416 }
2417
2418 pub fn set_expiration_time<T>(mut self, v: T) -> Self
2420 where
2421 T: std::convert::Into<wkt::Timestamp>,
2422 {
2423 self.expiration_time = std::option::Option::Some(v.into());
2424 self
2425 }
2426
2427 pub fn set_or_clear_expiration_time<T>(mut self, v: std::option::Option<T>) -> Self
2429 where
2430 T: std::convert::Into<wkt::Timestamp>,
2431 {
2432 self.expiration_time = v.map(|x| x.into());
2433 self
2434 }
2435}
2436
2437impl wkt::message::Message for FetchReadTokenResponse {
2438 fn typename() -> &'static str {
2439 "type.googleapis.com/google.devtools.cloudbuild.v2.FetchReadTokenResponse"
2440 }
2441}
2442
2443#[derive(Clone, Default, PartialEq)]
2445#[non_exhaustive]
2446pub struct FetchReadWriteTokenResponse {
2447 pub token: std::string::String,
2449
2450 pub expiration_time: std::option::Option<wkt::Timestamp>,
2452
2453 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2454}
2455
2456impl FetchReadWriteTokenResponse {
2457 pub fn new() -> Self {
2458 std::default::Default::default()
2459 }
2460
2461 pub fn set_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2463 self.token = v.into();
2464 self
2465 }
2466
2467 pub fn set_expiration_time<T>(mut self, v: T) -> Self
2469 where
2470 T: std::convert::Into<wkt::Timestamp>,
2471 {
2472 self.expiration_time = std::option::Option::Some(v.into());
2473 self
2474 }
2475
2476 pub fn set_or_clear_expiration_time<T>(mut self, v: std::option::Option<T>) -> Self
2478 where
2479 T: std::convert::Into<wkt::Timestamp>,
2480 {
2481 self.expiration_time = v.map(|x| x.into());
2482 self
2483 }
2484}
2485
2486impl wkt::message::Message for FetchReadWriteTokenResponse {
2487 fn typename() -> &'static str {
2488 "type.googleapis.com/google.devtools.cloudbuild.v2.FetchReadWriteTokenResponse"
2489 }
2490}
2491
2492#[derive(Clone, Default, PartialEq)]
2494#[non_exhaustive]
2495pub struct ProcessWebhookRequest {
2496 pub parent: std::string::String,
2499
2500 pub body: std::option::Option<api::model::HttpBody>,
2502
2503 pub webhook_key: std::string::String,
2506
2507 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2508}
2509
2510impl ProcessWebhookRequest {
2511 pub fn new() -> Self {
2512 std::default::Default::default()
2513 }
2514
2515 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2517 self.parent = v.into();
2518 self
2519 }
2520
2521 pub fn set_body<T>(mut self, v: T) -> Self
2523 where
2524 T: std::convert::Into<api::model::HttpBody>,
2525 {
2526 self.body = std::option::Option::Some(v.into());
2527 self
2528 }
2529
2530 pub fn set_or_clear_body<T>(mut self, v: std::option::Option<T>) -> Self
2532 where
2533 T: std::convert::Into<api::model::HttpBody>,
2534 {
2535 self.body = v.map(|x| x.into());
2536 self
2537 }
2538
2539 pub fn set_webhook_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2541 self.webhook_key = v.into();
2542 self
2543 }
2544}
2545
2546impl wkt::message::Message for ProcessWebhookRequest {
2547 fn typename() -> &'static str {
2548 "type.googleapis.com/google.devtools.cloudbuild.v2.ProcessWebhookRequest"
2549 }
2550}
2551
2552#[derive(Clone, Default, PartialEq)]
2554#[non_exhaustive]
2555pub struct FetchGitRefsRequest {
2556 pub repository: std::string::String,
2559
2560 pub ref_type: crate::model::fetch_git_refs_request::RefType,
2562
2563 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2564}
2565
2566impl FetchGitRefsRequest {
2567 pub fn new() -> Self {
2568 std::default::Default::default()
2569 }
2570
2571 pub fn set_repository<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2573 self.repository = v.into();
2574 self
2575 }
2576
2577 pub fn set_ref_type<T: std::convert::Into<crate::model::fetch_git_refs_request::RefType>>(
2579 mut self,
2580 v: T,
2581 ) -> Self {
2582 self.ref_type = v.into();
2583 self
2584 }
2585}
2586
2587impl wkt::message::Message for FetchGitRefsRequest {
2588 fn typename() -> &'static str {
2589 "type.googleapis.com/google.devtools.cloudbuild.v2.FetchGitRefsRequest"
2590 }
2591}
2592
2593pub mod fetch_git_refs_request {
2595 #[allow(unused_imports)]
2596 use super::*;
2597
2598 #[derive(Clone, Debug, PartialEq)]
2614 #[non_exhaustive]
2615 pub enum RefType {
2616 Unspecified,
2618 Tag,
2620 Branch,
2622 UnknownValue(ref_type::UnknownValue),
2627 }
2628
2629 #[doc(hidden)]
2630 pub mod ref_type {
2631 #[allow(unused_imports)]
2632 use super::*;
2633 #[derive(Clone, Debug, PartialEq)]
2634 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
2635 }
2636
2637 impl RefType {
2638 pub fn value(&self) -> std::option::Option<i32> {
2643 match self {
2644 Self::Unspecified => std::option::Option::Some(0),
2645 Self::Tag => std::option::Option::Some(1),
2646 Self::Branch => std::option::Option::Some(2),
2647 Self::UnknownValue(u) => u.0.value(),
2648 }
2649 }
2650
2651 pub fn name(&self) -> std::option::Option<&str> {
2656 match self {
2657 Self::Unspecified => std::option::Option::Some("REF_TYPE_UNSPECIFIED"),
2658 Self::Tag => std::option::Option::Some("TAG"),
2659 Self::Branch => std::option::Option::Some("BRANCH"),
2660 Self::UnknownValue(u) => u.0.name(),
2661 }
2662 }
2663 }
2664
2665 impl std::default::Default for RefType {
2666 fn default() -> Self {
2667 use std::convert::From;
2668 Self::from(0)
2669 }
2670 }
2671
2672 impl std::fmt::Display for RefType {
2673 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
2674 wkt::internal::display_enum(f, self.name(), self.value())
2675 }
2676 }
2677
2678 impl std::convert::From<i32> for RefType {
2679 fn from(value: i32) -> Self {
2680 match value {
2681 0 => Self::Unspecified,
2682 1 => Self::Tag,
2683 2 => Self::Branch,
2684 _ => Self::UnknownValue(ref_type::UnknownValue(
2685 wkt::internal::UnknownEnumValue::Integer(value),
2686 )),
2687 }
2688 }
2689 }
2690
2691 impl std::convert::From<&str> for RefType {
2692 fn from(value: &str) -> Self {
2693 use std::string::ToString;
2694 match value {
2695 "REF_TYPE_UNSPECIFIED" => Self::Unspecified,
2696 "TAG" => Self::Tag,
2697 "BRANCH" => Self::Branch,
2698 _ => Self::UnknownValue(ref_type::UnknownValue(
2699 wkt::internal::UnknownEnumValue::String(value.to_string()),
2700 )),
2701 }
2702 }
2703 }
2704
2705 impl serde::ser::Serialize for RefType {
2706 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2707 where
2708 S: serde::Serializer,
2709 {
2710 match self {
2711 Self::Unspecified => serializer.serialize_i32(0),
2712 Self::Tag => serializer.serialize_i32(1),
2713 Self::Branch => serializer.serialize_i32(2),
2714 Self::UnknownValue(u) => u.0.serialize(serializer),
2715 }
2716 }
2717 }
2718
2719 impl<'de> serde::de::Deserialize<'de> for RefType {
2720 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2721 where
2722 D: serde::Deserializer<'de>,
2723 {
2724 deserializer.deserialize_any(wkt::internal::EnumVisitor::<RefType>::new(
2725 ".google.devtools.cloudbuild.v2.FetchGitRefsRequest.RefType",
2726 ))
2727 }
2728 }
2729}
2730
2731#[derive(Clone, Default, PartialEq)]
2733#[non_exhaustive]
2734pub struct FetchGitRefsResponse {
2735 pub ref_names: std::vec::Vec<std::string::String>,
2737
2738 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2739}
2740
2741impl FetchGitRefsResponse {
2742 pub fn new() -> Self {
2743 std::default::Default::default()
2744 }
2745
2746 pub fn set_ref_names<T, V>(mut self, v: T) -> Self
2748 where
2749 T: std::iter::IntoIterator<Item = V>,
2750 V: std::convert::Into<std::string::String>,
2751 {
2752 use std::iter::Iterator;
2753 self.ref_names = v.into_iter().map(|i| i.into()).collect();
2754 self
2755 }
2756}
2757
2758impl wkt::message::Message for FetchGitRefsResponse {
2759 fn typename() -> &'static str {
2760 "type.googleapis.com/google.devtools.cloudbuild.v2.FetchGitRefsResponse"
2761 }
2762}