1#![allow(rustdoc::redundant_explicit_links)]
18#![allow(rustdoc::broken_intra_doc_links)]
19#![no_implicit_prelude]
20extern crate async_trait;
21extern crate bytes;
22extern crate gax;
23extern crate gaxi;
24extern crate lazy_static;
25extern crate location;
26extern crate longrunning;
27extern crate lro;
28extern crate reqwest;
29extern crate serde;
30extern crate serde_json;
31extern crate serde_with;
32extern crate std;
33extern crate tracing;
34extern crate wkt;
35
36#[serde_with::serde_as]
38#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
39#[serde(default, rename_all = "camelCase")]
40#[non_exhaustive]
41pub struct Connection {
42 #[serde(skip_serializing_if = "std::string::String::is_empty")]
45 pub name: std::string::String,
46
47 #[serde(skip_serializing_if = "std::option::Option::is_none")]
49 pub create_time: std::option::Option<wkt::Timestamp>,
50
51 #[serde(skip_serializing_if = "std::option::Option::is_none")]
53 pub update_time: std::option::Option<wkt::Timestamp>,
54
55 #[serde(skip_serializing_if = "std::option::Option::is_none")]
57 pub delete_time: std::option::Option<wkt::Timestamp>,
58
59 #[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
61 pub labels: std::collections::HashMap<std::string::String, std::string::String>,
62
63 #[serde(skip_serializing_if = "std::option::Option::is_none")]
65 pub installation_state: std::option::Option<crate::model::InstallationState>,
66
67 pub disabled: bool,
71
72 pub reconciling: bool,
75
76 #[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
78 pub annotations: std::collections::HashMap<std::string::String, std::string::String>,
79
80 #[serde(skip_serializing_if = "std::string::String::is_empty")]
84 pub etag: std::string::String,
85
86 #[serde(skip_serializing_if = "std::string::String::is_empty")]
89 pub uid: std::string::String,
90
91 #[serde(skip_serializing_if = "std::option::Option::is_none")]
94 pub crypto_key_config: std::option::Option<crate::model::CryptoKeyConfig>,
95
96 #[serde(flatten, skip_serializing_if = "std::option::Option::is_none")]
98 pub connection_config: std::option::Option<crate::model::connection::ConnectionConfig>,
99
100 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
101 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
102}
103
104impl Connection {
105 pub fn new() -> Self {
106 std::default::Default::default()
107 }
108
109 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
111 self.name = v.into();
112 self
113 }
114
115 pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
117 mut self,
118 v: T,
119 ) -> Self {
120 self.create_time = v.into();
121 self
122 }
123
124 pub fn set_update_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
126 mut self,
127 v: T,
128 ) -> Self {
129 self.update_time = v.into();
130 self
131 }
132
133 pub fn set_delete_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
135 mut self,
136 v: T,
137 ) -> Self {
138 self.delete_time = v.into();
139 self
140 }
141
142 pub fn set_installation_state<
144 T: std::convert::Into<std::option::Option<crate::model::InstallationState>>,
145 >(
146 mut self,
147 v: T,
148 ) -> Self {
149 self.installation_state = v.into();
150 self
151 }
152
153 pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
155 self.disabled = v.into();
156 self
157 }
158
159 pub fn set_reconciling<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
161 self.reconciling = v.into();
162 self
163 }
164
165 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
167 self.etag = v.into();
168 self
169 }
170
171 pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
173 self.uid = v.into();
174 self
175 }
176
177 pub fn set_crypto_key_config<
179 T: std::convert::Into<std::option::Option<crate::model::CryptoKeyConfig>>,
180 >(
181 mut self,
182 v: T,
183 ) -> Self {
184 self.crypto_key_config = v.into();
185 self
186 }
187
188 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
190 where
191 T: std::iter::IntoIterator<Item = (K, V)>,
192 K: std::convert::Into<std::string::String>,
193 V: std::convert::Into<std::string::String>,
194 {
195 use std::iter::Iterator;
196 self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
197 self
198 }
199
200 pub fn set_annotations<T, K, V>(mut self, v: T) -> Self
202 where
203 T: std::iter::IntoIterator<Item = (K, V)>,
204 K: std::convert::Into<std::string::String>,
205 V: std::convert::Into<std::string::String>,
206 {
207 use std::iter::Iterator;
208 self.annotations = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
209 self
210 }
211
212 pub fn set_connection_config<
217 T: std::convert::Into<std::option::Option<crate::model::connection::ConnectionConfig>>,
218 >(
219 mut self,
220 v: T,
221 ) -> Self {
222 self.connection_config = v.into();
223 self
224 }
225
226 pub fn github_config(
230 &self,
231 ) -> std::option::Option<&std::boxed::Box<crate::model::GitHubConfig>> {
232 #[allow(unreachable_patterns)]
233 self.connection_config.as_ref().and_then(|v| match v {
234 crate::model::connection::ConnectionConfig::GithubConfig(v) => {
235 std::option::Option::Some(v)
236 }
237 _ => std::option::Option::None,
238 })
239 }
240
241 pub fn github_enterprise_config(
245 &self,
246 ) -> std::option::Option<&std::boxed::Box<crate::model::GitHubEnterpriseConfig>> {
247 #[allow(unreachable_patterns)]
248 self.connection_config.as_ref().and_then(|v| match v {
249 crate::model::connection::ConnectionConfig::GithubEnterpriseConfig(v) => {
250 std::option::Option::Some(v)
251 }
252 _ => std::option::Option::None,
253 })
254 }
255
256 pub fn gitlab_config(
260 &self,
261 ) -> std::option::Option<&std::boxed::Box<crate::model::GitLabConfig>> {
262 #[allow(unreachable_patterns)]
263 self.connection_config.as_ref().and_then(|v| match v {
264 crate::model::connection::ConnectionConfig::GitlabConfig(v) => {
265 std::option::Option::Some(v)
266 }
267 _ => std::option::Option::None,
268 })
269 }
270
271 pub fn gitlab_enterprise_config(
275 &self,
276 ) -> std::option::Option<&std::boxed::Box<crate::model::GitLabEnterpriseConfig>> {
277 #[allow(unreachable_patterns)]
278 self.connection_config.as_ref().and_then(|v| match v {
279 crate::model::connection::ConnectionConfig::GitlabEnterpriseConfig(v) => {
280 std::option::Option::Some(v)
281 }
282 _ => std::option::Option::None,
283 })
284 }
285
286 pub fn set_github_config<T: std::convert::Into<std::boxed::Box<crate::model::GitHubConfig>>>(
292 mut self,
293 v: T,
294 ) -> Self {
295 self.connection_config = std::option::Option::Some(
296 crate::model::connection::ConnectionConfig::GithubConfig(v.into()),
297 );
298 self
299 }
300
301 pub fn set_github_enterprise_config<
307 T: std::convert::Into<std::boxed::Box<crate::model::GitHubEnterpriseConfig>>,
308 >(
309 mut self,
310 v: T,
311 ) -> Self {
312 self.connection_config = std::option::Option::Some(
313 crate::model::connection::ConnectionConfig::GithubEnterpriseConfig(v.into()),
314 );
315 self
316 }
317
318 pub fn set_gitlab_config<T: std::convert::Into<std::boxed::Box<crate::model::GitLabConfig>>>(
324 mut self,
325 v: T,
326 ) -> Self {
327 self.connection_config = std::option::Option::Some(
328 crate::model::connection::ConnectionConfig::GitlabConfig(v.into()),
329 );
330 self
331 }
332
333 pub fn set_gitlab_enterprise_config<
339 T: std::convert::Into<std::boxed::Box<crate::model::GitLabEnterpriseConfig>>,
340 >(
341 mut self,
342 v: T,
343 ) -> Self {
344 self.connection_config = std::option::Option::Some(
345 crate::model::connection::ConnectionConfig::GitlabEnterpriseConfig(v.into()),
346 );
347 self
348 }
349}
350
351impl wkt::message::Message for Connection {
352 fn typename() -> &'static str {
353 "type.googleapis.com/google.cloud.developerconnect.v1.Connection"
354 }
355}
356
357pub mod connection {
359 #[allow(unused_imports)]
360 use super::*;
361
362 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
364 #[serde(rename_all = "camelCase")]
365 #[non_exhaustive]
366 pub enum ConnectionConfig {
367 GithubConfig(std::boxed::Box<crate::model::GitHubConfig>),
369 GithubEnterpriseConfig(std::boxed::Box<crate::model::GitHubEnterpriseConfig>),
371 GitlabConfig(std::boxed::Box<crate::model::GitLabConfig>),
373 GitlabEnterpriseConfig(std::boxed::Box<crate::model::GitLabEnterpriseConfig>),
375 }
376}
377
378#[serde_with::serde_as]
381#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
382#[serde(default, rename_all = "camelCase")]
383#[non_exhaustive]
384pub struct CryptoKeyConfig {
385 #[serde(skip_serializing_if = "std::string::String::is_empty")]
389 pub key_reference: std::string::String,
390
391 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
392 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
393}
394
395impl CryptoKeyConfig {
396 pub fn new() -> Self {
397 std::default::Default::default()
398 }
399
400 pub fn set_key_reference<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
402 self.key_reference = v.into();
403 self
404 }
405}
406
407impl wkt::message::Message for CryptoKeyConfig {
408 fn typename() -> &'static str {
409 "type.googleapis.com/google.cloud.developerconnect.v1.CryptoKeyConfig"
410 }
411}
412
413#[serde_with::serde_as]
417#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
418#[serde(default, rename_all = "camelCase")]
419#[non_exhaustive]
420pub struct InstallationState {
421 pub stage: crate::model::installation_state::Stage,
423
424 #[serde(skip_serializing_if = "std::string::String::is_empty")]
427 pub message: std::string::String,
428
429 #[serde(skip_serializing_if = "std::string::String::is_empty")]
432 pub action_uri: std::string::String,
433
434 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
435 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
436}
437
438impl InstallationState {
439 pub fn new() -> Self {
440 std::default::Default::default()
441 }
442
443 pub fn set_stage<T: std::convert::Into<crate::model::installation_state::Stage>>(
445 mut self,
446 v: T,
447 ) -> Self {
448 self.stage = v.into();
449 self
450 }
451
452 pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
454 self.message = v.into();
455 self
456 }
457
458 pub fn set_action_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
460 self.action_uri = v.into();
461 self
462 }
463}
464
465impl wkt::message::Message for InstallationState {
466 fn typename() -> &'static str {
467 "type.googleapis.com/google.cloud.developerconnect.v1.InstallationState"
468 }
469}
470
471pub mod installation_state {
473 #[allow(unused_imports)]
474 use super::*;
475
476 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
478 pub struct Stage(i32);
479
480 impl Stage {
481 pub const STAGE_UNSPECIFIED: Stage = Stage::new(0);
483
484 pub const PENDING_CREATE_APP: Stage = Stage::new(1);
487
488 pub const PENDING_USER_OAUTH: Stage = Stage::new(2);
490
491 pub const PENDING_INSTALL_APP: Stage = Stage::new(3);
493
494 pub const COMPLETE: Stage = Stage::new(10);
496
497 pub(crate) const fn new(value: i32) -> Self {
499 Self(value)
500 }
501
502 pub fn value(&self) -> i32 {
504 self.0
505 }
506
507 pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
509 match self.0 {
510 0 => std::borrow::Cow::Borrowed("STAGE_UNSPECIFIED"),
511 1 => std::borrow::Cow::Borrowed("PENDING_CREATE_APP"),
512 2 => std::borrow::Cow::Borrowed("PENDING_USER_OAUTH"),
513 3 => std::borrow::Cow::Borrowed("PENDING_INSTALL_APP"),
514 10 => std::borrow::Cow::Borrowed("COMPLETE"),
515 _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
516 }
517 }
518
519 pub fn from_str_name(name: &str) -> std::option::Option<Self> {
521 match name {
522 "STAGE_UNSPECIFIED" => std::option::Option::Some(Self::STAGE_UNSPECIFIED),
523 "PENDING_CREATE_APP" => std::option::Option::Some(Self::PENDING_CREATE_APP),
524 "PENDING_USER_OAUTH" => std::option::Option::Some(Self::PENDING_USER_OAUTH),
525 "PENDING_INSTALL_APP" => std::option::Option::Some(Self::PENDING_INSTALL_APP),
526 "COMPLETE" => std::option::Option::Some(Self::COMPLETE),
527 _ => std::option::Option::None,
528 }
529 }
530 }
531
532 impl std::convert::From<i32> for Stage {
533 fn from(value: i32) -> Self {
534 Self::new(value)
535 }
536 }
537
538 impl std::default::Default for Stage {
539 fn default() -> Self {
540 Self::new(0)
541 }
542 }
543}
544
545#[serde_with::serde_as]
547#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
548#[serde(default, rename_all = "camelCase")]
549#[non_exhaustive]
550pub struct GitHubConfig {
551 pub github_app: crate::model::git_hub_config::GitHubApp,
554
555 #[serde(skip_serializing_if = "std::option::Option::is_none")]
559 pub authorizer_credential: std::option::Option<crate::model::OAuthCredential>,
560
561 #[serde_as(as = "serde_with::DisplayFromStr")]
563 pub app_installation_id: i64,
564
565 #[serde(skip_serializing_if = "std::string::String::is_empty")]
568 pub installation_uri: std::string::String,
569
570 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
571 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
572}
573
574impl GitHubConfig {
575 pub fn new() -> Self {
576 std::default::Default::default()
577 }
578
579 pub fn set_github_app<T: std::convert::Into<crate::model::git_hub_config::GitHubApp>>(
581 mut self,
582 v: T,
583 ) -> Self {
584 self.github_app = v.into();
585 self
586 }
587
588 pub fn set_authorizer_credential<
590 T: std::convert::Into<std::option::Option<crate::model::OAuthCredential>>,
591 >(
592 mut self,
593 v: T,
594 ) -> Self {
595 self.authorizer_credential = v.into();
596 self
597 }
598
599 pub fn set_app_installation_id<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
601 self.app_installation_id = v.into();
602 self
603 }
604
605 pub fn set_installation_uri<T: std::convert::Into<std::string::String>>(
607 mut self,
608 v: T,
609 ) -> Self {
610 self.installation_uri = v.into();
611 self
612 }
613}
614
615impl wkt::message::Message for GitHubConfig {
616 fn typename() -> &'static str {
617 "type.googleapis.com/google.cloud.developerconnect.v1.GitHubConfig"
618 }
619}
620
621pub mod git_hub_config {
623 #[allow(unused_imports)]
624 use super::*;
625
626 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
629 pub struct GitHubApp(i32);
630
631 impl GitHubApp {
632 pub const GIT_HUB_APP_UNSPECIFIED: GitHubApp = GitHubApp::new(0);
634
635 pub const DEVELOPER_CONNECT: GitHubApp = GitHubApp::new(1);
637
638 pub const FIREBASE: GitHubApp = GitHubApp::new(2);
640
641 pub(crate) const fn new(value: i32) -> Self {
643 Self(value)
644 }
645
646 pub fn value(&self) -> i32 {
648 self.0
649 }
650
651 pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
653 match self.0 {
654 0 => std::borrow::Cow::Borrowed("GIT_HUB_APP_UNSPECIFIED"),
655 1 => std::borrow::Cow::Borrowed("DEVELOPER_CONNECT"),
656 2 => std::borrow::Cow::Borrowed("FIREBASE"),
657 _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
658 }
659 }
660
661 pub fn from_str_name(name: &str) -> std::option::Option<Self> {
663 match name {
664 "GIT_HUB_APP_UNSPECIFIED" => {
665 std::option::Option::Some(Self::GIT_HUB_APP_UNSPECIFIED)
666 }
667 "DEVELOPER_CONNECT" => std::option::Option::Some(Self::DEVELOPER_CONNECT),
668 "FIREBASE" => std::option::Option::Some(Self::FIREBASE),
669 _ => std::option::Option::None,
670 }
671 }
672 }
673
674 impl std::convert::From<i32> for GitHubApp {
675 fn from(value: i32) -> Self {
676 Self::new(value)
677 }
678 }
679
680 impl std::default::Default for GitHubApp {
681 fn default() -> Self {
682 Self::new(0)
683 }
684 }
685}
686
687#[serde_with::serde_as]
689#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
690#[serde(default, rename_all = "camelCase")]
691#[non_exhaustive]
692pub struct GitHubEnterpriseConfig {
693 #[serde(skip_serializing_if = "std::string::String::is_empty")]
695 pub host_uri: std::string::String,
696
697 #[serde_as(as = "serde_with::DisplayFromStr")]
699 pub app_id: i64,
700
701 #[serde(skip_serializing_if = "std::string::String::is_empty")]
703 pub app_slug: std::string::String,
704
705 #[serde(skip_serializing_if = "std::string::String::is_empty")]
708 pub private_key_secret_version: std::string::String,
709
710 #[serde(skip_serializing_if = "std::string::String::is_empty")]
713 pub webhook_secret_secret_version: std::string::String,
714
715 #[serde_as(as = "serde_with::DisplayFromStr")]
717 pub app_installation_id: i64,
718
719 #[serde(skip_serializing_if = "std::string::String::is_empty")]
722 pub installation_uri: std::string::String,
723
724 #[serde(skip_serializing_if = "std::option::Option::is_none")]
730 pub service_directory_config: std::option::Option<crate::model::ServiceDirectoryConfig>,
731
732 #[serde(skip_serializing_if = "std::string::String::is_empty")]
734 pub server_version: std::string::String,
735
736 #[serde(skip_serializing_if = "std::string::String::is_empty")]
738 pub ssl_ca_certificate: std::string::String,
739
740 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
741 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
742}
743
744impl GitHubEnterpriseConfig {
745 pub fn new() -> Self {
746 std::default::Default::default()
747 }
748
749 pub fn set_host_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
751 self.host_uri = v.into();
752 self
753 }
754
755 pub fn set_app_id<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
757 self.app_id = v.into();
758 self
759 }
760
761 pub fn set_app_slug<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
763 self.app_slug = v.into();
764 self
765 }
766
767 pub fn set_private_key_secret_version<T: std::convert::Into<std::string::String>>(
769 mut self,
770 v: T,
771 ) -> Self {
772 self.private_key_secret_version = v.into();
773 self
774 }
775
776 pub fn set_webhook_secret_secret_version<T: std::convert::Into<std::string::String>>(
778 mut self,
779 v: T,
780 ) -> Self {
781 self.webhook_secret_secret_version = v.into();
782 self
783 }
784
785 pub fn set_app_installation_id<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
787 self.app_installation_id = v.into();
788 self
789 }
790
791 pub fn set_installation_uri<T: std::convert::Into<std::string::String>>(
793 mut self,
794 v: T,
795 ) -> Self {
796 self.installation_uri = v.into();
797 self
798 }
799
800 pub fn set_service_directory_config<
802 T: std::convert::Into<std::option::Option<crate::model::ServiceDirectoryConfig>>,
803 >(
804 mut self,
805 v: T,
806 ) -> Self {
807 self.service_directory_config = v.into();
808 self
809 }
810
811 pub fn set_server_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
813 self.server_version = v.into();
814 self
815 }
816
817 pub fn set_ssl_ca_certificate<T: std::convert::Into<std::string::String>>(
819 mut self,
820 v: T,
821 ) -> Self {
822 self.ssl_ca_certificate = v.into();
823 self
824 }
825}
826
827impl wkt::message::Message for GitHubEnterpriseConfig {
828 fn typename() -> &'static str {
829 "type.googleapis.com/google.cloud.developerconnect.v1.GitHubEnterpriseConfig"
830 }
831}
832
833#[serde_with::serde_as]
836#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
837#[serde(default, rename_all = "camelCase")]
838#[non_exhaustive]
839pub struct ServiceDirectoryConfig {
840 #[serde(skip_serializing_if = "std::string::String::is_empty")]
844 pub service: std::string::String,
845
846 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
847 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
848}
849
850impl ServiceDirectoryConfig {
851 pub fn new() -> Self {
852 std::default::Default::default()
853 }
854
855 pub fn set_service<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
857 self.service = v.into();
858 self
859 }
860}
861
862impl wkt::message::Message for ServiceDirectoryConfig {
863 fn typename() -> &'static str {
864 "type.googleapis.com/google.cloud.developerconnect.v1.ServiceDirectoryConfig"
865 }
866}
867
868#[serde_with::serde_as]
871#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
872#[serde(default, rename_all = "camelCase")]
873#[non_exhaustive]
874pub struct OAuthCredential {
875 #[serde(skip_serializing_if = "std::string::String::is_empty")]
878 pub oauth_token_secret_version: std::string::String,
879
880 #[serde(skip_serializing_if = "std::string::String::is_empty")]
882 pub username: std::string::String,
883
884 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
885 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
886}
887
888impl OAuthCredential {
889 pub fn new() -> Self {
890 std::default::Default::default()
891 }
892
893 pub fn set_oauth_token_secret_version<T: std::convert::Into<std::string::String>>(
895 mut self,
896 v: T,
897 ) -> Self {
898 self.oauth_token_secret_version = v.into();
899 self
900 }
901
902 pub fn set_username<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
904 self.username = v.into();
905 self
906 }
907}
908
909impl wkt::message::Message for OAuthCredential {
910 fn typename() -> &'static str {
911 "type.googleapis.com/google.cloud.developerconnect.v1.OAuthCredential"
912 }
913}
914
915#[serde_with::serde_as]
917#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
918#[serde(default, rename_all = "camelCase")]
919#[non_exhaustive]
920pub struct GitLabConfig {
921 #[serde(skip_serializing_if = "std::string::String::is_empty")]
925 pub webhook_secret_secret_version: std::string::String,
926
927 #[serde(skip_serializing_if = "std::option::Option::is_none")]
932 pub read_authorizer_credential: std::option::Option<crate::model::UserCredential>,
933
934 #[serde(skip_serializing_if = "std::option::Option::is_none")]
939 pub authorizer_credential: std::option::Option<crate::model::UserCredential>,
940
941 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
942 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
943}
944
945impl GitLabConfig {
946 pub fn new() -> Self {
947 std::default::Default::default()
948 }
949
950 pub fn set_webhook_secret_secret_version<T: std::convert::Into<std::string::String>>(
952 mut self,
953 v: T,
954 ) -> Self {
955 self.webhook_secret_secret_version = v.into();
956 self
957 }
958
959 pub fn set_read_authorizer_credential<
961 T: std::convert::Into<std::option::Option<crate::model::UserCredential>>,
962 >(
963 mut self,
964 v: T,
965 ) -> Self {
966 self.read_authorizer_credential = v.into();
967 self
968 }
969
970 pub fn set_authorizer_credential<
972 T: std::convert::Into<std::option::Option<crate::model::UserCredential>>,
973 >(
974 mut self,
975 v: T,
976 ) -> Self {
977 self.authorizer_credential = v.into();
978 self
979 }
980}
981
982impl wkt::message::Message for GitLabConfig {
983 fn typename() -> &'static str {
984 "type.googleapis.com/google.cloud.developerconnect.v1.GitLabConfig"
985 }
986}
987
988#[serde_with::serde_as]
991#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
992#[serde(default, rename_all = "camelCase")]
993#[non_exhaustive]
994pub struct UserCredential {
995 #[serde(skip_serializing_if = "std::string::String::is_empty")]
999 pub user_token_secret_version: std::string::String,
1000
1001 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1003 pub username: std::string::String,
1004
1005 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1006 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1007}
1008
1009impl UserCredential {
1010 pub fn new() -> Self {
1011 std::default::Default::default()
1012 }
1013
1014 pub fn set_user_token_secret_version<T: std::convert::Into<std::string::String>>(
1016 mut self,
1017 v: T,
1018 ) -> Self {
1019 self.user_token_secret_version = v.into();
1020 self
1021 }
1022
1023 pub fn set_username<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1025 self.username = v.into();
1026 self
1027 }
1028}
1029
1030impl wkt::message::Message for UserCredential {
1031 fn typename() -> &'static str {
1032 "type.googleapis.com/google.cloud.developerconnect.v1.UserCredential"
1033 }
1034}
1035
1036#[serde_with::serde_as]
1038#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1039#[serde(default, rename_all = "camelCase")]
1040#[non_exhaustive]
1041pub struct GitLabEnterpriseConfig {
1042 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1044 pub host_uri: std::string::String,
1045
1046 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1050 pub webhook_secret_secret_version: std::string::String,
1051
1052 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1057 pub read_authorizer_credential: std::option::Option<crate::model::UserCredential>,
1058
1059 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1064 pub authorizer_credential: std::option::Option<crate::model::UserCredential>,
1065
1066 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1072 pub service_directory_config: std::option::Option<crate::model::ServiceDirectoryConfig>,
1073
1074 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1077 pub ssl_ca_certificate: std::string::String,
1078
1079 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1082 pub server_version: std::string::String,
1083
1084 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1085 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1086}
1087
1088impl GitLabEnterpriseConfig {
1089 pub fn new() -> Self {
1090 std::default::Default::default()
1091 }
1092
1093 pub fn set_host_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1095 self.host_uri = v.into();
1096 self
1097 }
1098
1099 pub fn set_webhook_secret_secret_version<T: std::convert::Into<std::string::String>>(
1101 mut self,
1102 v: T,
1103 ) -> Self {
1104 self.webhook_secret_secret_version = v.into();
1105 self
1106 }
1107
1108 pub fn set_read_authorizer_credential<
1110 T: std::convert::Into<std::option::Option<crate::model::UserCredential>>,
1111 >(
1112 mut self,
1113 v: T,
1114 ) -> Self {
1115 self.read_authorizer_credential = v.into();
1116 self
1117 }
1118
1119 pub fn set_authorizer_credential<
1121 T: std::convert::Into<std::option::Option<crate::model::UserCredential>>,
1122 >(
1123 mut self,
1124 v: T,
1125 ) -> Self {
1126 self.authorizer_credential = v.into();
1127 self
1128 }
1129
1130 pub fn set_service_directory_config<
1132 T: std::convert::Into<std::option::Option<crate::model::ServiceDirectoryConfig>>,
1133 >(
1134 mut self,
1135 v: T,
1136 ) -> Self {
1137 self.service_directory_config = v.into();
1138 self
1139 }
1140
1141 pub fn set_ssl_ca_certificate<T: std::convert::Into<std::string::String>>(
1143 mut self,
1144 v: T,
1145 ) -> Self {
1146 self.ssl_ca_certificate = v.into();
1147 self
1148 }
1149
1150 pub fn set_server_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1152 self.server_version = v.into();
1153 self
1154 }
1155}
1156
1157impl wkt::message::Message for GitLabEnterpriseConfig {
1158 fn typename() -> &'static str {
1159 "type.googleapis.com/google.cloud.developerconnect.v1.GitLabEnterpriseConfig"
1160 }
1161}
1162
1163#[serde_with::serde_as]
1165#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1166#[serde(default, rename_all = "camelCase")]
1167#[non_exhaustive]
1168pub struct ListConnectionsRequest {
1169 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1171 pub parent: std::string::String,
1172
1173 pub page_size: i32,
1176
1177 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1179 pub page_token: std::string::String,
1180
1181 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1183 pub filter: std::string::String,
1184
1185 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1187 pub order_by: std::string::String,
1188
1189 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1190 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1191}
1192
1193impl ListConnectionsRequest {
1194 pub fn new() -> Self {
1195 std::default::Default::default()
1196 }
1197
1198 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1200 self.parent = v.into();
1201 self
1202 }
1203
1204 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1206 self.page_size = v.into();
1207 self
1208 }
1209
1210 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1212 self.page_token = v.into();
1213 self
1214 }
1215
1216 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1218 self.filter = v.into();
1219 self
1220 }
1221
1222 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1224 self.order_by = v.into();
1225 self
1226 }
1227}
1228
1229impl wkt::message::Message for ListConnectionsRequest {
1230 fn typename() -> &'static str {
1231 "type.googleapis.com/google.cloud.developerconnect.v1.ListConnectionsRequest"
1232 }
1233}
1234
1235#[serde_with::serde_as]
1237#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1238#[serde(default, rename_all = "camelCase")]
1239#[non_exhaustive]
1240pub struct ListConnectionsResponse {
1241 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
1243 pub connections: std::vec::Vec<crate::model::Connection>,
1244
1245 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1247 pub next_page_token: std::string::String,
1248
1249 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
1251 pub unreachable: std::vec::Vec<std::string::String>,
1252
1253 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1254 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1255}
1256
1257impl ListConnectionsResponse {
1258 pub fn new() -> Self {
1259 std::default::Default::default()
1260 }
1261
1262 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1264 self.next_page_token = v.into();
1265 self
1266 }
1267
1268 pub fn set_connections<T, V>(mut self, v: T) -> Self
1270 where
1271 T: std::iter::IntoIterator<Item = V>,
1272 V: std::convert::Into<crate::model::Connection>,
1273 {
1274 use std::iter::Iterator;
1275 self.connections = v.into_iter().map(|i| i.into()).collect();
1276 self
1277 }
1278
1279 pub fn set_unreachable<T, V>(mut self, v: T) -> Self
1281 where
1282 T: std::iter::IntoIterator<Item = V>,
1283 V: std::convert::Into<std::string::String>,
1284 {
1285 use std::iter::Iterator;
1286 self.unreachable = v.into_iter().map(|i| i.into()).collect();
1287 self
1288 }
1289}
1290
1291impl wkt::message::Message for ListConnectionsResponse {
1292 fn typename() -> &'static str {
1293 "type.googleapis.com/google.cloud.developerconnect.v1.ListConnectionsResponse"
1294 }
1295}
1296
1297#[doc(hidden)]
1298impl gax::paginator::internal::PageableResponse for ListConnectionsResponse {
1299 type PageItem = crate::model::Connection;
1300
1301 fn items(self) -> std::vec::Vec<Self::PageItem> {
1302 self.connections
1303 }
1304
1305 fn next_page_token(&self) -> std::string::String {
1306 use std::clone::Clone;
1307 self.next_page_token.clone()
1308 }
1309}
1310
1311#[serde_with::serde_as]
1313#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1314#[serde(default, rename_all = "camelCase")]
1315#[non_exhaustive]
1316pub struct GetConnectionRequest {
1317 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1319 pub name: std::string::String,
1320
1321 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1322 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1323}
1324
1325impl GetConnectionRequest {
1326 pub fn new() -> Self {
1327 std::default::Default::default()
1328 }
1329
1330 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1332 self.name = v.into();
1333 self
1334 }
1335}
1336
1337impl wkt::message::Message for GetConnectionRequest {
1338 fn typename() -> &'static str {
1339 "type.googleapis.com/google.cloud.developerconnect.v1.GetConnectionRequest"
1340 }
1341}
1342
1343#[serde_with::serde_as]
1345#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1346#[serde(default, rename_all = "camelCase")]
1347#[non_exhaustive]
1348pub struct CreateConnectionRequest {
1349 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1351 pub parent: std::string::String,
1352
1353 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1357 pub connection_id: std::string::String,
1358
1359 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1361 pub connection: std::option::Option<crate::model::Connection>,
1362
1363 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1377 pub request_id: std::string::String,
1378
1379 pub validate_only: bool,
1381
1382 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1383 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1384}
1385
1386impl CreateConnectionRequest {
1387 pub fn new() -> Self {
1388 std::default::Default::default()
1389 }
1390
1391 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1393 self.parent = v.into();
1394 self
1395 }
1396
1397 pub fn set_connection_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1399 self.connection_id = v.into();
1400 self
1401 }
1402
1403 pub fn set_connection<T: std::convert::Into<std::option::Option<crate::model::Connection>>>(
1405 mut self,
1406 v: T,
1407 ) -> Self {
1408 self.connection = v.into();
1409 self
1410 }
1411
1412 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1414 self.request_id = v.into();
1415 self
1416 }
1417
1418 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1420 self.validate_only = v.into();
1421 self
1422 }
1423}
1424
1425impl wkt::message::Message for CreateConnectionRequest {
1426 fn typename() -> &'static str {
1427 "type.googleapis.com/google.cloud.developerconnect.v1.CreateConnectionRequest"
1428 }
1429}
1430
1431#[serde_with::serde_as]
1433#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1434#[serde(default, rename_all = "camelCase")]
1435#[non_exhaustive]
1436pub struct UpdateConnectionRequest {
1437 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1443 pub update_mask: std::option::Option<wkt::FieldMask>,
1444
1445 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1447 pub connection: std::option::Option<crate::model::Connection>,
1448
1449 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1463 pub request_id: std::string::String,
1464
1465 pub allow_missing: bool,
1471
1472 pub validate_only: bool,
1474
1475 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1476 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1477}
1478
1479impl UpdateConnectionRequest {
1480 pub fn new() -> Self {
1481 std::default::Default::default()
1482 }
1483
1484 pub fn set_update_mask<T: std::convert::Into<std::option::Option<wkt::FieldMask>>>(
1486 mut self,
1487 v: T,
1488 ) -> Self {
1489 self.update_mask = v.into();
1490 self
1491 }
1492
1493 pub fn set_connection<T: std::convert::Into<std::option::Option<crate::model::Connection>>>(
1495 mut self,
1496 v: T,
1497 ) -> Self {
1498 self.connection = v.into();
1499 self
1500 }
1501
1502 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1504 self.request_id = v.into();
1505 self
1506 }
1507
1508 pub fn set_allow_missing<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1510 self.allow_missing = v.into();
1511 self
1512 }
1513
1514 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1516 self.validate_only = v.into();
1517 self
1518 }
1519}
1520
1521impl wkt::message::Message for UpdateConnectionRequest {
1522 fn typename() -> &'static str {
1523 "type.googleapis.com/google.cloud.developerconnect.v1.UpdateConnectionRequest"
1524 }
1525}
1526
1527#[serde_with::serde_as]
1529#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1530#[serde(default, rename_all = "camelCase")]
1531#[non_exhaustive]
1532pub struct DeleteConnectionRequest {
1533 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1535 pub name: std::string::String,
1536
1537 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1551 pub request_id: std::string::String,
1552
1553 pub validate_only: bool,
1555
1556 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1560 pub etag: std::string::String,
1561
1562 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1563 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1564}
1565
1566impl DeleteConnectionRequest {
1567 pub fn new() -> Self {
1568 std::default::Default::default()
1569 }
1570
1571 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1573 self.name = v.into();
1574 self
1575 }
1576
1577 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1579 self.request_id = v.into();
1580 self
1581 }
1582
1583 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1585 self.validate_only = v.into();
1586 self
1587 }
1588
1589 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1591 self.etag = v.into();
1592 self
1593 }
1594}
1595
1596impl wkt::message::Message for DeleteConnectionRequest {
1597 fn typename() -> &'static str {
1598 "type.googleapis.com/google.cloud.developerconnect.v1.DeleteConnectionRequest"
1599 }
1600}
1601
1602#[serde_with::serde_as]
1604#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1605#[serde(default, rename_all = "camelCase")]
1606#[non_exhaustive]
1607pub struct OperationMetadata {
1608 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1610 pub create_time: std::option::Option<wkt::Timestamp>,
1611
1612 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1614 pub end_time: std::option::Option<wkt::Timestamp>,
1615
1616 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1618 pub target: std::string::String,
1619
1620 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1622 pub verb: std::string::String,
1623
1624 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1626 pub status_message: std::string::String,
1627
1628 pub requested_cancellation: bool,
1638
1639 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1641 pub api_version: std::string::String,
1642
1643 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1644 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1645}
1646
1647impl OperationMetadata {
1648 pub fn new() -> Self {
1649 std::default::Default::default()
1650 }
1651
1652 pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
1654 mut self,
1655 v: T,
1656 ) -> Self {
1657 self.create_time = v.into();
1658 self
1659 }
1660
1661 pub fn set_end_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
1663 mut self,
1664 v: T,
1665 ) -> Self {
1666 self.end_time = v.into();
1667 self
1668 }
1669
1670 pub fn set_target<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1672 self.target = v.into();
1673 self
1674 }
1675
1676 pub fn set_verb<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1678 self.verb = v.into();
1679 self
1680 }
1681
1682 pub fn set_status_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1684 self.status_message = v.into();
1685 self
1686 }
1687
1688 pub fn set_requested_cancellation<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1690 self.requested_cancellation = v.into();
1691 self
1692 }
1693
1694 pub fn set_api_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1696 self.api_version = v.into();
1697 self
1698 }
1699}
1700
1701impl wkt::message::Message for OperationMetadata {
1702 fn typename() -> &'static str {
1703 "type.googleapis.com/google.cloud.developerconnect.v1.OperationMetadata"
1704 }
1705}
1706
1707#[serde_with::serde_as]
1709#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1710#[serde(default, rename_all = "camelCase")]
1711#[non_exhaustive]
1712pub struct GitRepositoryLink {
1713 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1716 pub name: std::string::String,
1717
1718 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1720 pub clone_uri: std::string::String,
1721
1722 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1724 pub create_time: std::option::Option<wkt::Timestamp>,
1725
1726 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1728 pub update_time: std::option::Option<wkt::Timestamp>,
1729
1730 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1732 pub delete_time: std::option::Option<wkt::Timestamp>,
1733
1734 #[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
1736 pub labels: std::collections::HashMap<std::string::String, std::string::String>,
1737
1738 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1742 pub etag: std::string::String,
1743
1744 pub reconciling: bool,
1747
1748 #[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
1750 pub annotations: std::collections::HashMap<std::string::String, std::string::String>,
1751
1752 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1755 pub uid: std::string::String,
1756
1757 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1759 pub webhook_id: std::string::String,
1760
1761 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1762 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1763}
1764
1765impl GitRepositoryLink {
1766 pub fn new() -> Self {
1767 std::default::Default::default()
1768 }
1769
1770 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1772 self.name = v.into();
1773 self
1774 }
1775
1776 pub fn set_clone_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1778 self.clone_uri = v.into();
1779 self
1780 }
1781
1782 pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
1784 mut self,
1785 v: T,
1786 ) -> Self {
1787 self.create_time = v.into();
1788 self
1789 }
1790
1791 pub fn set_update_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
1793 mut self,
1794 v: T,
1795 ) -> Self {
1796 self.update_time = v.into();
1797 self
1798 }
1799
1800 pub fn set_delete_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
1802 mut self,
1803 v: T,
1804 ) -> Self {
1805 self.delete_time = v.into();
1806 self
1807 }
1808
1809 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1811 self.etag = v.into();
1812 self
1813 }
1814
1815 pub fn set_reconciling<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1817 self.reconciling = v.into();
1818 self
1819 }
1820
1821 pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1823 self.uid = v.into();
1824 self
1825 }
1826
1827 pub fn set_webhook_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1829 self.webhook_id = v.into();
1830 self
1831 }
1832
1833 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
1835 where
1836 T: std::iter::IntoIterator<Item = (K, V)>,
1837 K: std::convert::Into<std::string::String>,
1838 V: std::convert::Into<std::string::String>,
1839 {
1840 use std::iter::Iterator;
1841 self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
1842 self
1843 }
1844
1845 pub fn set_annotations<T, K, V>(mut self, v: T) -> Self
1847 where
1848 T: std::iter::IntoIterator<Item = (K, V)>,
1849 K: std::convert::Into<std::string::String>,
1850 V: std::convert::Into<std::string::String>,
1851 {
1852 use std::iter::Iterator;
1853 self.annotations = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
1854 self
1855 }
1856}
1857
1858impl wkt::message::Message for GitRepositoryLink {
1859 fn typename() -> &'static str {
1860 "type.googleapis.com/google.cloud.developerconnect.v1.GitRepositoryLink"
1861 }
1862}
1863
1864#[serde_with::serde_as]
1866#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1867#[serde(default, rename_all = "camelCase")]
1868#[non_exhaustive]
1869pub struct CreateGitRepositoryLinkRequest {
1870 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1872 pub parent: std::string::String,
1873
1874 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1876 pub git_repository_link: std::option::Option<crate::model::GitRepositoryLink>,
1877
1878 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1883 pub git_repository_link_id: std::string::String,
1884
1885 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1899 pub request_id: std::string::String,
1900
1901 pub validate_only: bool,
1903
1904 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1905 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1906}
1907
1908impl CreateGitRepositoryLinkRequest {
1909 pub fn new() -> Self {
1910 std::default::Default::default()
1911 }
1912
1913 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1915 self.parent = v.into();
1916 self
1917 }
1918
1919 pub fn set_git_repository_link<
1921 T: std::convert::Into<std::option::Option<crate::model::GitRepositoryLink>>,
1922 >(
1923 mut self,
1924 v: T,
1925 ) -> Self {
1926 self.git_repository_link = v.into();
1927 self
1928 }
1929
1930 pub fn set_git_repository_link_id<T: std::convert::Into<std::string::String>>(
1932 mut self,
1933 v: T,
1934 ) -> Self {
1935 self.git_repository_link_id = v.into();
1936 self
1937 }
1938
1939 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1941 self.request_id = v.into();
1942 self
1943 }
1944
1945 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1947 self.validate_only = v.into();
1948 self
1949 }
1950}
1951
1952impl wkt::message::Message for CreateGitRepositoryLinkRequest {
1953 fn typename() -> &'static str {
1954 "type.googleapis.com/google.cloud.developerconnect.v1.CreateGitRepositoryLinkRequest"
1955 }
1956}
1957
1958#[serde_with::serde_as]
1960#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1961#[serde(default, rename_all = "camelCase")]
1962#[non_exhaustive]
1963pub struct DeleteGitRepositoryLinkRequest {
1964 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1966 pub name: std::string::String,
1967
1968 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1982 pub request_id: std::string::String,
1983
1984 pub validate_only: bool,
1986
1987 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1991 pub etag: std::string::String,
1992
1993 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1994 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1995}
1996
1997impl DeleteGitRepositoryLinkRequest {
1998 pub fn new() -> Self {
1999 std::default::Default::default()
2000 }
2001
2002 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2004 self.name = v.into();
2005 self
2006 }
2007
2008 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2010 self.request_id = v.into();
2011 self
2012 }
2013
2014 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2016 self.validate_only = v.into();
2017 self
2018 }
2019
2020 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2022 self.etag = v.into();
2023 self
2024 }
2025}
2026
2027impl wkt::message::Message for DeleteGitRepositoryLinkRequest {
2028 fn typename() -> &'static str {
2029 "type.googleapis.com/google.cloud.developerconnect.v1.DeleteGitRepositoryLinkRequest"
2030 }
2031}
2032
2033#[serde_with::serde_as]
2035#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2036#[serde(default, rename_all = "camelCase")]
2037#[non_exhaustive]
2038pub struct ListGitRepositoryLinksRequest {
2039 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2041 pub parent: std::string::String,
2042
2043 pub page_size: i32,
2046
2047 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2049 pub page_token: std::string::String,
2050
2051 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2053 pub filter: std::string::String,
2054
2055 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2057 pub order_by: std::string::String,
2058
2059 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2060 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2061}
2062
2063impl ListGitRepositoryLinksRequest {
2064 pub fn new() -> Self {
2065 std::default::Default::default()
2066 }
2067
2068 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2070 self.parent = v.into();
2071 self
2072 }
2073
2074 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2076 self.page_size = v.into();
2077 self
2078 }
2079
2080 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2082 self.page_token = v.into();
2083 self
2084 }
2085
2086 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2088 self.filter = v.into();
2089 self
2090 }
2091
2092 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2094 self.order_by = v.into();
2095 self
2096 }
2097}
2098
2099impl wkt::message::Message for ListGitRepositoryLinksRequest {
2100 fn typename() -> &'static str {
2101 "type.googleapis.com/google.cloud.developerconnect.v1.ListGitRepositoryLinksRequest"
2102 }
2103}
2104
2105#[serde_with::serde_as]
2107#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2108#[serde(default, rename_all = "camelCase")]
2109#[non_exhaustive]
2110pub struct ListGitRepositoryLinksResponse {
2111 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
2113 pub git_repository_links: std::vec::Vec<crate::model::GitRepositoryLink>,
2114
2115 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2117 pub next_page_token: std::string::String,
2118
2119 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
2121 pub unreachable: std::vec::Vec<std::string::String>,
2122
2123 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2124 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2125}
2126
2127impl ListGitRepositoryLinksResponse {
2128 pub fn new() -> Self {
2129 std::default::Default::default()
2130 }
2131
2132 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2134 self.next_page_token = v.into();
2135 self
2136 }
2137
2138 pub fn set_git_repository_links<T, V>(mut self, v: T) -> Self
2140 where
2141 T: std::iter::IntoIterator<Item = V>,
2142 V: std::convert::Into<crate::model::GitRepositoryLink>,
2143 {
2144 use std::iter::Iterator;
2145 self.git_repository_links = v.into_iter().map(|i| i.into()).collect();
2146 self
2147 }
2148
2149 pub fn set_unreachable<T, V>(mut self, v: T) -> Self
2151 where
2152 T: std::iter::IntoIterator<Item = V>,
2153 V: std::convert::Into<std::string::String>,
2154 {
2155 use std::iter::Iterator;
2156 self.unreachable = v.into_iter().map(|i| i.into()).collect();
2157 self
2158 }
2159}
2160
2161impl wkt::message::Message for ListGitRepositoryLinksResponse {
2162 fn typename() -> &'static str {
2163 "type.googleapis.com/google.cloud.developerconnect.v1.ListGitRepositoryLinksResponse"
2164 }
2165}
2166
2167#[doc(hidden)]
2168impl gax::paginator::internal::PageableResponse for ListGitRepositoryLinksResponse {
2169 type PageItem = crate::model::GitRepositoryLink;
2170
2171 fn items(self) -> std::vec::Vec<Self::PageItem> {
2172 self.git_repository_links
2173 }
2174
2175 fn next_page_token(&self) -> std::string::String {
2176 use std::clone::Clone;
2177 self.next_page_token.clone()
2178 }
2179}
2180
2181#[serde_with::serde_as]
2183#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2184#[serde(default, rename_all = "camelCase")]
2185#[non_exhaustive]
2186pub struct GetGitRepositoryLinkRequest {
2187 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2189 pub name: std::string::String,
2190
2191 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2192 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2193}
2194
2195impl GetGitRepositoryLinkRequest {
2196 pub fn new() -> Self {
2197 std::default::Default::default()
2198 }
2199
2200 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2202 self.name = v.into();
2203 self
2204 }
2205}
2206
2207impl wkt::message::Message for GetGitRepositoryLinkRequest {
2208 fn typename() -> &'static str {
2209 "type.googleapis.com/google.cloud.developerconnect.v1.GetGitRepositoryLinkRequest"
2210 }
2211}
2212
2213#[serde_with::serde_as]
2215#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2216#[serde(default, rename_all = "camelCase")]
2217#[non_exhaustive]
2218pub struct FetchReadWriteTokenRequest {
2219 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2222 pub git_repository_link: std::string::String,
2223
2224 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2225 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2226}
2227
2228impl FetchReadWriteTokenRequest {
2229 pub fn new() -> Self {
2230 std::default::Default::default()
2231 }
2232
2233 pub fn set_git_repository_link<T: std::convert::Into<std::string::String>>(
2235 mut self,
2236 v: T,
2237 ) -> Self {
2238 self.git_repository_link = v.into();
2239 self
2240 }
2241}
2242
2243impl wkt::message::Message for FetchReadWriteTokenRequest {
2244 fn typename() -> &'static str {
2245 "type.googleapis.com/google.cloud.developerconnect.v1.FetchReadWriteTokenRequest"
2246 }
2247}
2248
2249#[serde_with::serde_as]
2251#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2252#[serde(default, rename_all = "camelCase")]
2253#[non_exhaustive]
2254pub struct FetchReadTokenRequest {
2255 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2258 pub git_repository_link: std::string::String,
2259
2260 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2261 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2262}
2263
2264impl FetchReadTokenRequest {
2265 pub fn new() -> Self {
2266 std::default::Default::default()
2267 }
2268
2269 pub fn set_git_repository_link<T: std::convert::Into<std::string::String>>(
2271 mut self,
2272 v: T,
2273 ) -> Self {
2274 self.git_repository_link = v.into();
2275 self
2276 }
2277}
2278
2279impl wkt::message::Message for FetchReadTokenRequest {
2280 fn typename() -> &'static str {
2281 "type.googleapis.com/google.cloud.developerconnect.v1.FetchReadTokenRequest"
2282 }
2283}
2284
2285#[serde_with::serde_as]
2287#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2288#[serde(default, rename_all = "camelCase")]
2289#[non_exhaustive]
2290pub struct FetchReadTokenResponse {
2291 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2293 pub token: std::string::String,
2294
2295 #[serde(skip_serializing_if = "std::option::Option::is_none")]
2297 pub expiration_time: std::option::Option<wkt::Timestamp>,
2298
2299 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2303 pub git_username: std::string::String,
2304
2305 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2306 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2307}
2308
2309impl FetchReadTokenResponse {
2310 pub fn new() -> Self {
2311 std::default::Default::default()
2312 }
2313
2314 pub fn set_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2316 self.token = v.into();
2317 self
2318 }
2319
2320 pub fn set_expiration_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
2322 mut self,
2323 v: T,
2324 ) -> Self {
2325 self.expiration_time = v.into();
2326 self
2327 }
2328
2329 pub fn set_git_username<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2331 self.git_username = v.into();
2332 self
2333 }
2334}
2335
2336impl wkt::message::Message for FetchReadTokenResponse {
2337 fn typename() -> &'static str {
2338 "type.googleapis.com/google.cloud.developerconnect.v1.FetchReadTokenResponse"
2339 }
2340}
2341
2342#[serde_with::serde_as]
2344#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2345#[serde(default, rename_all = "camelCase")]
2346#[non_exhaustive]
2347pub struct FetchReadWriteTokenResponse {
2348 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2350 pub token: std::string::String,
2351
2352 #[serde(skip_serializing_if = "std::option::Option::is_none")]
2354 pub expiration_time: std::option::Option<wkt::Timestamp>,
2355
2356 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2360 pub git_username: std::string::String,
2361
2362 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2363 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2364}
2365
2366impl FetchReadWriteTokenResponse {
2367 pub fn new() -> Self {
2368 std::default::Default::default()
2369 }
2370
2371 pub fn set_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2373 self.token = v.into();
2374 self
2375 }
2376
2377 pub fn set_expiration_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
2379 mut self,
2380 v: T,
2381 ) -> Self {
2382 self.expiration_time = v.into();
2383 self
2384 }
2385
2386 pub fn set_git_username<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2388 self.git_username = v.into();
2389 self
2390 }
2391}
2392
2393impl wkt::message::Message for FetchReadWriteTokenResponse {
2394 fn typename() -> &'static str {
2395 "type.googleapis.com/google.cloud.developerconnect.v1.FetchReadWriteTokenResponse"
2396 }
2397}
2398
2399#[serde_with::serde_as]
2401#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2402#[serde(default, rename_all = "camelCase")]
2403#[non_exhaustive]
2404pub struct FetchLinkableGitRepositoriesRequest {
2405 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2408 pub connection: std::string::String,
2409
2410 pub page_size: i32,
2412
2413 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2415 pub page_token: std::string::String,
2416
2417 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2418 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2419}
2420
2421impl FetchLinkableGitRepositoriesRequest {
2422 pub fn new() -> Self {
2423 std::default::Default::default()
2424 }
2425
2426 pub fn set_connection<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2428 self.connection = v.into();
2429 self
2430 }
2431
2432 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2434 self.page_size = v.into();
2435 self
2436 }
2437
2438 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2440 self.page_token = v.into();
2441 self
2442 }
2443}
2444
2445impl wkt::message::Message for FetchLinkableGitRepositoriesRequest {
2446 fn typename() -> &'static str {
2447 "type.googleapis.com/google.cloud.developerconnect.v1.FetchLinkableGitRepositoriesRequest"
2448 }
2449}
2450
2451#[serde_with::serde_as]
2453#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2454#[serde(default, rename_all = "camelCase")]
2455#[non_exhaustive]
2456pub struct FetchLinkableGitRepositoriesResponse {
2457 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
2459 pub linkable_git_repositories: std::vec::Vec<crate::model::LinkableGitRepository>,
2460
2461 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2463 pub next_page_token: std::string::String,
2464
2465 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2466 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2467}
2468
2469impl FetchLinkableGitRepositoriesResponse {
2470 pub fn new() -> Self {
2471 std::default::Default::default()
2472 }
2473
2474 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2476 self.next_page_token = v.into();
2477 self
2478 }
2479
2480 pub fn set_linkable_git_repositories<T, V>(mut self, v: T) -> Self
2482 where
2483 T: std::iter::IntoIterator<Item = V>,
2484 V: std::convert::Into<crate::model::LinkableGitRepository>,
2485 {
2486 use std::iter::Iterator;
2487 self.linkable_git_repositories = v.into_iter().map(|i| i.into()).collect();
2488 self
2489 }
2490}
2491
2492impl wkt::message::Message for FetchLinkableGitRepositoriesResponse {
2493 fn typename() -> &'static str {
2494 "type.googleapis.com/google.cloud.developerconnect.v1.FetchLinkableGitRepositoriesResponse"
2495 }
2496}
2497
2498#[doc(hidden)]
2499impl gax::paginator::internal::PageableResponse for FetchLinkableGitRepositoriesResponse {
2500 type PageItem = crate::model::LinkableGitRepository;
2501
2502 fn items(self) -> std::vec::Vec<Self::PageItem> {
2503 self.linkable_git_repositories
2504 }
2505
2506 fn next_page_token(&self) -> std::string::String {
2507 use std::clone::Clone;
2508 self.next_page_token.clone()
2509 }
2510}
2511
2512#[serde_with::serde_as]
2515#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2516#[serde(default, rename_all = "camelCase")]
2517#[non_exhaustive]
2518pub struct LinkableGitRepository {
2519 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2521 pub clone_uri: std::string::String,
2522
2523 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2524 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2525}
2526
2527impl LinkableGitRepository {
2528 pub fn new() -> Self {
2529 std::default::Default::default()
2530 }
2531
2532 pub fn set_clone_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2534 self.clone_uri = v.into();
2535 self
2536 }
2537}
2538
2539impl wkt::message::Message for LinkableGitRepository {
2540 fn typename() -> &'static str {
2541 "type.googleapis.com/google.cloud.developerconnect.v1.LinkableGitRepository"
2542 }
2543}
2544
2545#[serde_with::serde_as]
2547#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2548#[serde(default, rename_all = "camelCase")]
2549#[non_exhaustive]
2550pub struct FetchGitHubInstallationsRequest {
2551 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2554 pub connection: std::string::String,
2555
2556 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2557 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2558}
2559
2560impl FetchGitHubInstallationsRequest {
2561 pub fn new() -> Self {
2562 std::default::Default::default()
2563 }
2564
2565 pub fn set_connection<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2567 self.connection = v.into();
2568 self
2569 }
2570}
2571
2572impl wkt::message::Message for FetchGitHubInstallationsRequest {
2573 fn typename() -> &'static str {
2574 "type.googleapis.com/google.cloud.developerconnect.v1.FetchGitHubInstallationsRequest"
2575 }
2576}
2577
2578#[serde_with::serde_as]
2580#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2581#[serde(default, rename_all = "camelCase")]
2582#[non_exhaustive]
2583pub struct FetchGitHubInstallationsResponse {
2584 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
2587 pub installations:
2588 std::vec::Vec<crate::model::fetch_git_hub_installations_response::Installation>,
2589
2590 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2591 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2592}
2593
2594impl FetchGitHubInstallationsResponse {
2595 pub fn new() -> Self {
2596 std::default::Default::default()
2597 }
2598
2599 pub fn set_installations<T, V>(mut self, v: T) -> Self
2601 where
2602 T: std::iter::IntoIterator<Item = V>,
2603 V: std::convert::Into<crate::model::fetch_git_hub_installations_response::Installation>,
2604 {
2605 use std::iter::Iterator;
2606 self.installations = v.into_iter().map(|i| i.into()).collect();
2607 self
2608 }
2609}
2610
2611impl wkt::message::Message for FetchGitHubInstallationsResponse {
2612 fn typename() -> &'static str {
2613 "type.googleapis.com/google.cloud.developerconnect.v1.FetchGitHubInstallationsResponse"
2614 }
2615}
2616
2617pub mod fetch_git_hub_installations_response {
2619 #[allow(unused_imports)]
2620 use super::*;
2621
2622 #[serde_with::serde_as]
2624 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2625 #[serde(default, rename_all = "camelCase")]
2626 #[non_exhaustive]
2627 pub struct Installation {
2628 #[serde_as(as = "serde_with::DisplayFromStr")]
2630 pub id: i64,
2631
2632 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2634 pub name: std::string::String,
2635
2636 #[serde(rename = "type")]
2638 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2639 pub r#type: std::string::String,
2640
2641 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2642 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2643 }
2644
2645 impl Installation {
2646 pub fn new() -> Self {
2647 std::default::Default::default()
2648 }
2649
2650 pub fn set_id<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
2652 self.id = v.into();
2653 self
2654 }
2655
2656 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2658 self.name = v.into();
2659 self
2660 }
2661
2662 pub fn set_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2664 self.r#type = v.into();
2665 self
2666 }
2667 }
2668
2669 impl wkt::message::Message for Installation {
2670 fn typename() -> &'static str {
2671 "type.googleapis.com/google.cloud.developerconnect.v1.FetchGitHubInstallationsResponse.Installation"
2672 }
2673 }
2674}
2675
2676#[serde_with::serde_as]
2678#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2679#[serde(default, rename_all = "camelCase")]
2680#[non_exhaustive]
2681pub struct FetchGitRefsRequest {
2682 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2685 pub git_repository_link: std::string::String,
2686
2687 pub ref_type: crate::model::fetch_git_refs_request::RefType,
2689
2690 pub page_size: i32,
2692
2693 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2695 pub page_token: std::string::String,
2696
2697 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2698 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2699}
2700
2701impl FetchGitRefsRequest {
2702 pub fn new() -> Self {
2703 std::default::Default::default()
2704 }
2705
2706 pub fn set_git_repository_link<T: std::convert::Into<std::string::String>>(
2708 mut self,
2709 v: T,
2710 ) -> Self {
2711 self.git_repository_link = v.into();
2712 self
2713 }
2714
2715 pub fn set_ref_type<T: std::convert::Into<crate::model::fetch_git_refs_request::RefType>>(
2717 mut self,
2718 v: T,
2719 ) -> Self {
2720 self.ref_type = v.into();
2721 self
2722 }
2723
2724 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2726 self.page_size = v.into();
2727 self
2728 }
2729
2730 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2732 self.page_token = v.into();
2733 self
2734 }
2735}
2736
2737impl wkt::message::Message for FetchGitRefsRequest {
2738 fn typename() -> &'static str {
2739 "type.googleapis.com/google.cloud.developerconnect.v1.FetchGitRefsRequest"
2740 }
2741}
2742
2743pub mod fetch_git_refs_request {
2745 #[allow(unused_imports)]
2746 use super::*;
2747
2748 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
2750 pub struct RefType(i32);
2751
2752 impl RefType {
2753 pub const REF_TYPE_UNSPECIFIED: RefType = RefType::new(0);
2755
2756 pub const TAG: RefType = RefType::new(1);
2758
2759 pub const BRANCH: RefType = RefType::new(2);
2761
2762 pub(crate) const fn new(value: i32) -> Self {
2764 Self(value)
2765 }
2766
2767 pub fn value(&self) -> i32 {
2769 self.0
2770 }
2771
2772 pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
2774 match self.0 {
2775 0 => std::borrow::Cow::Borrowed("REF_TYPE_UNSPECIFIED"),
2776 1 => std::borrow::Cow::Borrowed("TAG"),
2777 2 => std::borrow::Cow::Borrowed("BRANCH"),
2778 _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
2779 }
2780 }
2781
2782 pub fn from_str_name(name: &str) -> std::option::Option<Self> {
2784 match name {
2785 "REF_TYPE_UNSPECIFIED" => std::option::Option::Some(Self::REF_TYPE_UNSPECIFIED),
2786 "TAG" => std::option::Option::Some(Self::TAG),
2787 "BRANCH" => std::option::Option::Some(Self::BRANCH),
2788 _ => std::option::Option::None,
2789 }
2790 }
2791 }
2792
2793 impl std::convert::From<i32> for RefType {
2794 fn from(value: i32) -> Self {
2795 Self::new(value)
2796 }
2797 }
2798
2799 impl std::default::Default for RefType {
2800 fn default() -> Self {
2801 Self::new(0)
2802 }
2803 }
2804}
2805
2806#[serde_with::serde_as]
2808#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2809#[serde(default, rename_all = "camelCase")]
2810#[non_exhaustive]
2811pub struct FetchGitRefsResponse {
2812 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
2814 pub ref_names: std::vec::Vec<std::string::String>,
2815
2816 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2818 pub next_page_token: std::string::String,
2819
2820 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2821 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2822}
2823
2824impl FetchGitRefsResponse {
2825 pub fn new() -> Self {
2826 std::default::Default::default()
2827 }
2828
2829 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2831 self.next_page_token = v.into();
2832 self
2833 }
2834
2835 pub fn set_ref_names<T, V>(mut self, v: T) -> Self
2837 where
2838 T: std::iter::IntoIterator<Item = V>,
2839 V: std::convert::Into<std::string::String>,
2840 {
2841 use std::iter::Iterator;
2842 self.ref_names = v.into_iter().map(|i| i.into()).collect();
2843 self
2844 }
2845}
2846
2847impl wkt::message::Message for FetchGitRefsResponse {
2848 fn typename() -> &'static str {
2849 "type.googleapis.com/google.cloud.developerconnect.v1.FetchGitRefsResponse"
2850 }
2851}