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 rpc;
30extern crate serde;
31extern crate serde_json;
32extern crate serde_with;
33extern crate std;
34extern crate tracing;
35extern crate wkt;
36
37mod debug;
38mod deserialize;
39mod serialize;
40
41#[derive(Clone, Default, PartialEq)]
43#[non_exhaustive]
44pub struct ListUsersRequest {
45 pub parent: std::string::String,
47
48 pub page_size: i32,
51
52 pub page_token: std::string::String,
54
55 pub filter: std::string::String,
57
58 pub order_by: std::string::String,
60
61 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
62}
63
64impl ListUsersRequest {
65 pub fn new() -> Self {
66 std::default::Default::default()
67 }
68
69 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
71 self.parent = v.into();
72 self
73 }
74
75 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
77 self.page_size = v.into();
78 self
79 }
80
81 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
83 self.page_token = v.into();
84 self
85 }
86
87 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
89 self.filter = v.into();
90 self
91 }
92
93 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
95 self.order_by = v.into();
96 self
97 }
98}
99
100impl wkt::message::Message for ListUsersRequest {
101 fn typename() -> &'static str {
102 "type.googleapis.com/google.cloud.developerconnect.v1.ListUsersRequest"
103 }
104}
105
106#[derive(Clone, Default, PartialEq)]
108#[non_exhaustive]
109pub struct ListUsersResponse {
110 pub users: std::vec::Vec<crate::model::User>,
112
113 pub next_page_token: std::string::String,
115
116 pub unreachable: std::vec::Vec<std::string::String>,
118
119 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
120}
121
122impl ListUsersResponse {
123 pub fn new() -> Self {
124 std::default::Default::default()
125 }
126
127 pub fn set_users<T, V>(mut self, v: T) -> Self
129 where
130 T: std::iter::IntoIterator<Item = V>,
131 V: std::convert::Into<crate::model::User>,
132 {
133 use std::iter::Iterator;
134 self.users = v.into_iter().map(|i| i.into()).collect();
135 self
136 }
137
138 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
140 self.next_page_token = v.into();
141 self
142 }
143
144 pub fn set_unreachable<T, V>(mut self, v: T) -> Self
146 where
147 T: std::iter::IntoIterator<Item = V>,
148 V: std::convert::Into<std::string::String>,
149 {
150 use std::iter::Iterator;
151 self.unreachable = v.into_iter().map(|i| i.into()).collect();
152 self
153 }
154}
155
156impl wkt::message::Message for ListUsersResponse {
157 fn typename() -> &'static str {
158 "type.googleapis.com/google.cloud.developerconnect.v1.ListUsersResponse"
159 }
160}
161
162#[doc(hidden)]
163impl gax::paginator::internal::PageableResponse for ListUsersResponse {
164 type PageItem = crate::model::User;
165
166 fn items(self) -> std::vec::Vec<Self::PageItem> {
167 self.users
168 }
169
170 fn next_page_token(&self) -> std::string::String {
171 use std::clone::Clone;
172 self.next_page_token.clone()
173 }
174}
175
176#[derive(Clone, Default, PartialEq)]
178#[non_exhaustive]
179pub struct Connection {
180 pub name: std::string::String,
183
184 pub create_time: std::option::Option<wkt::Timestamp>,
186
187 pub update_time: std::option::Option<wkt::Timestamp>,
189
190 pub delete_time: std::option::Option<wkt::Timestamp>,
192
193 pub labels: std::collections::HashMap<std::string::String, std::string::String>,
195
196 pub installation_state: std::option::Option<crate::model::InstallationState>,
198
199 pub disabled: bool,
203
204 pub reconciling: bool,
207
208 pub annotations: std::collections::HashMap<std::string::String, std::string::String>,
210
211 pub etag: std::string::String,
215
216 pub uid: std::string::String,
218
219 pub crypto_key_config: std::option::Option<crate::model::CryptoKeyConfig>,
222
223 pub git_proxy_config: std::option::Option<crate::model::GitProxyConfig>,
227
228 pub connection_config: std::option::Option<crate::model::connection::ConnectionConfig>,
230
231 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
232}
233
234impl Connection {
235 pub fn new() -> Self {
236 std::default::Default::default()
237 }
238
239 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
241 self.name = v.into();
242 self
243 }
244
245 pub fn set_create_time<T>(mut self, v: T) -> Self
247 where
248 T: std::convert::Into<wkt::Timestamp>,
249 {
250 self.create_time = std::option::Option::Some(v.into());
251 self
252 }
253
254 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
256 where
257 T: std::convert::Into<wkt::Timestamp>,
258 {
259 self.create_time = v.map(|x| x.into());
260 self
261 }
262
263 pub fn set_update_time<T>(mut self, v: T) -> Self
265 where
266 T: std::convert::Into<wkt::Timestamp>,
267 {
268 self.update_time = std::option::Option::Some(v.into());
269 self
270 }
271
272 pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
274 where
275 T: std::convert::Into<wkt::Timestamp>,
276 {
277 self.update_time = v.map(|x| x.into());
278 self
279 }
280
281 pub fn set_delete_time<T>(mut self, v: T) -> Self
283 where
284 T: std::convert::Into<wkt::Timestamp>,
285 {
286 self.delete_time = std::option::Option::Some(v.into());
287 self
288 }
289
290 pub fn set_or_clear_delete_time<T>(mut self, v: std::option::Option<T>) -> Self
292 where
293 T: std::convert::Into<wkt::Timestamp>,
294 {
295 self.delete_time = v.map(|x| x.into());
296 self
297 }
298
299 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
301 where
302 T: std::iter::IntoIterator<Item = (K, V)>,
303 K: std::convert::Into<std::string::String>,
304 V: std::convert::Into<std::string::String>,
305 {
306 use std::iter::Iterator;
307 self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
308 self
309 }
310
311 pub fn set_installation_state<T>(mut self, v: T) -> Self
313 where
314 T: std::convert::Into<crate::model::InstallationState>,
315 {
316 self.installation_state = std::option::Option::Some(v.into());
317 self
318 }
319
320 pub fn set_or_clear_installation_state<T>(mut self, v: std::option::Option<T>) -> Self
322 where
323 T: std::convert::Into<crate::model::InstallationState>,
324 {
325 self.installation_state = v.map(|x| x.into());
326 self
327 }
328
329 pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
331 self.disabled = v.into();
332 self
333 }
334
335 pub fn set_reconciling<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
337 self.reconciling = v.into();
338 self
339 }
340
341 pub fn set_annotations<T, K, V>(mut self, v: T) -> Self
343 where
344 T: std::iter::IntoIterator<Item = (K, V)>,
345 K: std::convert::Into<std::string::String>,
346 V: std::convert::Into<std::string::String>,
347 {
348 use std::iter::Iterator;
349 self.annotations = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
350 self
351 }
352
353 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
355 self.etag = v.into();
356 self
357 }
358
359 pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
361 self.uid = v.into();
362 self
363 }
364
365 pub fn set_crypto_key_config<T>(mut self, v: T) -> Self
367 where
368 T: std::convert::Into<crate::model::CryptoKeyConfig>,
369 {
370 self.crypto_key_config = std::option::Option::Some(v.into());
371 self
372 }
373
374 pub fn set_or_clear_crypto_key_config<T>(mut self, v: std::option::Option<T>) -> Self
376 where
377 T: std::convert::Into<crate::model::CryptoKeyConfig>,
378 {
379 self.crypto_key_config = v.map(|x| x.into());
380 self
381 }
382
383 pub fn set_git_proxy_config<T>(mut self, v: T) -> Self
385 where
386 T: std::convert::Into<crate::model::GitProxyConfig>,
387 {
388 self.git_proxy_config = std::option::Option::Some(v.into());
389 self
390 }
391
392 pub fn set_or_clear_git_proxy_config<T>(mut self, v: std::option::Option<T>) -> Self
394 where
395 T: std::convert::Into<crate::model::GitProxyConfig>,
396 {
397 self.git_proxy_config = v.map(|x| x.into());
398 self
399 }
400
401 pub fn set_connection_config<
406 T: std::convert::Into<std::option::Option<crate::model::connection::ConnectionConfig>>,
407 >(
408 mut self,
409 v: T,
410 ) -> Self {
411 self.connection_config = v.into();
412 self
413 }
414
415 pub fn github_config(
419 &self,
420 ) -> std::option::Option<&std::boxed::Box<crate::model::GitHubConfig>> {
421 #[allow(unreachable_patterns)]
422 self.connection_config.as_ref().and_then(|v| match v {
423 crate::model::connection::ConnectionConfig::GithubConfig(v) => {
424 std::option::Option::Some(v)
425 }
426 _ => std::option::Option::None,
427 })
428 }
429
430 pub fn set_github_config<T: std::convert::Into<std::boxed::Box<crate::model::GitHubConfig>>>(
436 mut self,
437 v: T,
438 ) -> Self {
439 self.connection_config = std::option::Option::Some(
440 crate::model::connection::ConnectionConfig::GithubConfig(v.into()),
441 );
442 self
443 }
444
445 pub fn github_enterprise_config(
449 &self,
450 ) -> std::option::Option<&std::boxed::Box<crate::model::GitHubEnterpriseConfig>> {
451 #[allow(unreachable_patterns)]
452 self.connection_config.as_ref().and_then(|v| match v {
453 crate::model::connection::ConnectionConfig::GithubEnterpriseConfig(v) => {
454 std::option::Option::Some(v)
455 }
456 _ => std::option::Option::None,
457 })
458 }
459
460 pub fn set_github_enterprise_config<
466 T: std::convert::Into<std::boxed::Box<crate::model::GitHubEnterpriseConfig>>,
467 >(
468 mut self,
469 v: T,
470 ) -> Self {
471 self.connection_config = std::option::Option::Some(
472 crate::model::connection::ConnectionConfig::GithubEnterpriseConfig(v.into()),
473 );
474 self
475 }
476
477 pub fn gitlab_config(
481 &self,
482 ) -> std::option::Option<&std::boxed::Box<crate::model::GitLabConfig>> {
483 #[allow(unreachable_patterns)]
484 self.connection_config.as_ref().and_then(|v| match v {
485 crate::model::connection::ConnectionConfig::GitlabConfig(v) => {
486 std::option::Option::Some(v)
487 }
488 _ => std::option::Option::None,
489 })
490 }
491
492 pub fn set_gitlab_config<T: std::convert::Into<std::boxed::Box<crate::model::GitLabConfig>>>(
498 mut self,
499 v: T,
500 ) -> Self {
501 self.connection_config = std::option::Option::Some(
502 crate::model::connection::ConnectionConfig::GitlabConfig(v.into()),
503 );
504 self
505 }
506
507 pub fn gitlab_enterprise_config(
511 &self,
512 ) -> std::option::Option<&std::boxed::Box<crate::model::GitLabEnterpriseConfig>> {
513 #[allow(unreachable_patterns)]
514 self.connection_config.as_ref().and_then(|v| match v {
515 crate::model::connection::ConnectionConfig::GitlabEnterpriseConfig(v) => {
516 std::option::Option::Some(v)
517 }
518 _ => std::option::Option::None,
519 })
520 }
521
522 pub fn set_gitlab_enterprise_config<
528 T: std::convert::Into<std::boxed::Box<crate::model::GitLabEnterpriseConfig>>,
529 >(
530 mut self,
531 v: T,
532 ) -> Self {
533 self.connection_config = std::option::Option::Some(
534 crate::model::connection::ConnectionConfig::GitlabEnterpriseConfig(v.into()),
535 );
536 self
537 }
538
539 pub fn bitbucket_data_center_config(
543 &self,
544 ) -> std::option::Option<&std::boxed::Box<crate::model::BitbucketDataCenterConfig>> {
545 #[allow(unreachable_patterns)]
546 self.connection_config.as_ref().and_then(|v| match v {
547 crate::model::connection::ConnectionConfig::BitbucketDataCenterConfig(v) => {
548 std::option::Option::Some(v)
549 }
550 _ => std::option::Option::None,
551 })
552 }
553
554 pub fn set_bitbucket_data_center_config<
560 T: std::convert::Into<std::boxed::Box<crate::model::BitbucketDataCenterConfig>>,
561 >(
562 mut self,
563 v: T,
564 ) -> Self {
565 self.connection_config = std::option::Option::Some(
566 crate::model::connection::ConnectionConfig::BitbucketDataCenterConfig(v.into()),
567 );
568 self
569 }
570
571 pub fn bitbucket_cloud_config(
575 &self,
576 ) -> std::option::Option<&std::boxed::Box<crate::model::BitbucketCloudConfig>> {
577 #[allow(unreachable_patterns)]
578 self.connection_config.as_ref().and_then(|v| match v {
579 crate::model::connection::ConnectionConfig::BitbucketCloudConfig(v) => {
580 std::option::Option::Some(v)
581 }
582 _ => std::option::Option::None,
583 })
584 }
585
586 pub fn set_bitbucket_cloud_config<
592 T: std::convert::Into<std::boxed::Box<crate::model::BitbucketCloudConfig>>,
593 >(
594 mut self,
595 v: T,
596 ) -> Self {
597 self.connection_config = std::option::Option::Some(
598 crate::model::connection::ConnectionConfig::BitbucketCloudConfig(v.into()),
599 );
600 self
601 }
602}
603
604impl wkt::message::Message for Connection {
605 fn typename() -> &'static str {
606 "type.googleapis.com/google.cloud.developerconnect.v1.Connection"
607 }
608}
609
610pub mod connection {
612 #[allow(unused_imports)]
613 use super::*;
614
615 #[derive(Clone, Debug, PartialEq)]
617 #[non_exhaustive]
618 pub enum ConnectionConfig {
619 GithubConfig(std::boxed::Box<crate::model::GitHubConfig>),
621 GithubEnterpriseConfig(std::boxed::Box<crate::model::GitHubEnterpriseConfig>),
623 GitlabConfig(std::boxed::Box<crate::model::GitLabConfig>),
625 GitlabEnterpriseConfig(std::boxed::Box<crate::model::GitLabEnterpriseConfig>),
627 BitbucketDataCenterConfig(std::boxed::Box<crate::model::BitbucketDataCenterConfig>),
629 BitbucketCloudConfig(std::boxed::Box<crate::model::BitbucketCloudConfig>),
631 }
632}
633
634#[derive(Clone, Default, PartialEq)]
637#[non_exhaustive]
638pub struct CryptoKeyConfig {
639 pub key_reference: std::string::String,
643
644 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
645}
646
647impl CryptoKeyConfig {
648 pub fn new() -> Self {
649 std::default::Default::default()
650 }
651
652 pub fn set_key_reference<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
654 self.key_reference = v.into();
655 self
656 }
657}
658
659impl wkt::message::Message for CryptoKeyConfig {
660 fn typename() -> &'static str {
661 "type.googleapis.com/google.cloud.developerconnect.v1.CryptoKeyConfig"
662 }
663}
664
665#[derive(Clone, Default, PartialEq)]
667#[non_exhaustive]
668pub struct GitProxyConfig {
669 pub enabled: bool,
672
673 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
674}
675
676impl GitProxyConfig {
677 pub fn new() -> Self {
678 std::default::Default::default()
679 }
680
681 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
683 self.enabled = v.into();
684 self
685 }
686}
687
688impl wkt::message::Message for GitProxyConfig {
689 fn typename() -> &'static str {
690 "type.googleapis.com/google.cloud.developerconnect.v1.GitProxyConfig"
691 }
692}
693
694#[derive(Clone, Default, PartialEq)]
698#[non_exhaustive]
699pub struct InstallationState {
700 pub stage: crate::model::installation_state::Stage,
702
703 pub message: std::string::String,
706
707 pub action_uri: std::string::String,
710
711 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
712}
713
714impl InstallationState {
715 pub fn new() -> Self {
716 std::default::Default::default()
717 }
718
719 pub fn set_stage<T: std::convert::Into<crate::model::installation_state::Stage>>(
721 mut self,
722 v: T,
723 ) -> Self {
724 self.stage = v.into();
725 self
726 }
727
728 pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
730 self.message = v.into();
731 self
732 }
733
734 pub fn set_action_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
736 self.action_uri = v.into();
737 self
738 }
739}
740
741impl wkt::message::Message for InstallationState {
742 fn typename() -> &'static str {
743 "type.googleapis.com/google.cloud.developerconnect.v1.InstallationState"
744 }
745}
746
747pub mod installation_state {
749 #[allow(unused_imports)]
750 use super::*;
751
752 #[derive(Clone, Debug, PartialEq)]
768 #[non_exhaustive]
769 pub enum Stage {
770 Unspecified,
772 PendingCreateApp,
775 PendingUserOauth,
777 PendingInstallApp,
779 Complete,
781 UnknownValue(stage::UnknownValue),
786 }
787
788 #[doc(hidden)]
789 pub mod stage {
790 #[allow(unused_imports)]
791 use super::*;
792 #[derive(Clone, Debug, PartialEq)]
793 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
794 }
795
796 impl Stage {
797 pub fn value(&self) -> std::option::Option<i32> {
802 match self {
803 Self::Unspecified => std::option::Option::Some(0),
804 Self::PendingCreateApp => std::option::Option::Some(1),
805 Self::PendingUserOauth => std::option::Option::Some(2),
806 Self::PendingInstallApp => std::option::Option::Some(3),
807 Self::Complete => std::option::Option::Some(10),
808 Self::UnknownValue(u) => u.0.value(),
809 }
810 }
811
812 pub fn name(&self) -> std::option::Option<&str> {
817 match self {
818 Self::Unspecified => std::option::Option::Some("STAGE_UNSPECIFIED"),
819 Self::PendingCreateApp => std::option::Option::Some("PENDING_CREATE_APP"),
820 Self::PendingUserOauth => std::option::Option::Some("PENDING_USER_OAUTH"),
821 Self::PendingInstallApp => std::option::Option::Some("PENDING_INSTALL_APP"),
822 Self::Complete => std::option::Option::Some("COMPLETE"),
823 Self::UnknownValue(u) => u.0.name(),
824 }
825 }
826 }
827
828 impl std::default::Default for Stage {
829 fn default() -> Self {
830 use std::convert::From;
831 Self::from(0)
832 }
833 }
834
835 impl std::fmt::Display for Stage {
836 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
837 wkt::internal::display_enum(f, self.name(), self.value())
838 }
839 }
840
841 impl std::convert::From<i32> for Stage {
842 fn from(value: i32) -> Self {
843 match value {
844 0 => Self::Unspecified,
845 1 => Self::PendingCreateApp,
846 2 => Self::PendingUserOauth,
847 3 => Self::PendingInstallApp,
848 10 => Self::Complete,
849 _ => Self::UnknownValue(stage::UnknownValue(
850 wkt::internal::UnknownEnumValue::Integer(value),
851 )),
852 }
853 }
854 }
855
856 impl std::convert::From<&str> for Stage {
857 fn from(value: &str) -> Self {
858 use std::string::ToString;
859 match value {
860 "STAGE_UNSPECIFIED" => Self::Unspecified,
861 "PENDING_CREATE_APP" => Self::PendingCreateApp,
862 "PENDING_USER_OAUTH" => Self::PendingUserOauth,
863 "PENDING_INSTALL_APP" => Self::PendingInstallApp,
864 "COMPLETE" => Self::Complete,
865 _ => Self::UnknownValue(stage::UnknownValue(
866 wkt::internal::UnknownEnumValue::String(value.to_string()),
867 )),
868 }
869 }
870 }
871
872 impl serde::ser::Serialize for Stage {
873 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
874 where
875 S: serde::Serializer,
876 {
877 match self {
878 Self::Unspecified => serializer.serialize_i32(0),
879 Self::PendingCreateApp => serializer.serialize_i32(1),
880 Self::PendingUserOauth => serializer.serialize_i32(2),
881 Self::PendingInstallApp => serializer.serialize_i32(3),
882 Self::Complete => serializer.serialize_i32(10),
883 Self::UnknownValue(u) => u.0.serialize(serializer),
884 }
885 }
886 }
887
888 impl<'de> serde::de::Deserialize<'de> for Stage {
889 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
890 where
891 D: serde::Deserializer<'de>,
892 {
893 deserializer.deserialize_any(wkt::internal::EnumVisitor::<Stage>::new(
894 ".google.cloud.developerconnect.v1.InstallationState.Stage",
895 ))
896 }
897 }
898}
899
900#[derive(Clone, Default, PartialEq)]
902#[non_exhaustive]
903pub struct GitHubConfig {
904 pub github_app: crate::model::git_hub_config::GitHubApp,
907
908 pub authorizer_credential: std::option::Option<crate::model::OAuthCredential>,
912
913 pub app_installation_id: i64,
915
916 pub installation_uri: std::string::String,
919
920 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
921}
922
923impl GitHubConfig {
924 pub fn new() -> Self {
925 std::default::Default::default()
926 }
927
928 pub fn set_github_app<T: std::convert::Into<crate::model::git_hub_config::GitHubApp>>(
930 mut self,
931 v: T,
932 ) -> Self {
933 self.github_app = v.into();
934 self
935 }
936
937 pub fn set_authorizer_credential<T>(mut self, v: T) -> Self
939 where
940 T: std::convert::Into<crate::model::OAuthCredential>,
941 {
942 self.authorizer_credential = std::option::Option::Some(v.into());
943 self
944 }
945
946 pub fn set_or_clear_authorizer_credential<T>(mut self, v: std::option::Option<T>) -> Self
948 where
949 T: std::convert::Into<crate::model::OAuthCredential>,
950 {
951 self.authorizer_credential = v.map(|x| x.into());
952 self
953 }
954
955 pub fn set_app_installation_id<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
957 self.app_installation_id = v.into();
958 self
959 }
960
961 pub fn set_installation_uri<T: std::convert::Into<std::string::String>>(
963 mut self,
964 v: T,
965 ) -> Self {
966 self.installation_uri = v.into();
967 self
968 }
969}
970
971impl wkt::message::Message for GitHubConfig {
972 fn typename() -> &'static str {
973 "type.googleapis.com/google.cloud.developerconnect.v1.GitHubConfig"
974 }
975}
976
977pub mod git_hub_config {
979 #[allow(unused_imports)]
980 use super::*;
981
982 #[derive(Clone, Debug, PartialEq)]
999 #[non_exhaustive]
1000 pub enum GitHubApp {
1001 Unspecified,
1003 DeveloperConnect,
1005 Firebase,
1007 UnknownValue(git_hub_app::UnknownValue),
1012 }
1013
1014 #[doc(hidden)]
1015 pub mod git_hub_app {
1016 #[allow(unused_imports)]
1017 use super::*;
1018 #[derive(Clone, Debug, PartialEq)]
1019 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
1020 }
1021
1022 impl GitHubApp {
1023 pub fn value(&self) -> std::option::Option<i32> {
1028 match self {
1029 Self::Unspecified => std::option::Option::Some(0),
1030 Self::DeveloperConnect => std::option::Option::Some(1),
1031 Self::Firebase => std::option::Option::Some(2),
1032 Self::UnknownValue(u) => u.0.value(),
1033 }
1034 }
1035
1036 pub fn name(&self) -> std::option::Option<&str> {
1041 match self {
1042 Self::Unspecified => std::option::Option::Some("GIT_HUB_APP_UNSPECIFIED"),
1043 Self::DeveloperConnect => std::option::Option::Some("DEVELOPER_CONNECT"),
1044 Self::Firebase => std::option::Option::Some("FIREBASE"),
1045 Self::UnknownValue(u) => u.0.name(),
1046 }
1047 }
1048 }
1049
1050 impl std::default::Default for GitHubApp {
1051 fn default() -> Self {
1052 use std::convert::From;
1053 Self::from(0)
1054 }
1055 }
1056
1057 impl std::fmt::Display for GitHubApp {
1058 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
1059 wkt::internal::display_enum(f, self.name(), self.value())
1060 }
1061 }
1062
1063 impl std::convert::From<i32> for GitHubApp {
1064 fn from(value: i32) -> Self {
1065 match value {
1066 0 => Self::Unspecified,
1067 1 => Self::DeveloperConnect,
1068 2 => Self::Firebase,
1069 _ => Self::UnknownValue(git_hub_app::UnknownValue(
1070 wkt::internal::UnknownEnumValue::Integer(value),
1071 )),
1072 }
1073 }
1074 }
1075
1076 impl std::convert::From<&str> for GitHubApp {
1077 fn from(value: &str) -> Self {
1078 use std::string::ToString;
1079 match value {
1080 "GIT_HUB_APP_UNSPECIFIED" => Self::Unspecified,
1081 "DEVELOPER_CONNECT" => Self::DeveloperConnect,
1082 "FIREBASE" => Self::Firebase,
1083 _ => Self::UnknownValue(git_hub_app::UnknownValue(
1084 wkt::internal::UnknownEnumValue::String(value.to_string()),
1085 )),
1086 }
1087 }
1088 }
1089
1090 impl serde::ser::Serialize for GitHubApp {
1091 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1092 where
1093 S: serde::Serializer,
1094 {
1095 match self {
1096 Self::Unspecified => serializer.serialize_i32(0),
1097 Self::DeveloperConnect => serializer.serialize_i32(1),
1098 Self::Firebase => serializer.serialize_i32(2),
1099 Self::UnknownValue(u) => u.0.serialize(serializer),
1100 }
1101 }
1102 }
1103
1104 impl<'de> serde::de::Deserialize<'de> for GitHubApp {
1105 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1106 where
1107 D: serde::Deserializer<'de>,
1108 {
1109 deserializer.deserialize_any(wkt::internal::EnumVisitor::<GitHubApp>::new(
1110 ".google.cloud.developerconnect.v1.GitHubConfig.GitHubApp",
1111 ))
1112 }
1113 }
1114}
1115
1116#[derive(Clone, Default, PartialEq)]
1118#[non_exhaustive]
1119pub struct GitHubEnterpriseConfig {
1120 pub host_uri: std::string::String,
1122
1123 pub app_id: i64,
1125
1126 pub app_slug: std::string::String,
1128
1129 pub private_key_secret_version: std::string::String,
1132
1133 pub webhook_secret_secret_version: std::string::String,
1136
1137 pub app_installation_id: i64,
1139
1140 pub installation_uri: std::string::String,
1143
1144 pub service_directory_config: std::option::Option<crate::model::ServiceDirectoryConfig>,
1150
1151 pub server_version: std::string::String,
1153
1154 pub ssl_ca_certificate: std::string::String,
1156
1157 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1158}
1159
1160impl GitHubEnterpriseConfig {
1161 pub fn new() -> Self {
1162 std::default::Default::default()
1163 }
1164
1165 pub fn set_host_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1167 self.host_uri = v.into();
1168 self
1169 }
1170
1171 pub fn set_app_id<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
1173 self.app_id = v.into();
1174 self
1175 }
1176
1177 pub fn set_app_slug<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1179 self.app_slug = v.into();
1180 self
1181 }
1182
1183 pub fn set_private_key_secret_version<T: std::convert::Into<std::string::String>>(
1185 mut self,
1186 v: T,
1187 ) -> Self {
1188 self.private_key_secret_version = v.into();
1189 self
1190 }
1191
1192 pub fn set_webhook_secret_secret_version<T: std::convert::Into<std::string::String>>(
1194 mut self,
1195 v: T,
1196 ) -> Self {
1197 self.webhook_secret_secret_version = v.into();
1198 self
1199 }
1200
1201 pub fn set_app_installation_id<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
1203 self.app_installation_id = v.into();
1204 self
1205 }
1206
1207 pub fn set_installation_uri<T: std::convert::Into<std::string::String>>(
1209 mut self,
1210 v: T,
1211 ) -> Self {
1212 self.installation_uri = v.into();
1213 self
1214 }
1215
1216 pub fn set_service_directory_config<T>(mut self, v: T) -> Self
1218 where
1219 T: std::convert::Into<crate::model::ServiceDirectoryConfig>,
1220 {
1221 self.service_directory_config = std::option::Option::Some(v.into());
1222 self
1223 }
1224
1225 pub fn set_or_clear_service_directory_config<T>(mut self, v: std::option::Option<T>) -> Self
1227 where
1228 T: std::convert::Into<crate::model::ServiceDirectoryConfig>,
1229 {
1230 self.service_directory_config = v.map(|x| x.into());
1231 self
1232 }
1233
1234 pub fn set_server_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1236 self.server_version = v.into();
1237 self
1238 }
1239
1240 pub fn set_ssl_ca_certificate<T: std::convert::Into<std::string::String>>(
1242 mut self,
1243 v: T,
1244 ) -> Self {
1245 self.ssl_ca_certificate = v.into();
1246 self
1247 }
1248}
1249
1250impl wkt::message::Message for GitHubEnterpriseConfig {
1251 fn typename() -> &'static str {
1252 "type.googleapis.com/google.cloud.developerconnect.v1.GitHubEnterpriseConfig"
1253 }
1254}
1255
1256#[derive(Clone, Default, PartialEq)]
1259#[non_exhaustive]
1260pub struct ServiceDirectoryConfig {
1261 pub service: std::string::String,
1265
1266 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1267}
1268
1269impl ServiceDirectoryConfig {
1270 pub fn new() -> Self {
1271 std::default::Default::default()
1272 }
1273
1274 pub fn set_service<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1276 self.service = v.into();
1277 self
1278 }
1279}
1280
1281impl wkt::message::Message for ServiceDirectoryConfig {
1282 fn typename() -> &'static str {
1283 "type.googleapis.com/google.cloud.developerconnect.v1.ServiceDirectoryConfig"
1284 }
1285}
1286
1287#[derive(Clone, Default, PartialEq)]
1290#[non_exhaustive]
1291pub struct OAuthCredential {
1292 pub oauth_token_secret_version: std::string::String,
1295
1296 pub username: std::string::String,
1298
1299 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1300}
1301
1302impl OAuthCredential {
1303 pub fn new() -> Self {
1304 std::default::Default::default()
1305 }
1306
1307 pub fn set_oauth_token_secret_version<T: std::convert::Into<std::string::String>>(
1309 mut self,
1310 v: T,
1311 ) -> Self {
1312 self.oauth_token_secret_version = v.into();
1313 self
1314 }
1315
1316 pub fn set_username<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1318 self.username = v.into();
1319 self
1320 }
1321}
1322
1323impl wkt::message::Message for OAuthCredential {
1324 fn typename() -> &'static str {
1325 "type.googleapis.com/google.cloud.developerconnect.v1.OAuthCredential"
1326 }
1327}
1328
1329#[derive(Clone, Default, PartialEq)]
1331#[non_exhaustive]
1332pub struct GitLabConfig {
1333 pub webhook_secret_secret_version: std::string::String,
1337
1338 pub read_authorizer_credential: std::option::Option<crate::model::UserCredential>,
1343
1344 pub authorizer_credential: std::option::Option<crate::model::UserCredential>,
1349
1350 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1351}
1352
1353impl GitLabConfig {
1354 pub fn new() -> Self {
1355 std::default::Default::default()
1356 }
1357
1358 pub fn set_webhook_secret_secret_version<T: std::convert::Into<std::string::String>>(
1360 mut self,
1361 v: T,
1362 ) -> Self {
1363 self.webhook_secret_secret_version = v.into();
1364 self
1365 }
1366
1367 pub fn set_read_authorizer_credential<T>(mut self, v: T) -> Self
1369 where
1370 T: std::convert::Into<crate::model::UserCredential>,
1371 {
1372 self.read_authorizer_credential = std::option::Option::Some(v.into());
1373 self
1374 }
1375
1376 pub fn set_or_clear_read_authorizer_credential<T>(mut self, v: std::option::Option<T>) -> Self
1378 where
1379 T: std::convert::Into<crate::model::UserCredential>,
1380 {
1381 self.read_authorizer_credential = v.map(|x| x.into());
1382 self
1383 }
1384
1385 pub fn set_authorizer_credential<T>(mut self, v: T) -> Self
1387 where
1388 T: std::convert::Into<crate::model::UserCredential>,
1389 {
1390 self.authorizer_credential = std::option::Option::Some(v.into());
1391 self
1392 }
1393
1394 pub fn set_or_clear_authorizer_credential<T>(mut self, v: std::option::Option<T>) -> Self
1396 where
1397 T: std::convert::Into<crate::model::UserCredential>,
1398 {
1399 self.authorizer_credential = v.map(|x| x.into());
1400 self
1401 }
1402}
1403
1404impl wkt::message::Message for GitLabConfig {
1405 fn typename() -> &'static str {
1406 "type.googleapis.com/google.cloud.developerconnect.v1.GitLabConfig"
1407 }
1408}
1409
1410#[derive(Clone, Default, PartialEq)]
1413#[non_exhaustive]
1414pub struct UserCredential {
1415 pub user_token_secret_version: std::string::String,
1419
1420 pub username: std::string::String,
1422
1423 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1424}
1425
1426impl UserCredential {
1427 pub fn new() -> Self {
1428 std::default::Default::default()
1429 }
1430
1431 pub fn set_user_token_secret_version<T: std::convert::Into<std::string::String>>(
1433 mut self,
1434 v: T,
1435 ) -> Self {
1436 self.user_token_secret_version = v.into();
1437 self
1438 }
1439
1440 pub fn set_username<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1442 self.username = v.into();
1443 self
1444 }
1445}
1446
1447impl wkt::message::Message for UserCredential {
1448 fn typename() -> &'static str {
1449 "type.googleapis.com/google.cloud.developerconnect.v1.UserCredential"
1450 }
1451}
1452
1453#[derive(Clone, Default, PartialEq)]
1455#[non_exhaustive]
1456pub struct GitLabEnterpriseConfig {
1457 pub host_uri: std::string::String,
1459
1460 pub webhook_secret_secret_version: std::string::String,
1464
1465 pub read_authorizer_credential: std::option::Option<crate::model::UserCredential>,
1470
1471 pub authorizer_credential: std::option::Option<crate::model::UserCredential>,
1476
1477 pub service_directory_config: std::option::Option<crate::model::ServiceDirectoryConfig>,
1483
1484 pub ssl_ca_certificate: std::string::String,
1487
1488 pub server_version: std::string::String,
1491
1492 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1493}
1494
1495impl GitLabEnterpriseConfig {
1496 pub fn new() -> Self {
1497 std::default::Default::default()
1498 }
1499
1500 pub fn set_host_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1502 self.host_uri = v.into();
1503 self
1504 }
1505
1506 pub fn set_webhook_secret_secret_version<T: std::convert::Into<std::string::String>>(
1508 mut self,
1509 v: T,
1510 ) -> Self {
1511 self.webhook_secret_secret_version = v.into();
1512 self
1513 }
1514
1515 pub fn set_read_authorizer_credential<T>(mut self, v: T) -> Self
1517 where
1518 T: std::convert::Into<crate::model::UserCredential>,
1519 {
1520 self.read_authorizer_credential = std::option::Option::Some(v.into());
1521 self
1522 }
1523
1524 pub fn set_or_clear_read_authorizer_credential<T>(mut self, v: std::option::Option<T>) -> Self
1526 where
1527 T: std::convert::Into<crate::model::UserCredential>,
1528 {
1529 self.read_authorizer_credential = v.map(|x| x.into());
1530 self
1531 }
1532
1533 pub fn set_authorizer_credential<T>(mut self, v: T) -> Self
1535 where
1536 T: std::convert::Into<crate::model::UserCredential>,
1537 {
1538 self.authorizer_credential = std::option::Option::Some(v.into());
1539 self
1540 }
1541
1542 pub fn set_or_clear_authorizer_credential<T>(mut self, v: std::option::Option<T>) -> Self
1544 where
1545 T: std::convert::Into<crate::model::UserCredential>,
1546 {
1547 self.authorizer_credential = v.map(|x| x.into());
1548 self
1549 }
1550
1551 pub fn set_service_directory_config<T>(mut self, v: T) -> Self
1553 where
1554 T: std::convert::Into<crate::model::ServiceDirectoryConfig>,
1555 {
1556 self.service_directory_config = std::option::Option::Some(v.into());
1557 self
1558 }
1559
1560 pub fn set_or_clear_service_directory_config<T>(mut self, v: std::option::Option<T>) -> Self
1562 where
1563 T: std::convert::Into<crate::model::ServiceDirectoryConfig>,
1564 {
1565 self.service_directory_config = v.map(|x| x.into());
1566 self
1567 }
1568
1569 pub fn set_ssl_ca_certificate<T: std::convert::Into<std::string::String>>(
1571 mut self,
1572 v: T,
1573 ) -> Self {
1574 self.ssl_ca_certificate = v.into();
1575 self
1576 }
1577
1578 pub fn set_server_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1580 self.server_version = v.into();
1581 self
1582 }
1583}
1584
1585impl wkt::message::Message for GitLabEnterpriseConfig {
1586 fn typename() -> &'static str {
1587 "type.googleapis.com/google.cloud.developerconnect.v1.GitLabEnterpriseConfig"
1588 }
1589}
1590
1591#[derive(Clone, Default, PartialEq)]
1593#[non_exhaustive]
1594pub struct BitbucketDataCenterConfig {
1595 pub host_uri: std::string::String,
1597
1598 pub webhook_secret_secret_version: std::string::String,
1602
1603 pub read_authorizer_credential: std::option::Option<crate::model::UserCredential>,
1606
1607 pub authorizer_credential: std::option::Option<crate::model::UserCredential>,
1611
1612 pub service_directory_config: std::option::Option<crate::model::ServiceDirectoryConfig>,
1618
1619 pub ssl_ca_certificate: std::string::String,
1622
1623 pub server_version: std::string::String,
1626
1627 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1628}
1629
1630impl BitbucketDataCenterConfig {
1631 pub fn new() -> Self {
1632 std::default::Default::default()
1633 }
1634
1635 pub fn set_host_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1637 self.host_uri = v.into();
1638 self
1639 }
1640
1641 pub fn set_webhook_secret_secret_version<T: std::convert::Into<std::string::String>>(
1643 mut self,
1644 v: T,
1645 ) -> Self {
1646 self.webhook_secret_secret_version = v.into();
1647 self
1648 }
1649
1650 pub fn set_read_authorizer_credential<T>(mut self, v: T) -> Self
1652 where
1653 T: std::convert::Into<crate::model::UserCredential>,
1654 {
1655 self.read_authorizer_credential = std::option::Option::Some(v.into());
1656 self
1657 }
1658
1659 pub fn set_or_clear_read_authorizer_credential<T>(mut self, v: std::option::Option<T>) -> Self
1661 where
1662 T: std::convert::Into<crate::model::UserCredential>,
1663 {
1664 self.read_authorizer_credential = v.map(|x| x.into());
1665 self
1666 }
1667
1668 pub fn set_authorizer_credential<T>(mut self, v: T) -> Self
1670 where
1671 T: std::convert::Into<crate::model::UserCredential>,
1672 {
1673 self.authorizer_credential = std::option::Option::Some(v.into());
1674 self
1675 }
1676
1677 pub fn set_or_clear_authorizer_credential<T>(mut self, v: std::option::Option<T>) -> Self
1679 where
1680 T: std::convert::Into<crate::model::UserCredential>,
1681 {
1682 self.authorizer_credential = v.map(|x| x.into());
1683 self
1684 }
1685
1686 pub fn set_service_directory_config<T>(mut self, v: T) -> Self
1688 where
1689 T: std::convert::Into<crate::model::ServiceDirectoryConfig>,
1690 {
1691 self.service_directory_config = std::option::Option::Some(v.into());
1692 self
1693 }
1694
1695 pub fn set_or_clear_service_directory_config<T>(mut self, v: std::option::Option<T>) -> Self
1697 where
1698 T: std::convert::Into<crate::model::ServiceDirectoryConfig>,
1699 {
1700 self.service_directory_config = v.map(|x| x.into());
1701 self
1702 }
1703
1704 pub fn set_ssl_ca_certificate<T: std::convert::Into<std::string::String>>(
1706 mut self,
1707 v: T,
1708 ) -> Self {
1709 self.ssl_ca_certificate = v.into();
1710 self
1711 }
1712
1713 pub fn set_server_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1715 self.server_version = v.into();
1716 self
1717 }
1718}
1719
1720impl wkt::message::Message for BitbucketDataCenterConfig {
1721 fn typename() -> &'static str {
1722 "type.googleapis.com/google.cloud.developerconnect.v1.BitbucketDataCenterConfig"
1723 }
1724}
1725
1726#[derive(Clone, Default, PartialEq)]
1728#[non_exhaustive]
1729pub struct BitbucketCloudConfig {
1730 pub workspace: std::string::String,
1733
1734 pub webhook_secret_secret_version: std::string::String,
1739
1740 pub read_authorizer_credential: std::option::Option<crate::model::UserCredential>,
1744
1745 pub authorizer_credential: std::option::Option<crate::model::UserCredential>,
1750
1751 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1752}
1753
1754impl BitbucketCloudConfig {
1755 pub fn new() -> Self {
1756 std::default::Default::default()
1757 }
1758
1759 pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1761 self.workspace = v.into();
1762 self
1763 }
1764
1765 pub fn set_webhook_secret_secret_version<T: std::convert::Into<std::string::String>>(
1767 mut self,
1768 v: T,
1769 ) -> Self {
1770 self.webhook_secret_secret_version = v.into();
1771 self
1772 }
1773
1774 pub fn set_read_authorizer_credential<T>(mut self, v: T) -> Self
1776 where
1777 T: std::convert::Into<crate::model::UserCredential>,
1778 {
1779 self.read_authorizer_credential = std::option::Option::Some(v.into());
1780 self
1781 }
1782
1783 pub fn set_or_clear_read_authorizer_credential<T>(mut self, v: std::option::Option<T>) -> Self
1785 where
1786 T: std::convert::Into<crate::model::UserCredential>,
1787 {
1788 self.read_authorizer_credential = v.map(|x| x.into());
1789 self
1790 }
1791
1792 pub fn set_authorizer_credential<T>(mut self, v: T) -> Self
1794 where
1795 T: std::convert::Into<crate::model::UserCredential>,
1796 {
1797 self.authorizer_credential = std::option::Option::Some(v.into());
1798 self
1799 }
1800
1801 pub fn set_or_clear_authorizer_credential<T>(mut self, v: std::option::Option<T>) -> Self
1803 where
1804 T: std::convert::Into<crate::model::UserCredential>,
1805 {
1806 self.authorizer_credential = v.map(|x| x.into());
1807 self
1808 }
1809}
1810
1811impl wkt::message::Message for BitbucketCloudConfig {
1812 fn typename() -> &'static str {
1813 "type.googleapis.com/google.cloud.developerconnect.v1.BitbucketCloudConfig"
1814 }
1815}
1816
1817#[derive(Clone, Default, PartialEq)]
1819#[non_exhaustive]
1820pub struct ListConnectionsRequest {
1821 pub parent: std::string::String,
1823
1824 pub page_size: i32,
1827
1828 pub page_token: std::string::String,
1830
1831 pub filter: std::string::String,
1833
1834 pub order_by: std::string::String,
1836
1837 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1838}
1839
1840impl ListConnectionsRequest {
1841 pub fn new() -> Self {
1842 std::default::Default::default()
1843 }
1844
1845 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1847 self.parent = v.into();
1848 self
1849 }
1850
1851 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1853 self.page_size = v.into();
1854 self
1855 }
1856
1857 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1859 self.page_token = v.into();
1860 self
1861 }
1862
1863 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1865 self.filter = v.into();
1866 self
1867 }
1868
1869 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1871 self.order_by = v.into();
1872 self
1873 }
1874}
1875
1876impl wkt::message::Message for ListConnectionsRequest {
1877 fn typename() -> &'static str {
1878 "type.googleapis.com/google.cloud.developerconnect.v1.ListConnectionsRequest"
1879 }
1880}
1881
1882#[derive(Clone, Default, PartialEq)]
1884#[non_exhaustive]
1885pub struct ListConnectionsResponse {
1886 pub connections: std::vec::Vec<crate::model::Connection>,
1888
1889 pub next_page_token: std::string::String,
1891
1892 pub unreachable: std::vec::Vec<std::string::String>,
1894
1895 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1896}
1897
1898impl ListConnectionsResponse {
1899 pub fn new() -> Self {
1900 std::default::Default::default()
1901 }
1902
1903 pub fn set_connections<T, V>(mut self, v: T) -> Self
1905 where
1906 T: std::iter::IntoIterator<Item = V>,
1907 V: std::convert::Into<crate::model::Connection>,
1908 {
1909 use std::iter::Iterator;
1910 self.connections = v.into_iter().map(|i| i.into()).collect();
1911 self
1912 }
1913
1914 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1916 self.next_page_token = v.into();
1917 self
1918 }
1919
1920 pub fn set_unreachable<T, V>(mut self, v: T) -> Self
1922 where
1923 T: std::iter::IntoIterator<Item = V>,
1924 V: std::convert::Into<std::string::String>,
1925 {
1926 use std::iter::Iterator;
1927 self.unreachable = v.into_iter().map(|i| i.into()).collect();
1928 self
1929 }
1930}
1931
1932impl wkt::message::Message for ListConnectionsResponse {
1933 fn typename() -> &'static str {
1934 "type.googleapis.com/google.cloud.developerconnect.v1.ListConnectionsResponse"
1935 }
1936}
1937
1938#[doc(hidden)]
1939impl gax::paginator::internal::PageableResponse for ListConnectionsResponse {
1940 type PageItem = crate::model::Connection;
1941
1942 fn items(self) -> std::vec::Vec<Self::PageItem> {
1943 self.connections
1944 }
1945
1946 fn next_page_token(&self) -> std::string::String {
1947 use std::clone::Clone;
1948 self.next_page_token.clone()
1949 }
1950}
1951
1952#[derive(Clone, Default, PartialEq)]
1954#[non_exhaustive]
1955pub struct GetConnectionRequest {
1956 pub name: std::string::String,
1958
1959 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1960}
1961
1962impl GetConnectionRequest {
1963 pub fn new() -> Self {
1964 std::default::Default::default()
1965 }
1966
1967 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1969 self.name = v.into();
1970 self
1971 }
1972}
1973
1974impl wkt::message::Message for GetConnectionRequest {
1975 fn typename() -> &'static str {
1976 "type.googleapis.com/google.cloud.developerconnect.v1.GetConnectionRequest"
1977 }
1978}
1979
1980#[derive(Clone, Default, PartialEq)]
1982#[non_exhaustive]
1983pub struct CreateConnectionRequest {
1984 pub parent: std::string::String,
1986
1987 pub connection_id: std::string::String,
1991
1992 pub connection: std::option::Option<crate::model::Connection>,
1994
1995 pub request_id: std::string::String,
2009
2010 pub validate_only: bool,
2012
2013 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2014}
2015
2016impl CreateConnectionRequest {
2017 pub fn new() -> Self {
2018 std::default::Default::default()
2019 }
2020
2021 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2023 self.parent = v.into();
2024 self
2025 }
2026
2027 pub fn set_connection_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2029 self.connection_id = v.into();
2030 self
2031 }
2032
2033 pub fn set_connection<T>(mut self, v: T) -> Self
2035 where
2036 T: std::convert::Into<crate::model::Connection>,
2037 {
2038 self.connection = std::option::Option::Some(v.into());
2039 self
2040 }
2041
2042 pub fn set_or_clear_connection<T>(mut self, v: std::option::Option<T>) -> Self
2044 where
2045 T: std::convert::Into<crate::model::Connection>,
2046 {
2047 self.connection = v.map(|x| x.into());
2048 self
2049 }
2050
2051 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2053 self.request_id = v.into();
2054 self
2055 }
2056
2057 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2059 self.validate_only = v.into();
2060 self
2061 }
2062}
2063
2064impl wkt::message::Message for CreateConnectionRequest {
2065 fn typename() -> &'static str {
2066 "type.googleapis.com/google.cloud.developerconnect.v1.CreateConnectionRequest"
2067 }
2068}
2069
2070#[derive(Clone, Default, PartialEq)]
2072#[non_exhaustive]
2073pub struct UpdateConnectionRequest {
2074 pub update_mask: std::option::Option<wkt::FieldMask>,
2080
2081 pub connection: std::option::Option<crate::model::Connection>,
2083
2084 pub request_id: std::string::String,
2098
2099 pub allow_missing: bool,
2105
2106 pub validate_only: bool,
2108
2109 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2110}
2111
2112impl UpdateConnectionRequest {
2113 pub fn new() -> Self {
2114 std::default::Default::default()
2115 }
2116
2117 pub fn set_update_mask<T>(mut self, v: T) -> Self
2119 where
2120 T: std::convert::Into<wkt::FieldMask>,
2121 {
2122 self.update_mask = std::option::Option::Some(v.into());
2123 self
2124 }
2125
2126 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
2128 where
2129 T: std::convert::Into<wkt::FieldMask>,
2130 {
2131 self.update_mask = v.map(|x| x.into());
2132 self
2133 }
2134
2135 pub fn set_connection<T>(mut self, v: T) -> Self
2137 where
2138 T: std::convert::Into<crate::model::Connection>,
2139 {
2140 self.connection = std::option::Option::Some(v.into());
2141 self
2142 }
2143
2144 pub fn set_or_clear_connection<T>(mut self, v: std::option::Option<T>) -> Self
2146 where
2147 T: std::convert::Into<crate::model::Connection>,
2148 {
2149 self.connection = v.map(|x| x.into());
2150 self
2151 }
2152
2153 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2155 self.request_id = v.into();
2156 self
2157 }
2158
2159 pub fn set_allow_missing<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2161 self.allow_missing = v.into();
2162 self
2163 }
2164
2165 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2167 self.validate_only = v.into();
2168 self
2169 }
2170}
2171
2172impl wkt::message::Message for UpdateConnectionRequest {
2173 fn typename() -> &'static str {
2174 "type.googleapis.com/google.cloud.developerconnect.v1.UpdateConnectionRequest"
2175 }
2176}
2177
2178#[derive(Clone, Default, PartialEq)]
2180#[non_exhaustive]
2181pub struct DeleteConnectionRequest {
2182 pub name: std::string::String,
2184
2185 pub request_id: std::string::String,
2199
2200 pub validate_only: bool,
2202
2203 pub etag: std::string::String,
2207
2208 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2209}
2210
2211impl DeleteConnectionRequest {
2212 pub fn new() -> Self {
2213 std::default::Default::default()
2214 }
2215
2216 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2218 self.name = v.into();
2219 self
2220 }
2221
2222 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2224 self.request_id = v.into();
2225 self
2226 }
2227
2228 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2230 self.validate_only = v.into();
2231 self
2232 }
2233
2234 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2236 self.etag = v.into();
2237 self
2238 }
2239}
2240
2241impl wkt::message::Message for DeleteConnectionRequest {
2242 fn typename() -> &'static str {
2243 "type.googleapis.com/google.cloud.developerconnect.v1.DeleteConnectionRequest"
2244 }
2245}
2246
2247#[derive(Clone, Default, PartialEq)]
2249#[non_exhaustive]
2250pub struct ListAccountConnectorsRequest {
2251 pub parent: std::string::String,
2253
2254 pub page_size: i32,
2257
2258 pub page_token: std::string::String,
2260
2261 pub filter: std::string::String,
2263
2264 pub order_by: std::string::String,
2266
2267 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2268}
2269
2270impl ListAccountConnectorsRequest {
2271 pub fn new() -> Self {
2272 std::default::Default::default()
2273 }
2274
2275 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2277 self.parent = v.into();
2278 self
2279 }
2280
2281 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2283 self.page_size = v.into();
2284 self
2285 }
2286
2287 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2289 self.page_token = v.into();
2290 self
2291 }
2292
2293 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2295 self.filter = v.into();
2296 self
2297 }
2298
2299 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2301 self.order_by = v.into();
2302 self
2303 }
2304}
2305
2306impl wkt::message::Message for ListAccountConnectorsRequest {
2307 fn typename() -> &'static str {
2308 "type.googleapis.com/google.cloud.developerconnect.v1.ListAccountConnectorsRequest"
2309 }
2310}
2311
2312#[derive(Clone, Default, PartialEq)]
2314#[non_exhaustive]
2315pub struct ListAccountConnectorsResponse {
2316 pub account_connectors: std::vec::Vec<crate::model::AccountConnector>,
2318
2319 pub next_page_token: std::string::String,
2321
2322 pub unreachable: std::vec::Vec<std::string::String>,
2324
2325 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2326}
2327
2328impl ListAccountConnectorsResponse {
2329 pub fn new() -> Self {
2330 std::default::Default::default()
2331 }
2332
2333 pub fn set_account_connectors<T, V>(mut self, v: T) -> Self
2335 where
2336 T: std::iter::IntoIterator<Item = V>,
2337 V: std::convert::Into<crate::model::AccountConnector>,
2338 {
2339 use std::iter::Iterator;
2340 self.account_connectors = v.into_iter().map(|i| i.into()).collect();
2341 self
2342 }
2343
2344 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2346 self.next_page_token = v.into();
2347 self
2348 }
2349
2350 pub fn set_unreachable<T, V>(mut self, v: T) -> Self
2352 where
2353 T: std::iter::IntoIterator<Item = V>,
2354 V: std::convert::Into<std::string::String>,
2355 {
2356 use std::iter::Iterator;
2357 self.unreachable = v.into_iter().map(|i| i.into()).collect();
2358 self
2359 }
2360}
2361
2362impl wkt::message::Message for ListAccountConnectorsResponse {
2363 fn typename() -> &'static str {
2364 "type.googleapis.com/google.cloud.developerconnect.v1.ListAccountConnectorsResponse"
2365 }
2366}
2367
2368#[doc(hidden)]
2369impl gax::paginator::internal::PageableResponse for ListAccountConnectorsResponse {
2370 type PageItem = crate::model::AccountConnector;
2371
2372 fn items(self) -> std::vec::Vec<Self::PageItem> {
2373 self.account_connectors
2374 }
2375
2376 fn next_page_token(&self) -> std::string::String {
2377 use std::clone::Clone;
2378 self.next_page_token.clone()
2379 }
2380}
2381
2382#[derive(Clone, Default, PartialEq)]
2384#[non_exhaustive]
2385pub struct GetAccountConnectorRequest {
2386 pub name: std::string::String,
2388
2389 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2390}
2391
2392impl GetAccountConnectorRequest {
2393 pub fn new() -> Self {
2394 std::default::Default::default()
2395 }
2396
2397 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2399 self.name = v.into();
2400 self
2401 }
2402}
2403
2404impl wkt::message::Message for GetAccountConnectorRequest {
2405 fn typename() -> &'static str {
2406 "type.googleapis.com/google.cloud.developerconnect.v1.GetAccountConnectorRequest"
2407 }
2408}
2409
2410#[derive(Clone, Default, PartialEq)]
2411#[non_exhaustive]
2412pub struct CreateAccountConnectorRequest {
2413 pub parent: std::string::String,
2415
2416 pub account_connector_id: std::string::String,
2421
2422 pub account_connector: std::option::Option<crate::model::AccountConnector>,
2424
2425 pub request_id: std::string::String,
2439
2440 pub validate_only: bool,
2442
2443 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2444}
2445
2446impl CreateAccountConnectorRequest {
2447 pub fn new() -> Self {
2448 std::default::Default::default()
2449 }
2450
2451 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2453 self.parent = v.into();
2454 self
2455 }
2456
2457 pub fn set_account_connector_id<T: std::convert::Into<std::string::String>>(
2459 mut self,
2460 v: T,
2461 ) -> Self {
2462 self.account_connector_id = v.into();
2463 self
2464 }
2465
2466 pub fn set_account_connector<T>(mut self, v: T) -> Self
2468 where
2469 T: std::convert::Into<crate::model::AccountConnector>,
2470 {
2471 self.account_connector = std::option::Option::Some(v.into());
2472 self
2473 }
2474
2475 pub fn set_or_clear_account_connector<T>(mut self, v: std::option::Option<T>) -> Self
2477 where
2478 T: std::convert::Into<crate::model::AccountConnector>,
2479 {
2480 self.account_connector = v.map(|x| x.into());
2481 self
2482 }
2483
2484 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2486 self.request_id = v.into();
2487 self
2488 }
2489
2490 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2492 self.validate_only = v.into();
2493 self
2494 }
2495}
2496
2497impl wkt::message::Message for CreateAccountConnectorRequest {
2498 fn typename() -> &'static str {
2499 "type.googleapis.com/google.cloud.developerconnect.v1.CreateAccountConnectorRequest"
2500 }
2501}
2502
2503#[derive(Clone, Default, PartialEq)]
2505#[non_exhaustive]
2506pub struct UpdateAccountConnectorRequest {
2507 pub update_mask: std::option::Option<wkt::FieldMask>,
2509
2510 pub account_connector: std::option::Option<crate::model::AccountConnector>,
2512
2513 pub request_id: std::string::String,
2527
2528 pub allow_missing: bool,
2533
2534 pub validate_only: bool,
2536
2537 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2538}
2539
2540impl UpdateAccountConnectorRequest {
2541 pub fn new() -> Self {
2542 std::default::Default::default()
2543 }
2544
2545 pub fn set_update_mask<T>(mut self, v: T) -> Self
2547 where
2548 T: std::convert::Into<wkt::FieldMask>,
2549 {
2550 self.update_mask = std::option::Option::Some(v.into());
2551 self
2552 }
2553
2554 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
2556 where
2557 T: std::convert::Into<wkt::FieldMask>,
2558 {
2559 self.update_mask = v.map(|x| x.into());
2560 self
2561 }
2562
2563 pub fn set_account_connector<T>(mut self, v: T) -> Self
2565 where
2566 T: std::convert::Into<crate::model::AccountConnector>,
2567 {
2568 self.account_connector = std::option::Option::Some(v.into());
2569 self
2570 }
2571
2572 pub fn set_or_clear_account_connector<T>(mut self, v: std::option::Option<T>) -> Self
2574 where
2575 T: std::convert::Into<crate::model::AccountConnector>,
2576 {
2577 self.account_connector = v.map(|x| x.into());
2578 self
2579 }
2580
2581 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2583 self.request_id = v.into();
2584 self
2585 }
2586
2587 pub fn set_allow_missing<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2589 self.allow_missing = v.into();
2590 self
2591 }
2592
2593 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2595 self.validate_only = v.into();
2596 self
2597 }
2598}
2599
2600impl wkt::message::Message for UpdateAccountConnectorRequest {
2601 fn typename() -> &'static str {
2602 "type.googleapis.com/google.cloud.developerconnect.v1.UpdateAccountConnectorRequest"
2603 }
2604}
2605
2606#[derive(Clone, Default, PartialEq)]
2608#[non_exhaustive]
2609pub struct DeleteAccountConnectorRequest {
2610 pub name: std::string::String,
2612
2613 pub request_id: std::string::String,
2627
2628 pub validate_only: bool,
2630
2631 pub etag: std::string::String,
2636
2637 pub force: bool,
2641
2642 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2643}
2644
2645impl DeleteAccountConnectorRequest {
2646 pub fn new() -> Self {
2647 std::default::Default::default()
2648 }
2649
2650 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2652 self.name = v.into();
2653 self
2654 }
2655
2656 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2658 self.request_id = v.into();
2659 self
2660 }
2661
2662 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2664 self.validate_only = v.into();
2665 self
2666 }
2667
2668 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2670 self.etag = v.into();
2671 self
2672 }
2673
2674 pub fn set_force<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2676 self.force = v.into();
2677 self
2678 }
2679}
2680
2681impl wkt::message::Message for DeleteAccountConnectorRequest {
2682 fn typename() -> &'static str {
2683 "type.googleapis.com/google.cloud.developerconnect.v1.DeleteAccountConnectorRequest"
2684 }
2685}
2686
2687#[derive(Clone, Default, PartialEq)]
2689#[non_exhaustive]
2690pub struct DeleteUserRequest {
2691 pub name: std::string::String,
2693
2694 pub request_id: std::string::String,
2708
2709 pub validate_only: bool,
2711
2712 pub etag: std::string::String,
2716
2717 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2718}
2719
2720impl DeleteUserRequest {
2721 pub fn new() -> Self {
2722 std::default::Default::default()
2723 }
2724
2725 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2727 self.name = v.into();
2728 self
2729 }
2730
2731 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2733 self.request_id = v.into();
2734 self
2735 }
2736
2737 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2739 self.validate_only = v.into();
2740 self
2741 }
2742
2743 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2745 self.etag = v.into();
2746 self
2747 }
2748}
2749
2750impl wkt::message::Message for DeleteUserRequest {
2751 fn typename() -> &'static str {
2752 "type.googleapis.com/google.cloud.developerconnect.v1.DeleteUserRequest"
2753 }
2754}
2755
2756#[derive(Clone, Default, PartialEq)]
2758#[non_exhaustive]
2759pub struct OperationMetadata {
2760 pub create_time: std::option::Option<wkt::Timestamp>,
2762
2763 pub end_time: std::option::Option<wkt::Timestamp>,
2765
2766 pub target: std::string::String,
2768
2769 pub verb: std::string::String,
2771
2772 pub status_message: std::string::String,
2774
2775 pub requested_cancellation: bool,
2785
2786 pub api_version: std::string::String,
2788
2789 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2790}
2791
2792impl OperationMetadata {
2793 pub fn new() -> Self {
2794 std::default::Default::default()
2795 }
2796
2797 pub fn set_create_time<T>(mut self, v: T) -> Self
2799 where
2800 T: std::convert::Into<wkt::Timestamp>,
2801 {
2802 self.create_time = std::option::Option::Some(v.into());
2803 self
2804 }
2805
2806 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
2808 where
2809 T: std::convert::Into<wkt::Timestamp>,
2810 {
2811 self.create_time = v.map(|x| x.into());
2812 self
2813 }
2814
2815 pub fn set_end_time<T>(mut self, v: T) -> Self
2817 where
2818 T: std::convert::Into<wkt::Timestamp>,
2819 {
2820 self.end_time = std::option::Option::Some(v.into());
2821 self
2822 }
2823
2824 pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
2826 where
2827 T: std::convert::Into<wkt::Timestamp>,
2828 {
2829 self.end_time = v.map(|x| x.into());
2830 self
2831 }
2832
2833 pub fn set_target<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2835 self.target = v.into();
2836 self
2837 }
2838
2839 pub fn set_verb<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2841 self.verb = v.into();
2842 self
2843 }
2844
2845 pub fn set_status_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2847 self.status_message = v.into();
2848 self
2849 }
2850
2851 pub fn set_requested_cancellation<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2853 self.requested_cancellation = v.into();
2854 self
2855 }
2856
2857 pub fn set_api_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2859 self.api_version = v.into();
2860 self
2861 }
2862}
2863
2864impl wkt::message::Message for OperationMetadata {
2865 fn typename() -> &'static str {
2866 "type.googleapis.com/google.cloud.developerconnect.v1.OperationMetadata"
2867 }
2868}
2869
2870#[derive(Clone, Default, PartialEq)]
2872#[non_exhaustive]
2873pub struct FetchSelfRequest {
2874 pub name: std::string::String,
2876
2877 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2878}
2879
2880impl FetchSelfRequest {
2881 pub fn new() -> Self {
2882 std::default::Default::default()
2883 }
2884
2885 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2887 self.name = v.into();
2888 self
2889 }
2890}
2891
2892impl wkt::message::Message for FetchSelfRequest {
2893 fn typename() -> &'static str {
2894 "type.googleapis.com/google.cloud.developerconnect.v1.FetchSelfRequest"
2895 }
2896}
2897
2898#[derive(Clone, Default, PartialEq)]
2900#[non_exhaustive]
2901pub struct DeleteSelfRequest {
2902 pub name: std::string::String,
2904
2905 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2906}
2907
2908impl DeleteSelfRequest {
2909 pub fn new() -> Self {
2910 std::default::Default::default()
2911 }
2912
2913 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2915 self.name = v.into();
2916 self
2917 }
2918}
2919
2920impl wkt::message::Message for DeleteSelfRequest {
2921 fn typename() -> &'static str {
2922 "type.googleapis.com/google.cloud.developerconnect.v1.DeleteSelfRequest"
2923 }
2924}
2925
2926#[derive(Clone, Default, PartialEq)]
2928#[non_exhaustive]
2929pub struct FetchAccessTokenRequest {
2930 pub account_connector: std::string::String,
2933
2934 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2935}
2936
2937impl FetchAccessTokenRequest {
2938 pub fn new() -> Self {
2939 std::default::Default::default()
2940 }
2941
2942 pub fn set_account_connector<T: std::convert::Into<std::string::String>>(
2944 mut self,
2945 v: T,
2946 ) -> Self {
2947 self.account_connector = v.into();
2948 self
2949 }
2950}
2951
2952impl wkt::message::Message for FetchAccessTokenRequest {
2953 fn typename() -> &'static str {
2954 "type.googleapis.com/google.cloud.developerconnect.v1.FetchAccessTokenRequest"
2955 }
2956}
2957
2958#[derive(Clone, Default, PartialEq)]
2960#[non_exhaustive]
2961pub struct FetchAccessTokenResponse {
2962 pub token: std::string::String,
2964
2965 pub expiration_time: std::option::Option<wkt::Timestamp>,
2967
2968 pub scopes: std::vec::Vec<std::string::String>,
2970
2971 pub exchange_error: std::option::Option<crate::model::ExchangeError>,
2973
2974 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2975}
2976
2977impl FetchAccessTokenResponse {
2978 pub fn new() -> Self {
2979 std::default::Default::default()
2980 }
2981
2982 pub fn set_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2984 self.token = v.into();
2985 self
2986 }
2987
2988 pub fn set_expiration_time<T>(mut self, v: T) -> Self
2990 where
2991 T: std::convert::Into<wkt::Timestamp>,
2992 {
2993 self.expiration_time = std::option::Option::Some(v.into());
2994 self
2995 }
2996
2997 pub fn set_or_clear_expiration_time<T>(mut self, v: std::option::Option<T>) -> Self
2999 where
3000 T: std::convert::Into<wkt::Timestamp>,
3001 {
3002 self.expiration_time = v.map(|x| x.into());
3003 self
3004 }
3005
3006 pub fn set_scopes<T, V>(mut self, v: T) -> Self
3008 where
3009 T: std::iter::IntoIterator<Item = V>,
3010 V: std::convert::Into<std::string::String>,
3011 {
3012 use std::iter::Iterator;
3013 self.scopes = v.into_iter().map(|i| i.into()).collect();
3014 self
3015 }
3016
3017 pub fn set_exchange_error<T>(mut self, v: T) -> Self
3019 where
3020 T: std::convert::Into<crate::model::ExchangeError>,
3021 {
3022 self.exchange_error = std::option::Option::Some(v.into());
3023 self
3024 }
3025
3026 pub fn set_or_clear_exchange_error<T>(mut self, v: std::option::Option<T>) -> Self
3028 where
3029 T: std::convert::Into<crate::model::ExchangeError>,
3030 {
3031 self.exchange_error = v.map(|x| x.into());
3032 self
3033 }
3034}
3035
3036impl wkt::message::Message for FetchAccessTokenResponse {
3037 fn typename() -> &'static str {
3038 "type.googleapis.com/google.cloud.developerconnect.v1.FetchAccessTokenResponse"
3039 }
3040}
3041
3042#[derive(Clone, Default, PartialEq)]
3044#[non_exhaustive]
3045pub struct ExchangeError {
3046 pub code: std::string::String,
3048
3049 pub description: std::string::String,
3052
3053 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3054}
3055
3056impl ExchangeError {
3057 pub fn new() -> Self {
3058 std::default::Default::default()
3059 }
3060
3061 pub fn set_code<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3063 self.code = v.into();
3064 self
3065 }
3066
3067 pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3069 self.description = v.into();
3070 self
3071 }
3072}
3073
3074impl wkt::message::Message for ExchangeError {
3075 fn typename() -> &'static str {
3076 "type.googleapis.com/google.cloud.developerconnect.v1.ExchangeError"
3077 }
3078}
3079
3080#[derive(Clone, Default, PartialEq)]
3082#[non_exhaustive]
3083pub struct GitRepositoryLink {
3084 pub name: std::string::String,
3087
3088 pub clone_uri: std::string::String,
3090
3091 pub create_time: std::option::Option<wkt::Timestamp>,
3093
3094 pub update_time: std::option::Option<wkt::Timestamp>,
3096
3097 pub delete_time: std::option::Option<wkt::Timestamp>,
3099
3100 pub labels: std::collections::HashMap<std::string::String, std::string::String>,
3102
3103 pub etag: std::string::String,
3107
3108 pub reconciling: bool,
3111
3112 pub annotations: std::collections::HashMap<std::string::String, std::string::String>,
3114
3115 pub uid: std::string::String,
3117
3118 pub webhook_id: std::string::String,
3120
3121 pub git_proxy_uri: std::string::String,
3125
3126 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3127}
3128
3129impl GitRepositoryLink {
3130 pub fn new() -> Self {
3131 std::default::Default::default()
3132 }
3133
3134 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3136 self.name = v.into();
3137 self
3138 }
3139
3140 pub fn set_clone_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3142 self.clone_uri = v.into();
3143 self
3144 }
3145
3146 pub fn set_create_time<T>(mut self, v: T) -> Self
3148 where
3149 T: std::convert::Into<wkt::Timestamp>,
3150 {
3151 self.create_time = std::option::Option::Some(v.into());
3152 self
3153 }
3154
3155 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
3157 where
3158 T: std::convert::Into<wkt::Timestamp>,
3159 {
3160 self.create_time = v.map(|x| x.into());
3161 self
3162 }
3163
3164 pub fn set_update_time<T>(mut self, v: T) -> Self
3166 where
3167 T: std::convert::Into<wkt::Timestamp>,
3168 {
3169 self.update_time = std::option::Option::Some(v.into());
3170 self
3171 }
3172
3173 pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
3175 where
3176 T: std::convert::Into<wkt::Timestamp>,
3177 {
3178 self.update_time = v.map(|x| x.into());
3179 self
3180 }
3181
3182 pub fn set_delete_time<T>(mut self, v: T) -> Self
3184 where
3185 T: std::convert::Into<wkt::Timestamp>,
3186 {
3187 self.delete_time = std::option::Option::Some(v.into());
3188 self
3189 }
3190
3191 pub fn set_or_clear_delete_time<T>(mut self, v: std::option::Option<T>) -> Self
3193 where
3194 T: std::convert::Into<wkt::Timestamp>,
3195 {
3196 self.delete_time = v.map(|x| x.into());
3197 self
3198 }
3199
3200 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
3202 where
3203 T: std::iter::IntoIterator<Item = (K, V)>,
3204 K: std::convert::Into<std::string::String>,
3205 V: std::convert::Into<std::string::String>,
3206 {
3207 use std::iter::Iterator;
3208 self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
3209 self
3210 }
3211
3212 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3214 self.etag = v.into();
3215 self
3216 }
3217
3218 pub fn set_reconciling<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
3220 self.reconciling = v.into();
3221 self
3222 }
3223
3224 pub fn set_annotations<T, K, V>(mut self, v: T) -> Self
3226 where
3227 T: std::iter::IntoIterator<Item = (K, V)>,
3228 K: std::convert::Into<std::string::String>,
3229 V: std::convert::Into<std::string::String>,
3230 {
3231 use std::iter::Iterator;
3232 self.annotations = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
3233 self
3234 }
3235
3236 pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3238 self.uid = v.into();
3239 self
3240 }
3241
3242 pub fn set_webhook_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3244 self.webhook_id = v.into();
3245 self
3246 }
3247
3248 pub fn set_git_proxy_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3250 self.git_proxy_uri = v.into();
3251 self
3252 }
3253}
3254
3255impl wkt::message::Message for GitRepositoryLink {
3256 fn typename() -> &'static str {
3257 "type.googleapis.com/google.cloud.developerconnect.v1.GitRepositoryLink"
3258 }
3259}
3260
3261#[derive(Clone, Default, PartialEq)]
3263#[non_exhaustive]
3264pub struct CreateGitRepositoryLinkRequest {
3265 pub parent: std::string::String,
3267
3268 pub git_repository_link: std::option::Option<crate::model::GitRepositoryLink>,
3270
3271 pub git_repository_link_id: std::string::String,
3276
3277 pub request_id: std::string::String,
3291
3292 pub validate_only: bool,
3294
3295 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3296}
3297
3298impl CreateGitRepositoryLinkRequest {
3299 pub fn new() -> Self {
3300 std::default::Default::default()
3301 }
3302
3303 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3305 self.parent = v.into();
3306 self
3307 }
3308
3309 pub fn set_git_repository_link<T>(mut self, v: T) -> Self
3311 where
3312 T: std::convert::Into<crate::model::GitRepositoryLink>,
3313 {
3314 self.git_repository_link = std::option::Option::Some(v.into());
3315 self
3316 }
3317
3318 pub fn set_or_clear_git_repository_link<T>(mut self, v: std::option::Option<T>) -> Self
3320 where
3321 T: std::convert::Into<crate::model::GitRepositoryLink>,
3322 {
3323 self.git_repository_link = v.map(|x| x.into());
3324 self
3325 }
3326
3327 pub fn set_git_repository_link_id<T: std::convert::Into<std::string::String>>(
3329 mut self,
3330 v: T,
3331 ) -> Self {
3332 self.git_repository_link_id = v.into();
3333 self
3334 }
3335
3336 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3338 self.request_id = v.into();
3339 self
3340 }
3341
3342 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
3344 self.validate_only = v.into();
3345 self
3346 }
3347}
3348
3349impl wkt::message::Message for CreateGitRepositoryLinkRequest {
3350 fn typename() -> &'static str {
3351 "type.googleapis.com/google.cloud.developerconnect.v1.CreateGitRepositoryLinkRequest"
3352 }
3353}
3354
3355#[derive(Clone, Default, PartialEq)]
3357#[non_exhaustive]
3358pub struct DeleteGitRepositoryLinkRequest {
3359 pub name: std::string::String,
3361
3362 pub request_id: std::string::String,
3376
3377 pub validate_only: bool,
3379
3380 pub etag: std::string::String,
3384
3385 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3386}
3387
3388impl DeleteGitRepositoryLinkRequest {
3389 pub fn new() -> Self {
3390 std::default::Default::default()
3391 }
3392
3393 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3395 self.name = v.into();
3396 self
3397 }
3398
3399 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3401 self.request_id = v.into();
3402 self
3403 }
3404
3405 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
3407 self.validate_only = v.into();
3408 self
3409 }
3410
3411 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3413 self.etag = v.into();
3414 self
3415 }
3416}
3417
3418impl wkt::message::Message for DeleteGitRepositoryLinkRequest {
3419 fn typename() -> &'static str {
3420 "type.googleapis.com/google.cloud.developerconnect.v1.DeleteGitRepositoryLinkRequest"
3421 }
3422}
3423
3424#[derive(Clone, Default, PartialEq)]
3426#[non_exhaustive]
3427pub struct ListGitRepositoryLinksRequest {
3428 pub parent: std::string::String,
3430
3431 pub page_size: i32,
3434
3435 pub page_token: std::string::String,
3437
3438 pub filter: std::string::String,
3440
3441 pub order_by: std::string::String,
3443
3444 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3445}
3446
3447impl ListGitRepositoryLinksRequest {
3448 pub fn new() -> Self {
3449 std::default::Default::default()
3450 }
3451
3452 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3454 self.parent = v.into();
3455 self
3456 }
3457
3458 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3460 self.page_size = v.into();
3461 self
3462 }
3463
3464 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3466 self.page_token = v.into();
3467 self
3468 }
3469
3470 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3472 self.filter = v.into();
3473 self
3474 }
3475
3476 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3478 self.order_by = v.into();
3479 self
3480 }
3481}
3482
3483impl wkt::message::Message for ListGitRepositoryLinksRequest {
3484 fn typename() -> &'static str {
3485 "type.googleapis.com/google.cloud.developerconnect.v1.ListGitRepositoryLinksRequest"
3486 }
3487}
3488
3489#[derive(Clone, Default, PartialEq)]
3491#[non_exhaustive]
3492pub struct ListGitRepositoryLinksResponse {
3493 pub git_repository_links: std::vec::Vec<crate::model::GitRepositoryLink>,
3495
3496 pub next_page_token: std::string::String,
3498
3499 pub unreachable: std::vec::Vec<std::string::String>,
3501
3502 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3503}
3504
3505impl ListGitRepositoryLinksResponse {
3506 pub fn new() -> Self {
3507 std::default::Default::default()
3508 }
3509
3510 pub fn set_git_repository_links<T, V>(mut self, v: T) -> Self
3512 where
3513 T: std::iter::IntoIterator<Item = V>,
3514 V: std::convert::Into<crate::model::GitRepositoryLink>,
3515 {
3516 use std::iter::Iterator;
3517 self.git_repository_links = v.into_iter().map(|i| i.into()).collect();
3518 self
3519 }
3520
3521 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3523 self.next_page_token = v.into();
3524 self
3525 }
3526
3527 pub fn set_unreachable<T, V>(mut self, v: T) -> Self
3529 where
3530 T: std::iter::IntoIterator<Item = V>,
3531 V: std::convert::Into<std::string::String>,
3532 {
3533 use std::iter::Iterator;
3534 self.unreachable = v.into_iter().map(|i| i.into()).collect();
3535 self
3536 }
3537}
3538
3539impl wkt::message::Message for ListGitRepositoryLinksResponse {
3540 fn typename() -> &'static str {
3541 "type.googleapis.com/google.cloud.developerconnect.v1.ListGitRepositoryLinksResponse"
3542 }
3543}
3544
3545#[doc(hidden)]
3546impl gax::paginator::internal::PageableResponse for ListGitRepositoryLinksResponse {
3547 type PageItem = crate::model::GitRepositoryLink;
3548
3549 fn items(self) -> std::vec::Vec<Self::PageItem> {
3550 self.git_repository_links
3551 }
3552
3553 fn next_page_token(&self) -> std::string::String {
3554 use std::clone::Clone;
3555 self.next_page_token.clone()
3556 }
3557}
3558
3559#[derive(Clone, Default, PartialEq)]
3561#[non_exhaustive]
3562pub struct GetGitRepositoryLinkRequest {
3563 pub name: std::string::String,
3565
3566 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3567}
3568
3569impl GetGitRepositoryLinkRequest {
3570 pub fn new() -> Self {
3571 std::default::Default::default()
3572 }
3573
3574 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3576 self.name = v.into();
3577 self
3578 }
3579}
3580
3581impl wkt::message::Message for GetGitRepositoryLinkRequest {
3582 fn typename() -> &'static str {
3583 "type.googleapis.com/google.cloud.developerconnect.v1.GetGitRepositoryLinkRequest"
3584 }
3585}
3586
3587#[derive(Clone, Default, PartialEq)]
3589#[non_exhaustive]
3590pub struct FetchReadWriteTokenRequest {
3591 pub git_repository_link: std::string::String,
3594
3595 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3596}
3597
3598impl FetchReadWriteTokenRequest {
3599 pub fn new() -> Self {
3600 std::default::Default::default()
3601 }
3602
3603 pub fn set_git_repository_link<T: std::convert::Into<std::string::String>>(
3605 mut self,
3606 v: T,
3607 ) -> Self {
3608 self.git_repository_link = v.into();
3609 self
3610 }
3611}
3612
3613impl wkt::message::Message for FetchReadWriteTokenRequest {
3614 fn typename() -> &'static str {
3615 "type.googleapis.com/google.cloud.developerconnect.v1.FetchReadWriteTokenRequest"
3616 }
3617}
3618
3619#[derive(Clone, Default, PartialEq)]
3621#[non_exhaustive]
3622pub struct FetchReadTokenRequest {
3623 pub git_repository_link: std::string::String,
3626
3627 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3628}
3629
3630impl FetchReadTokenRequest {
3631 pub fn new() -> Self {
3632 std::default::Default::default()
3633 }
3634
3635 pub fn set_git_repository_link<T: std::convert::Into<std::string::String>>(
3637 mut self,
3638 v: T,
3639 ) -> Self {
3640 self.git_repository_link = v.into();
3641 self
3642 }
3643}
3644
3645impl wkt::message::Message for FetchReadTokenRequest {
3646 fn typename() -> &'static str {
3647 "type.googleapis.com/google.cloud.developerconnect.v1.FetchReadTokenRequest"
3648 }
3649}
3650
3651#[derive(Clone, Default, PartialEq)]
3653#[non_exhaustive]
3654pub struct FetchReadTokenResponse {
3655 pub token: std::string::String,
3657
3658 pub expiration_time: std::option::Option<wkt::Timestamp>,
3660
3661 pub git_username: std::string::String,
3665
3666 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3667}
3668
3669impl FetchReadTokenResponse {
3670 pub fn new() -> Self {
3671 std::default::Default::default()
3672 }
3673
3674 pub fn set_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3676 self.token = v.into();
3677 self
3678 }
3679
3680 pub fn set_expiration_time<T>(mut self, v: T) -> Self
3682 where
3683 T: std::convert::Into<wkt::Timestamp>,
3684 {
3685 self.expiration_time = std::option::Option::Some(v.into());
3686 self
3687 }
3688
3689 pub fn set_or_clear_expiration_time<T>(mut self, v: std::option::Option<T>) -> Self
3691 where
3692 T: std::convert::Into<wkt::Timestamp>,
3693 {
3694 self.expiration_time = v.map(|x| x.into());
3695 self
3696 }
3697
3698 pub fn set_git_username<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3700 self.git_username = v.into();
3701 self
3702 }
3703}
3704
3705impl wkt::message::Message for FetchReadTokenResponse {
3706 fn typename() -> &'static str {
3707 "type.googleapis.com/google.cloud.developerconnect.v1.FetchReadTokenResponse"
3708 }
3709}
3710
3711#[derive(Clone, Default, PartialEq)]
3713#[non_exhaustive]
3714pub struct FetchReadWriteTokenResponse {
3715 pub token: std::string::String,
3717
3718 pub expiration_time: std::option::Option<wkt::Timestamp>,
3720
3721 pub git_username: std::string::String,
3725
3726 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3727}
3728
3729impl FetchReadWriteTokenResponse {
3730 pub fn new() -> Self {
3731 std::default::Default::default()
3732 }
3733
3734 pub fn set_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3736 self.token = v.into();
3737 self
3738 }
3739
3740 pub fn set_expiration_time<T>(mut self, v: T) -> Self
3742 where
3743 T: std::convert::Into<wkt::Timestamp>,
3744 {
3745 self.expiration_time = std::option::Option::Some(v.into());
3746 self
3747 }
3748
3749 pub fn set_or_clear_expiration_time<T>(mut self, v: std::option::Option<T>) -> Self
3751 where
3752 T: std::convert::Into<wkt::Timestamp>,
3753 {
3754 self.expiration_time = v.map(|x| x.into());
3755 self
3756 }
3757
3758 pub fn set_git_username<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3760 self.git_username = v.into();
3761 self
3762 }
3763}
3764
3765impl wkt::message::Message for FetchReadWriteTokenResponse {
3766 fn typename() -> &'static str {
3767 "type.googleapis.com/google.cloud.developerconnect.v1.FetchReadWriteTokenResponse"
3768 }
3769}
3770
3771#[derive(Clone, Default, PartialEq)]
3773#[non_exhaustive]
3774pub struct FetchLinkableGitRepositoriesRequest {
3775 pub connection: std::string::String,
3778
3779 pub page_size: i32,
3781
3782 pub page_token: std::string::String,
3784
3785 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3786}
3787
3788impl FetchLinkableGitRepositoriesRequest {
3789 pub fn new() -> Self {
3790 std::default::Default::default()
3791 }
3792
3793 pub fn set_connection<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3795 self.connection = v.into();
3796 self
3797 }
3798
3799 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3801 self.page_size = v.into();
3802 self
3803 }
3804
3805 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3807 self.page_token = v.into();
3808 self
3809 }
3810}
3811
3812impl wkt::message::Message for FetchLinkableGitRepositoriesRequest {
3813 fn typename() -> &'static str {
3814 "type.googleapis.com/google.cloud.developerconnect.v1.FetchLinkableGitRepositoriesRequest"
3815 }
3816}
3817
3818#[derive(Clone, Default, PartialEq)]
3820#[non_exhaustive]
3821pub struct FetchLinkableGitRepositoriesResponse {
3822 pub linkable_git_repositories: std::vec::Vec<crate::model::LinkableGitRepository>,
3824
3825 pub next_page_token: std::string::String,
3827
3828 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3829}
3830
3831impl FetchLinkableGitRepositoriesResponse {
3832 pub fn new() -> Self {
3833 std::default::Default::default()
3834 }
3835
3836 pub fn set_linkable_git_repositories<T, V>(mut self, v: T) -> Self
3838 where
3839 T: std::iter::IntoIterator<Item = V>,
3840 V: std::convert::Into<crate::model::LinkableGitRepository>,
3841 {
3842 use std::iter::Iterator;
3843 self.linkable_git_repositories = v.into_iter().map(|i| i.into()).collect();
3844 self
3845 }
3846
3847 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3849 self.next_page_token = v.into();
3850 self
3851 }
3852}
3853
3854impl wkt::message::Message for FetchLinkableGitRepositoriesResponse {
3855 fn typename() -> &'static str {
3856 "type.googleapis.com/google.cloud.developerconnect.v1.FetchLinkableGitRepositoriesResponse"
3857 }
3858}
3859
3860#[doc(hidden)]
3861impl gax::paginator::internal::PageableResponse for FetchLinkableGitRepositoriesResponse {
3862 type PageItem = crate::model::LinkableGitRepository;
3863
3864 fn items(self) -> std::vec::Vec<Self::PageItem> {
3865 self.linkable_git_repositories
3866 }
3867
3868 fn next_page_token(&self) -> std::string::String {
3869 use std::clone::Clone;
3870 self.next_page_token.clone()
3871 }
3872}
3873
3874#[derive(Clone, Default, PartialEq)]
3877#[non_exhaustive]
3878pub struct LinkableGitRepository {
3879 pub clone_uri: std::string::String,
3881
3882 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3883}
3884
3885impl LinkableGitRepository {
3886 pub fn new() -> Self {
3887 std::default::Default::default()
3888 }
3889
3890 pub fn set_clone_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3892 self.clone_uri = v.into();
3893 self
3894 }
3895}
3896
3897impl wkt::message::Message for LinkableGitRepository {
3898 fn typename() -> &'static str {
3899 "type.googleapis.com/google.cloud.developerconnect.v1.LinkableGitRepository"
3900 }
3901}
3902
3903#[derive(Clone, Default, PartialEq)]
3905#[non_exhaustive]
3906pub struct FetchGitHubInstallationsRequest {
3907 pub connection: std::string::String,
3910
3911 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3912}
3913
3914impl FetchGitHubInstallationsRequest {
3915 pub fn new() -> Self {
3916 std::default::Default::default()
3917 }
3918
3919 pub fn set_connection<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3921 self.connection = v.into();
3922 self
3923 }
3924}
3925
3926impl wkt::message::Message for FetchGitHubInstallationsRequest {
3927 fn typename() -> &'static str {
3928 "type.googleapis.com/google.cloud.developerconnect.v1.FetchGitHubInstallationsRequest"
3929 }
3930}
3931
3932#[derive(Clone, Default, PartialEq)]
3934#[non_exhaustive]
3935pub struct FetchGitHubInstallationsResponse {
3936 pub installations:
3939 std::vec::Vec<crate::model::fetch_git_hub_installations_response::Installation>,
3940
3941 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3942}
3943
3944impl FetchGitHubInstallationsResponse {
3945 pub fn new() -> Self {
3946 std::default::Default::default()
3947 }
3948
3949 pub fn set_installations<T, V>(mut self, v: T) -> Self
3951 where
3952 T: std::iter::IntoIterator<Item = V>,
3953 V: std::convert::Into<crate::model::fetch_git_hub_installations_response::Installation>,
3954 {
3955 use std::iter::Iterator;
3956 self.installations = v.into_iter().map(|i| i.into()).collect();
3957 self
3958 }
3959}
3960
3961impl wkt::message::Message for FetchGitHubInstallationsResponse {
3962 fn typename() -> &'static str {
3963 "type.googleapis.com/google.cloud.developerconnect.v1.FetchGitHubInstallationsResponse"
3964 }
3965}
3966
3967pub mod fetch_git_hub_installations_response {
3969 #[allow(unused_imports)]
3970 use super::*;
3971
3972 #[derive(Clone, Default, PartialEq)]
3974 #[non_exhaustive]
3975 pub struct Installation {
3976 pub id: i64,
3978
3979 pub name: std::string::String,
3981
3982 pub r#type: std::string::String,
3984
3985 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3986 }
3987
3988 impl Installation {
3989 pub fn new() -> Self {
3990 std::default::Default::default()
3991 }
3992
3993 pub fn set_id<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
3995 self.id = v.into();
3996 self
3997 }
3998
3999 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4001 self.name = v.into();
4002 self
4003 }
4004
4005 pub fn set_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4007 self.r#type = v.into();
4008 self
4009 }
4010 }
4011
4012 impl wkt::message::Message for Installation {
4013 fn typename() -> &'static str {
4014 "type.googleapis.com/google.cloud.developerconnect.v1.FetchGitHubInstallationsResponse.Installation"
4015 }
4016 }
4017}
4018
4019#[derive(Clone, Default, PartialEq)]
4021#[non_exhaustive]
4022pub struct FetchGitRefsRequest {
4023 pub git_repository_link: std::string::String,
4026
4027 pub ref_type: crate::model::fetch_git_refs_request::RefType,
4029
4030 pub page_size: i32,
4032
4033 pub page_token: std::string::String,
4035
4036 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4037}
4038
4039impl FetchGitRefsRequest {
4040 pub fn new() -> Self {
4041 std::default::Default::default()
4042 }
4043
4044 pub fn set_git_repository_link<T: std::convert::Into<std::string::String>>(
4046 mut self,
4047 v: T,
4048 ) -> Self {
4049 self.git_repository_link = v.into();
4050 self
4051 }
4052
4053 pub fn set_ref_type<T: std::convert::Into<crate::model::fetch_git_refs_request::RefType>>(
4055 mut self,
4056 v: T,
4057 ) -> Self {
4058 self.ref_type = v.into();
4059 self
4060 }
4061
4062 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4064 self.page_size = v.into();
4065 self
4066 }
4067
4068 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4070 self.page_token = v.into();
4071 self
4072 }
4073}
4074
4075impl wkt::message::Message for FetchGitRefsRequest {
4076 fn typename() -> &'static str {
4077 "type.googleapis.com/google.cloud.developerconnect.v1.FetchGitRefsRequest"
4078 }
4079}
4080
4081pub mod fetch_git_refs_request {
4083 #[allow(unused_imports)]
4084 use super::*;
4085
4086 #[derive(Clone, Debug, PartialEq)]
4102 #[non_exhaustive]
4103 pub enum RefType {
4104 Unspecified,
4106 Tag,
4108 Branch,
4110 UnknownValue(ref_type::UnknownValue),
4115 }
4116
4117 #[doc(hidden)]
4118 pub mod ref_type {
4119 #[allow(unused_imports)]
4120 use super::*;
4121 #[derive(Clone, Debug, PartialEq)]
4122 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
4123 }
4124
4125 impl RefType {
4126 pub fn value(&self) -> std::option::Option<i32> {
4131 match self {
4132 Self::Unspecified => std::option::Option::Some(0),
4133 Self::Tag => std::option::Option::Some(1),
4134 Self::Branch => std::option::Option::Some(2),
4135 Self::UnknownValue(u) => u.0.value(),
4136 }
4137 }
4138
4139 pub fn name(&self) -> std::option::Option<&str> {
4144 match self {
4145 Self::Unspecified => std::option::Option::Some("REF_TYPE_UNSPECIFIED"),
4146 Self::Tag => std::option::Option::Some("TAG"),
4147 Self::Branch => std::option::Option::Some("BRANCH"),
4148 Self::UnknownValue(u) => u.0.name(),
4149 }
4150 }
4151 }
4152
4153 impl std::default::Default for RefType {
4154 fn default() -> Self {
4155 use std::convert::From;
4156 Self::from(0)
4157 }
4158 }
4159
4160 impl std::fmt::Display for RefType {
4161 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
4162 wkt::internal::display_enum(f, self.name(), self.value())
4163 }
4164 }
4165
4166 impl std::convert::From<i32> for RefType {
4167 fn from(value: i32) -> Self {
4168 match value {
4169 0 => Self::Unspecified,
4170 1 => Self::Tag,
4171 2 => Self::Branch,
4172 _ => Self::UnknownValue(ref_type::UnknownValue(
4173 wkt::internal::UnknownEnumValue::Integer(value),
4174 )),
4175 }
4176 }
4177 }
4178
4179 impl std::convert::From<&str> for RefType {
4180 fn from(value: &str) -> Self {
4181 use std::string::ToString;
4182 match value {
4183 "REF_TYPE_UNSPECIFIED" => Self::Unspecified,
4184 "TAG" => Self::Tag,
4185 "BRANCH" => Self::Branch,
4186 _ => Self::UnknownValue(ref_type::UnknownValue(
4187 wkt::internal::UnknownEnumValue::String(value.to_string()),
4188 )),
4189 }
4190 }
4191 }
4192
4193 impl serde::ser::Serialize for RefType {
4194 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4195 where
4196 S: serde::Serializer,
4197 {
4198 match self {
4199 Self::Unspecified => serializer.serialize_i32(0),
4200 Self::Tag => serializer.serialize_i32(1),
4201 Self::Branch => serializer.serialize_i32(2),
4202 Self::UnknownValue(u) => u.0.serialize(serializer),
4203 }
4204 }
4205 }
4206
4207 impl<'de> serde::de::Deserialize<'de> for RefType {
4208 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4209 where
4210 D: serde::Deserializer<'de>,
4211 {
4212 deserializer.deserialize_any(wkt::internal::EnumVisitor::<RefType>::new(
4213 ".google.cloud.developerconnect.v1.FetchGitRefsRequest.RefType",
4214 ))
4215 }
4216 }
4217}
4218
4219#[derive(Clone, Default, PartialEq)]
4221#[non_exhaustive]
4222pub struct FetchGitRefsResponse {
4223 pub ref_names: std::vec::Vec<std::string::String>,
4225
4226 pub next_page_token: std::string::String,
4228
4229 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4230}
4231
4232impl FetchGitRefsResponse {
4233 pub fn new() -> Self {
4234 std::default::Default::default()
4235 }
4236
4237 pub fn set_ref_names<T, V>(mut self, v: T) -> Self
4239 where
4240 T: std::iter::IntoIterator<Item = V>,
4241 V: std::convert::Into<std::string::String>,
4242 {
4243 use std::iter::Iterator;
4244 self.ref_names = v.into_iter().map(|i| i.into()).collect();
4245 self
4246 }
4247
4248 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4250 self.next_page_token = v.into();
4251 self
4252 }
4253}
4254
4255impl wkt::message::Message for FetchGitRefsResponse {
4256 fn typename() -> &'static str {
4257 "type.googleapis.com/google.cloud.developerconnect.v1.FetchGitRefsResponse"
4258 }
4259}
4260
4261#[derive(Clone, Default, PartialEq)]
4266#[non_exhaustive]
4267pub struct AccountConnector {
4268 pub name: std::string::String,
4271
4272 pub create_time: std::option::Option<wkt::Timestamp>,
4274
4275 pub update_time: std::option::Option<wkt::Timestamp>,
4277
4278 pub annotations: std::collections::HashMap<std::string::String, std::string::String>,
4280
4281 pub etag: std::string::String,
4285
4286 pub labels: std::collections::HashMap<std::string::String, std::string::String>,
4288
4289 pub oauth_start_uri: std::string::String,
4291
4292 pub account_connector_config:
4294 std::option::Option<crate::model::account_connector::AccountConnectorConfig>,
4295
4296 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4297}
4298
4299impl AccountConnector {
4300 pub fn new() -> Self {
4301 std::default::Default::default()
4302 }
4303
4304 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4306 self.name = v.into();
4307 self
4308 }
4309
4310 pub fn set_create_time<T>(mut self, v: T) -> Self
4312 where
4313 T: std::convert::Into<wkt::Timestamp>,
4314 {
4315 self.create_time = std::option::Option::Some(v.into());
4316 self
4317 }
4318
4319 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
4321 where
4322 T: std::convert::Into<wkt::Timestamp>,
4323 {
4324 self.create_time = v.map(|x| x.into());
4325 self
4326 }
4327
4328 pub fn set_update_time<T>(mut self, v: T) -> Self
4330 where
4331 T: std::convert::Into<wkt::Timestamp>,
4332 {
4333 self.update_time = std::option::Option::Some(v.into());
4334 self
4335 }
4336
4337 pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
4339 where
4340 T: std::convert::Into<wkt::Timestamp>,
4341 {
4342 self.update_time = v.map(|x| x.into());
4343 self
4344 }
4345
4346 pub fn set_annotations<T, K, V>(mut self, v: T) -> Self
4348 where
4349 T: std::iter::IntoIterator<Item = (K, V)>,
4350 K: std::convert::Into<std::string::String>,
4351 V: std::convert::Into<std::string::String>,
4352 {
4353 use std::iter::Iterator;
4354 self.annotations = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
4355 self
4356 }
4357
4358 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4360 self.etag = v.into();
4361 self
4362 }
4363
4364 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
4366 where
4367 T: std::iter::IntoIterator<Item = (K, V)>,
4368 K: std::convert::Into<std::string::String>,
4369 V: std::convert::Into<std::string::String>,
4370 {
4371 use std::iter::Iterator;
4372 self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
4373 self
4374 }
4375
4376 pub fn set_oauth_start_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4378 self.oauth_start_uri = v.into();
4379 self
4380 }
4381
4382 pub fn set_account_connector_config<
4387 T: std::convert::Into<
4388 std::option::Option<crate::model::account_connector::AccountConnectorConfig>,
4389 >,
4390 >(
4391 mut self,
4392 v: T,
4393 ) -> Self {
4394 self.account_connector_config = v.into();
4395 self
4396 }
4397
4398 pub fn provider_oauth_config(
4402 &self,
4403 ) -> std::option::Option<&std::boxed::Box<crate::model::ProviderOAuthConfig>> {
4404 #[allow(unreachable_patterns)]
4405 self.account_connector_config
4406 .as_ref()
4407 .and_then(|v| match v {
4408 crate::model::account_connector::AccountConnectorConfig::ProviderOauthConfig(v) => {
4409 std::option::Option::Some(v)
4410 }
4411 _ => std::option::Option::None,
4412 })
4413 }
4414
4415 pub fn set_provider_oauth_config<
4421 T: std::convert::Into<std::boxed::Box<crate::model::ProviderOAuthConfig>>,
4422 >(
4423 mut self,
4424 v: T,
4425 ) -> Self {
4426 self.account_connector_config = std::option::Option::Some(
4427 crate::model::account_connector::AccountConnectorConfig::ProviderOauthConfig(v.into()),
4428 );
4429 self
4430 }
4431}
4432
4433impl wkt::message::Message for AccountConnector {
4434 fn typename() -> &'static str {
4435 "type.googleapis.com/google.cloud.developerconnect.v1.AccountConnector"
4436 }
4437}
4438
4439pub mod account_connector {
4441 #[allow(unused_imports)]
4442 use super::*;
4443
4444 #[derive(Clone, Debug, PartialEq)]
4446 #[non_exhaustive]
4447 pub enum AccountConnectorConfig {
4448 ProviderOauthConfig(std::boxed::Box<crate::model::ProviderOAuthConfig>),
4450 }
4451}
4452
4453#[derive(Clone, Default, PartialEq)]
4456#[non_exhaustive]
4457pub struct User {
4458 pub name: std::string::String,
4461
4462 pub display_name: std::string::String,
4465
4466 pub create_time: std::option::Option<wkt::Timestamp>,
4468
4469 pub last_token_request_time: std::option::Option<wkt::Timestamp>,
4471
4472 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4473}
4474
4475impl User {
4476 pub fn new() -> Self {
4477 std::default::Default::default()
4478 }
4479
4480 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4482 self.name = v.into();
4483 self
4484 }
4485
4486 pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4488 self.display_name = v.into();
4489 self
4490 }
4491
4492 pub fn set_create_time<T>(mut self, v: T) -> Self
4494 where
4495 T: std::convert::Into<wkt::Timestamp>,
4496 {
4497 self.create_time = std::option::Option::Some(v.into());
4498 self
4499 }
4500
4501 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
4503 where
4504 T: std::convert::Into<wkt::Timestamp>,
4505 {
4506 self.create_time = v.map(|x| x.into());
4507 self
4508 }
4509
4510 pub fn set_last_token_request_time<T>(mut self, v: T) -> Self
4512 where
4513 T: std::convert::Into<wkt::Timestamp>,
4514 {
4515 self.last_token_request_time = std::option::Option::Some(v.into());
4516 self
4517 }
4518
4519 pub fn set_or_clear_last_token_request_time<T>(mut self, v: std::option::Option<T>) -> Self
4521 where
4522 T: std::convert::Into<wkt::Timestamp>,
4523 {
4524 self.last_token_request_time = v.map(|x| x.into());
4525 self
4526 }
4527}
4528
4529impl wkt::message::Message for User {
4530 fn typename() -> &'static str {
4531 "type.googleapis.com/google.cloud.developerconnect.v1.User"
4532 }
4533}
4534
4535#[derive(Clone, Default, PartialEq)]
4537#[non_exhaustive]
4538pub struct ProviderOAuthConfig {
4539 pub scopes: std::vec::Vec<std::string::String>,
4543
4544 pub oauth_provider_id:
4547 std::option::Option<crate::model::provider_o_auth_config::OauthProviderId>,
4548
4549 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4550}
4551
4552impl ProviderOAuthConfig {
4553 pub fn new() -> Self {
4554 std::default::Default::default()
4555 }
4556
4557 pub fn set_scopes<T, V>(mut self, v: T) -> Self
4559 where
4560 T: std::iter::IntoIterator<Item = V>,
4561 V: std::convert::Into<std::string::String>,
4562 {
4563 use std::iter::Iterator;
4564 self.scopes = v.into_iter().map(|i| i.into()).collect();
4565 self
4566 }
4567
4568 pub fn set_oauth_provider_id<
4573 T: std::convert::Into<
4574 std::option::Option<crate::model::provider_o_auth_config::OauthProviderId>,
4575 >,
4576 >(
4577 mut self,
4578 v: T,
4579 ) -> Self {
4580 self.oauth_provider_id = v.into();
4581 self
4582 }
4583
4584 pub fn system_provider_id(&self) -> std::option::Option<&crate::model::SystemProvider> {
4588 #[allow(unreachable_patterns)]
4589 self.oauth_provider_id.as_ref().and_then(|v| match v {
4590 crate::model::provider_o_auth_config::OauthProviderId::SystemProviderId(v) => {
4591 std::option::Option::Some(v)
4592 }
4593 _ => std::option::Option::None,
4594 })
4595 }
4596
4597 pub fn set_system_provider_id<T: std::convert::Into<crate::model::SystemProvider>>(
4603 mut self,
4604 v: T,
4605 ) -> Self {
4606 self.oauth_provider_id = std::option::Option::Some(
4607 crate::model::provider_o_auth_config::OauthProviderId::SystemProviderId(v.into()),
4608 );
4609 self
4610 }
4611}
4612
4613impl wkt::message::Message for ProviderOAuthConfig {
4614 fn typename() -> &'static str {
4615 "type.googleapis.com/google.cloud.developerconnect.v1.ProviderOAuthConfig"
4616 }
4617}
4618
4619pub mod provider_o_auth_config {
4621 #[allow(unused_imports)]
4622 use super::*;
4623
4624 #[derive(Clone, Debug, PartialEq)]
4627 #[non_exhaustive]
4628 pub enum OauthProviderId {
4629 SystemProviderId(crate::model::SystemProvider),
4631 }
4632}
4633
4634#[derive(Clone, Default, PartialEq)]
4639#[non_exhaustive]
4640pub struct InsightsConfig {
4641 pub name: std::string::String,
4645
4646 pub create_time: std::option::Option<wkt::Timestamp>,
4648
4649 pub update_time: std::option::Option<wkt::Timestamp>,
4651
4652 pub runtime_configs: std::vec::Vec<crate::model::RuntimeConfig>,
4654
4655 pub artifact_configs: std::vec::Vec<crate::model::ArtifactConfig>,
4657
4658 pub state: crate::model::insights_config::State,
4660
4661 pub annotations: std::collections::HashMap<std::string::String, std::string::String>,
4665
4666 pub labels: std::collections::HashMap<std::string::String, std::string::String>,
4668
4669 pub reconciling: bool,
4675
4676 pub errors: std::vec::Vec<rpc::model::Status>,
4681
4682 pub insights_config_context:
4684 std::option::Option<crate::model::insights_config::InsightsConfigContext>,
4685
4686 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4687}
4688
4689impl InsightsConfig {
4690 pub fn new() -> Self {
4691 std::default::Default::default()
4692 }
4693
4694 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4696 self.name = v.into();
4697 self
4698 }
4699
4700 pub fn set_create_time<T>(mut self, v: T) -> Self
4702 where
4703 T: std::convert::Into<wkt::Timestamp>,
4704 {
4705 self.create_time = std::option::Option::Some(v.into());
4706 self
4707 }
4708
4709 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
4711 where
4712 T: std::convert::Into<wkt::Timestamp>,
4713 {
4714 self.create_time = v.map(|x| x.into());
4715 self
4716 }
4717
4718 pub fn set_update_time<T>(mut self, v: T) -> Self
4720 where
4721 T: std::convert::Into<wkt::Timestamp>,
4722 {
4723 self.update_time = std::option::Option::Some(v.into());
4724 self
4725 }
4726
4727 pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
4729 where
4730 T: std::convert::Into<wkt::Timestamp>,
4731 {
4732 self.update_time = v.map(|x| x.into());
4733 self
4734 }
4735
4736 pub fn set_runtime_configs<T, V>(mut self, v: T) -> Self
4738 where
4739 T: std::iter::IntoIterator<Item = V>,
4740 V: std::convert::Into<crate::model::RuntimeConfig>,
4741 {
4742 use std::iter::Iterator;
4743 self.runtime_configs = v.into_iter().map(|i| i.into()).collect();
4744 self
4745 }
4746
4747 pub fn set_artifact_configs<T, V>(mut self, v: T) -> Self
4749 where
4750 T: std::iter::IntoIterator<Item = V>,
4751 V: std::convert::Into<crate::model::ArtifactConfig>,
4752 {
4753 use std::iter::Iterator;
4754 self.artifact_configs = v.into_iter().map(|i| i.into()).collect();
4755 self
4756 }
4757
4758 pub fn set_state<T: std::convert::Into<crate::model::insights_config::State>>(
4760 mut self,
4761 v: T,
4762 ) -> Self {
4763 self.state = v.into();
4764 self
4765 }
4766
4767 pub fn set_annotations<T, K, V>(mut self, v: T) -> Self
4769 where
4770 T: std::iter::IntoIterator<Item = (K, V)>,
4771 K: std::convert::Into<std::string::String>,
4772 V: std::convert::Into<std::string::String>,
4773 {
4774 use std::iter::Iterator;
4775 self.annotations = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
4776 self
4777 }
4778
4779 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
4781 where
4782 T: std::iter::IntoIterator<Item = (K, V)>,
4783 K: std::convert::Into<std::string::String>,
4784 V: std::convert::Into<std::string::String>,
4785 {
4786 use std::iter::Iterator;
4787 self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
4788 self
4789 }
4790
4791 pub fn set_reconciling<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4793 self.reconciling = v.into();
4794 self
4795 }
4796
4797 pub fn set_errors<T, V>(mut self, v: T) -> Self
4799 where
4800 T: std::iter::IntoIterator<Item = V>,
4801 V: std::convert::Into<rpc::model::Status>,
4802 {
4803 use std::iter::Iterator;
4804 self.errors = v.into_iter().map(|i| i.into()).collect();
4805 self
4806 }
4807
4808 pub fn set_insights_config_context<
4813 T: std::convert::Into<
4814 std::option::Option<crate::model::insights_config::InsightsConfigContext>,
4815 >,
4816 >(
4817 mut self,
4818 v: T,
4819 ) -> Self {
4820 self.insights_config_context = v.into();
4821 self
4822 }
4823
4824 pub fn app_hub_application(&self) -> std::option::Option<&std::string::String> {
4828 #[allow(unreachable_patterns)]
4829 self.insights_config_context.as_ref().and_then(|v| match v {
4830 crate::model::insights_config::InsightsConfigContext::AppHubApplication(v) => {
4831 std::option::Option::Some(v)
4832 }
4833 _ => std::option::Option::None,
4834 })
4835 }
4836
4837 pub fn set_app_hub_application<T: std::convert::Into<std::string::String>>(
4843 mut self,
4844 v: T,
4845 ) -> Self {
4846 self.insights_config_context = std::option::Option::Some(
4847 crate::model::insights_config::InsightsConfigContext::AppHubApplication(v.into()),
4848 );
4849 self
4850 }
4851}
4852
4853impl wkt::message::Message for InsightsConfig {
4854 fn typename() -> &'static str {
4855 "type.googleapis.com/google.cloud.developerconnect.v1.InsightsConfig"
4856 }
4857}
4858
4859pub mod insights_config {
4861 #[allow(unused_imports)]
4862 use super::*;
4863
4864 #[derive(Clone, Debug, PartialEq)]
4880 #[non_exhaustive]
4881 pub enum State {
4882 Unspecified,
4884 Pending,
4886 Complete,
4888 Error,
4890 UnknownValue(state::UnknownValue),
4895 }
4896
4897 #[doc(hidden)]
4898 pub mod state {
4899 #[allow(unused_imports)]
4900 use super::*;
4901 #[derive(Clone, Debug, PartialEq)]
4902 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
4903 }
4904
4905 impl State {
4906 pub fn value(&self) -> std::option::Option<i32> {
4911 match self {
4912 Self::Unspecified => std::option::Option::Some(0),
4913 Self::Pending => std::option::Option::Some(5),
4914 Self::Complete => std::option::Option::Some(3),
4915 Self::Error => std::option::Option::Some(4),
4916 Self::UnknownValue(u) => u.0.value(),
4917 }
4918 }
4919
4920 pub fn name(&self) -> std::option::Option<&str> {
4925 match self {
4926 Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
4927 Self::Pending => std::option::Option::Some("PENDING"),
4928 Self::Complete => std::option::Option::Some("COMPLETE"),
4929 Self::Error => std::option::Option::Some("ERROR"),
4930 Self::UnknownValue(u) => u.0.name(),
4931 }
4932 }
4933 }
4934
4935 impl std::default::Default for State {
4936 fn default() -> Self {
4937 use std::convert::From;
4938 Self::from(0)
4939 }
4940 }
4941
4942 impl std::fmt::Display for State {
4943 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
4944 wkt::internal::display_enum(f, self.name(), self.value())
4945 }
4946 }
4947
4948 impl std::convert::From<i32> for State {
4949 fn from(value: i32) -> Self {
4950 match value {
4951 0 => Self::Unspecified,
4952 3 => Self::Complete,
4953 4 => Self::Error,
4954 5 => Self::Pending,
4955 _ => Self::UnknownValue(state::UnknownValue(
4956 wkt::internal::UnknownEnumValue::Integer(value),
4957 )),
4958 }
4959 }
4960 }
4961
4962 impl std::convert::From<&str> for State {
4963 fn from(value: &str) -> Self {
4964 use std::string::ToString;
4965 match value {
4966 "STATE_UNSPECIFIED" => Self::Unspecified,
4967 "PENDING" => Self::Pending,
4968 "COMPLETE" => Self::Complete,
4969 "ERROR" => Self::Error,
4970 _ => Self::UnknownValue(state::UnknownValue(
4971 wkt::internal::UnknownEnumValue::String(value.to_string()),
4972 )),
4973 }
4974 }
4975 }
4976
4977 impl serde::ser::Serialize for State {
4978 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4979 where
4980 S: serde::Serializer,
4981 {
4982 match self {
4983 Self::Unspecified => serializer.serialize_i32(0),
4984 Self::Pending => serializer.serialize_i32(5),
4985 Self::Complete => serializer.serialize_i32(3),
4986 Self::Error => serializer.serialize_i32(4),
4987 Self::UnknownValue(u) => u.0.serialize(serializer),
4988 }
4989 }
4990 }
4991
4992 impl<'de> serde::de::Deserialize<'de> for State {
4993 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4994 where
4995 D: serde::Deserializer<'de>,
4996 {
4997 deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
4998 ".google.cloud.developerconnect.v1.InsightsConfig.State",
4999 ))
5000 }
5001 }
5002
5003 #[derive(Clone, Debug, PartialEq)]
5005 #[non_exhaustive]
5006 pub enum InsightsConfigContext {
5007 AppHubApplication(std::string::String),
5011 }
5012}
5013
5014#[derive(Clone, Default, PartialEq)]
5017#[non_exhaustive]
5018pub struct RuntimeConfig {
5019 pub uri: std::string::String,
5023
5024 pub state: crate::model::runtime_config::State,
5026
5027 pub runtime: std::option::Option<crate::model::runtime_config::Runtime>,
5029
5030 pub derived_from: std::option::Option<crate::model::runtime_config::DerivedFrom>,
5032
5033 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5034}
5035
5036impl RuntimeConfig {
5037 pub fn new() -> Self {
5038 std::default::Default::default()
5039 }
5040
5041 pub fn set_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5043 self.uri = v.into();
5044 self
5045 }
5046
5047 pub fn set_state<T: std::convert::Into<crate::model::runtime_config::State>>(
5049 mut self,
5050 v: T,
5051 ) -> Self {
5052 self.state = v.into();
5053 self
5054 }
5055
5056 pub fn set_runtime<
5061 T: std::convert::Into<std::option::Option<crate::model::runtime_config::Runtime>>,
5062 >(
5063 mut self,
5064 v: T,
5065 ) -> Self {
5066 self.runtime = v.into();
5067 self
5068 }
5069
5070 pub fn gke_workload(&self) -> std::option::Option<&std::boxed::Box<crate::model::GKEWorkload>> {
5074 #[allow(unreachable_patterns)]
5075 self.runtime.as_ref().and_then(|v| match v {
5076 crate::model::runtime_config::Runtime::GkeWorkload(v) => std::option::Option::Some(v),
5077 _ => std::option::Option::None,
5078 })
5079 }
5080
5081 pub fn set_gke_workload<T: std::convert::Into<std::boxed::Box<crate::model::GKEWorkload>>>(
5087 mut self,
5088 v: T,
5089 ) -> Self {
5090 self.runtime =
5091 std::option::Option::Some(crate::model::runtime_config::Runtime::GkeWorkload(v.into()));
5092 self
5093 }
5094
5095 pub fn set_derived_from<
5100 T: std::convert::Into<std::option::Option<crate::model::runtime_config::DerivedFrom>>,
5101 >(
5102 mut self,
5103 v: T,
5104 ) -> Self {
5105 self.derived_from = v.into();
5106 self
5107 }
5108
5109 pub fn app_hub_workload(
5113 &self,
5114 ) -> std::option::Option<&std::boxed::Box<crate::model::AppHubWorkload>> {
5115 #[allow(unreachable_patterns)]
5116 self.derived_from.as_ref().and_then(|v| match v {
5117 crate::model::runtime_config::DerivedFrom::AppHubWorkload(v) => {
5118 std::option::Option::Some(v)
5119 }
5120 _ => std::option::Option::None,
5121 })
5122 }
5123
5124 pub fn set_app_hub_workload<
5130 T: std::convert::Into<std::boxed::Box<crate::model::AppHubWorkload>>,
5131 >(
5132 mut self,
5133 v: T,
5134 ) -> Self {
5135 self.derived_from = std::option::Option::Some(
5136 crate::model::runtime_config::DerivedFrom::AppHubWorkload(v.into()),
5137 );
5138 self
5139 }
5140}
5141
5142impl wkt::message::Message for RuntimeConfig {
5143 fn typename() -> &'static str {
5144 "type.googleapis.com/google.cloud.developerconnect.v1.RuntimeConfig"
5145 }
5146}
5147
5148pub mod runtime_config {
5150 #[allow(unused_imports)]
5151 use super::*;
5152
5153 #[derive(Clone, Debug, PartialEq)]
5170 #[non_exhaustive]
5171 pub enum State {
5172 Unspecified,
5174 Linked,
5176 Unlinked,
5178 UnknownValue(state::UnknownValue),
5183 }
5184
5185 #[doc(hidden)]
5186 pub mod state {
5187 #[allow(unused_imports)]
5188 use super::*;
5189 #[derive(Clone, Debug, PartialEq)]
5190 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
5191 }
5192
5193 impl State {
5194 pub fn value(&self) -> std::option::Option<i32> {
5199 match self {
5200 Self::Unspecified => std::option::Option::Some(0),
5201 Self::Linked => std::option::Option::Some(1),
5202 Self::Unlinked => std::option::Option::Some(2),
5203 Self::UnknownValue(u) => u.0.value(),
5204 }
5205 }
5206
5207 pub fn name(&self) -> std::option::Option<&str> {
5212 match self {
5213 Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
5214 Self::Linked => std::option::Option::Some("LINKED"),
5215 Self::Unlinked => std::option::Option::Some("UNLINKED"),
5216 Self::UnknownValue(u) => u.0.name(),
5217 }
5218 }
5219 }
5220
5221 impl std::default::Default for State {
5222 fn default() -> Self {
5223 use std::convert::From;
5224 Self::from(0)
5225 }
5226 }
5227
5228 impl std::fmt::Display for State {
5229 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
5230 wkt::internal::display_enum(f, self.name(), self.value())
5231 }
5232 }
5233
5234 impl std::convert::From<i32> for State {
5235 fn from(value: i32) -> Self {
5236 match value {
5237 0 => Self::Unspecified,
5238 1 => Self::Linked,
5239 2 => Self::Unlinked,
5240 _ => Self::UnknownValue(state::UnknownValue(
5241 wkt::internal::UnknownEnumValue::Integer(value),
5242 )),
5243 }
5244 }
5245 }
5246
5247 impl std::convert::From<&str> for State {
5248 fn from(value: &str) -> Self {
5249 use std::string::ToString;
5250 match value {
5251 "STATE_UNSPECIFIED" => Self::Unspecified,
5252 "LINKED" => Self::Linked,
5253 "UNLINKED" => Self::Unlinked,
5254 _ => Self::UnknownValue(state::UnknownValue(
5255 wkt::internal::UnknownEnumValue::String(value.to_string()),
5256 )),
5257 }
5258 }
5259 }
5260
5261 impl serde::ser::Serialize for State {
5262 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
5263 where
5264 S: serde::Serializer,
5265 {
5266 match self {
5267 Self::Unspecified => serializer.serialize_i32(0),
5268 Self::Linked => serializer.serialize_i32(1),
5269 Self::Unlinked => serializer.serialize_i32(2),
5270 Self::UnknownValue(u) => u.0.serialize(serializer),
5271 }
5272 }
5273 }
5274
5275 impl<'de> serde::de::Deserialize<'de> for State {
5276 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
5277 where
5278 D: serde::Deserializer<'de>,
5279 {
5280 deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
5281 ".google.cloud.developerconnect.v1.RuntimeConfig.State",
5282 ))
5283 }
5284 }
5285
5286 #[derive(Clone, Debug, PartialEq)]
5288 #[non_exhaustive]
5289 pub enum Runtime {
5290 GkeWorkload(std::boxed::Box<crate::model::GKEWorkload>),
5292 }
5293
5294 #[derive(Clone, Debug, PartialEq)]
5296 #[non_exhaustive]
5297 pub enum DerivedFrom {
5298 AppHubWorkload(std::boxed::Box<crate::model::AppHubWorkload>),
5300 }
5301}
5302
5303#[derive(Clone, Default, PartialEq)]
5305#[non_exhaustive]
5306pub struct GKEWorkload {
5307 pub cluster: std::string::String,
5311
5312 pub deployment: std::string::String,
5316
5317 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5318}
5319
5320impl GKEWorkload {
5321 pub fn new() -> Self {
5322 std::default::Default::default()
5323 }
5324
5325 pub fn set_cluster<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5327 self.cluster = v.into();
5328 self
5329 }
5330
5331 pub fn set_deployment<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5333 self.deployment = v.into();
5334 self
5335 }
5336}
5337
5338impl wkt::message::Message for GKEWorkload {
5339 fn typename() -> &'static str {
5340 "type.googleapis.com/google.cloud.developerconnect.v1.GKEWorkload"
5341 }
5342}
5343
5344#[derive(Clone, Default, PartialEq)]
5346#[non_exhaustive]
5347pub struct AppHubWorkload {
5348 pub workload: std::string::String,
5352
5353 pub criticality: std::string::String,
5355
5356 pub environment: std::string::String,
5358
5359 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5360}
5361
5362impl AppHubWorkload {
5363 pub fn new() -> Self {
5364 std::default::Default::default()
5365 }
5366
5367 pub fn set_workload<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5369 self.workload = v.into();
5370 self
5371 }
5372
5373 pub fn set_criticality<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5375 self.criticality = v.into();
5376 self
5377 }
5378
5379 pub fn set_environment<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5381 self.environment = v.into();
5382 self
5383 }
5384}
5385
5386impl wkt::message::Message for AppHubWorkload {
5387 fn typename() -> &'static str {
5388 "type.googleapis.com/google.cloud.developerconnect.v1.AppHubWorkload"
5389 }
5390}
5391
5392#[derive(Clone, Default, PartialEq)]
5394#[non_exhaustive]
5395pub struct ArtifactConfig {
5396 pub uri: std::string::String,
5401
5402 pub artifact_storage: std::option::Option<crate::model::artifact_config::ArtifactStorage>,
5404
5405 pub artifact_metadata_storage:
5407 std::option::Option<crate::model::artifact_config::ArtifactMetadataStorage>,
5408
5409 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5410}
5411
5412impl ArtifactConfig {
5413 pub fn new() -> Self {
5414 std::default::Default::default()
5415 }
5416
5417 pub fn set_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5419 self.uri = v.into();
5420 self
5421 }
5422
5423 pub fn set_artifact_storage<
5428 T: std::convert::Into<std::option::Option<crate::model::artifact_config::ArtifactStorage>>,
5429 >(
5430 mut self,
5431 v: T,
5432 ) -> Self {
5433 self.artifact_storage = v.into();
5434 self
5435 }
5436
5437 pub fn google_artifact_registry(
5441 &self,
5442 ) -> std::option::Option<&std::boxed::Box<crate::model::GoogleArtifactRegistry>> {
5443 #[allow(unreachable_patterns)]
5444 self.artifact_storage.as_ref().and_then(|v| match v {
5445 crate::model::artifact_config::ArtifactStorage::GoogleArtifactRegistry(v) => {
5446 std::option::Option::Some(v)
5447 }
5448 _ => std::option::Option::None,
5449 })
5450 }
5451
5452 pub fn set_google_artifact_registry<
5458 T: std::convert::Into<std::boxed::Box<crate::model::GoogleArtifactRegistry>>,
5459 >(
5460 mut self,
5461 v: T,
5462 ) -> Self {
5463 self.artifact_storage = std::option::Option::Some(
5464 crate::model::artifact_config::ArtifactStorage::GoogleArtifactRegistry(v.into()),
5465 );
5466 self
5467 }
5468
5469 pub fn set_artifact_metadata_storage<
5474 T: std::convert::Into<
5475 std::option::Option<crate::model::artifact_config::ArtifactMetadataStorage>,
5476 >,
5477 >(
5478 mut self,
5479 v: T,
5480 ) -> Self {
5481 self.artifact_metadata_storage = v.into();
5482 self
5483 }
5484
5485 pub fn google_artifact_analysis(
5489 &self,
5490 ) -> std::option::Option<&std::boxed::Box<crate::model::GoogleArtifactAnalysis>> {
5491 #[allow(unreachable_patterns)]
5492 self.artifact_metadata_storage
5493 .as_ref()
5494 .and_then(|v| match v {
5495 crate::model::artifact_config::ArtifactMetadataStorage::GoogleArtifactAnalysis(
5496 v,
5497 ) => std::option::Option::Some(v),
5498 _ => std::option::Option::None,
5499 })
5500 }
5501
5502 pub fn set_google_artifact_analysis<
5508 T: std::convert::Into<std::boxed::Box<crate::model::GoogleArtifactAnalysis>>,
5509 >(
5510 mut self,
5511 v: T,
5512 ) -> Self {
5513 self.artifact_metadata_storage = std::option::Option::Some(
5514 crate::model::artifact_config::ArtifactMetadataStorage::GoogleArtifactAnalysis(
5515 v.into(),
5516 ),
5517 );
5518 self
5519 }
5520}
5521
5522impl wkt::message::Message for ArtifactConfig {
5523 fn typename() -> &'static str {
5524 "type.googleapis.com/google.cloud.developerconnect.v1.ArtifactConfig"
5525 }
5526}
5527
5528pub mod artifact_config {
5530 #[allow(unused_imports)]
5531 use super::*;
5532
5533 #[derive(Clone, Debug, PartialEq)]
5535 #[non_exhaustive]
5536 pub enum ArtifactStorage {
5537 GoogleArtifactRegistry(std::boxed::Box<crate::model::GoogleArtifactRegistry>),
5539 }
5540
5541 #[derive(Clone, Debug, PartialEq)]
5543 #[non_exhaustive]
5544 pub enum ArtifactMetadataStorage {
5545 GoogleArtifactAnalysis(std::boxed::Box<crate::model::GoogleArtifactAnalysis>),
5547 }
5548}
5549
5550#[derive(Clone, Default, PartialEq)]
5552#[non_exhaustive]
5553pub struct GoogleArtifactAnalysis {
5554 pub project_id: std::string::String,
5556
5557 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5558}
5559
5560impl GoogleArtifactAnalysis {
5561 pub fn new() -> Self {
5562 std::default::Default::default()
5563 }
5564
5565 pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5567 self.project_id = v.into();
5568 self
5569 }
5570}
5571
5572impl wkt::message::Message for GoogleArtifactAnalysis {
5573 fn typename() -> &'static str {
5574 "type.googleapis.com/google.cloud.developerconnect.v1.GoogleArtifactAnalysis"
5575 }
5576}
5577
5578#[derive(Clone, Default, PartialEq)]
5580#[non_exhaustive]
5581pub struct GoogleArtifactRegistry {
5582 pub project_id: std::string::String,
5584
5585 pub artifact_registry_package: std::string::String,
5587
5588 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5589}
5590
5591impl GoogleArtifactRegistry {
5592 pub fn new() -> Self {
5593 std::default::Default::default()
5594 }
5595
5596 pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5598 self.project_id = v.into();
5599 self
5600 }
5601
5602 pub fn set_artifact_registry_package<T: std::convert::Into<std::string::String>>(
5604 mut self,
5605 v: T,
5606 ) -> Self {
5607 self.artifact_registry_package = v.into();
5608 self
5609 }
5610}
5611
5612impl wkt::message::Message for GoogleArtifactRegistry {
5613 fn typename() -> &'static str {
5614 "type.googleapis.com/google.cloud.developerconnect.v1.GoogleArtifactRegistry"
5615 }
5616}
5617
5618#[derive(Clone, Default, PartialEq)]
5620#[non_exhaustive]
5621pub struct CreateInsightsConfigRequest {
5622 pub parent: std::string::String,
5624
5625 pub insights_config_id: std::string::String,
5627
5628 pub insights_config: std::option::Option<crate::model::InsightsConfig>,
5630
5631 pub validate_only: bool,
5633
5634 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5635}
5636
5637impl CreateInsightsConfigRequest {
5638 pub fn new() -> Self {
5639 std::default::Default::default()
5640 }
5641
5642 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5644 self.parent = v.into();
5645 self
5646 }
5647
5648 pub fn set_insights_config_id<T: std::convert::Into<std::string::String>>(
5650 mut self,
5651 v: T,
5652 ) -> Self {
5653 self.insights_config_id = v.into();
5654 self
5655 }
5656
5657 pub fn set_insights_config<T>(mut self, v: T) -> Self
5659 where
5660 T: std::convert::Into<crate::model::InsightsConfig>,
5661 {
5662 self.insights_config = std::option::Option::Some(v.into());
5663 self
5664 }
5665
5666 pub fn set_or_clear_insights_config<T>(mut self, v: std::option::Option<T>) -> Self
5668 where
5669 T: std::convert::Into<crate::model::InsightsConfig>,
5670 {
5671 self.insights_config = v.map(|x| x.into());
5672 self
5673 }
5674
5675 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5677 self.validate_only = v.into();
5678 self
5679 }
5680}
5681
5682impl wkt::message::Message for CreateInsightsConfigRequest {
5683 fn typename() -> &'static str {
5684 "type.googleapis.com/google.cloud.developerconnect.v1.CreateInsightsConfigRequest"
5685 }
5686}
5687
5688#[derive(Clone, Default, PartialEq)]
5690#[non_exhaustive]
5691pub struct GetInsightsConfigRequest {
5692 pub name: std::string::String,
5694
5695 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5696}
5697
5698impl GetInsightsConfigRequest {
5699 pub fn new() -> Self {
5700 std::default::Default::default()
5701 }
5702
5703 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5705 self.name = v.into();
5706 self
5707 }
5708}
5709
5710impl wkt::message::Message for GetInsightsConfigRequest {
5711 fn typename() -> &'static str {
5712 "type.googleapis.com/google.cloud.developerconnect.v1.GetInsightsConfigRequest"
5713 }
5714}
5715
5716#[derive(Clone, Default, PartialEq)]
5718#[non_exhaustive]
5719pub struct ListInsightsConfigsRequest {
5720 pub parent: std::string::String,
5722
5723 pub page_size: i32,
5726
5727 pub page_token: std::string::String,
5729
5730 pub filter: std::string::String,
5735
5736 pub order_by: std::string::String,
5738
5739 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5740}
5741
5742impl ListInsightsConfigsRequest {
5743 pub fn new() -> Self {
5744 std::default::Default::default()
5745 }
5746
5747 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5749 self.parent = v.into();
5750 self
5751 }
5752
5753 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
5755 self.page_size = v.into();
5756 self
5757 }
5758
5759 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5761 self.page_token = v.into();
5762 self
5763 }
5764
5765 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5767 self.filter = v.into();
5768 self
5769 }
5770
5771 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5773 self.order_by = v.into();
5774 self
5775 }
5776}
5777
5778impl wkt::message::Message for ListInsightsConfigsRequest {
5779 fn typename() -> &'static str {
5780 "type.googleapis.com/google.cloud.developerconnect.v1.ListInsightsConfigsRequest"
5781 }
5782}
5783
5784#[derive(Clone, Default, PartialEq)]
5786#[non_exhaustive]
5787pub struct ListInsightsConfigsResponse {
5788 pub insights_configs: std::vec::Vec<crate::model::InsightsConfig>,
5790
5791 pub next_page_token: std::string::String,
5793
5794 pub unreachable: std::vec::Vec<std::string::String>,
5796
5797 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5798}
5799
5800impl ListInsightsConfigsResponse {
5801 pub fn new() -> Self {
5802 std::default::Default::default()
5803 }
5804
5805 pub fn set_insights_configs<T, V>(mut self, v: T) -> Self
5807 where
5808 T: std::iter::IntoIterator<Item = V>,
5809 V: std::convert::Into<crate::model::InsightsConfig>,
5810 {
5811 use std::iter::Iterator;
5812 self.insights_configs = v.into_iter().map(|i| i.into()).collect();
5813 self
5814 }
5815
5816 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5818 self.next_page_token = v.into();
5819 self
5820 }
5821
5822 pub fn set_unreachable<T, V>(mut self, v: T) -> Self
5824 where
5825 T: std::iter::IntoIterator<Item = V>,
5826 V: std::convert::Into<std::string::String>,
5827 {
5828 use std::iter::Iterator;
5829 self.unreachable = v.into_iter().map(|i| i.into()).collect();
5830 self
5831 }
5832}
5833
5834impl wkt::message::Message for ListInsightsConfigsResponse {
5835 fn typename() -> &'static str {
5836 "type.googleapis.com/google.cloud.developerconnect.v1.ListInsightsConfigsResponse"
5837 }
5838}
5839
5840#[doc(hidden)]
5841impl gax::paginator::internal::PageableResponse for ListInsightsConfigsResponse {
5842 type PageItem = crate::model::InsightsConfig;
5843
5844 fn items(self) -> std::vec::Vec<Self::PageItem> {
5845 self.insights_configs
5846 }
5847
5848 fn next_page_token(&self) -> std::string::String {
5849 use std::clone::Clone;
5850 self.next_page_token.clone()
5851 }
5852}
5853
5854#[derive(Clone, Default, PartialEq)]
5856#[non_exhaustive]
5857pub struct DeleteInsightsConfigRequest {
5858 pub name: std::string::String,
5860
5861 pub request_id: std::string::String,
5875
5876 pub validate_only: bool,
5878
5879 pub etag: std::string::String,
5883
5884 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5885}
5886
5887impl DeleteInsightsConfigRequest {
5888 pub fn new() -> Self {
5889 std::default::Default::default()
5890 }
5891
5892 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5894 self.name = v.into();
5895 self
5896 }
5897
5898 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5900 self.request_id = v.into();
5901 self
5902 }
5903
5904 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5906 self.validate_only = v.into();
5907 self
5908 }
5909
5910 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5912 self.etag = v.into();
5913 self
5914 }
5915}
5916
5917impl wkt::message::Message for DeleteInsightsConfigRequest {
5918 fn typename() -> &'static str {
5919 "type.googleapis.com/google.cloud.developerconnect.v1.DeleteInsightsConfigRequest"
5920 }
5921}
5922
5923#[derive(Clone, Default, PartialEq)]
5925#[non_exhaustive]
5926pub struct UpdateInsightsConfigRequest {
5927 pub insights_config: std::option::Option<crate::model::InsightsConfig>,
5929
5930 pub request_id: std::string::String,
5944
5945 pub allow_missing: bool,
5951
5952 pub validate_only: bool,
5954
5955 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5956}
5957
5958impl UpdateInsightsConfigRequest {
5959 pub fn new() -> Self {
5960 std::default::Default::default()
5961 }
5962
5963 pub fn set_insights_config<T>(mut self, v: T) -> Self
5965 where
5966 T: std::convert::Into<crate::model::InsightsConfig>,
5967 {
5968 self.insights_config = std::option::Option::Some(v.into());
5969 self
5970 }
5971
5972 pub fn set_or_clear_insights_config<T>(mut self, v: std::option::Option<T>) -> Self
5974 where
5975 T: std::convert::Into<crate::model::InsightsConfig>,
5976 {
5977 self.insights_config = v.map(|x| x.into());
5978 self
5979 }
5980
5981 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5983 self.request_id = v.into();
5984 self
5985 }
5986
5987 pub fn set_allow_missing<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5989 self.allow_missing = v.into();
5990 self
5991 }
5992
5993 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5995 self.validate_only = v.into();
5996 self
5997 }
5998}
5999
6000impl wkt::message::Message for UpdateInsightsConfigRequest {
6001 fn typename() -> &'static str {
6002 "type.googleapis.com/google.cloud.developerconnect.v1.UpdateInsightsConfigRequest"
6003 }
6004}
6005
6006#[derive(Clone, Debug, PartialEq)]
6022#[non_exhaustive]
6023pub enum SystemProvider {
6024 Unspecified,
6026 Github,
6030 Gitlab,
6034 Google,
6039 Sentry,
6043 Rovo,
6046 NewRelic,
6049 Datastax,
6052 Dynatrace,
6054 UnknownValue(system_provider::UnknownValue),
6059}
6060
6061#[doc(hidden)]
6062pub mod system_provider {
6063 #[allow(unused_imports)]
6064 use super::*;
6065 #[derive(Clone, Debug, PartialEq)]
6066 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
6067}
6068
6069impl SystemProvider {
6070 pub fn value(&self) -> std::option::Option<i32> {
6075 match self {
6076 Self::Unspecified => std::option::Option::Some(0),
6077 Self::Github => std::option::Option::Some(1),
6078 Self::Gitlab => std::option::Option::Some(2),
6079 Self::Google => std::option::Option::Some(3),
6080 Self::Sentry => std::option::Option::Some(4),
6081 Self::Rovo => std::option::Option::Some(5),
6082 Self::NewRelic => std::option::Option::Some(6),
6083 Self::Datastax => std::option::Option::Some(7),
6084 Self::Dynatrace => std::option::Option::Some(8),
6085 Self::UnknownValue(u) => u.0.value(),
6086 }
6087 }
6088
6089 pub fn name(&self) -> std::option::Option<&str> {
6094 match self {
6095 Self::Unspecified => std::option::Option::Some("SYSTEM_PROVIDER_UNSPECIFIED"),
6096 Self::Github => std::option::Option::Some("GITHUB"),
6097 Self::Gitlab => std::option::Option::Some("GITLAB"),
6098 Self::Google => std::option::Option::Some("GOOGLE"),
6099 Self::Sentry => std::option::Option::Some("SENTRY"),
6100 Self::Rovo => std::option::Option::Some("ROVO"),
6101 Self::NewRelic => std::option::Option::Some("NEW_RELIC"),
6102 Self::Datastax => std::option::Option::Some("DATASTAX"),
6103 Self::Dynatrace => std::option::Option::Some("DYNATRACE"),
6104 Self::UnknownValue(u) => u.0.name(),
6105 }
6106 }
6107}
6108
6109impl std::default::Default for SystemProvider {
6110 fn default() -> Self {
6111 use std::convert::From;
6112 Self::from(0)
6113 }
6114}
6115
6116impl std::fmt::Display for SystemProvider {
6117 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
6118 wkt::internal::display_enum(f, self.name(), self.value())
6119 }
6120}
6121
6122impl std::convert::From<i32> for SystemProvider {
6123 fn from(value: i32) -> Self {
6124 match value {
6125 0 => Self::Unspecified,
6126 1 => Self::Github,
6127 2 => Self::Gitlab,
6128 3 => Self::Google,
6129 4 => Self::Sentry,
6130 5 => Self::Rovo,
6131 6 => Self::NewRelic,
6132 7 => Self::Datastax,
6133 8 => Self::Dynatrace,
6134 _ => Self::UnknownValue(system_provider::UnknownValue(
6135 wkt::internal::UnknownEnumValue::Integer(value),
6136 )),
6137 }
6138 }
6139}
6140
6141impl std::convert::From<&str> for SystemProvider {
6142 fn from(value: &str) -> Self {
6143 use std::string::ToString;
6144 match value {
6145 "SYSTEM_PROVIDER_UNSPECIFIED" => Self::Unspecified,
6146 "GITHUB" => Self::Github,
6147 "GITLAB" => Self::Gitlab,
6148 "GOOGLE" => Self::Google,
6149 "SENTRY" => Self::Sentry,
6150 "ROVO" => Self::Rovo,
6151 "NEW_RELIC" => Self::NewRelic,
6152 "DATASTAX" => Self::Datastax,
6153 "DYNATRACE" => Self::Dynatrace,
6154 _ => Self::UnknownValue(system_provider::UnknownValue(
6155 wkt::internal::UnknownEnumValue::String(value.to_string()),
6156 )),
6157 }
6158 }
6159}
6160
6161impl serde::ser::Serialize for SystemProvider {
6162 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
6163 where
6164 S: serde::Serializer,
6165 {
6166 match self {
6167 Self::Unspecified => serializer.serialize_i32(0),
6168 Self::Github => serializer.serialize_i32(1),
6169 Self::Gitlab => serializer.serialize_i32(2),
6170 Self::Google => serializer.serialize_i32(3),
6171 Self::Sentry => serializer.serialize_i32(4),
6172 Self::Rovo => serializer.serialize_i32(5),
6173 Self::NewRelic => serializer.serialize_i32(6),
6174 Self::Datastax => serializer.serialize_i32(7),
6175 Self::Dynatrace => serializer.serialize_i32(8),
6176 Self::UnknownValue(u) => u.0.serialize(serializer),
6177 }
6178 }
6179}
6180
6181impl<'de> serde::de::Deserialize<'de> for SystemProvider {
6182 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6183 where
6184 D: serde::Deserializer<'de>,
6185 {
6186 deserializer.deserialize_any(wkt::internal::EnumVisitor::<SystemProvider>::new(
6187 ".google.cloud.developerconnect.v1.SystemProvider",
6188 ))
6189 }
6190}