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 pub requested_cancellation: bool,
71
72 #[serde(skip_serializing_if = "std::string::String::is_empty")]
74 pub api_version: std::string::String,
75
76 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
77 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
78}
79
80impl OperationMetadata {
81 pub fn new() -> Self {
82 std::default::Default::default()
83 }
84
85 pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
87 mut self,
88 v: T,
89 ) -> Self {
90 self.create_time = v.into();
91 self
92 }
93
94 pub fn set_end_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
96 mut self,
97 v: T,
98 ) -> Self {
99 self.end_time = v.into();
100 self
101 }
102
103 pub fn set_target<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
105 self.target = v.into();
106 self
107 }
108
109 pub fn set_verb<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
111 self.verb = v.into();
112 self
113 }
114
115 pub fn set_status_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
117 self.status_message = v.into();
118 self
119 }
120
121 pub fn set_requested_cancellation<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
123 self.requested_cancellation = v.into();
124 self
125 }
126
127 pub fn set_api_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
129 self.api_version = v.into();
130 self
131 }
132}
133
134impl wkt::message::Message for OperationMetadata {
135 fn typename() -> &'static str {
136 "type.googleapis.com/google.devtools.cloudbuild.v2.OperationMetadata"
137 }
138}
139
140#[serde_with::serde_as]
142#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
143#[serde(default, rename_all = "camelCase")]
144#[non_exhaustive]
145pub struct RunWorkflowCustomOperationMetadata {
146 #[serde(skip_serializing_if = "std::option::Option::is_none")]
148 pub create_time: std::option::Option<wkt::Timestamp>,
149
150 #[serde(skip_serializing_if = "std::option::Option::is_none")]
152 pub end_time: std::option::Option<wkt::Timestamp>,
153
154 #[serde(skip_serializing_if = "std::string::String::is_empty")]
156 pub verb: std::string::String,
157
158 pub requested_cancellation: bool,
166
167 #[serde(skip_serializing_if = "std::string::String::is_empty")]
169 pub api_version: std::string::String,
170
171 #[serde(skip_serializing_if = "std::string::String::is_empty")]
173 pub target: std::string::String,
174
175 #[serde(skip_serializing_if = "std::string::String::is_empty")]
177 pub pipeline_run_id: std::string::String,
178
179 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
180 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
181}
182
183impl RunWorkflowCustomOperationMetadata {
184 pub fn new() -> Self {
185 std::default::Default::default()
186 }
187
188 pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
190 mut self,
191 v: T,
192 ) -> Self {
193 self.create_time = v.into();
194 self
195 }
196
197 pub fn set_end_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
199 mut self,
200 v: T,
201 ) -> Self {
202 self.end_time = v.into();
203 self
204 }
205
206 pub fn set_verb<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
208 self.verb = v.into();
209 self
210 }
211
212 pub fn set_requested_cancellation<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
214 self.requested_cancellation = v.into();
215 self
216 }
217
218 pub fn set_api_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
220 self.api_version = v.into();
221 self
222 }
223
224 pub fn set_target<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
226 self.target = v.into();
227 self
228 }
229
230 pub fn set_pipeline_run_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
232 self.pipeline_run_id = v.into();
233 self
234 }
235}
236
237impl wkt::message::Message for RunWorkflowCustomOperationMetadata {
238 fn typename() -> &'static str {
239 "type.googleapis.com/google.devtools.cloudbuild.v2.RunWorkflowCustomOperationMetadata"
240 }
241}
242
243#[serde_with::serde_as]
246#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
247#[serde(default, rename_all = "camelCase")]
248#[non_exhaustive]
249pub struct Connection {
250 #[serde(skip_serializing_if = "std::string::String::is_empty")]
253 pub name: std::string::String,
254
255 #[serde(skip_serializing_if = "std::option::Option::is_none")]
257 pub create_time: std::option::Option<wkt::Timestamp>,
258
259 #[serde(skip_serializing_if = "std::option::Option::is_none")]
261 pub update_time: std::option::Option<wkt::Timestamp>,
262
263 #[serde(skip_serializing_if = "std::option::Option::is_none")]
265 pub installation_state: std::option::Option<crate::model::InstallationState>,
266
267 pub disabled: bool,
271
272 pub reconciling: bool,
275
276 #[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
278 pub annotations: std::collections::HashMap<std::string::String, std::string::String>,
279
280 #[serde(skip_serializing_if = "std::string::String::is_empty")]
284 pub etag: std::string::String,
285
286 #[serde(flatten, skip_serializing_if = "std::option::Option::is_none")]
288 pub connection_config: std::option::Option<crate::model::connection::ConnectionConfig>,
289
290 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
291 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
292}
293
294impl Connection {
295 pub fn new() -> Self {
296 std::default::Default::default()
297 }
298
299 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
301 self.name = v.into();
302 self
303 }
304
305 pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
307 mut self,
308 v: T,
309 ) -> Self {
310 self.create_time = v.into();
311 self
312 }
313
314 pub fn set_update_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
316 mut self,
317 v: T,
318 ) -> Self {
319 self.update_time = v.into();
320 self
321 }
322
323 pub fn set_installation_state<
325 T: std::convert::Into<std::option::Option<crate::model::InstallationState>>,
326 >(
327 mut self,
328 v: T,
329 ) -> Self {
330 self.installation_state = v.into();
331 self
332 }
333
334 pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
336 self.disabled = v.into();
337 self
338 }
339
340 pub fn set_reconciling<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
342 self.reconciling = v.into();
343 self
344 }
345
346 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
348 self.etag = v.into();
349 self
350 }
351
352 pub fn set_annotations<T, K, V>(mut self, v: T) -> Self
354 where
355 T: std::iter::IntoIterator<Item = (K, V)>,
356 K: std::convert::Into<std::string::String>,
357 V: std::convert::Into<std::string::String>,
358 {
359 use std::iter::Iterator;
360 self.annotations = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
361 self
362 }
363
364 pub fn set_connection_config<
369 T: std::convert::Into<std::option::Option<crate::model::connection::ConnectionConfig>>,
370 >(
371 mut self,
372 v: T,
373 ) -> Self {
374 self.connection_config = v.into();
375 self
376 }
377
378 pub fn github_config(
382 &self,
383 ) -> std::option::Option<&std::boxed::Box<crate::model::GitHubConfig>> {
384 #[allow(unreachable_patterns)]
385 self.connection_config.as_ref().and_then(|v| match v {
386 crate::model::connection::ConnectionConfig::GithubConfig(v) => {
387 std::option::Option::Some(v)
388 }
389 _ => std::option::Option::None,
390 })
391 }
392
393 pub fn github_enterprise_config(
397 &self,
398 ) -> std::option::Option<&std::boxed::Box<crate::model::GitHubEnterpriseConfig>> {
399 #[allow(unreachable_patterns)]
400 self.connection_config.as_ref().and_then(|v| match v {
401 crate::model::connection::ConnectionConfig::GithubEnterpriseConfig(v) => {
402 std::option::Option::Some(v)
403 }
404 _ => std::option::Option::None,
405 })
406 }
407
408 pub fn gitlab_config(
412 &self,
413 ) -> std::option::Option<&std::boxed::Box<crate::model::GitLabConfig>> {
414 #[allow(unreachable_patterns)]
415 self.connection_config.as_ref().and_then(|v| match v {
416 crate::model::connection::ConnectionConfig::GitlabConfig(v) => {
417 std::option::Option::Some(v)
418 }
419 _ => std::option::Option::None,
420 })
421 }
422
423 pub fn bitbucket_data_center_config(
427 &self,
428 ) -> std::option::Option<&std::boxed::Box<crate::model::BitbucketDataCenterConfig>> {
429 #[allow(unreachable_patterns)]
430 self.connection_config.as_ref().and_then(|v| match v {
431 crate::model::connection::ConnectionConfig::BitbucketDataCenterConfig(v) => {
432 std::option::Option::Some(v)
433 }
434 _ => std::option::Option::None,
435 })
436 }
437
438 pub fn bitbucket_cloud_config(
442 &self,
443 ) -> std::option::Option<&std::boxed::Box<crate::model::BitbucketCloudConfig>> {
444 #[allow(unreachable_patterns)]
445 self.connection_config.as_ref().and_then(|v| match v {
446 crate::model::connection::ConnectionConfig::BitbucketCloudConfig(v) => {
447 std::option::Option::Some(v)
448 }
449 _ => std::option::Option::None,
450 })
451 }
452
453 pub fn set_github_config<T: std::convert::Into<std::boxed::Box<crate::model::GitHubConfig>>>(
459 mut self,
460 v: T,
461 ) -> Self {
462 self.connection_config = std::option::Option::Some(
463 crate::model::connection::ConnectionConfig::GithubConfig(v.into()),
464 );
465 self
466 }
467
468 pub fn set_github_enterprise_config<
474 T: std::convert::Into<std::boxed::Box<crate::model::GitHubEnterpriseConfig>>,
475 >(
476 mut self,
477 v: T,
478 ) -> Self {
479 self.connection_config = std::option::Option::Some(
480 crate::model::connection::ConnectionConfig::GithubEnterpriseConfig(v.into()),
481 );
482 self
483 }
484
485 pub fn set_gitlab_config<T: std::convert::Into<std::boxed::Box<crate::model::GitLabConfig>>>(
491 mut self,
492 v: T,
493 ) -> Self {
494 self.connection_config = std::option::Option::Some(
495 crate::model::connection::ConnectionConfig::GitlabConfig(v.into()),
496 );
497 self
498 }
499
500 pub fn set_bitbucket_data_center_config<
506 T: std::convert::Into<std::boxed::Box<crate::model::BitbucketDataCenterConfig>>,
507 >(
508 mut self,
509 v: T,
510 ) -> Self {
511 self.connection_config = std::option::Option::Some(
512 crate::model::connection::ConnectionConfig::BitbucketDataCenterConfig(v.into()),
513 );
514 self
515 }
516
517 pub fn set_bitbucket_cloud_config<
523 T: std::convert::Into<std::boxed::Box<crate::model::BitbucketCloudConfig>>,
524 >(
525 mut self,
526 v: T,
527 ) -> Self {
528 self.connection_config = std::option::Option::Some(
529 crate::model::connection::ConnectionConfig::BitbucketCloudConfig(v.into()),
530 );
531 self
532 }
533}
534
535impl wkt::message::Message for Connection {
536 fn typename() -> &'static str {
537 "type.googleapis.com/google.devtools.cloudbuild.v2.Connection"
538 }
539}
540
541pub mod connection {
543 #[allow(unused_imports)]
544 use super::*;
545
546 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
548 #[serde(rename_all = "camelCase")]
549 #[non_exhaustive]
550 pub enum ConnectionConfig {
551 GithubConfig(std::boxed::Box<crate::model::GitHubConfig>),
553 GithubEnterpriseConfig(std::boxed::Box<crate::model::GitHubEnterpriseConfig>),
555 GitlabConfig(std::boxed::Box<crate::model::GitLabConfig>),
558 BitbucketDataCenterConfig(std::boxed::Box<crate::model::BitbucketDataCenterConfig>),
560 BitbucketCloudConfig(std::boxed::Box<crate::model::BitbucketCloudConfig>),
562 }
563}
564
565#[serde_with::serde_as]
569#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
570#[serde(default, rename_all = "camelCase")]
571#[non_exhaustive]
572pub struct InstallationState {
573 pub stage: crate::model::installation_state::Stage,
575
576 #[serde(skip_serializing_if = "std::string::String::is_empty")]
579 pub message: std::string::String,
580
581 #[serde(skip_serializing_if = "std::string::String::is_empty")]
584 pub action_uri: std::string::String,
585
586 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
587 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
588}
589
590impl InstallationState {
591 pub fn new() -> Self {
592 std::default::Default::default()
593 }
594
595 pub fn set_stage<T: std::convert::Into<crate::model::installation_state::Stage>>(
597 mut self,
598 v: T,
599 ) -> Self {
600 self.stage = v.into();
601 self
602 }
603
604 pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
606 self.message = v.into();
607 self
608 }
609
610 pub fn set_action_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
612 self.action_uri = v.into();
613 self
614 }
615}
616
617impl wkt::message::Message for InstallationState {
618 fn typename() -> &'static str {
619 "type.googleapis.com/google.devtools.cloudbuild.v2.InstallationState"
620 }
621}
622
623pub mod installation_state {
625 #[allow(unused_imports)]
626 use super::*;
627
628 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
630 pub struct Stage(i32);
631
632 impl Stage {
633 pub const STAGE_UNSPECIFIED: Stage = Stage::new(0);
635
636 pub const PENDING_CREATE_APP: Stage = Stage::new(1);
639
640 pub const PENDING_USER_OAUTH: Stage = Stage::new(2);
642
643 pub const PENDING_INSTALL_APP: Stage = Stage::new(3);
645
646 pub const COMPLETE: Stage = Stage::new(10);
648
649 pub(crate) const fn new(value: i32) -> Self {
651 Self(value)
652 }
653
654 pub fn value(&self) -> i32 {
656 self.0
657 }
658
659 pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
661 match self.0 {
662 0 => std::borrow::Cow::Borrowed("STAGE_UNSPECIFIED"),
663 1 => std::borrow::Cow::Borrowed("PENDING_CREATE_APP"),
664 2 => std::borrow::Cow::Borrowed("PENDING_USER_OAUTH"),
665 3 => std::borrow::Cow::Borrowed("PENDING_INSTALL_APP"),
666 10 => std::borrow::Cow::Borrowed("COMPLETE"),
667 _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
668 }
669 }
670
671 pub fn from_str_name(name: &str) -> std::option::Option<Self> {
673 match name {
674 "STAGE_UNSPECIFIED" => std::option::Option::Some(Self::STAGE_UNSPECIFIED),
675 "PENDING_CREATE_APP" => std::option::Option::Some(Self::PENDING_CREATE_APP),
676 "PENDING_USER_OAUTH" => std::option::Option::Some(Self::PENDING_USER_OAUTH),
677 "PENDING_INSTALL_APP" => std::option::Option::Some(Self::PENDING_INSTALL_APP),
678 "COMPLETE" => std::option::Option::Some(Self::COMPLETE),
679 _ => std::option::Option::None,
680 }
681 }
682 }
683
684 impl std::convert::From<i32> for Stage {
685 fn from(value: i32) -> Self {
686 Self::new(value)
687 }
688 }
689
690 impl std::default::Default for Stage {
691 fn default() -> Self {
692 Self::new(0)
693 }
694 }
695}
696
697#[serde_with::serde_as]
699#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
700#[serde(default, rename_all = "camelCase")]
701#[non_exhaustive]
702pub struct FetchLinkableRepositoriesRequest {
703 #[serde(skip_serializing_if = "std::string::String::is_empty")]
706 pub connection: std::string::String,
707
708 pub page_size: i32,
710
711 #[serde(skip_serializing_if = "std::string::String::is_empty")]
713 pub page_token: std::string::String,
714
715 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
716 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
717}
718
719impl FetchLinkableRepositoriesRequest {
720 pub fn new() -> Self {
721 std::default::Default::default()
722 }
723
724 pub fn set_connection<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
726 self.connection = v.into();
727 self
728 }
729
730 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
732 self.page_size = v.into();
733 self
734 }
735
736 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
738 self.page_token = v.into();
739 self
740 }
741}
742
743impl wkt::message::Message for FetchLinkableRepositoriesRequest {
744 fn typename() -> &'static str {
745 "type.googleapis.com/google.devtools.cloudbuild.v2.FetchLinkableRepositoriesRequest"
746 }
747}
748
749#[serde_with::serde_as]
751#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
752#[serde(default, rename_all = "camelCase")]
753#[non_exhaustive]
754pub struct FetchLinkableRepositoriesResponse {
755 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
757 pub repositories: std::vec::Vec<crate::model::Repository>,
758
759 #[serde(skip_serializing_if = "std::string::String::is_empty")]
761 pub next_page_token: std::string::String,
762
763 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
764 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
765}
766
767impl FetchLinkableRepositoriesResponse {
768 pub fn new() -> Self {
769 std::default::Default::default()
770 }
771
772 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
774 self.next_page_token = v.into();
775 self
776 }
777
778 pub fn set_repositories<T, V>(mut self, v: T) -> Self
780 where
781 T: std::iter::IntoIterator<Item = V>,
782 V: std::convert::Into<crate::model::Repository>,
783 {
784 use std::iter::Iterator;
785 self.repositories = v.into_iter().map(|i| i.into()).collect();
786 self
787 }
788}
789
790impl wkt::message::Message for FetchLinkableRepositoriesResponse {
791 fn typename() -> &'static str {
792 "type.googleapis.com/google.devtools.cloudbuild.v2.FetchLinkableRepositoriesResponse"
793 }
794}
795
796#[doc(hidden)]
797impl gax::paginator::internal::PageableResponse for FetchLinkableRepositoriesResponse {
798 type PageItem = crate::model::Repository;
799
800 fn items(self) -> std::vec::Vec<Self::PageItem> {
801 self.repositories
802 }
803
804 fn next_page_token(&self) -> std::string::String {
805 use std::clone::Clone;
806 self.next_page_token.clone()
807 }
808}
809
810#[serde_with::serde_as]
812#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
813#[serde(default, rename_all = "camelCase")]
814#[non_exhaustive]
815pub struct GitHubConfig {
816 #[serde(skip_serializing_if = "std::option::Option::is_none")]
820 pub authorizer_credential: std::option::Option<crate::model::OAuthCredential>,
821
822 #[serde_as(as = "serde_with::DisplayFromStr")]
824 pub app_installation_id: i64,
825
826 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
827 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
828}
829
830impl GitHubConfig {
831 pub fn new() -> Self {
832 std::default::Default::default()
833 }
834
835 pub fn set_authorizer_credential<
837 T: std::convert::Into<std::option::Option<crate::model::OAuthCredential>>,
838 >(
839 mut self,
840 v: T,
841 ) -> Self {
842 self.authorizer_credential = v.into();
843 self
844 }
845
846 pub fn set_app_installation_id<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
848 self.app_installation_id = v.into();
849 self
850 }
851}
852
853impl wkt::message::Message for GitHubConfig {
854 fn typename() -> &'static str {
855 "type.googleapis.com/google.devtools.cloudbuild.v2.GitHubConfig"
856 }
857}
858
859#[serde_with::serde_as]
861#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
862#[serde(default, rename_all = "camelCase")]
863#[non_exhaustive]
864pub struct GitHubEnterpriseConfig {
865 #[serde(skip_serializing_if = "std::string::String::is_empty")]
867 pub host_uri: std::string::String,
868
869 #[serde(skip_serializing_if = "std::string::String::is_empty")]
871 pub api_key: std::string::String,
872
873 #[serde_as(as = "serde_with::DisplayFromStr")]
875 pub app_id: i64,
876
877 #[serde(skip_serializing_if = "std::string::String::is_empty")]
879 pub app_slug: std::string::String,
880
881 #[serde(skip_serializing_if = "std::string::String::is_empty")]
884 pub private_key_secret_version: std::string::String,
885
886 #[serde(skip_serializing_if = "std::string::String::is_empty")]
889 pub webhook_secret_secret_version: std::string::String,
890
891 #[serde_as(as = "serde_with::DisplayFromStr")]
893 pub app_installation_id: i64,
894
895 #[serde(skip_serializing_if = "std::option::Option::is_none")]
901 pub service_directory_config: std::option::Option<crate::model::ServiceDirectoryConfig>,
902
903 #[serde(skip_serializing_if = "std::string::String::is_empty")]
905 pub ssl_ca: std::string::String,
906
907 #[serde(skip_serializing_if = "std::string::String::is_empty")]
909 pub server_version: std::string::String,
910
911 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
912 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
913}
914
915impl GitHubEnterpriseConfig {
916 pub fn new() -> Self {
917 std::default::Default::default()
918 }
919
920 pub fn set_host_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
922 self.host_uri = v.into();
923 self
924 }
925
926 pub fn set_api_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
928 self.api_key = v.into();
929 self
930 }
931
932 pub fn set_app_id<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
934 self.app_id = v.into();
935 self
936 }
937
938 pub fn set_app_slug<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
940 self.app_slug = v.into();
941 self
942 }
943
944 pub fn set_private_key_secret_version<T: std::convert::Into<std::string::String>>(
946 mut self,
947 v: T,
948 ) -> Self {
949 self.private_key_secret_version = v.into();
950 self
951 }
952
953 pub fn set_webhook_secret_secret_version<T: std::convert::Into<std::string::String>>(
955 mut self,
956 v: T,
957 ) -> Self {
958 self.webhook_secret_secret_version = v.into();
959 self
960 }
961
962 pub fn set_app_installation_id<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
964 self.app_installation_id = v.into();
965 self
966 }
967
968 pub fn set_service_directory_config<
970 T: std::convert::Into<std::option::Option<crate::model::ServiceDirectoryConfig>>,
971 >(
972 mut self,
973 v: T,
974 ) -> Self {
975 self.service_directory_config = v.into();
976 self
977 }
978
979 pub fn set_ssl_ca<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
981 self.ssl_ca = v.into();
982 self
983 }
984
985 pub fn set_server_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
987 self.server_version = v.into();
988 self
989 }
990}
991
992impl wkt::message::Message for GitHubEnterpriseConfig {
993 fn typename() -> &'static str {
994 "type.googleapis.com/google.devtools.cloudbuild.v2.GitHubEnterpriseConfig"
995 }
996}
997
998#[serde_with::serde_as]
1001#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1002#[serde(default, rename_all = "camelCase")]
1003#[non_exhaustive]
1004pub struct GitLabConfig {
1005 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1008 pub host_uri: std::string::String,
1009
1010 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1014 pub webhook_secret_secret_version: std::string::String,
1015
1016 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1019 pub read_authorizer_credential: std::option::Option<crate::model::UserCredential>,
1020
1021 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1023 pub authorizer_credential: std::option::Option<crate::model::UserCredential>,
1024
1025 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1031 pub service_directory_config: std::option::Option<crate::model::ServiceDirectoryConfig>,
1032
1033 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1035 pub ssl_ca: std::string::String,
1036
1037 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1040 pub server_version: std::string::String,
1041
1042 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1043 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1044}
1045
1046impl GitLabConfig {
1047 pub fn new() -> Self {
1048 std::default::Default::default()
1049 }
1050
1051 pub fn set_host_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1053 self.host_uri = v.into();
1054 self
1055 }
1056
1057 pub fn set_webhook_secret_secret_version<T: std::convert::Into<std::string::String>>(
1059 mut self,
1060 v: T,
1061 ) -> Self {
1062 self.webhook_secret_secret_version = v.into();
1063 self
1064 }
1065
1066 pub fn set_read_authorizer_credential<
1068 T: std::convert::Into<std::option::Option<crate::model::UserCredential>>,
1069 >(
1070 mut self,
1071 v: T,
1072 ) -> Self {
1073 self.read_authorizer_credential = v.into();
1074 self
1075 }
1076
1077 pub fn set_authorizer_credential<
1079 T: std::convert::Into<std::option::Option<crate::model::UserCredential>>,
1080 >(
1081 mut self,
1082 v: T,
1083 ) -> Self {
1084 self.authorizer_credential = v.into();
1085 self
1086 }
1087
1088 pub fn set_service_directory_config<
1090 T: std::convert::Into<std::option::Option<crate::model::ServiceDirectoryConfig>>,
1091 >(
1092 mut self,
1093 v: T,
1094 ) -> Self {
1095 self.service_directory_config = v.into();
1096 self
1097 }
1098
1099 pub fn set_ssl_ca<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1101 self.ssl_ca = v.into();
1102 self
1103 }
1104
1105 pub fn set_server_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1107 self.server_version = v.into();
1108 self
1109 }
1110}
1111
1112impl wkt::message::Message for GitLabConfig {
1113 fn typename() -> &'static str {
1114 "type.googleapis.com/google.devtools.cloudbuild.v2.GitLabConfig"
1115 }
1116}
1117
1118#[serde_with::serde_as]
1120#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1121#[serde(default, rename_all = "camelCase")]
1122#[non_exhaustive]
1123pub struct BitbucketDataCenterConfig {
1124 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1127 pub host_uri: std::string::String,
1128
1129 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1133 pub webhook_secret_secret_version: std::string::String,
1134
1135 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1137 pub read_authorizer_credential: std::option::Option<crate::model::UserCredential>,
1138
1139 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1141 pub authorizer_credential: std::option::Option<crate::model::UserCredential>,
1142
1143 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1149 pub service_directory_config: std::option::Option<crate::model::ServiceDirectoryConfig>,
1150
1151 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1153 pub ssl_ca: std::string::String,
1154
1155 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1158 pub server_version: std::string::String,
1159
1160 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1161 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1162}
1163
1164impl BitbucketDataCenterConfig {
1165 pub fn new() -> Self {
1166 std::default::Default::default()
1167 }
1168
1169 pub fn set_host_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1171 self.host_uri = v.into();
1172 self
1173 }
1174
1175 pub fn set_webhook_secret_secret_version<T: std::convert::Into<std::string::String>>(
1177 mut self,
1178 v: T,
1179 ) -> Self {
1180 self.webhook_secret_secret_version = v.into();
1181 self
1182 }
1183
1184 pub fn set_read_authorizer_credential<
1186 T: std::convert::Into<std::option::Option<crate::model::UserCredential>>,
1187 >(
1188 mut self,
1189 v: T,
1190 ) -> Self {
1191 self.read_authorizer_credential = v.into();
1192 self
1193 }
1194
1195 pub fn set_authorizer_credential<
1197 T: std::convert::Into<std::option::Option<crate::model::UserCredential>>,
1198 >(
1199 mut self,
1200 v: T,
1201 ) -> Self {
1202 self.authorizer_credential = v.into();
1203 self
1204 }
1205
1206 pub fn set_service_directory_config<
1208 T: std::convert::Into<std::option::Option<crate::model::ServiceDirectoryConfig>>,
1209 >(
1210 mut self,
1211 v: T,
1212 ) -> Self {
1213 self.service_directory_config = v.into();
1214 self
1215 }
1216
1217 pub fn set_ssl_ca<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1219 self.ssl_ca = v.into();
1220 self
1221 }
1222
1223 pub fn set_server_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1225 self.server_version = v.into();
1226 self
1227 }
1228}
1229
1230impl wkt::message::Message for BitbucketDataCenterConfig {
1231 fn typename() -> &'static str {
1232 "type.googleapis.com/google.devtools.cloudbuild.v2.BitbucketDataCenterConfig"
1233 }
1234}
1235
1236#[serde_with::serde_as]
1238#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1239#[serde(default, rename_all = "camelCase")]
1240#[non_exhaustive]
1241pub struct BitbucketCloudConfig {
1242 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1245 pub workspace: std::string::String,
1246
1247 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1250 pub webhook_secret_secret_version: std::string::String,
1251
1252 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1256 pub read_authorizer_credential: std::option::Option<crate::model::UserCredential>,
1257
1258 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1263 pub authorizer_credential: std::option::Option<crate::model::UserCredential>,
1264
1265 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1266 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1267}
1268
1269impl BitbucketCloudConfig {
1270 pub fn new() -> Self {
1271 std::default::Default::default()
1272 }
1273
1274 pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1276 self.workspace = v.into();
1277 self
1278 }
1279
1280 pub fn set_webhook_secret_secret_version<T: std::convert::Into<std::string::String>>(
1282 mut self,
1283 v: T,
1284 ) -> Self {
1285 self.webhook_secret_secret_version = v.into();
1286 self
1287 }
1288
1289 pub fn set_read_authorizer_credential<
1291 T: std::convert::Into<std::option::Option<crate::model::UserCredential>>,
1292 >(
1293 mut self,
1294 v: T,
1295 ) -> Self {
1296 self.read_authorizer_credential = v.into();
1297 self
1298 }
1299
1300 pub fn set_authorizer_credential<
1302 T: std::convert::Into<std::option::Option<crate::model::UserCredential>>,
1303 >(
1304 mut self,
1305 v: T,
1306 ) -> Self {
1307 self.authorizer_credential = v.into();
1308 self
1309 }
1310}
1311
1312impl wkt::message::Message for BitbucketCloudConfig {
1313 fn typename() -> &'static str {
1314 "type.googleapis.com/google.devtools.cloudbuild.v2.BitbucketCloudConfig"
1315 }
1316}
1317
1318#[serde_with::serde_as]
1321#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1322#[serde(default, rename_all = "camelCase")]
1323#[non_exhaustive]
1324pub struct ServiceDirectoryConfig {
1325 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1329 pub service: std::string::String,
1330
1331 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1332 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1333}
1334
1335impl ServiceDirectoryConfig {
1336 pub fn new() -> Self {
1337 std::default::Default::default()
1338 }
1339
1340 pub fn set_service<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1342 self.service = v.into();
1343 self
1344 }
1345}
1346
1347impl wkt::message::Message for ServiceDirectoryConfig {
1348 fn typename() -> &'static str {
1349 "type.googleapis.com/google.devtools.cloudbuild.v2.ServiceDirectoryConfig"
1350 }
1351}
1352
1353#[serde_with::serde_as]
1355#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1356#[serde(default, rename_all = "camelCase")]
1357#[non_exhaustive]
1358pub struct Repository {
1359 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1362 pub name: std::string::String,
1363
1364 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1366 pub remote_uri: std::string::String,
1367
1368 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1370 pub create_time: std::option::Option<wkt::Timestamp>,
1371
1372 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1374 pub update_time: std::option::Option<wkt::Timestamp>,
1375
1376 #[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
1378 pub annotations: std::collections::HashMap<std::string::String, std::string::String>,
1379
1380 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1384 pub etag: std::string::String,
1385
1386 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1388 pub webhook_id: std::string::String,
1389
1390 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1391 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1392}
1393
1394impl Repository {
1395 pub fn new() -> Self {
1396 std::default::Default::default()
1397 }
1398
1399 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1401 self.name = v.into();
1402 self
1403 }
1404
1405 pub fn set_remote_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1407 self.remote_uri = v.into();
1408 self
1409 }
1410
1411 pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
1413 mut self,
1414 v: T,
1415 ) -> Self {
1416 self.create_time = v.into();
1417 self
1418 }
1419
1420 pub fn set_update_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
1422 mut self,
1423 v: T,
1424 ) -> Self {
1425 self.update_time = v.into();
1426 self
1427 }
1428
1429 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1431 self.etag = v.into();
1432 self
1433 }
1434
1435 pub fn set_webhook_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1437 self.webhook_id = v.into();
1438 self
1439 }
1440
1441 pub fn set_annotations<T, K, V>(mut self, v: T) -> Self
1443 where
1444 T: std::iter::IntoIterator<Item = (K, V)>,
1445 K: std::convert::Into<std::string::String>,
1446 V: std::convert::Into<std::string::String>,
1447 {
1448 use std::iter::Iterator;
1449 self.annotations = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
1450 self
1451 }
1452}
1453
1454impl wkt::message::Message for Repository {
1455 fn typename() -> &'static str {
1456 "type.googleapis.com/google.devtools.cloudbuild.v2.Repository"
1457 }
1458}
1459
1460#[serde_with::serde_as]
1463#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1464#[serde(default, rename_all = "camelCase")]
1465#[non_exhaustive]
1466pub struct OAuthCredential {
1467 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1470 pub oauth_token_secret_version: std::string::String,
1471
1472 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1474 pub username: std::string::String,
1475
1476 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1477 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1478}
1479
1480impl OAuthCredential {
1481 pub fn new() -> Self {
1482 std::default::Default::default()
1483 }
1484
1485 pub fn set_oauth_token_secret_version<T: std::convert::Into<std::string::String>>(
1487 mut self,
1488 v: T,
1489 ) -> Self {
1490 self.oauth_token_secret_version = v.into();
1491 self
1492 }
1493
1494 pub fn set_username<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1496 self.username = v.into();
1497 self
1498 }
1499}
1500
1501impl wkt::message::Message for OAuthCredential {
1502 fn typename() -> &'static str {
1503 "type.googleapis.com/google.devtools.cloudbuild.v2.OAuthCredential"
1504 }
1505}
1506
1507#[serde_with::serde_as]
1510#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1511#[serde(default, rename_all = "camelCase")]
1512#[non_exhaustive]
1513pub struct UserCredential {
1514 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1518 pub user_token_secret_version: std::string::String,
1519
1520 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1522 pub username: std::string::String,
1523
1524 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1525 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1526}
1527
1528impl UserCredential {
1529 pub fn new() -> Self {
1530 std::default::Default::default()
1531 }
1532
1533 pub fn set_user_token_secret_version<T: std::convert::Into<std::string::String>>(
1535 mut self,
1536 v: T,
1537 ) -> Self {
1538 self.user_token_secret_version = v.into();
1539 self
1540 }
1541
1542 pub fn set_username<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1544 self.username = v.into();
1545 self
1546 }
1547}
1548
1549impl wkt::message::Message for UserCredential {
1550 fn typename() -> &'static str {
1551 "type.googleapis.com/google.devtools.cloudbuild.v2.UserCredential"
1552 }
1553}
1554
1555#[serde_with::serde_as]
1557#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1558#[serde(default, rename_all = "camelCase")]
1559#[non_exhaustive]
1560pub struct CreateConnectionRequest {
1561 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1564 pub parent: std::string::String,
1565
1566 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1568 pub connection: std::option::Option<crate::model::Connection>,
1569
1570 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1575 pub connection_id: std::string::String,
1576
1577 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1578 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1579}
1580
1581impl CreateConnectionRequest {
1582 pub fn new() -> Self {
1583 std::default::Default::default()
1584 }
1585
1586 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1588 self.parent = v.into();
1589 self
1590 }
1591
1592 pub fn set_connection<T: std::convert::Into<std::option::Option<crate::model::Connection>>>(
1594 mut self,
1595 v: T,
1596 ) -> Self {
1597 self.connection = v.into();
1598 self
1599 }
1600
1601 pub fn set_connection_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1603 self.connection_id = v.into();
1604 self
1605 }
1606}
1607
1608impl wkt::message::Message for CreateConnectionRequest {
1609 fn typename() -> &'static str {
1610 "type.googleapis.com/google.devtools.cloudbuild.v2.CreateConnectionRequest"
1611 }
1612}
1613
1614#[serde_with::serde_as]
1616#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1617#[serde(default, rename_all = "camelCase")]
1618#[non_exhaustive]
1619pub struct GetConnectionRequest {
1620 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1623 pub name: std::string::String,
1624
1625 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1626 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1627}
1628
1629impl GetConnectionRequest {
1630 pub fn new() -> Self {
1631 std::default::Default::default()
1632 }
1633
1634 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1636 self.name = v.into();
1637 self
1638 }
1639}
1640
1641impl wkt::message::Message for GetConnectionRequest {
1642 fn typename() -> &'static str {
1643 "type.googleapis.com/google.devtools.cloudbuild.v2.GetConnectionRequest"
1644 }
1645}
1646
1647#[serde_with::serde_as]
1649#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1650#[serde(default, rename_all = "camelCase")]
1651#[non_exhaustive]
1652pub struct ListConnectionsRequest {
1653 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1656 pub parent: std::string::String,
1657
1658 pub page_size: i32,
1660
1661 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1663 pub page_token: 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 ListConnectionsRequest {
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_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1682 self.page_size = v.into();
1683 self
1684 }
1685
1686 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1688 self.page_token = v.into();
1689 self
1690 }
1691}
1692
1693impl wkt::message::Message for ListConnectionsRequest {
1694 fn typename() -> &'static str {
1695 "type.googleapis.com/google.devtools.cloudbuild.v2.ListConnectionsRequest"
1696 }
1697}
1698
1699#[serde_with::serde_as]
1701#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1702#[serde(default, rename_all = "camelCase")]
1703#[non_exhaustive]
1704pub struct ListConnectionsResponse {
1705 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
1707 pub connections: std::vec::Vec<crate::model::Connection>,
1708
1709 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1711 pub next_page_token: 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 ListConnectionsResponse {
1718 pub fn new() -> Self {
1719 std::default::Default::default()
1720 }
1721
1722 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1724 self.next_page_token = v.into();
1725 self
1726 }
1727
1728 pub fn set_connections<T, V>(mut self, v: T) -> Self
1730 where
1731 T: std::iter::IntoIterator<Item = V>,
1732 V: std::convert::Into<crate::model::Connection>,
1733 {
1734 use std::iter::Iterator;
1735 self.connections = v.into_iter().map(|i| i.into()).collect();
1736 self
1737 }
1738}
1739
1740impl wkt::message::Message for ListConnectionsResponse {
1741 fn typename() -> &'static str {
1742 "type.googleapis.com/google.devtools.cloudbuild.v2.ListConnectionsResponse"
1743 }
1744}
1745
1746#[doc(hidden)]
1747impl gax::paginator::internal::PageableResponse for ListConnectionsResponse {
1748 type PageItem = crate::model::Connection;
1749
1750 fn items(self) -> std::vec::Vec<Self::PageItem> {
1751 self.connections
1752 }
1753
1754 fn next_page_token(&self) -> std::string::String {
1755 use std::clone::Clone;
1756 self.next_page_token.clone()
1757 }
1758}
1759
1760#[serde_with::serde_as]
1762#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1763#[serde(default, rename_all = "camelCase")]
1764#[non_exhaustive]
1765pub struct UpdateConnectionRequest {
1766 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1768 pub connection: std::option::Option<crate::model::Connection>,
1769
1770 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1772 pub update_mask: std::option::Option<wkt::FieldMask>,
1773
1774 pub allow_missing: bool,
1780
1781 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1785 pub etag: std::string::String,
1786
1787 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1788 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1789}
1790
1791impl UpdateConnectionRequest {
1792 pub fn new() -> Self {
1793 std::default::Default::default()
1794 }
1795
1796 pub fn set_connection<T: std::convert::Into<std::option::Option<crate::model::Connection>>>(
1798 mut self,
1799 v: T,
1800 ) -> Self {
1801 self.connection = v.into();
1802 self
1803 }
1804
1805 pub fn set_update_mask<T: std::convert::Into<std::option::Option<wkt::FieldMask>>>(
1807 mut self,
1808 v: T,
1809 ) -> Self {
1810 self.update_mask = v.into();
1811 self
1812 }
1813
1814 pub fn set_allow_missing<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1816 self.allow_missing = v.into();
1817 self
1818 }
1819
1820 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1822 self.etag = v.into();
1823 self
1824 }
1825}
1826
1827impl wkt::message::Message for UpdateConnectionRequest {
1828 fn typename() -> &'static str {
1829 "type.googleapis.com/google.devtools.cloudbuild.v2.UpdateConnectionRequest"
1830 }
1831}
1832
1833#[serde_with::serde_as]
1835#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1836#[serde(default, rename_all = "camelCase")]
1837#[non_exhaustive]
1838pub struct DeleteConnectionRequest {
1839 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1842 pub name: std::string::String,
1843
1844 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1848 pub etag: std::string::String,
1849
1850 pub validate_only: bool,
1852
1853 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1854 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1855}
1856
1857impl DeleteConnectionRequest {
1858 pub fn new() -> Self {
1859 std::default::Default::default()
1860 }
1861
1862 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1864 self.name = v.into();
1865 self
1866 }
1867
1868 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1870 self.etag = v.into();
1871 self
1872 }
1873
1874 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1876 self.validate_only = v.into();
1877 self
1878 }
1879}
1880
1881impl wkt::message::Message for DeleteConnectionRequest {
1882 fn typename() -> &'static str {
1883 "type.googleapis.com/google.devtools.cloudbuild.v2.DeleteConnectionRequest"
1884 }
1885}
1886
1887#[serde_with::serde_as]
1889#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1890#[serde(default, rename_all = "camelCase")]
1891#[non_exhaustive]
1892pub struct CreateRepositoryRequest {
1893 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1897 pub parent: std::string::String,
1898
1899 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1901 pub repository: std::option::Option<crate::model::Repository>,
1902
1903 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1908 pub repository_id: std::string::String,
1909
1910 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1911 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1912}
1913
1914impl CreateRepositoryRequest {
1915 pub fn new() -> Self {
1916 std::default::Default::default()
1917 }
1918
1919 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1921 self.parent = v.into();
1922 self
1923 }
1924
1925 pub fn set_repository<T: std::convert::Into<std::option::Option<crate::model::Repository>>>(
1927 mut self,
1928 v: T,
1929 ) -> Self {
1930 self.repository = v.into();
1931 self
1932 }
1933
1934 pub fn set_repository_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1936 self.repository_id = v.into();
1937 self
1938 }
1939}
1940
1941impl wkt::message::Message for CreateRepositoryRequest {
1942 fn typename() -> &'static str {
1943 "type.googleapis.com/google.devtools.cloudbuild.v2.CreateRepositoryRequest"
1944 }
1945}
1946
1947#[serde_with::serde_as]
1949#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1950#[serde(default, rename_all = "camelCase")]
1951#[non_exhaustive]
1952pub struct BatchCreateRepositoriesRequest {
1953 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1958 pub parent: std::string::String,
1959
1960 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
1962 pub requests: std::vec::Vec<crate::model::CreateRepositoryRequest>,
1963
1964 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1965 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1966}
1967
1968impl BatchCreateRepositoriesRequest {
1969 pub fn new() -> Self {
1970 std::default::Default::default()
1971 }
1972
1973 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1975 self.parent = v.into();
1976 self
1977 }
1978
1979 pub fn set_requests<T, V>(mut self, v: T) -> Self
1981 where
1982 T: std::iter::IntoIterator<Item = V>,
1983 V: std::convert::Into<crate::model::CreateRepositoryRequest>,
1984 {
1985 use std::iter::Iterator;
1986 self.requests = v.into_iter().map(|i| i.into()).collect();
1987 self
1988 }
1989}
1990
1991impl wkt::message::Message for BatchCreateRepositoriesRequest {
1992 fn typename() -> &'static str {
1993 "type.googleapis.com/google.devtools.cloudbuild.v2.BatchCreateRepositoriesRequest"
1994 }
1995}
1996
1997#[serde_with::serde_as]
1999#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2000#[serde(default, rename_all = "camelCase")]
2001#[non_exhaustive]
2002pub struct BatchCreateRepositoriesResponse {
2003 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
2005 pub repositories: std::vec::Vec<crate::model::Repository>,
2006
2007 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2008 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2009}
2010
2011impl BatchCreateRepositoriesResponse {
2012 pub fn new() -> Self {
2013 std::default::Default::default()
2014 }
2015
2016 pub fn set_repositories<T, V>(mut self, v: T) -> Self
2018 where
2019 T: std::iter::IntoIterator<Item = V>,
2020 V: std::convert::Into<crate::model::Repository>,
2021 {
2022 use std::iter::Iterator;
2023 self.repositories = v.into_iter().map(|i| i.into()).collect();
2024 self
2025 }
2026}
2027
2028impl wkt::message::Message for BatchCreateRepositoriesResponse {
2029 fn typename() -> &'static str {
2030 "type.googleapis.com/google.devtools.cloudbuild.v2.BatchCreateRepositoriesResponse"
2031 }
2032}
2033
2034#[serde_with::serde_as]
2036#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2037#[serde(default, rename_all = "camelCase")]
2038#[non_exhaustive]
2039pub struct GetRepositoryRequest {
2040 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2043 pub name: std::string::String,
2044
2045 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2046 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2047}
2048
2049impl GetRepositoryRequest {
2050 pub fn new() -> Self {
2051 std::default::Default::default()
2052 }
2053
2054 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2056 self.name = v.into();
2057 self
2058 }
2059}
2060
2061impl wkt::message::Message for GetRepositoryRequest {
2062 fn typename() -> &'static str {
2063 "type.googleapis.com/google.devtools.cloudbuild.v2.GetRepositoryRequest"
2064 }
2065}
2066
2067#[serde_with::serde_as]
2069#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2070#[serde(default, rename_all = "camelCase")]
2071#[non_exhaustive]
2072pub struct ListRepositoriesRequest {
2073 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2076 pub parent: std::string::String,
2077
2078 pub page_size: i32,
2080
2081 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2083 pub page_token: std::string::String,
2084
2085 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2090 pub filter: std::string::String,
2091
2092 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2093 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2094}
2095
2096impl ListRepositoriesRequest {
2097 pub fn new() -> Self {
2098 std::default::Default::default()
2099 }
2100
2101 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2103 self.parent = v.into();
2104 self
2105 }
2106
2107 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2109 self.page_size = v.into();
2110 self
2111 }
2112
2113 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2115 self.page_token = v.into();
2116 self
2117 }
2118
2119 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2121 self.filter = v.into();
2122 self
2123 }
2124}
2125
2126impl wkt::message::Message for ListRepositoriesRequest {
2127 fn typename() -> &'static str {
2128 "type.googleapis.com/google.devtools.cloudbuild.v2.ListRepositoriesRequest"
2129 }
2130}
2131
2132#[serde_with::serde_as]
2134#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2135#[serde(default, rename_all = "camelCase")]
2136#[non_exhaustive]
2137pub struct ListRepositoriesResponse {
2138 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
2140 pub repositories: std::vec::Vec<crate::model::Repository>,
2141
2142 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2144 pub next_page_token: std::string::String,
2145
2146 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2147 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2148}
2149
2150impl ListRepositoriesResponse {
2151 pub fn new() -> Self {
2152 std::default::Default::default()
2153 }
2154
2155 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2157 self.next_page_token = v.into();
2158 self
2159 }
2160
2161 pub fn set_repositories<T, V>(mut self, v: T) -> Self
2163 where
2164 T: std::iter::IntoIterator<Item = V>,
2165 V: std::convert::Into<crate::model::Repository>,
2166 {
2167 use std::iter::Iterator;
2168 self.repositories = v.into_iter().map(|i| i.into()).collect();
2169 self
2170 }
2171}
2172
2173impl wkt::message::Message for ListRepositoriesResponse {
2174 fn typename() -> &'static str {
2175 "type.googleapis.com/google.devtools.cloudbuild.v2.ListRepositoriesResponse"
2176 }
2177}
2178
2179#[doc(hidden)]
2180impl gax::paginator::internal::PageableResponse for ListRepositoriesResponse {
2181 type PageItem = crate::model::Repository;
2182
2183 fn items(self) -> std::vec::Vec<Self::PageItem> {
2184 self.repositories
2185 }
2186
2187 fn next_page_token(&self) -> std::string::String {
2188 use std::clone::Clone;
2189 self.next_page_token.clone()
2190 }
2191}
2192
2193#[serde_with::serde_as]
2195#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2196#[serde(default, rename_all = "camelCase")]
2197#[non_exhaustive]
2198pub struct DeleteRepositoryRequest {
2199 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2202 pub name: std::string::String,
2203
2204 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2208 pub etag: std::string::String,
2209
2210 pub validate_only: bool,
2212
2213 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2214 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2215}
2216
2217impl DeleteRepositoryRequest {
2218 pub fn new() -> Self {
2219 std::default::Default::default()
2220 }
2221
2222 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2224 self.name = v.into();
2225 self
2226 }
2227
2228 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2230 self.etag = v.into();
2231 self
2232 }
2233
2234 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2236 self.validate_only = v.into();
2237 self
2238 }
2239}
2240
2241impl wkt::message::Message for DeleteRepositoryRequest {
2242 fn typename() -> &'static str {
2243 "type.googleapis.com/google.devtools.cloudbuild.v2.DeleteRepositoryRequest"
2244 }
2245}
2246
2247#[serde_with::serde_as]
2249#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2250#[serde(default, rename_all = "camelCase")]
2251#[non_exhaustive]
2252pub struct FetchReadWriteTokenRequest {
2253 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2256 pub repository: std::string::String,
2257
2258 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2259 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2260}
2261
2262impl FetchReadWriteTokenRequest {
2263 pub fn new() -> Self {
2264 std::default::Default::default()
2265 }
2266
2267 pub fn set_repository<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2269 self.repository = v.into();
2270 self
2271 }
2272}
2273
2274impl wkt::message::Message for FetchReadWriteTokenRequest {
2275 fn typename() -> &'static str {
2276 "type.googleapis.com/google.devtools.cloudbuild.v2.FetchReadWriteTokenRequest"
2277 }
2278}
2279
2280#[serde_with::serde_as]
2282#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2283#[serde(default, rename_all = "camelCase")]
2284#[non_exhaustive]
2285pub struct FetchReadTokenRequest {
2286 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2289 pub repository: std::string::String,
2290
2291 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2292 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2293}
2294
2295impl FetchReadTokenRequest {
2296 pub fn new() -> Self {
2297 std::default::Default::default()
2298 }
2299
2300 pub fn set_repository<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2302 self.repository = v.into();
2303 self
2304 }
2305}
2306
2307impl wkt::message::Message for FetchReadTokenRequest {
2308 fn typename() -> &'static str {
2309 "type.googleapis.com/google.devtools.cloudbuild.v2.FetchReadTokenRequest"
2310 }
2311}
2312
2313#[serde_with::serde_as]
2315#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2316#[serde(default, rename_all = "camelCase")]
2317#[non_exhaustive]
2318pub struct FetchReadTokenResponse {
2319 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2321 pub token: std::string::String,
2322
2323 #[serde(skip_serializing_if = "std::option::Option::is_none")]
2325 pub expiration_time: std::option::Option<wkt::Timestamp>,
2326
2327 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2328 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2329}
2330
2331impl FetchReadTokenResponse {
2332 pub fn new() -> Self {
2333 std::default::Default::default()
2334 }
2335
2336 pub fn set_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2338 self.token = v.into();
2339 self
2340 }
2341
2342 pub fn set_expiration_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
2344 mut self,
2345 v: T,
2346 ) -> Self {
2347 self.expiration_time = v.into();
2348 self
2349 }
2350}
2351
2352impl wkt::message::Message for FetchReadTokenResponse {
2353 fn typename() -> &'static str {
2354 "type.googleapis.com/google.devtools.cloudbuild.v2.FetchReadTokenResponse"
2355 }
2356}
2357
2358#[serde_with::serde_as]
2360#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2361#[serde(default, rename_all = "camelCase")]
2362#[non_exhaustive]
2363pub struct FetchReadWriteTokenResponse {
2364 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2366 pub token: std::string::String,
2367
2368 #[serde(skip_serializing_if = "std::option::Option::is_none")]
2370 pub expiration_time: std::option::Option<wkt::Timestamp>,
2371
2372 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2373 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2374}
2375
2376impl FetchReadWriteTokenResponse {
2377 pub fn new() -> Self {
2378 std::default::Default::default()
2379 }
2380
2381 pub fn set_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2383 self.token = v.into();
2384 self
2385 }
2386
2387 pub fn set_expiration_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
2389 mut self,
2390 v: T,
2391 ) -> Self {
2392 self.expiration_time = v.into();
2393 self
2394 }
2395}
2396
2397impl wkt::message::Message for FetchReadWriteTokenResponse {
2398 fn typename() -> &'static str {
2399 "type.googleapis.com/google.devtools.cloudbuild.v2.FetchReadWriteTokenResponse"
2400 }
2401}
2402
2403#[serde_with::serde_as]
2405#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2406#[serde(default, rename_all = "camelCase")]
2407#[non_exhaustive]
2408pub struct ProcessWebhookRequest {
2409 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2412 pub parent: std::string::String,
2413
2414 #[serde(skip_serializing_if = "std::option::Option::is_none")]
2416 pub body: std::option::Option<api::model::HttpBody>,
2417
2418 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2421 pub webhook_key: std::string::String,
2422
2423 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2424 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2425}
2426
2427impl ProcessWebhookRequest {
2428 pub fn new() -> Self {
2429 std::default::Default::default()
2430 }
2431
2432 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2434 self.parent = v.into();
2435 self
2436 }
2437
2438 pub fn set_body<T: std::convert::Into<std::option::Option<api::model::HttpBody>>>(
2440 mut self,
2441 v: T,
2442 ) -> Self {
2443 self.body = v.into();
2444 self
2445 }
2446
2447 pub fn set_webhook_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2449 self.webhook_key = v.into();
2450 self
2451 }
2452}
2453
2454impl wkt::message::Message for ProcessWebhookRequest {
2455 fn typename() -> &'static str {
2456 "type.googleapis.com/google.devtools.cloudbuild.v2.ProcessWebhookRequest"
2457 }
2458}
2459
2460#[serde_with::serde_as]
2462#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2463#[serde(default, rename_all = "camelCase")]
2464#[non_exhaustive]
2465pub struct FetchGitRefsRequest {
2466 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2469 pub repository: std::string::String,
2470
2471 pub ref_type: crate::model::fetch_git_refs_request::RefType,
2473
2474 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2475 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2476}
2477
2478impl FetchGitRefsRequest {
2479 pub fn new() -> Self {
2480 std::default::Default::default()
2481 }
2482
2483 pub fn set_repository<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2485 self.repository = v.into();
2486 self
2487 }
2488
2489 pub fn set_ref_type<T: std::convert::Into<crate::model::fetch_git_refs_request::RefType>>(
2491 mut self,
2492 v: T,
2493 ) -> Self {
2494 self.ref_type = v.into();
2495 self
2496 }
2497}
2498
2499impl wkt::message::Message for FetchGitRefsRequest {
2500 fn typename() -> &'static str {
2501 "type.googleapis.com/google.devtools.cloudbuild.v2.FetchGitRefsRequest"
2502 }
2503}
2504
2505pub mod fetch_git_refs_request {
2507 #[allow(unused_imports)]
2508 use super::*;
2509
2510 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
2512 pub struct RefType(i32);
2513
2514 impl RefType {
2515 pub const REF_TYPE_UNSPECIFIED: RefType = RefType::new(0);
2517
2518 pub const TAG: RefType = RefType::new(1);
2520
2521 pub const BRANCH: RefType = RefType::new(2);
2523
2524 pub(crate) const fn new(value: i32) -> Self {
2526 Self(value)
2527 }
2528
2529 pub fn value(&self) -> i32 {
2531 self.0
2532 }
2533
2534 pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
2536 match self.0 {
2537 0 => std::borrow::Cow::Borrowed("REF_TYPE_UNSPECIFIED"),
2538 1 => std::borrow::Cow::Borrowed("TAG"),
2539 2 => std::borrow::Cow::Borrowed("BRANCH"),
2540 _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
2541 }
2542 }
2543
2544 pub fn from_str_name(name: &str) -> std::option::Option<Self> {
2546 match name {
2547 "REF_TYPE_UNSPECIFIED" => std::option::Option::Some(Self::REF_TYPE_UNSPECIFIED),
2548 "TAG" => std::option::Option::Some(Self::TAG),
2549 "BRANCH" => std::option::Option::Some(Self::BRANCH),
2550 _ => std::option::Option::None,
2551 }
2552 }
2553 }
2554
2555 impl std::convert::From<i32> for RefType {
2556 fn from(value: i32) -> Self {
2557 Self::new(value)
2558 }
2559 }
2560
2561 impl std::default::Default for RefType {
2562 fn default() -> Self {
2563 Self::new(0)
2564 }
2565 }
2566}
2567
2568#[serde_with::serde_as]
2570#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2571#[serde(default, rename_all = "camelCase")]
2572#[non_exhaustive]
2573pub struct FetchGitRefsResponse {
2574 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
2576 pub ref_names: std::vec::Vec<std::string::String>,
2577
2578 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2579 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2580}
2581
2582impl FetchGitRefsResponse {
2583 pub fn new() -> Self {
2584 std::default::Default::default()
2585 }
2586
2587 pub fn set_ref_names<T, V>(mut self, v: T) -> Self
2589 where
2590 T: std::iter::IntoIterator<Item = V>,
2591 V: std::convert::Into<std::string::String>,
2592 {
2593 use std::iter::Iterator;
2594 self.ref_names = v.into_iter().map(|i| i.into()).collect();
2595 self
2596 }
2597}
2598
2599impl wkt::message::Message for FetchGitRefsResponse {
2600 fn typename() -> &'static str {
2601 "type.googleapis.com/google.devtools.cloudbuild.v2.FetchGitRefsResponse"
2602 }
2603}