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 iam_v1;
25extern crate lazy_static;
26extern crate location;
27extern crate longrunning;
28extern crate lro;
29extern crate reqwest;
30extern crate serde;
31extern crate serde_json;
32extern crate serde_with;
33extern crate std;
34extern crate tracing;
35extern crate wkt;
36
37mod debug;
38mod deserialize;
39mod serialize;
40
41#[derive(Clone, Default, PartialEq)]
43#[non_exhaustive]
44pub struct Instance {
45 pub name: std::string::String,
58
59 pub create_time: std::option::Option<wkt::Timestamp>,
61
62 pub update_time: std::option::Option<wkt::Timestamp>,
64
65 pub labels: std::collections::HashMap<std::string::String, std::string::String>,
67
68 pub private_config: std::option::Option<crate::model::instance::PrivateConfig>,
70
71 pub state: crate::model::instance::State,
73
74 pub state_note: crate::model::instance::StateNote,
77
78 pub kms_key: std::string::String,
81
82 pub host_config: std::option::Option<crate::model::instance::HostConfig>,
84
85 pub workforce_identity_federation_config:
88 std::option::Option<crate::model::instance::WorkforceIdentityFederationConfig>,
89
90 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
91}
92
93impl Instance {
94 pub fn new() -> Self {
95 std::default::Default::default()
96 }
97
98 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
100 self.name = v.into();
101 self
102 }
103
104 pub fn set_create_time<T>(mut self, v: T) -> Self
106 where
107 T: std::convert::Into<wkt::Timestamp>,
108 {
109 self.create_time = std::option::Option::Some(v.into());
110 self
111 }
112
113 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
115 where
116 T: std::convert::Into<wkt::Timestamp>,
117 {
118 self.create_time = v.map(|x| x.into());
119 self
120 }
121
122 pub fn set_update_time<T>(mut self, v: T) -> Self
124 where
125 T: std::convert::Into<wkt::Timestamp>,
126 {
127 self.update_time = std::option::Option::Some(v.into());
128 self
129 }
130
131 pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
133 where
134 T: std::convert::Into<wkt::Timestamp>,
135 {
136 self.update_time = v.map(|x| x.into());
137 self
138 }
139
140 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
142 where
143 T: std::iter::IntoIterator<Item = (K, V)>,
144 K: std::convert::Into<std::string::String>,
145 V: std::convert::Into<std::string::String>,
146 {
147 use std::iter::Iterator;
148 self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
149 self
150 }
151
152 pub fn set_private_config<T>(mut self, v: T) -> Self
154 where
155 T: std::convert::Into<crate::model::instance::PrivateConfig>,
156 {
157 self.private_config = std::option::Option::Some(v.into());
158 self
159 }
160
161 pub fn set_or_clear_private_config<T>(mut self, v: std::option::Option<T>) -> Self
163 where
164 T: std::convert::Into<crate::model::instance::PrivateConfig>,
165 {
166 self.private_config = v.map(|x| x.into());
167 self
168 }
169
170 pub fn set_state<T: std::convert::Into<crate::model::instance::State>>(mut self, v: T) -> Self {
172 self.state = v.into();
173 self
174 }
175
176 pub fn set_state_note<T: std::convert::Into<crate::model::instance::StateNote>>(
178 mut self,
179 v: T,
180 ) -> Self {
181 self.state_note = v.into();
182 self
183 }
184
185 pub fn set_kms_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
187 self.kms_key = v.into();
188 self
189 }
190
191 pub fn set_host_config<T>(mut self, v: T) -> Self
193 where
194 T: std::convert::Into<crate::model::instance::HostConfig>,
195 {
196 self.host_config = std::option::Option::Some(v.into());
197 self
198 }
199
200 pub fn set_or_clear_host_config<T>(mut self, v: std::option::Option<T>) -> Self
202 where
203 T: std::convert::Into<crate::model::instance::HostConfig>,
204 {
205 self.host_config = v.map(|x| x.into());
206 self
207 }
208
209 pub fn set_workforce_identity_federation_config<T>(mut self, v: T) -> Self
211 where
212 T: std::convert::Into<crate::model::instance::WorkforceIdentityFederationConfig>,
213 {
214 self.workforce_identity_federation_config = std::option::Option::Some(v.into());
215 self
216 }
217
218 pub fn set_or_clear_workforce_identity_federation_config<T>(
220 mut self,
221 v: std::option::Option<T>,
222 ) -> Self
223 where
224 T: std::convert::Into<crate::model::instance::WorkforceIdentityFederationConfig>,
225 {
226 self.workforce_identity_federation_config = v.map(|x| x.into());
227 self
228 }
229}
230
231impl wkt::message::Message for Instance {
232 fn typename() -> &'static str {
233 "type.googleapis.com/google.cloud.securesourcemanager.v1.Instance"
234 }
235}
236
237pub mod instance {
239 #[allow(unused_imports)]
240 use super::*;
241
242 #[derive(Clone, Default, PartialEq)]
244 #[non_exhaustive]
245 pub struct HostConfig {
246 pub html: std::string::String,
248
249 pub api: std::string::String,
251
252 pub git_http: std::string::String,
254
255 pub git_ssh: std::string::String,
257
258 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
259 }
260
261 impl HostConfig {
262 pub fn new() -> Self {
263 std::default::Default::default()
264 }
265
266 pub fn set_html<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
268 self.html = v.into();
269 self
270 }
271
272 pub fn set_api<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
274 self.api = v.into();
275 self
276 }
277
278 pub fn set_git_http<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
280 self.git_http = v.into();
281 self
282 }
283
284 pub fn set_git_ssh<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
286 self.git_ssh = v.into();
287 self
288 }
289 }
290
291 impl wkt::message::Message for HostConfig {
292 fn typename() -> &'static str {
293 "type.googleapis.com/google.cloud.securesourcemanager.v1.Instance.HostConfig"
294 }
295 }
296
297 #[derive(Clone, Default, PartialEq)]
299 #[non_exhaustive]
300 pub struct PrivateConfig {
301 pub is_private: bool,
303
304 pub ca_pool: std::string::String,
307
308 pub http_service_attachment: std::string::String,
311
312 pub ssh_service_attachment: std::string::String,
315
316 pub psc_allowed_projects: std::vec::Vec<std::string::String>,
320
321 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
322 }
323
324 impl PrivateConfig {
325 pub fn new() -> Self {
326 std::default::Default::default()
327 }
328
329 pub fn set_is_private<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
331 self.is_private = v.into();
332 self
333 }
334
335 pub fn set_ca_pool<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
337 self.ca_pool = v.into();
338 self
339 }
340
341 pub fn set_http_service_attachment<T: std::convert::Into<std::string::String>>(
343 mut self,
344 v: T,
345 ) -> Self {
346 self.http_service_attachment = v.into();
347 self
348 }
349
350 pub fn set_ssh_service_attachment<T: std::convert::Into<std::string::String>>(
352 mut self,
353 v: T,
354 ) -> Self {
355 self.ssh_service_attachment = v.into();
356 self
357 }
358
359 pub fn set_psc_allowed_projects<T, V>(mut self, v: T) -> Self
361 where
362 T: std::iter::IntoIterator<Item = V>,
363 V: std::convert::Into<std::string::String>,
364 {
365 use std::iter::Iterator;
366 self.psc_allowed_projects = v.into_iter().map(|i| i.into()).collect();
367 self
368 }
369 }
370
371 impl wkt::message::Message for PrivateConfig {
372 fn typename() -> &'static str {
373 "type.googleapis.com/google.cloud.securesourcemanager.v1.Instance.PrivateConfig"
374 }
375 }
376
377 #[derive(Clone, Default, PartialEq)]
380 #[non_exhaustive]
381 pub struct WorkforceIdentityFederationConfig {
382 pub enabled: bool,
384
385 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
386 }
387
388 impl WorkforceIdentityFederationConfig {
389 pub fn new() -> Self {
390 std::default::Default::default()
391 }
392
393 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
395 self.enabled = v.into();
396 self
397 }
398 }
399
400 impl wkt::message::Message for WorkforceIdentityFederationConfig {
401 fn typename() -> &'static str {
402 "type.googleapis.com/google.cloud.securesourcemanager.v1.Instance.WorkforceIdentityFederationConfig"
403 }
404 }
405
406 #[derive(Clone, Debug, PartialEq)]
422 #[non_exhaustive]
423 pub enum State {
424 Unspecified,
426 Creating,
428 Active,
430 Deleting,
432 Paused,
434 Unknown,
436 UnknownValue(state::UnknownValue),
441 }
442
443 #[doc(hidden)]
444 pub mod state {
445 #[allow(unused_imports)]
446 use super::*;
447 #[derive(Clone, Debug, PartialEq)]
448 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
449 }
450
451 impl State {
452 pub fn value(&self) -> std::option::Option<i32> {
457 match self {
458 Self::Unspecified => std::option::Option::Some(0),
459 Self::Creating => std::option::Option::Some(1),
460 Self::Active => std::option::Option::Some(2),
461 Self::Deleting => std::option::Option::Some(3),
462 Self::Paused => std::option::Option::Some(4),
463 Self::Unknown => std::option::Option::Some(6),
464 Self::UnknownValue(u) => u.0.value(),
465 }
466 }
467
468 pub fn name(&self) -> std::option::Option<&str> {
473 match self {
474 Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
475 Self::Creating => std::option::Option::Some("CREATING"),
476 Self::Active => std::option::Option::Some("ACTIVE"),
477 Self::Deleting => std::option::Option::Some("DELETING"),
478 Self::Paused => std::option::Option::Some("PAUSED"),
479 Self::Unknown => std::option::Option::Some("UNKNOWN"),
480 Self::UnknownValue(u) => u.0.name(),
481 }
482 }
483 }
484
485 impl std::default::Default for State {
486 fn default() -> Self {
487 use std::convert::From;
488 Self::from(0)
489 }
490 }
491
492 impl std::fmt::Display for State {
493 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
494 wkt::internal::display_enum(f, self.name(), self.value())
495 }
496 }
497
498 impl std::convert::From<i32> for State {
499 fn from(value: i32) -> Self {
500 match value {
501 0 => Self::Unspecified,
502 1 => Self::Creating,
503 2 => Self::Active,
504 3 => Self::Deleting,
505 4 => Self::Paused,
506 6 => Self::Unknown,
507 _ => Self::UnknownValue(state::UnknownValue(
508 wkt::internal::UnknownEnumValue::Integer(value),
509 )),
510 }
511 }
512 }
513
514 impl std::convert::From<&str> for State {
515 fn from(value: &str) -> Self {
516 use std::string::ToString;
517 match value {
518 "STATE_UNSPECIFIED" => Self::Unspecified,
519 "CREATING" => Self::Creating,
520 "ACTIVE" => Self::Active,
521 "DELETING" => Self::Deleting,
522 "PAUSED" => Self::Paused,
523 "UNKNOWN" => Self::Unknown,
524 _ => Self::UnknownValue(state::UnknownValue(
525 wkt::internal::UnknownEnumValue::String(value.to_string()),
526 )),
527 }
528 }
529 }
530
531 impl serde::ser::Serialize for State {
532 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
533 where
534 S: serde::Serializer,
535 {
536 match self {
537 Self::Unspecified => serializer.serialize_i32(0),
538 Self::Creating => serializer.serialize_i32(1),
539 Self::Active => serializer.serialize_i32(2),
540 Self::Deleting => serializer.serialize_i32(3),
541 Self::Paused => serializer.serialize_i32(4),
542 Self::Unknown => serializer.serialize_i32(6),
543 Self::UnknownValue(u) => u.0.serialize(serializer),
544 }
545 }
546 }
547
548 impl<'de> serde::de::Deserialize<'de> for State {
549 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
550 where
551 D: serde::Deserializer<'de>,
552 {
553 deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
554 ".google.cloud.securesourcemanager.v1.Instance.State",
555 ))
556 }
557 }
558
559 #[derive(Clone, Debug, PartialEq)]
575 #[non_exhaustive]
576 pub enum StateNote {
577 Unspecified,
579 PausedCmekUnavailable,
581 #[deprecated]
584 InstanceResuming,
585 UnknownValue(state_note::UnknownValue),
590 }
591
592 #[doc(hidden)]
593 pub mod state_note {
594 #[allow(unused_imports)]
595 use super::*;
596 #[derive(Clone, Debug, PartialEq)]
597 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
598 }
599
600 impl StateNote {
601 pub fn value(&self) -> std::option::Option<i32> {
606 match self {
607 Self::Unspecified => std::option::Option::Some(0),
608 Self::PausedCmekUnavailable => std::option::Option::Some(1),
609 Self::InstanceResuming => std::option::Option::Some(2),
610 Self::UnknownValue(u) => u.0.value(),
611 }
612 }
613
614 pub fn name(&self) -> std::option::Option<&str> {
619 match self {
620 Self::Unspecified => std::option::Option::Some("STATE_NOTE_UNSPECIFIED"),
621 Self::PausedCmekUnavailable => std::option::Option::Some("PAUSED_CMEK_UNAVAILABLE"),
622 Self::InstanceResuming => std::option::Option::Some("INSTANCE_RESUMING"),
623 Self::UnknownValue(u) => u.0.name(),
624 }
625 }
626 }
627
628 impl std::default::Default for StateNote {
629 fn default() -> Self {
630 use std::convert::From;
631 Self::from(0)
632 }
633 }
634
635 impl std::fmt::Display for StateNote {
636 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
637 wkt::internal::display_enum(f, self.name(), self.value())
638 }
639 }
640
641 impl std::convert::From<i32> for StateNote {
642 fn from(value: i32) -> Self {
643 match value {
644 0 => Self::Unspecified,
645 1 => Self::PausedCmekUnavailable,
646 2 => Self::InstanceResuming,
647 _ => Self::UnknownValue(state_note::UnknownValue(
648 wkt::internal::UnknownEnumValue::Integer(value),
649 )),
650 }
651 }
652 }
653
654 impl std::convert::From<&str> for StateNote {
655 fn from(value: &str) -> Self {
656 use std::string::ToString;
657 match value {
658 "STATE_NOTE_UNSPECIFIED" => Self::Unspecified,
659 "PAUSED_CMEK_UNAVAILABLE" => Self::PausedCmekUnavailable,
660 "INSTANCE_RESUMING" => Self::InstanceResuming,
661 _ => Self::UnknownValue(state_note::UnknownValue(
662 wkt::internal::UnknownEnumValue::String(value.to_string()),
663 )),
664 }
665 }
666 }
667
668 impl serde::ser::Serialize for StateNote {
669 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
670 where
671 S: serde::Serializer,
672 {
673 match self {
674 Self::Unspecified => serializer.serialize_i32(0),
675 Self::PausedCmekUnavailable => serializer.serialize_i32(1),
676 Self::InstanceResuming => serializer.serialize_i32(2),
677 Self::UnknownValue(u) => u.0.serialize(serializer),
678 }
679 }
680 }
681
682 impl<'de> serde::de::Deserialize<'de> for StateNote {
683 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
684 where
685 D: serde::Deserializer<'de>,
686 {
687 deserializer.deserialize_any(wkt::internal::EnumVisitor::<StateNote>::new(
688 ".google.cloud.securesourcemanager.v1.Instance.StateNote",
689 ))
690 }
691 }
692}
693
694#[derive(Clone, Default, PartialEq)]
696#[non_exhaustive]
697pub struct Repository {
698 pub name: std::string::String,
702
703 pub description: std::string::String,
706
707 pub instance: std::string::String,
714
715 pub uid: std::string::String,
717
718 pub create_time: std::option::Option<wkt::Timestamp>,
720
721 pub update_time: std::option::Option<wkt::Timestamp>,
723
724 pub etag: std::string::String,
728
729 pub uris: std::option::Option<crate::model::repository::URIs>,
731
732 pub initial_config: std::option::Option<crate::model::repository::InitialConfig>,
734
735 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
736}
737
738impl Repository {
739 pub fn new() -> Self {
740 std::default::Default::default()
741 }
742
743 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
745 self.name = v.into();
746 self
747 }
748
749 pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
751 self.description = v.into();
752 self
753 }
754
755 pub fn set_instance<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
757 self.instance = v.into();
758 self
759 }
760
761 pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
763 self.uid = v.into();
764 self
765 }
766
767 pub fn set_create_time<T>(mut self, v: T) -> Self
769 where
770 T: std::convert::Into<wkt::Timestamp>,
771 {
772 self.create_time = std::option::Option::Some(v.into());
773 self
774 }
775
776 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
778 where
779 T: std::convert::Into<wkt::Timestamp>,
780 {
781 self.create_time = v.map(|x| x.into());
782 self
783 }
784
785 pub fn set_update_time<T>(mut self, v: T) -> Self
787 where
788 T: std::convert::Into<wkt::Timestamp>,
789 {
790 self.update_time = std::option::Option::Some(v.into());
791 self
792 }
793
794 pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
796 where
797 T: std::convert::Into<wkt::Timestamp>,
798 {
799 self.update_time = v.map(|x| x.into());
800 self
801 }
802
803 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
805 self.etag = v.into();
806 self
807 }
808
809 pub fn set_uris<T>(mut self, v: T) -> Self
811 where
812 T: std::convert::Into<crate::model::repository::URIs>,
813 {
814 self.uris = std::option::Option::Some(v.into());
815 self
816 }
817
818 pub fn set_or_clear_uris<T>(mut self, v: std::option::Option<T>) -> Self
820 where
821 T: std::convert::Into<crate::model::repository::URIs>,
822 {
823 self.uris = v.map(|x| x.into());
824 self
825 }
826
827 pub fn set_initial_config<T>(mut self, v: T) -> Self
829 where
830 T: std::convert::Into<crate::model::repository::InitialConfig>,
831 {
832 self.initial_config = std::option::Option::Some(v.into());
833 self
834 }
835
836 pub fn set_or_clear_initial_config<T>(mut self, v: std::option::Option<T>) -> Self
838 where
839 T: std::convert::Into<crate::model::repository::InitialConfig>,
840 {
841 self.initial_config = v.map(|x| x.into());
842 self
843 }
844}
845
846impl wkt::message::Message for Repository {
847 fn typename() -> &'static str {
848 "type.googleapis.com/google.cloud.securesourcemanager.v1.Repository"
849 }
850}
851
852pub mod repository {
854 #[allow(unused_imports)]
855 use super::*;
856
857 #[derive(Clone, Default, PartialEq)]
859 #[non_exhaustive]
860 pub struct URIs {
861 pub html: std::string::String,
864
865 pub git_https: std::string::String,
867
868 pub api: std::string::String,
870
871 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
872 }
873
874 impl URIs {
875 pub fn new() -> Self {
876 std::default::Default::default()
877 }
878
879 pub fn set_html<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
881 self.html = v.into();
882 self
883 }
884
885 pub fn set_git_https<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
887 self.git_https = v.into();
888 self
889 }
890
891 pub fn set_api<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
893 self.api = v.into();
894 self
895 }
896 }
897
898 impl wkt::message::Message for URIs {
899 fn typename() -> &'static str {
900 "type.googleapis.com/google.cloud.securesourcemanager.v1.Repository.URIs"
901 }
902 }
903
904 #[derive(Clone, Default, PartialEq)]
906 #[non_exhaustive]
907 pub struct InitialConfig {
908 pub default_branch: std::string::String,
910
911 pub gitignores: std::vec::Vec<std::string::String>,
945
946 pub license: std::string::String,
1039
1040 pub readme: std::string::String,
1043
1044 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1045 }
1046
1047 impl InitialConfig {
1048 pub fn new() -> Self {
1049 std::default::Default::default()
1050 }
1051
1052 pub fn set_default_branch<T: std::convert::Into<std::string::String>>(
1054 mut self,
1055 v: T,
1056 ) -> Self {
1057 self.default_branch = v.into();
1058 self
1059 }
1060
1061 pub fn set_gitignores<T, V>(mut self, v: T) -> Self
1063 where
1064 T: std::iter::IntoIterator<Item = V>,
1065 V: std::convert::Into<std::string::String>,
1066 {
1067 use std::iter::Iterator;
1068 self.gitignores = v.into_iter().map(|i| i.into()).collect();
1069 self
1070 }
1071
1072 pub fn set_license<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1074 self.license = v.into();
1075 self
1076 }
1077
1078 pub fn set_readme<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1080 self.readme = v.into();
1081 self
1082 }
1083 }
1084
1085 impl wkt::message::Message for InitialConfig {
1086 fn typename() -> &'static str {
1087 "type.googleapis.com/google.cloud.securesourcemanager.v1.Repository.InitialConfig"
1088 }
1089 }
1090}
1091
1092#[derive(Clone, Default, PartialEq)]
1094#[non_exhaustive]
1095pub struct Hook {
1096 pub name: std::string::String,
1100
1101 pub target_uri: std::string::String,
1103
1104 pub disabled: bool,
1107
1108 pub events: std::vec::Vec<crate::model::hook::HookEventType>,
1110
1111 pub create_time: std::option::Option<wkt::Timestamp>,
1113
1114 pub update_time: std::option::Option<wkt::Timestamp>,
1116
1117 pub uid: std::string::String,
1119
1120 pub push_option: std::option::Option<crate::model::hook::PushOption>,
1122
1123 pub sensitive_query_string: std::string::String,
1125
1126 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1127}
1128
1129impl Hook {
1130 pub fn new() -> Self {
1131 std::default::Default::default()
1132 }
1133
1134 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1136 self.name = v.into();
1137 self
1138 }
1139
1140 pub fn set_target_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1142 self.target_uri = v.into();
1143 self
1144 }
1145
1146 pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1148 self.disabled = v.into();
1149 self
1150 }
1151
1152 pub fn set_events<T, V>(mut self, v: T) -> Self
1154 where
1155 T: std::iter::IntoIterator<Item = V>,
1156 V: std::convert::Into<crate::model::hook::HookEventType>,
1157 {
1158 use std::iter::Iterator;
1159 self.events = v.into_iter().map(|i| i.into()).collect();
1160 self
1161 }
1162
1163 pub fn set_create_time<T>(mut self, v: T) -> Self
1165 where
1166 T: std::convert::Into<wkt::Timestamp>,
1167 {
1168 self.create_time = std::option::Option::Some(v.into());
1169 self
1170 }
1171
1172 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
1174 where
1175 T: std::convert::Into<wkt::Timestamp>,
1176 {
1177 self.create_time = v.map(|x| x.into());
1178 self
1179 }
1180
1181 pub fn set_update_time<T>(mut self, v: T) -> Self
1183 where
1184 T: std::convert::Into<wkt::Timestamp>,
1185 {
1186 self.update_time = std::option::Option::Some(v.into());
1187 self
1188 }
1189
1190 pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
1192 where
1193 T: std::convert::Into<wkt::Timestamp>,
1194 {
1195 self.update_time = v.map(|x| x.into());
1196 self
1197 }
1198
1199 pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1201 self.uid = v.into();
1202 self
1203 }
1204
1205 pub fn set_push_option<T>(mut self, v: T) -> Self
1207 where
1208 T: std::convert::Into<crate::model::hook::PushOption>,
1209 {
1210 self.push_option = std::option::Option::Some(v.into());
1211 self
1212 }
1213
1214 pub fn set_or_clear_push_option<T>(mut self, v: std::option::Option<T>) -> Self
1216 where
1217 T: std::convert::Into<crate::model::hook::PushOption>,
1218 {
1219 self.push_option = v.map(|x| x.into());
1220 self
1221 }
1222
1223 pub fn set_sensitive_query_string<T: std::convert::Into<std::string::String>>(
1225 mut self,
1226 v: T,
1227 ) -> Self {
1228 self.sensitive_query_string = v.into();
1229 self
1230 }
1231}
1232
1233impl wkt::message::Message for Hook {
1234 fn typename() -> &'static str {
1235 "type.googleapis.com/google.cloud.securesourcemanager.v1.Hook"
1236 }
1237}
1238
1239pub mod hook {
1241 #[allow(unused_imports)]
1242 use super::*;
1243
1244 #[derive(Clone, Default, PartialEq)]
1245 #[non_exhaustive]
1246 pub struct PushOption {
1247 pub branch_filter: std::string::String,
1252
1253 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1254 }
1255
1256 impl PushOption {
1257 pub fn new() -> Self {
1258 std::default::Default::default()
1259 }
1260
1261 pub fn set_branch_filter<T: std::convert::Into<std::string::String>>(
1263 mut self,
1264 v: T,
1265 ) -> Self {
1266 self.branch_filter = v.into();
1267 self
1268 }
1269 }
1270
1271 impl wkt::message::Message for PushOption {
1272 fn typename() -> &'static str {
1273 "type.googleapis.com/google.cloud.securesourcemanager.v1.Hook.PushOption"
1274 }
1275 }
1276
1277 #[derive(Clone, Debug, PartialEq)]
1292 #[non_exhaustive]
1293 pub enum HookEventType {
1294 Unspecified,
1296 Push,
1298 PullRequest,
1301 UnknownValue(hook_event_type::UnknownValue),
1306 }
1307
1308 #[doc(hidden)]
1309 pub mod hook_event_type {
1310 #[allow(unused_imports)]
1311 use super::*;
1312 #[derive(Clone, Debug, PartialEq)]
1313 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
1314 }
1315
1316 impl HookEventType {
1317 pub fn value(&self) -> std::option::Option<i32> {
1322 match self {
1323 Self::Unspecified => std::option::Option::Some(0),
1324 Self::Push => std::option::Option::Some(1),
1325 Self::PullRequest => std::option::Option::Some(2),
1326 Self::UnknownValue(u) => u.0.value(),
1327 }
1328 }
1329
1330 pub fn name(&self) -> std::option::Option<&str> {
1335 match self {
1336 Self::Unspecified => std::option::Option::Some("UNSPECIFIED"),
1337 Self::Push => std::option::Option::Some("PUSH"),
1338 Self::PullRequest => std::option::Option::Some("PULL_REQUEST"),
1339 Self::UnknownValue(u) => u.0.name(),
1340 }
1341 }
1342 }
1343
1344 impl std::default::Default for HookEventType {
1345 fn default() -> Self {
1346 use std::convert::From;
1347 Self::from(0)
1348 }
1349 }
1350
1351 impl std::fmt::Display for HookEventType {
1352 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
1353 wkt::internal::display_enum(f, self.name(), self.value())
1354 }
1355 }
1356
1357 impl std::convert::From<i32> for HookEventType {
1358 fn from(value: i32) -> Self {
1359 match value {
1360 0 => Self::Unspecified,
1361 1 => Self::Push,
1362 2 => Self::PullRequest,
1363 _ => Self::UnknownValue(hook_event_type::UnknownValue(
1364 wkt::internal::UnknownEnumValue::Integer(value),
1365 )),
1366 }
1367 }
1368 }
1369
1370 impl std::convert::From<&str> for HookEventType {
1371 fn from(value: &str) -> Self {
1372 use std::string::ToString;
1373 match value {
1374 "UNSPECIFIED" => Self::Unspecified,
1375 "PUSH" => Self::Push,
1376 "PULL_REQUEST" => Self::PullRequest,
1377 _ => Self::UnknownValue(hook_event_type::UnknownValue(
1378 wkt::internal::UnknownEnumValue::String(value.to_string()),
1379 )),
1380 }
1381 }
1382 }
1383
1384 impl serde::ser::Serialize for HookEventType {
1385 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1386 where
1387 S: serde::Serializer,
1388 {
1389 match self {
1390 Self::Unspecified => serializer.serialize_i32(0),
1391 Self::Push => serializer.serialize_i32(1),
1392 Self::PullRequest => serializer.serialize_i32(2),
1393 Self::UnknownValue(u) => u.0.serialize(serializer),
1394 }
1395 }
1396 }
1397
1398 impl<'de> serde::de::Deserialize<'de> for HookEventType {
1399 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1400 where
1401 D: serde::Deserializer<'de>,
1402 {
1403 deserializer.deserialize_any(wkt::internal::EnumVisitor::<HookEventType>::new(
1404 ".google.cloud.securesourcemanager.v1.Hook.HookEventType",
1405 ))
1406 }
1407 }
1408}
1409
1410#[derive(Clone, Default, PartialEq)]
1413#[non_exhaustive]
1414pub struct BranchRule {
1415 pub name: std::string::String,
1419
1420 pub uid: std::string::String,
1422
1423 pub create_time: std::option::Option<wkt::Timestamp>,
1425
1426 pub update_time: std::option::Option<wkt::Timestamp>,
1428
1429 pub annotations: std::collections::HashMap<std::string::String, std::string::String>,
1433
1434 pub etag: std::string::String,
1438
1439 pub include_pattern: std::string::String,
1444
1445 pub disabled: bool,
1447
1448 pub require_pull_request: bool,
1450
1451 pub minimum_reviews_count: i32,
1454
1455 pub minimum_approvals_count: i32,
1458
1459 pub require_comments_resolved: bool,
1462
1463 pub allow_stale_reviews: bool,
1466
1467 pub require_linear_history: bool,
1470
1471 pub required_status_checks: std::vec::Vec<crate::model::branch_rule::Check>,
1473
1474 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1475}
1476
1477impl BranchRule {
1478 pub fn new() -> Self {
1479 std::default::Default::default()
1480 }
1481
1482 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1484 self.name = v.into();
1485 self
1486 }
1487
1488 pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1490 self.uid = v.into();
1491 self
1492 }
1493
1494 pub fn set_create_time<T>(mut self, v: T) -> Self
1496 where
1497 T: std::convert::Into<wkt::Timestamp>,
1498 {
1499 self.create_time = std::option::Option::Some(v.into());
1500 self
1501 }
1502
1503 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
1505 where
1506 T: std::convert::Into<wkt::Timestamp>,
1507 {
1508 self.create_time = v.map(|x| x.into());
1509 self
1510 }
1511
1512 pub fn set_update_time<T>(mut self, v: T) -> Self
1514 where
1515 T: std::convert::Into<wkt::Timestamp>,
1516 {
1517 self.update_time = std::option::Option::Some(v.into());
1518 self
1519 }
1520
1521 pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
1523 where
1524 T: std::convert::Into<wkt::Timestamp>,
1525 {
1526 self.update_time = v.map(|x| x.into());
1527 self
1528 }
1529
1530 pub fn set_annotations<T, K, V>(mut self, v: T) -> Self
1532 where
1533 T: std::iter::IntoIterator<Item = (K, V)>,
1534 K: std::convert::Into<std::string::String>,
1535 V: std::convert::Into<std::string::String>,
1536 {
1537 use std::iter::Iterator;
1538 self.annotations = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
1539 self
1540 }
1541
1542 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1544 self.etag = v.into();
1545 self
1546 }
1547
1548 pub fn set_include_pattern<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1550 self.include_pattern = v.into();
1551 self
1552 }
1553
1554 pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1556 self.disabled = v.into();
1557 self
1558 }
1559
1560 pub fn set_require_pull_request<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1562 self.require_pull_request = v.into();
1563 self
1564 }
1565
1566 pub fn set_minimum_reviews_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1568 self.minimum_reviews_count = v.into();
1569 self
1570 }
1571
1572 pub fn set_minimum_approvals_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1574 self.minimum_approvals_count = v.into();
1575 self
1576 }
1577
1578 pub fn set_require_comments_resolved<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1580 self.require_comments_resolved = v.into();
1581 self
1582 }
1583
1584 pub fn set_allow_stale_reviews<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1586 self.allow_stale_reviews = v.into();
1587 self
1588 }
1589
1590 pub fn set_require_linear_history<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1592 self.require_linear_history = v.into();
1593 self
1594 }
1595
1596 pub fn set_required_status_checks<T, V>(mut self, v: T) -> Self
1598 where
1599 T: std::iter::IntoIterator<Item = V>,
1600 V: std::convert::Into<crate::model::branch_rule::Check>,
1601 {
1602 use std::iter::Iterator;
1603 self.required_status_checks = v.into_iter().map(|i| i.into()).collect();
1604 self
1605 }
1606}
1607
1608impl wkt::message::Message for BranchRule {
1609 fn typename() -> &'static str {
1610 "type.googleapis.com/google.cloud.securesourcemanager.v1.BranchRule"
1611 }
1612}
1613
1614pub mod branch_rule {
1616 #[allow(unused_imports)]
1617 use super::*;
1618
1619 #[derive(Clone, Default, PartialEq)]
1621 #[non_exhaustive]
1622 pub struct Check {
1623 pub context: std::string::String,
1625
1626 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1627 }
1628
1629 impl Check {
1630 pub fn new() -> Self {
1631 std::default::Default::default()
1632 }
1633
1634 pub fn set_context<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1636 self.context = v.into();
1637 self
1638 }
1639 }
1640
1641 impl wkt::message::Message for Check {
1642 fn typename() -> &'static str {
1643 "type.googleapis.com/google.cloud.securesourcemanager.v1.BranchRule.Check"
1644 }
1645 }
1646}
1647
1648#[derive(Clone, Default, PartialEq)]
1651#[non_exhaustive]
1652pub struct PullRequest {
1653 pub name: std::string::String,
1657
1658 pub title: std::string::String,
1660
1661 pub body: std::string::String,
1664
1665 pub base: std::option::Option<crate::model::pull_request::Branch>,
1667
1668 pub head: std::option::Option<crate::model::pull_request::Branch>,
1670
1671 pub state: crate::model::pull_request::State,
1673
1674 pub create_time: std::option::Option<wkt::Timestamp>,
1676
1677 pub update_time: std::option::Option<wkt::Timestamp>,
1679
1680 pub close_time: std::option::Option<wkt::Timestamp>,
1683
1684 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1685}
1686
1687impl PullRequest {
1688 pub fn new() -> Self {
1689 std::default::Default::default()
1690 }
1691
1692 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1694 self.name = v.into();
1695 self
1696 }
1697
1698 pub fn set_title<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1700 self.title = v.into();
1701 self
1702 }
1703
1704 pub fn set_body<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1706 self.body = v.into();
1707 self
1708 }
1709
1710 pub fn set_base<T>(mut self, v: T) -> Self
1712 where
1713 T: std::convert::Into<crate::model::pull_request::Branch>,
1714 {
1715 self.base = std::option::Option::Some(v.into());
1716 self
1717 }
1718
1719 pub fn set_or_clear_base<T>(mut self, v: std::option::Option<T>) -> Self
1721 where
1722 T: std::convert::Into<crate::model::pull_request::Branch>,
1723 {
1724 self.base = v.map(|x| x.into());
1725 self
1726 }
1727
1728 pub fn set_head<T>(mut self, v: T) -> Self
1730 where
1731 T: std::convert::Into<crate::model::pull_request::Branch>,
1732 {
1733 self.head = std::option::Option::Some(v.into());
1734 self
1735 }
1736
1737 pub fn set_or_clear_head<T>(mut self, v: std::option::Option<T>) -> Self
1739 where
1740 T: std::convert::Into<crate::model::pull_request::Branch>,
1741 {
1742 self.head = v.map(|x| x.into());
1743 self
1744 }
1745
1746 pub fn set_state<T: std::convert::Into<crate::model::pull_request::State>>(
1748 mut self,
1749 v: T,
1750 ) -> Self {
1751 self.state = v.into();
1752 self
1753 }
1754
1755 pub fn set_create_time<T>(mut self, v: T) -> Self
1757 where
1758 T: std::convert::Into<wkt::Timestamp>,
1759 {
1760 self.create_time = std::option::Option::Some(v.into());
1761 self
1762 }
1763
1764 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
1766 where
1767 T: std::convert::Into<wkt::Timestamp>,
1768 {
1769 self.create_time = v.map(|x| x.into());
1770 self
1771 }
1772
1773 pub fn set_update_time<T>(mut self, v: T) -> Self
1775 where
1776 T: std::convert::Into<wkt::Timestamp>,
1777 {
1778 self.update_time = std::option::Option::Some(v.into());
1779 self
1780 }
1781
1782 pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
1784 where
1785 T: std::convert::Into<wkt::Timestamp>,
1786 {
1787 self.update_time = v.map(|x| x.into());
1788 self
1789 }
1790
1791 pub fn set_close_time<T>(mut self, v: T) -> Self
1793 where
1794 T: std::convert::Into<wkt::Timestamp>,
1795 {
1796 self.close_time = std::option::Option::Some(v.into());
1797 self
1798 }
1799
1800 pub fn set_or_clear_close_time<T>(mut self, v: std::option::Option<T>) -> Self
1802 where
1803 T: std::convert::Into<wkt::Timestamp>,
1804 {
1805 self.close_time = v.map(|x| x.into());
1806 self
1807 }
1808}
1809
1810impl wkt::message::Message for PullRequest {
1811 fn typename() -> &'static str {
1812 "type.googleapis.com/google.cloud.securesourcemanager.v1.PullRequest"
1813 }
1814}
1815
1816pub mod pull_request {
1818 #[allow(unused_imports)]
1819 use super::*;
1820
1821 #[derive(Clone, Default, PartialEq)]
1823 #[non_exhaustive]
1824 pub struct Branch {
1825 pub r#ref: std::string::String,
1827
1828 pub sha: std::string::String,
1830
1831 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1832 }
1833
1834 impl Branch {
1835 pub fn new() -> Self {
1836 std::default::Default::default()
1837 }
1838
1839 pub fn set_ref<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1841 self.r#ref = v.into();
1842 self
1843 }
1844
1845 pub fn set_sha<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1847 self.sha = v.into();
1848 self
1849 }
1850 }
1851
1852 impl wkt::message::Message for Branch {
1853 fn typename() -> &'static str {
1854 "type.googleapis.com/google.cloud.securesourcemanager.v1.PullRequest.Branch"
1855 }
1856 }
1857
1858 #[derive(Clone, Debug, PartialEq)]
1874 #[non_exhaustive]
1875 pub enum State {
1876 Unspecified,
1878 Open,
1880 Closed,
1882 Merged,
1884 UnknownValue(state::UnknownValue),
1889 }
1890
1891 #[doc(hidden)]
1892 pub mod state {
1893 #[allow(unused_imports)]
1894 use super::*;
1895 #[derive(Clone, Debug, PartialEq)]
1896 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
1897 }
1898
1899 impl State {
1900 pub fn value(&self) -> std::option::Option<i32> {
1905 match self {
1906 Self::Unspecified => std::option::Option::Some(0),
1907 Self::Open => std::option::Option::Some(1),
1908 Self::Closed => std::option::Option::Some(2),
1909 Self::Merged => std::option::Option::Some(3),
1910 Self::UnknownValue(u) => u.0.value(),
1911 }
1912 }
1913
1914 pub fn name(&self) -> std::option::Option<&str> {
1919 match self {
1920 Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
1921 Self::Open => std::option::Option::Some("OPEN"),
1922 Self::Closed => std::option::Option::Some("CLOSED"),
1923 Self::Merged => std::option::Option::Some("MERGED"),
1924 Self::UnknownValue(u) => u.0.name(),
1925 }
1926 }
1927 }
1928
1929 impl std::default::Default for State {
1930 fn default() -> Self {
1931 use std::convert::From;
1932 Self::from(0)
1933 }
1934 }
1935
1936 impl std::fmt::Display for State {
1937 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
1938 wkt::internal::display_enum(f, self.name(), self.value())
1939 }
1940 }
1941
1942 impl std::convert::From<i32> for State {
1943 fn from(value: i32) -> Self {
1944 match value {
1945 0 => Self::Unspecified,
1946 1 => Self::Open,
1947 2 => Self::Closed,
1948 3 => Self::Merged,
1949 _ => Self::UnknownValue(state::UnknownValue(
1950 wkt::internal::UnknownEnumValue::Integer(value),
1951 )),
1952 }
1953 }
1954 }
1955
1956 impl std::convert::From<&str> for State {
1957 fn from(value: &str) -> Self {
1958 use std::string::ToString;
1959 match value {
1960 "STATE_UNSPECIFIED" => Self::Unspecified,
1961 "OPEN" => Self::Open,
1962 "CLOSED" => Self::Closed,
1963 "MERGED" => Self::Merged,
1964 _ => Self::UnknownValue(state::UnknownValue(
1965 wkt::internal::UnknownEnumValue::String(value.to_string()),
1966 )),
1967 }
1968 }
1969 }
1970
1971 impl serde::ser::Serialize for State {
1972 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1973 where
1974 S: serde::Serializer,
1975 {
1976 match self {
1977 Self::Unspecified => serializer.serialize_i32(0),
1978 Self::Open => serializer.serialize_i32(1),
1979 Self::Closed => serializer.serialize_i32(2),
1980 Self::Merged => serializer.serialize_i32(3),
1981 Self::UnknownValue(u) => u.0.serialize(serializer),
1982 }
1983 }
1984 }
1985
1986 impl<'de> serde::de::Deserialize<'de> for State {
1987 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1988 where
1989 D: serde::Deserializer<'de>,
1990 {
1991 deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
1992 ".google.cloud.securesourcemanager.v1.PullRequest.State",
1993 ))
1994 }
1995 }
1996}
1997
1998#[derive(Clone, Default, PartialEq)]
2001#[non_exhaustive]
2002pub struct FileDiff {
2003 pub name: std::string::String,
2005
2006 pub action: crate::model::file_diff::Action,
2008
2009 pub sha: std::string::String,
2011
2012 pub patch: std::string::String,
2014
2015 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2016}
2017
2018impl FileDiff {
2019 pub fn new() -> Self {
2020 std::default::Default::default()
2021 }
2022
2023 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2025 self.name = v.into();
2026 self
2027 }
2028
2029 pub fn set_action<T: std::convert::Into<crate::model::file_diff::Action>>(
2031 mut self,
2032 v: T,
2033 ) -> Self {
2034 self.action = v.into();
2035 self
2036 }
2037
2038 pub fn set_sha<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2040 self.sha = v.into();
2041 self
2042 }
2043
2044 pub fn set_patch<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2046 self.patch = v.into();
2047 self
2048 }
2049}
2050
2051impl wkt::message::Message for FileDiff {
2052 fn typename() -> &'static str {
2053 "type.googleapis.com/google.cloud.securesourcemanager.v1.FileDiff"
2054 }
2055}
2056
2057pub mod file_diff {
2059 #[allow(unused_imports)]
2060 use super::*;
2061
2062 #[derive(Clone, Debug, PartialEq)]
2078 #[non_exhaustive]
2079 pub enum Action {
2080 Unspecified,
2082 Added,
2084 Modified,
2086 Deleted,
2088 UnknownValue(action::UnknownValue),
2093 }
2094
2095 #[doc(hidden)]
2096 pub mod action {
2097 #[allow(unused_imports)]
2098 use super::*;
2099 #[derive(Clone, Debug, PartialEq)]
2100 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
2101 }
2102
2103 impl Action {
2104 pub fn value(&self) -> std::option::Option<i32> {
2109 match self {
2110 Self::Unspecified => std::option::Option::Some(0),
2111 Self::Added => std::option::Option::Some(1),
2112 Self::Modified => std::option::Option::Some(2),
2113 Self::Deleted => std::option::Option::Some(3),
2114 Self::UnknownValue(u) => u.0.value(),
2115 }
2116 }
2117
2118 pub fn name(&self) -> std::option::Option<&str> {
2123 match self {
2124 Self::Unspecified => std::option::Option::Some("ACTION_UNSPECIFIED"),
2125 Self::Added => std::option::Option::Some("ADDED"),
2126 Self::Modified => std::option::Option::Some("MODIFIED"),
2127 Self::Deleted => std::option::Option::Some("DELETED"),
2128 Self::UnknownValue(u) => u.0.name(),
2129 }
2130 }
2131 }
2132
2133 impl std::default::Default for Action {
2134 fn default() -> Self {
2135 use std::convert::From;
2136 Self::from(0)
2137 }
2138 }
2139
2140 impl std::fmt::Display for Action {
2141 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
2142 wkt::internal::display_enum(f, self.name(), self.value())
2143 }
2144 }
2145
2146 impl std::convert::From<i32> for Action {
2147 fn from(value: i32) -> Self {
2148 match value {
2149 0 => Self::Unspecified,
2150 1 => Self::Added,
2151 2 => Self::Modified,
2152 3 => Self::Deleted,
2153 _ => Self::UnknownValue(action::UnknownValue(
2154 wkt::internal::UnknownEnumValue::Integer(value),
2155 )),
2156 }
2157 }
2158 }
2159
2160 impl std::convert::From<&str> for Action {
2161 fn from(value: &str) -> Self {
2162 use std::string::ToString;
2163 match value {
2164 "ACTION_UNSPECIFIED" => Self::Unspecified,
2165 "ADDED" => Self::Added,
2166 "MODIFIED" => Self::Modified,
2167 "DELETED" => Self::Deleted,
2168 _ => Self::UnknownValue(action::UnknownValue(
2169 wkt::internal::UnknownEnumValue::String(value.to_string()),
2170 )),
2171 }
2172 }
2173 }
2174
2175 impl serde::ser::Serialize for Action {
2176 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2177 where
2178 S: serde::Serializer,
2179 {
2180 match self {
2181 Self::Unspecified => serializer.serialize_i32(0),
2182 Self::Added => serializer.serialize_i32(1),
2183 Self::Modified => serializer.serialize_i32(2),
2184 Self::Deleted => serializer.serialize_i32(3),
2185 Self::UnknownValue(u) => u.0.serialize(serializer),
2186 }
2187 }
2188 }
2189
2190 impl<'de> serde::de::Deserialize<'de> for Action {
2191 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2192 where
2193 D: serde::Deserializer<'de>,
2194 {
2195 deserializer.deserialize_any(wkt::internal::EnumVisitor::<Action>::new(
2196 ".google.cloud.securesourcemanager.v1.FileDiff.Action",
2197 ))
2198 }
2199 }
2200}
2201
2202#[derive(Clone, Default, PartialEq)]
2204#[non_exhaustive]
2205pub struct Issue {
2206 pub name: std::string::String,
2210
2211 pub title: std::string::String,
2213
2214 pub body: std::string::String,
2216
2217 pub state: crate::model::issue::State,
2219
2220 pub create_time: std::option::Option<wkt::Timestamp>,
2222
2223 pub update_time: std::option::Option<wkt::Timestamp>,
2225
2226 pub close_time: std::option::Option<wkt::Timestamp>,
2228
2229 pub etag: std::string::String,
2233
2234 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2235}
2236
2237impl Issue {
2238 pub fn new() -> Self {
2239 std::default::Default::default()
2240 }
2241
2242 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2244 self.name = v.into();
2245 self
2246 }
2247
2248 pub fn set_title<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2250 self.title = v.into();
2251 self
2252 }
2253
2254 pub fn set_body<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2256 self.body = v.into();
2257 self
2258 }
2259
2260 pub fn set_state<T: std::convert::Into<crate::model::issue::State>>(mut self, v: T) -> Self {
2262 self.state = v.into();
2263 self
2264 }
2265
2266 pub fn set_create_time<T>(mut self, v: T) -> Self
2268 where
2269 T: std::convert::Into<wkt::Timestamp>,
2270 {
2271 self.create_time = std::option::Option::Some(v.into());
2272 self
2273 }
2274
2275 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
2277 where
2278 T: std::convert::Into<wkt::Timestamp>,
2279 {
2280 self.create_time = v.map(|x| x.into());
2281 self
2282 }
2283
2284 pub fn set_update_time<T>(mut self, v: T) -> Self
2286 where
2287 T: std::convert::Into<wkt::Timestamp>,
2288 {
2289 self.update_time = std::option::Option::Some(v.into());
2290 self
2291 }
2292
2293 pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
2295 where
2296 T: std::convert::Into<wkt::Timestamp>,
2297 {
2298 self.update_time = v.map(|x| x.into());
2299 self
2300 }
2301
2302 pub fn set_close_time<T>(mut self, v: T) -> Self
2304 where
2305 T: std::convert::Into<wkt::Timestamp>,
2306 {
2307 self.close_time = std::option::Option::Some(v.into());
2308 self
2309 }
2310
2311 pub fn set_or_clear_close_time<T>(mut self, v: std::option::Option<T>) -> Self
2313 where
2314 T: std::convert::Into<wkt::Timestamp>,
2315 {
2316 self.close_time = v.map(|x| x.into());
2317 self
2318 }
2319
2320 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2322 self.etag = v.into();
2323 self
2324 }
2325}
2326
2327impl wkt::message::Message for Issue {
2328 fn typename() -> &'static str {
2329 "type.googleapis.com/google.cloud.securesourcemanager.v1.Issue"
2330 }
2331}
2332
2333pub mod issue {
2335 #[allow(unused_imports)]
2336 use super::*;
2337
2338 #[derive(Clone, Debug, PartialEq)]
2354 #[non_exhaustive]
2355 pub enum State {
2356 Unspecified,
2358 Open,
2360 Closed,
2362 UnknownValue(state::UnknownValue),
2367 }
2368
2369 #[doc(hidden)]
2370 pub mod state {
2371 #[allow(unused_imports)]
2372 use super::*;
2373 #[derive(Clone, Debug, PartialEq)]
2374 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
2375 }
2376
2377 impl State {
2378 pub fn value(&self) -> std::option::Option<i32> {
2383 match self {
2384 Self::Unspecified => std::option::Option::Some(0),
2385 Self::Open => std::option::Option::Some(1),
2386 Self::Closed => std::option::Option::Some(2),
2387 Self::UnknownValue(u) => u.0.value(),
2388 }
2389 }
2390
2391 pub fn name(&self) -> std::option::Option<&str> {
2396 match self {
2397 Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
2398 Self::Open => std::option::Option::Some("OPEN"),
2399 Self::Closed => std::option::Option::Some("CLOSED"),
2400 Self::UnknownValue(u) => u.0.name(),
2401 }
2402 }
2403 }
2404
2405 impl std::default::Default for State {
2406 fn default() -> Self {
2407 use std::convert::From;
2408 Self::from(0)
2409 }
2410 }
2411
2412 impl std::fmt::Display for State {
2413 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
2414 wkt::internal::display_enum(f, self.name(), self.value())
2415 }
2416 }
2417
2418 impl std::convert::From<i32> for State {
2419 fn from(value: i32) -> Self {
2420 match value {
2421 0 => Self::Unspecified,
2422 1 => Self::Open,
2423 2 => Self::Closed,
2424 _ => Self::UnknownValue(state::UnknownValue(
2425 wkt::internal::UnknownEnumValue::Integer(value),
2426 )),
2427 }
2428 }
2429 }
2430
2431 impl std::convert::From<&str> for State {
2432 fn from(value: &str) -> Self {
2433 use std::string::ToString;
2434 match value {
2435 "STATE_UNSPECIFIED" => Self::Unspecified,
2436 "OPEN" => Self::Open,
2437 "CLOSED" => Self::Closed,
2438 _ => Self::UnknownValue(state::UnknownValue(
2439 wkt::internal::UnknownEnumValue::String(value.to_string()),
2440 )),
2441 }
2442 }
2443 }
2444
2445 impl serde::ser::Serialize for State {
2446 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2447 where
2448 S: serde::Serializer,
2449 {
2450 match self {
2451 Self::Unspecified => serializer.serialize_i32(0),
2452 Self::Open => serializer.serialize_i32(1),
2453 Self::Closed => serializer.serialize_i32(2),
2454 Self::UnknownValue(u) => u.0.serialize(serializer),
2455 }
2456 }
2457 }
2458
2459 impl<'de> serde::de::Deserialize<'de> for State {
2460 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2461 where
2462 D: serde::Deserializer<'de>,
2463 {
2464 deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
2465 ".google.cloud.securesourcemanager.v1.Issue.State",
2466 ))
2467 }
2468 }
2469}
2470
2471#[derive(Clone, Default, PartialEq)]
2473#[non_exhaustive]
2474pub struct IssueComment {
2475 pub name: std::string::String,
2479
2480 pub body: std::string::String,
2482
2483 pub create_time: std::option::Option<wkt::Timestamp>,
2485
2486 pub update_time: std::option::Option<wkt::Timestamp>,
2488
2489 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2490}
2491
2492impl IssueComment {
2493 pub fn new() -> Self {
2494 std::default::Default::default()
2495 }
2496
2497 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2499 self.name = v.into();
2500 self
2501 }
2502
2503 pub fn set_body<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2505 self.body = v.into();
2506 self
2507 }
2508
2509 pub fn set_create_time<T>(mut self, v: T) -> Self
2511 where
2512 T: std::convert::Into<wkt::Timestamp>,
2513 {
2514 self.create_time = std::option::Option::Some(v.into());
2515 self
2516 }
2517
2518 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
2520 where
2521 T: std::convert::Into<wkt::Timestamp>,
2522 {
2523 self.create_time = v.map(|x| x.into());
2524 self
2525 }
2526
2527 pub fn set_update_time<T>(mut self, v: T) -> Self
2529 where
2530 T: std::convert::Into<wkt::Timestamp>,
2531 {
2532 self.update_time = std::option::Option::Some(v.into());
2533 self
2534 }
2535
2536 pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
2538 where
2539 T: std::convert::Into<wkt::Timestamp>,
2540 {
2541 self.update_time = v.map(|x| x.into());
2542 self
2543 }
2544}
2545
2546impl wkt::message::Message for IssueComment {
2547 fn typename() -> &'static str {
2548 "type.googleapis.com/google.cloud.securesourcemanager.v1.IssueComment"
2549 }
2550}
2551
2552#[derive(Clone, Default, PartialEq)]
2554#[non_exhaustive]
2555pub struct PullRequestComment {
2556 pub name: std::string::String,
2560
2561 pub create_time: std::option::Option<wkt::Timestamp>,
2563
2564 pub update_time: std::option::Option<wkt::Timestamp>,
2566
2567 pub comment_detail: std::option::Option<crate::model::pull_request_comment::CommentDetail>,
2570
2571 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2572}
2573
2574impl PullRequestComment {
2575 pub fn new() -> Self {
2576 std::default::Default::default()
2577 }
2578
2579 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2581 self.name = v.into();
2582 self
2583 }
2584
2585 pub fn set_create_time<T>(mut self, v: T) -> Self
2587 where
2588 T: std::convert::Into<wkt::Timestamp>,
2589 {
2590 self.create_time = std::option::Option::Some(v.into());
2591 self
2592 }
2593
2594 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
2596 where
2597 T: std::convert::Into<wkt::Timestamp>,
2598 {
2599 self.create_time = v.map(|x| x.into());
2600 self
2601 }
2602
2603 pub fn set_update_time<T>(mut self, v: T) -> Self
2605 where
2606 T: std::convert::Into<wkt::Timestamp>,
2607 {
2608 self.update_time = std::option::Option::Some(v.into());
2609 self
2610 }
2611
2612 pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
2614 where
2615 T: std::convert::Into<wkt::Timestamp>,
2616 {
2617 self.update_time = v.map(|x| x.into());
2618 self
2619 }
2620
2621 pub fn set_comment_detail<
2626 T: std::convert::Into<std::option::Option<crate::model::pull_request_comment::CommentDetail>>,
2627 >(
2628 mut self,
2629 v: T,
2630 ) -> Self {
2631 self.comment_detail = v.into();
2632 self
2633 }
2634
2635 pub fn review(
2639 &self,
2640 ) -> std::option::Option<&std::boxed::Box<crate::model::pull_request_comment::Review>> {
2641 #[allow(unreachable_patterns)]
2642 self.comment_detail.as_ref().and_then(|v| match v {
2643 crate::model::pull_request_comment::CommentDetail::Review(v) => {
2644 std::option::Option::Some(v)
2645 }
2646 _ => std::option::Option::None,
2647 })
2648 }
2649
2650 pub fn set_review<
2656 T: std::convert::Into<std::boxed::Box<crate::model::pull_request_comment::Review>>,
2657 >(
2658 mut self,
2659 v: T,
2660 ) -> Self {
2661 self.comment_detail = std::option::Option::Some(
2662 crate::model::pull_request_comment::CommentDetail::Review(v.into()),
2663 );
2664 self
2665 }
2666
2667 pub fn comment(
2671 &self,
2672 ) -> std::option::Option<&std::boxed::Box<crate::model::pull_request_comment::Comment>> {
2673 #[allow(unreachable_patterns)]
2674 self.comment_detail.as_ref().and_then(|v| match v {
2675 crate::model::pull_request_comment::CommentDetail::Comment(v) => {
2676 std::option::Option::Some(v)
2677 }
2678 _ => std::option::Option::None,
2679 })
2680 }
2681
2682 pub fn set_comment<
2688 T: std::convert::Into<std::boxed::Box<crate::model::pull_request_comment::Comment>>,
2689 >(
2690 mut self,
2691 v: T,
2692 ) -> Self {
2693 self.comment_detail = std::option::Option::Some(
2694 crate::model::pull_request_comment::CommentDetail::Comment(v.into()),
2695 );
2696 self
2697 }
2698
2699 pub fn code(
2703 &self,
2704 ) -> std::option::Option<&std::boxed::Box<crate::model::pull_request_comment::Code>> {
2705 #[allow(unreachable_patterns)]
2706 self.comment_detail.as_ref().and_then(|v| match v {
2707 crate::model::pull_request_comment::CommentDetail::Code(v) => {
2708 std::option::Option::Some(v)
2709 }
2710 _ => std::option::Option::None,
2711 })
2712 }
2713
2714 pub fn set_code<
2720 T: std::convert::Into<std::boxed::Box<crate::model::pull_request_comment::Code>>,
2721 >(
2722 mut self,
2723 v: T,
2724 ) -> Self {
2725 self.comment_detail = std::option::Option::Some(
2726 crate::model::pull_request_comment::CommentDetail::Code(v.into()),
2727 );
2728 self
2729 }
2730}
2731
2732impl wkt::message::Message for PullRequestComment {
2733 fn typename() -> &'static str {
2734 "type.googleapis.com/google.cloud.securesourcemanager.v1.PullRequestComment"
2735 }
2736}
2737
2738pub mod pull_request_comment {
2740 #[allow(unused_imports)]
2741 use super::*;
2742
2743 #[derive(Clone, Default, PartialEq)]
2745 #[non_exhaustive]
2746 pub struct Review {
2747 pub action_type: crate::model::pull_request_comment::review::ActionType,
2749
2750 pub body: std::string::String,
2752
2753 pub effective_commit_sha: std::string::String,
2755
2756 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2757 }
2758
2759 impl Review {
2760 pub fn new() -> Self {
2761 std::default::Default::default()
2762 }
2763
2764 pub fn set_action_type<
2766 T: std::convert::Into<crate::model::pull_request_comment::review::ActionType>,
2767 >(
2768 mut self,
2769 v: T,
2770 ) -> Self {
2771 self.action_type = v.into();
2772 self
2773 }
2774
2775 pub fn set_body<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2777 self.body = v.into();
2778 self
2779 }
2780
2781 pub fn set_effective_commit_sha<T: std::convert::Into<std::string::String>>(
2783 mut self,
2784 v: T,
2785 ) -> Self {
2786 self.effective_commit_sha = v.into();
2787 self
2788 }
2789 }
2790
2791 impl wkt::message::Message for Review {
2792 fn typename() -> &'static str {
2793 "type.googleapis.com/google.cloud.securesourcemanager.v1.PullRequestComment.Review"
2794 }
2795 }
2796
2797 pub mod review {
2799 #[allow(unused_imports)]
2800 use super::*;
2801
2802 #[derive(Clone, Debug, PartialEq)]
2818 #[non_exhaustive]
2819 pub enum ActionType {
2820 Unspecified,
2822 Comment,
2824 ChangeRequested,
2826 Approved,
2828 UnknownValue(action_type::UnknownValue),
2833 }
2834
2835 #[doc(hidden)]
2836 pub mod action_type {
2837 #[allow(unused_imports)]
2838 use super::*;
2839 #[derive(Clone, Debug, PartialEq)]
2840 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
2841 }
2842
2843 impl ActionType {
2844 pub fn value(&self) -> std::option::Option<i32> {
2849 match self {
2850 Self::Unspecified => std::option::Option::Some(0),
2851 Self::Comment => std::option::Option::Some(1),
2852 Self::ChangeRequested => std::option::Option::Some(2),
2853 Self::Approved => std::option::Option::Some(3),
2854 Self::UnknownValue(u) => u.0.value(),
2855 }
2856 }
2857
2858 pub fn name(&self) -> std::option::Option<&str> {
2863 match self {
2864 Self::Unspecified => std::option::Option::Some("ACTION_TYPE_UNSPECIFIED"),
2865 Self::Comment => std::option::Option::Some("COMMENT"),
2866 Self::ChangeRequested => std::option::Option::Some("CHANGE_REQUESTED"),
2867 Self::Approved => std::option::Option::Some("APPROVED"),
2868 Self::UnknownValue(u) => u.0.name(),
2869 }
2870 }
2871 }
2872
2873 impl std::default::Default for ActionType {
2874 fn default() -> Self {
2875 use std::convert::From;
2876 Self::from(0)
2877 }
2878 }
2879
2880 impl std::fmt::Display for ActionType {
2881 fn fmt(
2882 &self,
2883 f: &mut std::fmt::Formatter<'_>,
2884 ) -> std::result::Result<(), std::fmt::Error> {
2885 wkt::internal::display_enum(f, self.name(), self.value())
2886 }
2887 }
2888
2889 impl std::convert::From<i32> for ActionType {
2890 fn from(value: i32) -> Self {
2891 match value {
2892 0 => Self::Unspecified,
2893 1 => Self::Comment,
2894 2 => Self::ChangeRequested,
2895 3 => Self::Approved,
2896 _ => Self::UnknownValue(action_type::UnknownValue(
2897 wkt::internal::UnknownEnumValue::Integer(value),
2898 )),
2899 }
2900 }
2901 }
2902
2903 impl std::convert::From<&str> for ActionType {
2904 fn from(value: &str) -> Self {
2905 use std::string::ToString;
2906 match value {
2907 "ACTION_TYPE_UNSPECIFIED" => Self::Unspecified,
2908 "COMMENT" => Self::Comment,
2909 "CHANGE_REQUESTED" => Self::ChangeRequested,
2910 "APPROVED" => Self::Approved,
2911 _ => Self::UnknownValue(action_type::UnknownValue(
2912 wkt::internal::UnknownEnumValue::String(value.to_string()),
2913 )),
2914 }
2915 }
2916 }
2917
2918 impl serde::ser::Serialize for ActionType {
2919 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2920 where
2921 S: serde::Serializer,
2922 {
2923 match self {
2924 Self::Unspecified => serializer.serialize_i32(0),
2925 Self::Comment => serializer.serialize_i32(1),
2926 Self::ChangeRequested => serializer.serialize_i32(2),
2927 Self::Approved => serializer.serialize_i32(3),
2928 Self::UnknownValue(u) => u.0.serialize(serializer),
2929 }
2930 }
2931 }
2932
2933 impl<'de> serde::de::Deserialize<'de> for ActionType {
2934 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2935 where
2936 D: serde::Deserializer<'de>,
2937 {
2938 deserializer.deserialize_any(wkt::internal::EnumVisitor::<ActionType>::new(
2939 ".google.cloud.securesourcemanager.v1.PullRequestComment.Review.ActionType",
2940 ))
2941 }
2942 }
2943 }
2944
2945 #[derive(Clone, Default, PartialEq)]
2947 #[non_exhaustive]
2948 pub struct Comment {
2949 pub body: std::string::String,
2951
2952 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2953 }
2954
2955 impl Comment {
2956 pub fn new() -> Self {
2957 std::default::Default::default()
2958 }
2959
2960 pub fn set_body<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2962 self.body = v.into();
2963 self
2964 }
2965 }
2966
2967 impl wkt::message::Message for Comment {
2968 fn typename() -> &'static str {
2969 "type.googleapis.com/google.cloud.securesourcemanager.v1.PullRequestComment.Comment"
2970 }
2971 }
2972
2973 #[derive(Clone, Default, PartialEq)]
2975 #[non_exhaustive]
2976 pub struct Code {
2977 pub body: std::string::String,
2979
2980 pub reply: std::string::String,
2983
2984 pub position: std::option::Option<crate::model::pull_request_comment::Position>,
2986
2987 pub effective_root_comment: std::string::String,
2990
2991 pub resolved: bool,
2993
2994 pub effective_commit_sha: std::string::String,
2996
2997 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2998 }
2999
3000 impl Code {
3001 pub fn new() -> Self {
3002 std::default::Default::default()
3003 }
3004
3005 pub fn set_body<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3007 self.body = v.into();
3008 self
3009 }
3010
3011 pub fn set_reply<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3013 self.reply = v.into();
3014 self
3015 }
3016
3017 pub fn set_position<T>(mut self, v: T) -> Self
3019 where
3020 T: std::convert::Into<crate::model::pull_request_comment::Position>,
3021 {
3022 self.position = std::option::Option::Some(v.into());
3023 self
3024 }
3025
3026 pub fn set_or_clear_position<T>(mut self, v: std::option::Option<T>) -> Self
3028 where
3029 T: std::convert::Into<crate::model::pull_request_comment::Position>,
3030 {
3031 self.position = v.map(|x| x.into());
3032 self
3033 }
3034
3035 pub fn set_effective_root_comment<T: std::convert::Into<std::string::String>>(
3037 mut self,
3038 v: T,
3039 ) -> Self {
3040 self.effective_root_comment = v.into();
3041 self
3042 }
3043
3044 pub fn set_resolved<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
3046 self.resolved = v.into();
3047 self
3048 }
3049
3050 pub fn set_effective_commit_sha<T: std::convert::Into<std::string::String>>(
3052 mut self,
3053 v: T,
3054 ) -> Self {
3055 self.effective_commit_sha = v.into();
3056 self
3057 }
3058 }
3059
3060 impl wkt::message::Message for Code {
3061 fn typename() -> &'static str {
3062 "type.googleapis.com/google.cloud.securesourcemanager.v1.PullRequestComment.Code"
3063 }
3064 }
3065
3066 #[derive(Clone, Default, PartialEq)]
3068 #[non_exhaustive]
3069 pub struct Position {
3070 pub path: std::string::String,
3072
3073 pub line: i64,
3076
3077 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3078 }
3079
3080 impl Position {
3081 pub fn new() -> Self {
3082 std::default::Default::default()
3083 }
3084
3085 pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3087 self.path = v.into();
3088 self
3089 }
3090
3091 pub fn set_line<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
3093 self.line = v.into();
3094 self
3095 }
3096 }
3097
3098 impl wkt::message::Message for Position {
3099 fn typename() -> &'static str {
3100 "type.googleapis.com/google.cloud.securesourcemanager.v1.PullRequestComment.Position"
3101 }
3102 }
3103
3104 #[derive(Clone, Debug, PartialEq)]
3107 #[non_exhaustive]
3108 pub enum CommentDetail {
3109 Review(std::boxed::Box<crate::model::pull_request_comment::Review>),
3111 Comment(std::boxed::Box<crate::model::pull_request_comment::Comment>),
3113 Code(std::boxed::Box<crate::model::pull_request_comment::Code>),
3115 }
3116}
3117
3118#[derive(Clone, Default, PartialEq)]
3120#[non_exhaustive]
3121pub struct ListInstancesRequest {
3122 pub parent: std::string::String,
3124
3125 pub page_size: i32,
3128
3129 pub page_token: std::string::String,
3131
3132 pub filter: std::string::String,
3134
3135 pub order_by: std::string::String,
3137
3138 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3139}
3140
3141impl ListInstancesRequest {
3142 pub fn new() -> Self {
3143 std::default::Default::default()
3144 }
3145
3146 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3148 self.parent = v.into();
3149 self
3150 }
3151
3152 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3154 self.page_size = v.into();
3155 self
3156 }
3157
3158 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3160 self.page_token = v.into();
3161 self
3162 }
3163
3164 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3166 self.filter = v.into();
3167 self
3168 }
3169
3170 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3172 self.order_by = v.into();
3173 self
3174 }
3175}
3176
3177impl wkt::message::Message for ListInstancesRequest {
3178 fn typename() -> &'static str {
3179 "type.googleapis.com/google.cloud.securesourcemanager.v1.ListInstancesRequest"
3180 }
3181}
3182
3183#[derive(Clone, Default, PartialEq)]
3184#[non_exhaustive]
3185pub struct ListInstancesResponse {
3186 pub instances: std::vec::Vec<crate::model::Instance>,
3188
3189 pub next_page_token: std::string::String,
3191
3192 pub unreachable: std::vec::Vec<std::string::String>,
3194
3195 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3196}
3197
3198impl ListInstancesResponse {
3199 pub fn new() -> Self {
3200 std::default::Default::default()
3201 }
3202
3203 pub fn set_instances<T, V>(mut self, v: T) -> Self
3205 where
3206 T: std::iter::IntoIterator<Item = V>,
3207 V: std::convert::Into<crate::model::Instance>,
3208 {
3209 use std::iter::Iterator;
3210 self.instances = v.into_iter().map(|i| i.into()).collect();
3211 self
3212 }
3213
3214 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3216 self.next_page_token = v.into();
3217 self
3218 }
3219
3220 pub fn set_unreachable<T, V>(mut self, v: T) -> Self
3222 where
3223 T: std::iter::IntoIterator<Item = V>,
3224 V: std::convert::Into<std::string::String>,
3225 {
3226 use std::iter::Iterator;
3227 self.unreachable = v.into_iter().map(|i| i.into()).collect();
3228 self
3229 }
3230}
3231
3232impl wkt::message::Message for ListInstancesResponse {
3233 fn typename() -> &'static str {
3234 "type.googleapis.com/google.cloud.securesourcemanager.v1.ListInstancesResponse"
3235 }
3236}
3237
3238#[doc(hidden)]
3239impl gax::paginator::internal::PageableResponse for ListInstancesResponse {
3240 type PageItem = crate::model::Instance;
3241
3242 fn items(self) -> std::vec::Vec<Self::PageItem> {
3243 self.instances
3244 }
3245
3246 fn next_page_token(&self) -> std::string::String {
3247 use std::clone::Clone;
3248 self.next_page_token.clone()
3249 }
3250}
3251
3252#[derive(Clone, Default, PartialEq)]
3254#[non_exhaustive]
3255pub struct GetInstanceRequest {
3256 pub name: std::string::String,
3258
3259 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3260}
3261
3262impl GetInstanceRequest {
3263 pub fn new() -> Self {
3264 std::default::Default::default()
3265 }
3266
3267 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3269 self.name = v.into();
3270 self
3271 }
3272}
3273
3274impl wkt::message::Message for GetInstanceRequest {
3275 fn typename() -> &'static str {
3276 "type.googleapis.com/google.cloud.securesourcemanager.v1.GetInstanceRequest"
3277 }
3278}
3279
3280#[derive(Clone, Default, PartialEq)]
3282#[non_exhaustive]
3283pub struct CreateInstanceRequest {
3284 pub parent: std::string::String,
3286
3287 pub instance_id: std::string::String,
3289
3290 pub instance: std::option::Option<crate::model::Instance>,
3292
3293 pub request_id: std::string::String,
3307
3308 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3309}
3310
3311impl CreateInstanceRequest {
3312 pub fn new() -> Self {
3313 std::default::Default::default()
3314 }
3315
3316 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3318 self.parent = v.into();
3319 self
3320 }
3321
3322 pub fn set_instance_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3324 self.instance_id = v.into();
3325 self
3326 }
3327
3328 pub fn set_instance<T>(mut self, v: T) -> Self
3330 where
3331 T: std::convert::Into<crate::model::Instance>,
3332 {
3333 self.instance = std::option::Option::Some(v.into());
3334 self
3335 }
3336
3337 pub fn set_or_clear_instance<T>(mut self, v: std::option::Option<T>) -> Self
3339 where
3340 T: std::convert::Into<crate::model::Instance>,
3341 {
3342 self.instance = v.map(|x| x.into());
3343 self
3344 }
3345
3346 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3348 self.request_id = v.into();
3349 self
3350 }
3351}
3352
3353impl wkt::message::Message for CreateInstanceRequest {
3354 fn typename() -> &'static str {
3355 "type.googleapis.com/google.cloud.securesourcemanager.v1.CreateInstanceRequest"
3356 }
3357}
3358
3359#[derive(Clone, Default, PartialEq)]
3361#[non_exhaustive]
3362pub struct DeleteInstanceRequest {
3363 pub name: std::string::String,
3365
3366 pub request_id: std::string::String,
3380
3381 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3382}
3383
3384impl DeleteInstanceRequest {
3385 pub fn new() -> Self {
3386 std::default::Default::default()
3387 }
3388
3389 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3391 self.name = v.into();
3392 self
3393 }
3394
3395 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3397 self.request_id = v.into();
3398 self
3399 }
3400}
3401
3402impl wkt::message::Message for DeleteInstanceRequest {
3403 fn typename() -> &'static str {
3404 "type.googleapis.com/google.cloud.securesourcemanager.v1.DeleteInstanceRequest"
3405 }
3406}
3407
3408#[derive(Clone, Default, PartialEq)]
3410#[non_exhaustive]
3411pub struct OperationMetadata {
3412 pub create_time: std::option::Option<wkt::Timestamp>,
3414
3415 pub end_time: std::option::Option<wkt::Timestamp>,
3417
3418 pub target: std::string::String,
3420
3421 pub verb: std::string::String,
3423
3424 pub status_message: std::string::String,
3426
3427 pub requested_cancellation: bool,
3436
3437 pub api_version: std::string::String,
3439
3440 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3441}
3442
3443impl OperationMetadata {
3444 pub fn new() -> Self {
3445 std::default::Default::default()
3446 }
3447
3448 pub fn set_create_time<T>(mut self, v: T) -> Self
3450 where
3451 T: std::convert::Into<wkt::Timestamp>,
3452 {
3453 self.create_time = std::option::Option::Some(v.into());
3454 self
3455 }
3456
3457 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
3459 where
3460 T: std::convert::Into<wkt::Timestamp>,
3461 {
3462 self.create_time = v.map(|x| x.into());
3463 self
3464 }
3465
3466 pub fn set_end_time<T>(mut self, v: T) -> Self
3468 where
3469 T: std::convert::Into<wkt::Timestamp>,
3470 {
3471 self.end_time = std::option::Option::Some(v.into());
3472 self
3473 }
3474
3475 pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
3477 where
3478 T: std::convert::Into<wkt::Timestamp>,
3479 {
3480 self.end_time = v.map(|x| x.into());
3481 self
3482 }
3483
3484 pub fn set_target<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3486 self.target = v.into();
3487 self
3488 }
3489
3490 pub fn set_verb<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3492 self.verb = v.into();
3493 self
3494 }
3495
3496 pub fn set_status_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3498 self.status_message = v.into();
3499 self
3500 }
3501
3502 pub fn set_requested_cancellation<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
3504 self.requested_cancellation = v.into();
3505 self
3506 }
3507
3508 pub fn set_api_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3510 self.api_version = v.into();
3511 self
3512 }
3513}
3514
3515impl wkt::message::Message for OperationMetadata {
3516 fn typename() -> &'static str {
3517 "type.googleapis.com/google.cloud.securesourcemanager.v1.OperationMetadata"
3518 }
3519}
3520
3521#[derive(Clone, Default, PartialEq)]
3523#[non_exhaustive]
3524pub struct ListRepositoriesRequest {
3525 pub parent: std::string::String,
3527
3528 pub page_size: i32,
3531
3532 pub page_token: std::string::String,
3534
3535 pub filter: std::string::String,
3537
3538 pub instance: std::string::String,
3545
3546 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3547}
3548
3549impl ListRepositoriesRequest {
3550 pub fn new() -> Self {
3551 std::default::Default::default()
3552 }
3553
3554 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3556 self.parent = v.into();
3557 self
3558 }
3559
3560 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3562 self.page_size = v.into();
3563 self
3564 }
3565
3566 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3568 self.page_token = v.into();
3569 self
3570 }
3571
3572 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3574 self.filter = v.into();
3575 self
3576 }
3577
3578 pub fn set_instance<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3580 self.instance = v.into();
3581 self
3582 }
3583}
3584
3585impl wkt::message::Message for ListRepositoriesRequest {
3586 fn typename() -> &'static str {
3587 "type.googleapis.com/google.cloud.securesourcemanager.v1.ListRepositoriesRequest"
3588 }
3589}
3590
3591#[derive(Clone, Default, PartialEq)]
3592#[non_exhaustive]
3593pub struct ListRepositoriesResponse {
3594 pub repositories: std::vec::Vec<crate::model::Repository>,
3596
3597 pub next_page_token: std::string::String,
3599
3600 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3601}
3602
3603impl ListRepositoriesResponse {
3604 pub fn new() -> Self {
3605 std::default::Default::default()
3606 }
3607
3608 pub fn set_repositories<T, V>(mut self, v: T) -> Self
3610 where
3611 T: std::iter::IntoIterator<Item = V>,
3612 V: std::convert::Into<crate::model::Repository>,
3613 {
3614 use std::iter::Iterator;
3615 self.repositories = v.into_iter().map(|i| i.into()).collect();
3616 self
3617 }
3618
3619 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3621 self.next_page_token = v.into();
3622 self
3623 }
3624}
3625
3626impl wkt::message::Message for ListRepositoriesResponse {
3627 fn typename() -> &'static str {
3628 "type.googleapis.com/google.cloud.securesourcemanager.v1.ListRepositoriesResponse"
3629 }
3630}
3631
3632#[doc(hidden)]
3633impl gax::paginator::internal::PageableResponse for ListRepositoriesResponse {
3634 type PageItem = crate::model::Repository;
3635
3636 fn items(self) -> std::vec::Vec<Self::PageItem> {
3637 self.repositories
3638 }
3639
3640 fn next_page_token(&self) -> std::string::String {
3641 use std::clone::Clone;
3642 self.next_page_token.clone()
3643 }
3644}
3645
3646#[derive(Clone, Default, PartialEq)]
3648#[non_exhaustive]
3649pub struct GetRepositoryRequest {
3650 pub name: std::string::String,
3654
3655 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3656}
3657
3658impl GetRepositoryRequest {
3659 pub fn new() -> Self {
3660 std::default::Default::default()
3661 }
3662
3663 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3665 self.name = v.into();
3666 self
3667 }
3668}
3669
3670impl wkt::message::Message for GetRepositoryRequest {
3671 fn typename() -> &'static str {
3672 "type.googleapis.com/google.cloud.securesourcemanager.v1.GetRepositoryRequest"
3673 }
3674}
3675
3676#[derive(Clone, Default, PartialEq)]
3678#[non_exhaustive]
3679pub struct CreateRepositoryRequest {
3680 pub parent: std::string::String,
3683
3684 pub repository: std::option::Option<crate::model::Repository>,
3686
3687 pub repository_id: std::string::String,
3691
3692 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3693}
3694
3695impl CreateRepositoryRequest {
3696 pub fn new() -> Self {
3697 std::default::Default::default()
3698 }
3699
3700 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3702 self.parent = v.into();
3703 self
3704 }
3705
3706 pub fn set_repository<T>(mut self, v: T) -> Self
3708 where
3709 T: std::convert::Into<crate::model::Repository>,
3710 {
3711 self.repository = std::option::Option::Some(v.into());
3712 self
3713 }
3714
3715 pub fn set_or_clear_repository<T>(mut self, v: std::option::Option<T>) -> Self
3717 where
3718 T: std::convert::Into<crate::model::Repository>,
3719 {
3720 self.repository = v.map(|x| x.into());
3721 self
3722 }
3723
3724 pub fn set_repository_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3726 self.repository_id = v.into();
3727 self
3728 }
3729}
3730
3731impl wkt::message::Message for CreateRepositoryRequest {
3732 fn typename() -> &'static str {
3733 "type.googleapis.com/google.cloud.securesourcemanager.v1.CreateRepositoryRequest"
3734 }
3735}
3736
3737#[derive(Clone, Default, PartialEq)]
3739#[non_exhaustive]
3740pub struct UpdateRepositoryRequest {
3741 pub update_mask: std::option::Option<wkt::FieldMask>,
3747
3748 pub repository: std::option::Option<crate::model::Repository>,
3750
3751 pub validate_only: bool,
3754
3755 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3756}
3757
3758impl UpdateRepositoryRequest {
3759 pub fn new() -> Self {
3760 std::default::Default::default()
3761 }
3762
3763 pub fn set_update_mask<T>(mut self, v: T) -> Self
3765 where
3766 T: std::convert::Into<wkt::FieldMask>,
3767 {
3768 self.update_mask = std::option::Option::Some(v.into());
3769 self
3770 }
3771
3772 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
3774 where
3775 T: std::convert::Into<wkt::FieldMask>,
3776 {
3777 self.update_mask = v.map(|x| x.into());
3778 self
3779 }
3780
3781 pub fn set_repository<T>(mut self, v: T) -> Self
3783 where
3784 T: std::convert::Into<crate::model::Repository>,
3785 {
3786 self.repository = std::option::Option::Some(v.into());
3787 self
3788 }
3789
3790 pub fn set_or_clear_repository<T>(mut self, v: std::option::Option<T>) -> Self
3792 where
3793 T: std::convert::Into<crate::model::Repository>,
3794 {
3795 self.repository = v.map(|x| x.into());
3796 self
3797 }
3798
3799 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
3801 self.validate_only = v.into();
3802 self
3803 }
3804}
3805
3806impl wkt::message::Message for UpdateRepositoryRequest {
3807 fn typename() -> &'static str {
3808 "type.googleapis.com/google.cloud.securesourcemanager.v1.UpdateRepositoryRequest"
3809 }
3810}
3811
3812#[derive(Clone, Default, PartialEq)]
3814#[non_exhaustive]
3815pub struct DeleteRepositoryRequest {
3816 pub name: std::string::String,
3820
3821 pub allow_missing: bool,
3824
3825 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3826}
3827
3828impl DeleteRepositoryRequest {
3829 pub fn new() -> Self {
3830 std::default::Default::default()
3831 }
3832
3833 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3835 self.name = v.into();
3836 self
3837 }
3838
3839 pub fn set_allow_missing<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
3841 self.allow_missing = v.into();
3842 self
3843 }
3844}
3845
3846impl wkt::message::Message for DeleteRepositoryRequest {
3847 fn typename() -> &'static str {
3848 "type.googleapis.com/google.cloud.securesourcemanager.v1.DeleteRepositoryRequest"
3849 }
3850}
3851
3852#[derive(Clone, Default, PartialEq)]
3854#[non_exhaustive]
3855pub struct ListHooksRequest {
3856 pub parent: std::string::String,
3858
3859 pub page_size: i32,
3862
3863 pub page_token: std::string::String,
3865
3866 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3867}
3868
3869impl ListHooksRequest {
3870 pub fn new() -> Self {
3871 std::default::Default::default()
3872 }
3873
3874 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3876 self.parent = v.into();
3877 self
3878 }
3879
3880 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3882 self.page_size = v.into();
3883 self
3884 }
3885
3886 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3888 self.page_token = v.into();
3889 self
3890 }
3891}
3892
3893impl wkt::message::Message for ListHooksRequest {
3894 fn typename() -> &'static str {
3895 "type.googleapis.com/google.cloud.securesourcemanager.v1.ListHooksRequest"
3896 }
3897}
3898
3899#[derive(Clone, Default, PartialEq)]
3901#[non_exhaustive]
3902pub struct ListHooksResponse {
3903 pub hooks: std::vec::Vec<crate::model::Hook>,
3905
3906 pub next_page_token: std::string::String,
3908
3909 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3910}
3911
3912impl ListHooksResponse {
3913 pub fn new() -> Self {
3914 std::default::Default::default()
3915 }
3916
3917 pub fn set_hooks<T, V>(mut self, v: T) -> Self
3919 where
3920 T: std::iter::IntoIterator<Item = V>,
3921 V: std::convert::Into<crate::model::Hook>,
3922 {
3923 use std::iter::Iterator;
3924 self.hooks = v.into_iter().map(|i| i.into()).collect();
3925 self
3926 }
3927
3928 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3930 self.next_page_token = v.into();
3931 self
3932 }
3933}
3934
3935impl wkt::message::Message for ListHooksResponse {
3936 fn typename() -> &'static str {
3937 "type.googleapis.com/google.cloud.securesourcemanager.v1.ListHooksResponse"
3938 }
3939}
3940
3941#[doc(hidden)]
3942impl gax::paginator::internal::PageableResponse for ListHooksResponse {
3943 type PageItem = crate::model::Hook;
3944
3945 fn items(self) -> std::vec::Vec<Self::PageItem> {
3946 self.hooks
3947 }
3948
3949 fn next_page_token(&self) -> std::string::String {
3950 use std::clone::Clone;
3951 self.next_page_token.clone()
3952 }
3953}
3954
3955#[derive(Clone, Default, PartialEq)]
3957#[non_exhaustive]
3958pub struct GetHookRequest {
3959 pub name: std::string::String,
3963
3964 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3965}
3966
3967impl GetHookRequest {
3968 pub fn new() -> Self {
3969 std::default::Default::default()
3970 }
3971
3972 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3974 self.name = v.into();
3975 self
3976 }
3977}
3978
3979impl wkt::message::Message for GetHookRequest {
3980 fn typename() -> &'static str {
3981 "type.googleapis.com/google.cloud.securesourcemanager.v1.GetHookRequest"
3982 }
3983}
3984
3985#[derive(Clone, Default, PartialEq)]
3987#[non_exhaustive]
3988pub struct CreateHookRequest {
3989 pub parent: std::string::String,
3993
3994 pub hook: std::option::Option<crate::model::Hook>,
3996
3997 pub hook_id: std::string::String,
4002
4003 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4004}
4005
4006impl CreateHookRequest {
4007 pub fn new() -> Self {
4008 std::default::Default::default()
4009 }
4010
4011 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4013 self.parent = v.into();
4014 self
4015 }
4016
4017 pub fn set_hook<T>(mut self, v: T) -> Self
4019 where
4020 T: std::convert::Into<crate::model::Hook>,
4021 {
4022 self.hook = std::option::Option::Some(v.into());
4023 self
4024 }
4025
4026 pub fn set_or_clear_hook<T>(mut self, v: std::option::Option<T>) -> Self
4028 where
4029 T: std::convert::Into<crate::model::Hook>,
4030 {
4031 self.hook = v.map(|x| x.into());
4032 self
4033 }
4034
4035 pub fn set_hook_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4037 self.hook_id = v.into();
4038 self
4039 }
4040}
4041
4042impl wkt::message::Message for CreateHookRequest {
4043 fn typename() -> &'static str {
4044 "type.googleapis.com/google.cloud.securesourcemanager.v1.CreateHookRequest"
4045 }
4046}
4047
4048#[derive(Clone, Default, PartialEq)]
4050#[non_exhaustive]
4051pub struct UpdateHookRequest {
4052 pub update_mask: std::option::Option<wkt::FieldMask>,
4058
4059 pub hook: std::option::Option<crate::model::Hook>,
4061
4062 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4063}
4064
4065impl UpdateHookRequest {
4066 pub fn new() -> Self {
4067 std::default::Default::default()
4068 }
4069
4070 pub fn set_update_mask<T>(mut self, v: T) -> Self
4072 where
4073 T: std::convert::Into<wkt::FieldMask>,
4074 {
4075 self.update_mask = std::option::Option::Some(v.into());
4076 self
4077 }
4078
4079 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
4081 where
4082 T: std::convert::Into<wkt::FieldMask>,
4083 {
4084 self.update_mask = v.map(|x| x.into());
4085 self
4086 }
4087
4088 pub fn set_hook<T>(mut self, v: T) -> Self
4090 where
4091 T: std::convert::Into<crate::model::Hook>,
4092 {
4093 self.hook = std::option::Option::Some(v.into());
4094 self
4095 }
4096
4097 pub fn set_or_clear_hook<T>(mut self, v: std::option::Option<T>) -> Self
4099 where
4100 T: std::convert::Into<crate::model::Hook>,
4101 {
4102 self.hook = v.map(|x| x.into());
4103 self
4104 }
4105}
4106
4107impl wkt::message::Message for UpdateHookRequest {
4108 fn typename() -> &'static str {
4109 "type.googleapis.com/google.cloud.securesourcemanager.v1.UpdateHookRequest"
4110 }
4111}
4112
4113#[derive(Clone, Default, PartialEq)]
4115#[non_exhaustive]
4116pub struct DeleteHookRequest {
4117 pub name: std::string::String,
4121
4122 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4123}
4124
4125impl DeleteHookRequest {
4126 pub fn new() -> Self {
4127 std::default::Default::default()
4128 }
4129
4130 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4132 self.name = v.into();
4133 self
4134 }
4135}
4136
4137impl wkt::message::Message for DeleteHookRequest {
4138 fn typename() -> &'static str {
4139 "type.googleapis.com/google.cloud.securesourcemanager.v1.DeleteHookRequest"
4140 }
4141}
4142
4143#[derive(Clone, Default, PartialEq)]
4145#[non_exhaustive]
4146pub struct GetBranchRuleRequest {
4147 pub name: std::string::String,
4151
4152 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4153}
4154
4155impl GetBranchRuleRequest {
4156 pub fn new() -> Self {
4157 std::default::Default::default()
4158 }
4159
4160 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4162 self.name = v.into();
4163 self
4164 }
4165}
4166
4167impl wkt::message::Message for GetBranchRuleRequest {
4168 fn typename() -> &'static str {
4169 "type.googleapis.com/google.cloud.securesourcemanager.v1.GetBranchRuleRequest"
4170 }
4171}
4172
4173#[derive(Clone, Default, PartialEq)]
4175#[non_exhaustive]
4176pub struct CreateBranchRuleRequest {
4177 pub parent: std::string::String,
4178
4179 pub branch_rule: std::option::Option<crate::model::BranchRule>,
4180
4181 pub branch_rule_id: std::string::String,
4182
4183 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4184}
4185
4186impl CreateBranchRuleRequest {
4187 pub fn new() -> Self {
4188 std::default::Default::default()
4189 }
4190
4191 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4193 self.parent = v.into();
4194 self
4195 }
4196
4197 pub fn set_branch_rule<T>(mut self, v: T) -> Self
4199 where
4200 T: std::convert::Into<crate::model::BranchRule>,
4201 {
4202 self.branch_rule = std::option::Option::Some(v.into());
4203 self
4204 }
4205
4206 pub fn set_or_clear_branch_rule<T>(mut self, v: std::option::Option<T>) -> Self
4208 where
4209 T: std::convert::Into<crate::model::BranchRule>,
4210 {
4211 self.branch_rule = v.map(|x| x.into());
4212 self
4213 }
4214
4215 pub fn set_branch_rule_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4217 self.branch_rule_id = v.into();
4218 self
4219 }
4220}
4221
4222impl wkt::message::Message for CreateBranchRuleRequest {
4223 fn typename() -> &'static str {
4224 "type.googleapis.com/google.cloud.securesourcemanager.v1.CreateBranchRuleRequest"
4225 }
4226}
4227
4228#[derive(Clone, Default, PartialEq)]
4230#[non_exhaustive]
4231pub struct ListBranchRulesRequest {
4232 pub parent: std::string::String,
4233
4234 pub page_size: i32,
4235
4236 pub page_token: std::string::String,
4237
4238 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4239}
4240
4241impl ListBranchRulesRequest {
4242 pub fn new() -> Self {
4243 std::default::Default::default()
4244 }
4245
4246 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4248 self.parent = v.into();
4249 self
4250 }
4251
4252 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4254 self.page_size = v.into();
4255 self
4256 }
4257
4258 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4260 self.page_token = v.into();
4261 self
4262 }
4263}
4264
4265impl wkt::message::Message for ListBranchRulesRequest {
4266 fn typename() -> &'static str {
4267 "type.googleapis.com/google.cloud.securesourcemanager.v1.ListBranchRulesRequest"
4268 }
4269}
4270
4271#[derive(Clone, Default, PartialEq)]
4273#[non_exhaustive]
4274pub struct DeleteBranchRuleRequest {
4275 pub name: std::string::String,
4276
4277 pub allow_missing: bool,
4280
4281 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4282}
4283
4284impl DeleteBranchRuleRequest {
4285 pub fn new() -> Self {
4286 std::default::Default::default()
4287 }
4288
4289 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4291 self.name = v.into();
4292 self
4293 }
4294
4295 pub fn set_allow_missing<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4297 self.allow_missing = v.into();
4298 self
4299 }
4300}
4301
4302impl wkt::message::Message for DeleteBranchRuleRequest {
4303 fn typename() -> &'static str {
4304 "type.googleapis.com/google.cloud.securesourcemanager.v1.DeleteBranchRuleRequest"
4305 }
4306}
4307
4308#[derive(Clone, Default, PartialEq)]
4310#[non_exhaustive]
4311pub struct UpdateBranchRuleRequest {
4312 pub branch_rule: std::option::Option<crate::model::BranchRule>,
4313
4314 pub validate_only: bool,
4317
4318 pub update_mask: std::option::Option<wkt::FieldMask>,
4324
4325 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4326}
4327
4328impl UpdateBranchRuleRequest {
4329 pub fn new() -> Self {
4330 std::default::Default::default()
4331 }
4332
4333 pub fn set_branch_rule<T>(mut self, v: T) -> Self
4335 where
4336 T: std::convert::Into<crate::model::BranchRule>,
4337 {
4338 self.branch_rule = std::option::Option::Some(v.into());
4339 self
4340 }
4341
4342 pub fn set_or_clear_branch_rule<T>(mut self, v: std::option::Option<T>) -> Self
4344 where
4345 T: std::convert::Into<crate::model::BranchRule>,
4346 {
4347 self.branch_rule = v.map(|x| x.into());
4348 self
4349 }
4350
4351 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4353 self.validate_only = v.into();
4354 self
4355 }
4356
4357 pub fn set_update_mask<T>(mut self, v: T) -> Self
4359 where
4360 T: std::convert::Into<wkt::FieldMask>,
4361 {
4362 self.update_mask = std::option::Option::Some(v.into());
4363 self
4364 }
4365
4366 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
4368 where
4369 T: std::convert::Into<wkt::FieldMask>,
4370 {
4371 self.update_mask = v.map(|x| x.into());
4372 self
4373 }
4374}
4375
4376impl wkt::message::Message for UpdateBranchRuleRequest {
4377 fn typename() -> &'static str {
4378 "type.googleapis.com/google.cloud.securesourcemanager.v1.UpdateBranchRuleRequest"
4379 }
4380}
4381
4382#[derive(Clone, Default, PartialEq)]
4384#[non_exhaustive]
4385pub struct ListBranchRulesResponse {
4386 pub branch_rules: std::vec::Vec<crate::model::BranchRule>,
4388
4389 pub next_page_token: std::string::String,
4391
4392 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4393}
4394
4395impl ListBranchRulesResponse {
4396 pub fn new() -> Self {
4397 std::default::Default::default()
4398 }
4399
4400 pub fn set_branch_rules<T, V>(mut self, v: T) -> Self
4402 where
4403 T: std::iter::IntoIterator<Item = V>,
4404 V: std::convert::Into<crate::model::BranchRule>,
4405 {
4406 use std::iter::Iterator;
4407 self.branch_rules = v.into_iter().map(|i| i.into()).collect();
4408 self
4409 }
4410
4411 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4413 self.next_page_token = v.into();
4414 self
4415 }
4416}
4417
4418impl wkt::message::Message for ListBranchRulesResponse {
4419 fn typename() -> &'static str {
4420 "type.googleapis.com/google.cloud.securesourcemanager.v1.ListBranchRulesResponse"
4421 }
4422}
4423
4424#[doc(hidden)]
4425impl gax::paginator::internal::PageableResponse for ListBranchRulesResponse {
4426 type PageItem = crate::model::BranchRule;
4427
4428 fn items(self) -> std::vec::Vec<Self::PageItem> {
4429 self.branch_rules
4430 }
4431
4432 fn next_page_token(&self) -> std::string::String {
4433 use std::clone::Clone;
4434 self.next_page_token.clone()
4435 }
4436}
4437
4438#[derive(Clone, Default, PartialEq)]
4440#[non_exhaustive]
4441pub struct CreatePullRequestRequest {
4442 pub parent: std::string::String,
4445
4446 pub pull_request: std::option::Option<crate::model::PullRequest>,
4448
4449 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4450}
4451
4452impl CreatePullRequestRequest {
4453 pub fn new() -> Self {
4454 std::default::Default::default()
4455 }
4456
4457 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4459 self.parent = v.into();
4460 self
4461 }
4462
4463 pub fn set_pull_request<T>(mut self, v: T) -> Self
4465 where
4466 T: std::convert::Into<crate::model::PullRequest>,
4467 {
4468 self.pull_request = std::option::Option::Some(v.into());
4469 self
4470 }
4471
4472 pub fn set_or_clear_pull_request<T>(mut self, v: std::option::Option<T>) -> Self
4474 where
4475 T: std::convert::Into<crate::model::PullRequest>,
4476 {
4477 self.pull_request = v.map(|x| x.into());
4478 self
4479 }
4480}
4481
4482impl wkt::message::Message for CreatePullRequestRequest {
4483 fn typename() -> &'static str {
4484 "type.googleapis.com/google.cloud.securesourcemanager.v1.CreatePullRequestRequest"
4485 }
4486}
4487
4488#[derive(Clone, Default, PartialEq)]
4490#[non_exhaustive]
4491pub struct GetPullRequestRequest {
4492 pub name: std::string::String,
4496
4497 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4498}
4499
4500impl GetPullRequestRequest {
4501 pub fn new() -> Self {
4502 std::default::Default::default()
4503 }
4504
4505 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4507 self.name = v.into();
4508 self
4509 }
4510}
4511
4512impl wkt::message::Message for GetPullRequestRequest {
4513 fn typename() -> &'static str {
4514 "type.googleapis.com/google.cloud.securesourcemanager.v1.GetPullRequestRequest"
4515 }
4516}
4517
4518#[derive(Clone, Default, PartialEq)]
4520#[non_exhaustive]
4521pub struct ListPullRequestsRequest {
4522 pub parent: std::string::String,
4525
4526 pub page_size: i32,
4529
4530 pub page_token: std::string::String,
4532
4533 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4534}
4535
4536impl ListPullRequestsRequest {
4537 pub fn new() -> Self {
4538 std::default::Default::default()
4539 }
4540
4541 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4543 self.parent = v.into();
4544 self
4545 }
4546
4547 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4549 self.page_size = v.into();
4550 self
4551 }
4552
4553 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4555 self.page_token = v.into();
4556 self
4557 }
4558}
4559
4560impl wkt::message::Message for ListPullRequestsRequest {
4561 fn typename() -> &'static str {
4562 "type.googleapis.com/google.cloud.securesourcemanager.v1.ListPullRequestsRequest"
4563 }
4564}
4565
4566#[derive(Clone, Default, PartialEq)]
4568#[non_exhaustive]
4569pub struct ListPullRequestsResponse {
4570 pub pull_requests: std::vec::Vec<crate::model::PullRequest>,
4572
4573 pub next_page_token: std::string::String,
4575
4576 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4577}
4578
4579impl ListPullRequestsResponse {
4580 pub fn new() -> Self {
4581 std::default::Default::default()
4582 }
4583
4584 pub fn set_pull_requests<T, V>(mut self, v: T) -> Self
4586 where
4587 T: std::iter::IntoIterator<Item = V>,
4588 V: std::convert::Into<crate::model::PullRequest>,
4589 {
4590 use std::iter::Iterator;
4591 self.pull_requests = v.into_iter().map(|i| i.into()).collect();
4592 self
4593 }
4594
4595 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4597 self.next_page_token = v.into();
4598 self
4599 }
4600}
4601
4602impl wkt::message::Message for ListPullRequestsResponse {
4603 fn typename() -> &'static str {
4604 "type.googleapis.com/google.cloud.securesourcemanager.v1.ListPullRequestsResponse"
4605 }
4606}
4607
4608#[doc(hidden)]
4609impl gax::paginator::internal::PageableResponse for ListPullRequestsResponse {
4610 type PageItem = crate::model::PullRequest;
4611
4612 fn items(self) -> std::vec::Vec<Self::PageItem> {
4613 self.pull_requests
4614 }
4615
4616 fn next_page_token(&self) -> std::string::String {
4617 use std::clone::Clone;
4618 self.next_page_token.clone()
4619 }
4620}
4621
4622#[derive(Clone, Default, PartialEq)]
4624#[non_exhaustive]
4625pub struct UpdatePullRequestRequest {
4626 pub pull_request: std::option::Option<crate::model::PullRequest>,
4628
4629 pub update_mask: std::option::Option<wkt::FieldMask>,
4635
4636 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4637}
4638
4639impl UpdatePullRequestRequest {
4640 pub fn new() -> Self {
4641 std::default::Default::default()
4642 }
4643
4644 pub fn set_pull_request<T>(mut self, v: T) -> Self
4646 where
4647 T: std::convert::Into<crate::model::PullRequest>,
4648 {
4649 self.pull_request = std::option::Option::Some(v.into());
4650 self
4651 }
4652
4653 pub fn set_or_clear_pull_request<T>(mut self, v: std::option::Option<T>) -> Self
4655 where
4656 T: std::convert::Into<crate::model::PullRequest>,
4657 {
4658 self.pull_request = v.map(|x| x.into());
4659 self
4660 }
4661
4662 pub fn set_update_mask<T>(mut self, v: T) -> Self
4664 where
4665 T: std::convert::Into<wkt::FieldMask>,
4666 {
4667 self.update_mask = std::option::Option::Some(v.into());
4668 self
4669 }
4670
4671 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
4673 where
4674 T: std::convert::Into<wkt::FieldMask>,
4675 {
4676 self.update_mask = v.map(|x| x.into());
4677 self
4678 }
4679}
4680
4681impl wkt::message::Message for UpdatePullRequestRequest {
4682 fn typename() -> &'static str {
4683 "type.googleapis.com/google.cloud.securesourcemanager.v1.UpdatePullRequestRequest"
4684 }
4685}
4686
4687#[derive(Clone, Default, PartialEq)]
4689#[non_exhaustive]
4690pub struct MergePullRequestRequest {
4691 pub name: std::string::String,
4695
4696 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4697}
4698
4699impl MergePullRequestRequest {
4700 pub fn new() -> Self {
4701 std::default::Default::default()
4702 }
4703
4704 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4706 self.name = v.into();
4707 self
4708 }
4709}
4710
4711impl wkt::message::Message for MergePullRequestRequest {
4712 fn typename() -> &'static str {
4713 "type.googleapis.com/google.cloud.securesourcemanager.v1.MergePullRequestRequest"
4714 }
4715}
4716
4717#[derive(Clone, Default, PartialEq)]
4719#[non_exhaustive]
4720pub struct OpenPullRequestRequest {
4721 pub name: std::string::String,
4725
4726 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4727}
4728
4729impl OpenPullRequestRequest {
4730 pub fn new() -> Self {
4731 std::default::Default::default()
4732 }
4733
4734 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4736 self.name = v.into();
4737 self
4738 }
4739}
4740
4741impl wkt::message::Message for OpenPullRequestRequest {
4742 fn typename() -> &'static str {
4743 "type.googleapis.com/google.cloud.securesourcemanager.v1.OpenPullRequestRequest"
4744 }
4745}
4746
4747#[derive(Clone, Default, PartialEq)]
4749#[non_exhaustive]
4750pub struct ClosePullRequestRequest {
4751 pub name: std::string::String,
4755
4756 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4757}
4758
4759impl ClosePullRequestRequest {
4760 pub fn new() -> Self {
4761 std::default::Default::default()
4762 }
4763
4764 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4766 self.name = v.into();
4767 self
4768 }
4769}
4770
4771impl wkt::message::Message for ClosePullRequestRequest {
4772 fn typename() -> &'static str {
4773 "type.googleapis.com/google.cloud.securesourcemanager.v1.ClosePullRequestRequest"
4774 }
4775}
4776
4777#[derive(Clone, Default, PartialEq)]
4780#[non_exhaustive]
4781pub struct ListPullRequestFileDiffsRequest {
4782 pub name: std::string::String,
4786
4787 pub page_size: i32,
4790
4791 pub page_token: std::string::String,
4793
4794 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4795}
4796
4797impl ListPullRequestFileDiffsRequest {
4798 pub fn new() -> Self {
4799 std::default::Default::default()
4800 }
4801
4802 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4804 self.name = v.into();
4805 self
4806 }
4807
4808 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4810 self.page_size = v.into();
4811 self
4812 }
4813
4814 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4816 self.page_token = v.into();
4817 self
4818 }
4819}
4820
4821impl wkt::message::Message for ListPullRequestFileDiffsRequest {
4822 fn typename() -> &'static str {
4823 "type.googleapis.com/google.cloud.securesourcemanager.v1.ListPullRequestFileDiffsRequest"
4824 }
4825}
4826
4827#[derive(Clone, Default, PartialEq)]
4830#[non_exhaustive]
4831pub struct ListPullRequestFileDiffsResponse {
4832 pub file_diffs: std::vec::Vec<crate::model::FileDiff>,
4834
4835 pub next_page_token: std::string::String,
4837
4838 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4839}
4840
4841impl ListPullRequestFileDiffsResponse {
4842 pub fn new() -> Self {
4843 std::default::Default::default()
4844 }
4845
4846 pub fn set_file_diffs<T, V>(mut self, v: T) -> Self
4848 where
4849 T: std::iter::IntoIterator<Item = V>,
4850 V: std::convert::Into<crate::model::FileDiff>,
4851 {
4852 use std::iter::Iterator;
4853 self.file_diffs = v.into_iter().map(|i| i.into()).collect();
4854 self
4855 }
4856
4857 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4859 self.next_page_token = v.into();
4860 self
4861 }
4862}
4863
4864impl wkt::message::Message for ListPullRequestFileDiffsResponse {
4865 fn typename() -> &'static str {
4866 "type.googleapis.com/google.cloud.securesourcemanager.v1.ListPullRequestFileDiffsResponse"
4867 }
4868}
4869
4870#[doc(hidden)]
4871impl gax::paginator::internal::PageableResponse for ListPullRequestFileDiffsResponse {
4872 type PageItem = crate::model::FileDiff;
4873
4874 fn items(self) -> std::vec::Vec<Self::PageItem> {
4875 self.file_diffs
4876 }
4877
4878 fn next_page_token(&self) -> std::string::String {
4879 use std::clone::Clone;
4880 self.next_page_token.clone()
4881 }
4882}
4883
4884#[derive(Clone, Default, PartialEq)]
4886#[non_exhaustive]
4887pub struct CreateIssueRequest {
4888 pub parent: std::string::String,
4891
4892 pub issue: std::option::Option<crate::model::Issue>,
4894
4895 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4896}
4897
4898impl CreateIssueRequest {
4899 pub fn new() -> Self {
4900 std::default::Default::default()
4901 }
4902
4903 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4905 self.parent = v.into();
4906 self
4907 }
4908
4909 pub fn set_issue<T>(mut self, v: T) -> Self
4911 where
4912 T: std::convert::Into<crate::model::Issue>,
4913 {
4914 self.issue = std::option::Option::Some(v.into());
4915 self
4916 }
4917
4918 pub fn set_or_clear_issue<T>(mut self, v: std::option::Option<T>) -> Self
4920 where
4921 T: std::convert::Into<crate::model::Issue>,
4922 {
4923 self.issue = v.map(|x| x.into());
4924 self
4925 }
4926}
4927
4928impl wkt::message::Message for CreateIssueRequest {
4929 fn typename() -> &'static str {
4930 "type.googleapis.com/google.cloud.securesourcemanager.v1.CreateIssueRequest"
4931 }
4932}
4933
4934#[derive(Clone, Default, PartialEq)]
4936#[non_exhaustive]
4937pub struct GetIssueRequest {
4938 pub name: std::string::String,
4942
4943 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4944}
4945
4946impl GetIssueRequest {
4947 pub fn new() -> Self {
4948 std::default::Default::default()
4949 }
4950
4951 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4953 self.name = v.into();
4954 self
4955 }
4956}
4957
4958impl wkt::message::Message for GetIssueRequest {
4959 fn typename() -> &'static str {
4960 "type.googleapis.com/google.cloud.securesourcemanager.v1.GetIssueRequest"
4961 }
4962}
4963
4964#[derive(Clone, Default, PartialEq)]
4966#[non_exhaustive]
4967pub struct ListIssuesRequest {
4968 pub parent: std::string::String,
4971
4972 pub page_size: i32,
4975
4976 pub page_token: std::string::String,
4978
4979 pub filter: std::string::String,
4981
4982 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4983}
4984
4985impl ListIssuesRequest {
4986 pub fn new() -> Self {
4987 std::default::Default::default()
4988 }
4989
4990 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4992 self.parent = v.into();
4993 self
4994 }
4995
4996 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4998 self.page_size = v.into();
4999 self
5000 }
5001
5002 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5004 self.page_token = v.into();
5005 self
5006 }
5007
5008 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5010 self.filter = v.into();
5011 self
5012 }
5013}
5014
5015impl wkt::message::Message for ListIssuesRequest {
5016 fn typename() -> &'static str {
5017 "type.googleapis.com/google.cloud.securesourcemanager.v1.ListIssuesRequest"
5018 }
5019}
5020
5021#[derive(Clone, Default, PartialEq)]
5023#[non_exhaustive]
5024pub struct ListIssuesResponse {
5025 pub issues: std::vec::Vec<crate::model::Issue>,
5027
5028 pub next_page_token: std::string::String,
5030
5031 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5032}
5033
5034impl ListIssuesResponse {
5035 pub fn new() -> Self {
5036 std::default::Default::default()
5037 }
5038
5039 pub fn set_issues<T, V>(mut self, v: T) -> Self
5041 where
5042 T: std::iter::IntoIterator<Item = V>,
5043 V: std::convert::Into<crate::model::Issue>,
5044 {
5045 use std::iter::Iterator;
5046 self.issues = v.into_iter().map(|i| i.into()).collect();
5047 self
5048 }
5049
5050 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5052 self.next_page_token = v.into();
5053 self
5054 }
5055}
5056
5057impl wkt::message::Message for ListIssuesResponse {
5058 fn typename() -> &'static str {
5059 "type.googleapis.com/google.cloud.securesourcemanager.v1.ListIssuesResponse"
5060 }
5061}
5062
5063#[doc(hidden)]
5064impl gax::paginator::internal::PageableResponse for ListIssuesResponse {
5065 type PageItem = crate::model::Issue;
5066
5067 fn items(self) -> std::vec::Vec<Self::PageItem> {
5068 self.issues
5069 }
5070
5071 fn next_page_token(&self) -> std::string::String {
5072 use std::clone::Clone;
5073 self.next_page_token.clone()
5074 }
5075}
5076
5077#[derive(Clone, Default, PartialEq)]
5079#[non_exhaustive]
5080pub struct UpdateIssueRequest {
5081 pub issue: std::option::Option<crate::model::Issue>,
5083
5084 pub update_mask: std::option::Option<wkt::FieldMask>,
5090
5091 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5092}
5093
5094impl UpdateIssueRequest {
5095 pub fn new() -> Self {
5096 std::default::Default::default()
5097 }
5098
5099 pub fn set_issue<T>(mut self, v: T) -> Self
5101 where
5102 T: std::convert::Into<crate::model::Issue>,
5103 {
5104 self.issue = std::option::Option::Some(v.into());
5105 self
5106 }
5107
5108 pub fn set_or_clear_issue<T>(mut self, v: std::option::Option<T>) -> Self
5110 where
5111 T: std::convert::Into<crate::model::Issue>,
5112 {
5113 self.issue = v.map(|x| x.into());
5114 self
5115 }
5116
5117 pub fn set_update_mask<T>(mut self, v: T) -> Self
5119 where
5120 T: std::convert::Into<wkt::FieldMask>,
5121 {
5122 self.update_mask = std::option::Option::Some(v.into());
5123 self
5124 }
5125
5126 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
5128 where
5129 T: std::convert::Into<wkt::FieldMask>,
5130 {
5131 self.update_mask = v.map(|x| x.into());
5132 self
5133 }
5134}
5135
5136impl wkt::message::Message for UpdateIssueRequest {
5137 fn typename() -> &'static str {
5138 "type.googleapis.com/google.cloud.securesourcemanager.v1.UpdateIssueRequest"
5139 }
5140}
5141
5142#[derive(Clone, Default, PartialEq)]
5144#[non_exhaustive]
5145pub struct DeleteIssueRequest {
5146 pub name: std::string::String,
5150
5151 pub etag: std::string::String,
5155
5156 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5157}
5158
5159impl DeleteIssueRequest {
5160 pub fn new() -> Self {
5161 std::default::Default::default()
5162 }
5163
5164 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5166 self.name = v.into();
5167 self
5168 }
5169
5170 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5172 self.etag = v.into();
5173 self
5174 }
5175}
5176
5177impl wkt::message::Message for DeleteIssueRequest {
5178 fn typename() -> &'static str {
5179 "type.googleapis.com/google.cloud.securesourcemanager.v1.DeleteIssueRequest"
5180 }
5181}
5182
5183#[derive(Clone, Default, PartialEq)]
5185#[non_exhaustive]
5186pub struct CloseIssueRequest {
5187 pub name: std::string::String,
5191
5192 pub etag: std::string::String,
5196
5197 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5198}
5199
5200impl CloseIssueRequest {
5201 pub fn new() -> Self {
5202 std::default::Default::default()
5203 }
5204
5205 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5207 self.name = v.into();
5208 self
5209 }
5210
5211 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5213 self.etag = v.into();
5214 self
5215 }
5216}
5217
5218impl wkt::message::Message for CloseIssueRequest {
5219 fn typename() -> &'static str {
5220 "type.googleapis.com/google.cloud.securesourcemanager.v1.CloseIssueRequest"
5221 }
5222}
5223
5224#[derive(Clone, Default, PartialEq)]
5226#[non_exhaustive]
5227pub struct OpenIssueRequest {
5228 pub name: std::string::String,
5232
5233 pub etag: std::string::String,
5237
5238 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5239}
5240
5241impl OpenIssueRequest {
5242 pub fn new() -> Self {
5243 std::default::Default::default()
5244 }
5245
5246 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5248 self.name = v.into();
5249 self
5250 }
5251
5252 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5254 self.etag = v.into();
5255 self
5256 }
5257}
5258
5259impl wkt::message::Message for OpenIssueRequest {
5260 fn typename() -> &'static str {
5261 "type.googleapis.com/google.cloud.securesourcemanager.v1.OpenIssueRequest"
5262 }
5263}
5264
5265#[derive(Clone, Default, PartialEq)]
5267#[non_exhaustive]
5268pub struct TreeEntry {
5269 pub r#type: crate::model::tree_entry::ObjectType,
5271
5272 pub sha: std::string::String,
5274
5275 pub path: std::string::String,
5278
5279 pub mode: std::string::String,
5282
5283 pub size: i64,
5285
5286 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5287}
5288
5289impl TreeEntry {
5290 pub fn new() -> Self {
5291 std::default::Default::default()
5292 }
5293
5294 pub fn set_type<T: std::convert::Into<crate::model::tree_entry::ObjectType>>(
5296 mut self,
5297 v: T,
5298 ) -> Self {
5299 self.r#type = v.into();
5300 self
5301 }
5302
5303 pub fn set_sha<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5305 self.sha = v.into();
5306 self
5307 }
5308
5309 pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5311 self.path = v.into();
5312 self
5313 }
5314
5315 pub fn set_mode<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5317 self.mode = v.into();
5318 self
5319 }
5320
5321 pub fn set_size<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
5323 self.size = v.into();
5324 self
5325 }
5326}
5327
5328impl wkt::message::Message for TreeEntry {
5329 fn typename() -> &'static str {
5330 "type.googleapis.com/google.cloud.securesourcemanager.v1.TreeEntry"
5331 }
5332}
5333
5334pub mod tree_entry {
5336 #[allow(unused_imports)]
5337 use super::*;
5338
5339 #[derive(Clone, Debug, PartialEq)]
5355 #[non_exhaustive]
5356 pub enum ObjectType {
5357 Unspecified,
5359 Tree,
5361 Blob,
5363 Commit,
5365 UnknownValue(object_type::UnknownValue),
5370 }
5371
5372 #[doc(hidden)]
5373 pub mod object_type {
5374 #[allow(unused_imports)]
5375 use super::*;
5376 #[derive(Clone, Debug, PartialEq)]
5377 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
5378 }
5379
5380 impl ObjectType {
5381 pub fn value(&self) -> std::option::Option<i32> {
5386 match self {
5387 Self::Unspecified => std::option::Option::Some(0),
5388 Self::Tree => std::option::Option::Some(1),
5389 Self::Blob => std::option::Option::Some(2),
5390 Self::Commit => std::option::Option::Some(3),
5391 Self::UnknownValue(u) => u.0.value(),
5392 }
5393 }
5394
5395 pub fn name(&self) -> std::option::Option<&str> {
5400 match self {
5401 Self::Unspecified => std::option::Option::Some("OBJECT_TYPE_UNSPECIFIED"),
5402 Self::Tree => std::option::Option::Some("TREE"),
5403 Self::Blob => std::option::Option::Some("BLOB"),
5404 Self::Commit => std::option::Option::Some("COMMIT"),
5405 Self::UnknownValue(u) => u.0.name(),
5406 }
5407 }
5408 }
5409
5410 impl std::default::Default for ObjectType {
5411 fn default() -> Self {
5412 use std::convert::From;
5413 Self::from(0)
5414 }
5415 }
5416
5417 impl std::fmt::Display for ObjectType {
5418 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
5419 wkt::internal::display_enum(f, self.name(), self.value())
5420 }
5421 }
5422
5423 impl std::convert::From<i32> for ObjectType {
5424 fn from(value: i32) -> Self {
5425 match value {
5426 0 => Self::Unspecified,
5427 1 => Self::Tree,
5428 2 => Self::Blob,
5429 3 => Self::Commit,
5430 _ => Self::UnknownValue(object_type::UnknownValue(
5431 wkt::internal::UnknownEnumValue::Integer(value),
5432 )),
5433 }
5434 }
5435 }
5436
5437 impl std::convert::From<&str> for ObjectType {
5438 fn from(value: &str) -> Self {
5439 use std::string::ToString;
5440 match value {
5441 "OBJECT_TYPE_UNSPECIFIED" => Self::Unspecified,
5442 "TREE" => Self::Tree,
5443 "BLOB" => Self::Blob,
5444 "COMMIT" => Self::Commit,
5445 _ => Self::UnknownValue(object_type::UnknownValue(
5446 wkt::internal::UnknownEnumValue::String(value.to_string()),
5447 )),
5448 }
5449 }
5450 }
5451
5452 impl serde::ser::Serialize for ObjectType {
5453 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
5454 where
5455 S: serde::Serializer,
5456 {
5457 match self {
5458 Self::Unspecified => serializer.serialize_i32(0),
5459 Self::Tree => serializer.serialize_i32(1),
5460 Self::Blob => serializer.serialize_i32(2),
5461 Self::Commit => serializer.serialize_i32(3),
5462 Self::UnknownValue(u) => u.0.serialize(serializer),
5463 }
5464 }
5465 }
5466
5467 impl<'de> serde::de::Deserialize<'de> for ObjectType {
5468 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
5469 where
5470 D: serde::Deserializer<'de>,
5471 {
5472 deserializer.deserialize_any(wkt::internal::EnumVisitor::<ObjectType>::new(
5473 ".google.cloud.securesourcemanager.v1.TreeEntry.ObjectType",
5474 ))
5475 }
5476 }
5477}
5478
5479#[derive(Clone, Default, PartialEq)]
5481#[non_exhaustive]
5482pub struct FetchTreeRequest {
5483 pub repository: std::string::String,
5487
5488 pub r#ref: std::string::String,
5491
5492 pub recursive: bool,
5495
5496 pub page_size: i32,
5499
5500 pub page_token: std::string::String,
5502
5503 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5504}
5505
5506impl FetchTreeRequest {
5507 pub fn new() -> Self {
5508 std::default::Default::default()
5509 }
5510
5511 pub fn set_repository<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5513 self.repository = v.into();
5514 self
5515 }
5516
5517 pub fn set_ref<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5519 self.r#ref = v.into();
5520 self
5521 }
5522
5523 pub fn set_recursive<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5525 self.recursive = v.into();
5526 self
5527 }
5528
5529 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
5531 self.page_size = v.into();
5532 self
5533 }
5534
5535 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5537 self.page_token = v.into();
5538 self
5539 }
5540}
5541
5542impl wkt::message::Message for FetchTreeRequest {
5543 fn typename() -> &'static str {
5544 "type.googleapis.com/google.cloud.securesourcemanager.v1.FetchTreeRequest"
5545 }
5546}
5547
5548#[derive(Clone, Default, PartialEq)]
5550#[non_exhaustive]
5551pub struct FetchTreeResponse {
5552 pub tree_entries: std::vec::Vec<crate::model::TreeEntry>,
5554
5555 pub next_page_token: std::string::String,
5557
5558 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5559}
5560
5561impl FetchTreeResponse {
5562 pub fn new() -> Self {
5563 std::default::Default::default()
5564 }
5565
5566 pub fn set_tree_entries<T, V>(mut self, v: T) -> Self
5568 where
5569 T: std::iter::IntoIterator<Item = V>,
5570 V: std::convert::Into<crate::model::TreeEntry>,
5571 {
5572 use std::iter::Iterator;
5573 self.tree_entries = v.into_iter().map(|i| i.into()).collect();
5574 self
5575 }
5576
5577 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5579 self.next_page_token = v.into();
5580 self
5581 }
5582}
5583
5584impl wkt::message::Message for FetchTreeResponse {
5585 fn typename() -> &'static str {
5586 "type.googleapis.com/google.cloud.securesourcemanager.v1.FetchTreeResponse"
5587 }
5588}
5589
5590#[doc(hidden)]
5591impl gax::paginator::internal::PageableResponse for FetchTreeResponse {
5592 type PageItem = crate::model::TreeEntry;
5593
5594 fn items(self) -> std::vec::Vec<Self::PageItem> {
5595 self.tree_entries
5596 }
5597
5598 fn next_page_token(&self) -> std::string::String {
5599 use std::clone::Clone;
5600 self.next_page_token.clone()
5601 }
5602}
5603
5604#[derive(Clone, Default, PartialEq)]
5606#[non_exhaustive]
5607pub struct FetchBlobRequest {
5608 pub repository: std::string::String,
5612
5613 pub sha: std::string::String,
5615
5616 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5617}
5618
5619impl FetchBlobRequest {
5620 pub fn new() -> Self {
5621 std::default::Default::default()
5622 }
5623
5624 pub fn set_repository<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5626 self.repository = v.into();
5627 self
5628 }
5629
5630 pub fn set_sha<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5632 self.sha = v.into();
5633 self
5634 }
5635}
5636
5637impl wkt::message::Message for FetchBlobRequest {
5638 fn typename() -> &'static str {
5639 "type.googleapis.com/google.cloud.securesourcemanager.v1.FetchBlobRequest"
5640 }
5641}
5642
5643#[derive(Clone, Default, PartialEq)]
5645#[non_exhaustive]
5646pub struct FetchBlobResponse {
5647 pub sha: std::string::String,
5649
5650 pub content: std::string::String,
5652
5653 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5654}
5655
5656impl FetchBlobResponse {
5657 pub fn new() -> Self {
5658 std::default::Default::default()
5659 }
5660
5661 pub fn set_sha<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5663 self.sha = v.into();
5664 self
5665 }
5666
5667 pub fn set_content<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5669 self.content = v.into();
5670 self
5671 }
5672}
5673
5674impl wkt::message::Message for FetchBlobResponse {
5675 fn typename() -> &'static str {
5676 "type.googleapis.com/google.cloud.securesourcemanager.v1.FetchBlobResponse"
5677 }
5678}
5679
5680#[derive(Clone, Default, PartialEq)]
5682#[non_exhaustive]
5683pub struct ListPullRequestCommentsRequest {
5684 pub parent: std::string::String,
5687
5688 pub page_size: i32,
5692
5693 pub page_token: std::string::String,
5695
5696 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5697}
5698
5699impl ListPullRequestCommentsRequest {
5700 pub fn new() -> Self {
5701 std::default::Default::default()
5702 }
5703
5704 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5706 self.parent = v.into();
5707 self
5708 }
5709
5710 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
5712 self.page_size = v.into();
5713 self
5714 }
5715
5716 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5718 self.page_token = v.into();
5719 self
5720 }
5721}
5722
5723impl wkt::message::Message for ListPullRequestCommentsRequest {
5724 fn typename() -> &'static str {
5725 "type.googleapis.com/google.cloud.securesourcemanager.v1.ListPullRequestCommentsRequest"
5726 }
5727}
5728
5729#[derive(Clone, Default, PartialEq)]
5731#[non_exhaustive]
5732pub struct ListPullRequestCommentsResponse {
5733 pub pull_request_comments: std::vec::Vec<crate::model::PullRequestComment>,
5735
5736 pub next_page_token: std::string::String,
5739
5740 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5741}
5742
5743impl ListPullRequestCommentsResponse {
5744 pub fn new() -> Self {
5745 std::default::Default::default()
5746 }
5747
5748 pub fn set_pull_request_comments<T, V>(mut self, v: T) -> Self
5750 where
5751 T: std::iter::IntoIterator<Item = V>,
5752 V: std::convert::Into<crate::model::PullRequestComment>,
5753 {
5754 use std::iter::Iterator;
5755 self.pull_request_comments = v.into_iter().map(|i| i.into()).collect();
5756 self
5757 }
5758
5759 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5761 self.next_page_token = v.into();
5762 self
5763 }
5764}
5765
5766impl wkt::message::Message for ListPullRequestCommentsResponse {
5767 fn typename() -> &'static str {
5768 "type.googleapis.com/google.cloud.securesourcemanager.v1.ListPullRequestCommentsResponse"
5769 }
5770}
5771
5772#[doc(hidden)]
5773impl gax::paginator::internal::PageableResponse for ListPullRequestCommentsResponse {
5774 type PageItem = crate::model::PullRequestComment;
5775
5776 fn items(self) -> std::vec::Vec<Self::PageItem> {
5777 self.pull_request_comments
5778 }
5779
5780 fn next_page_token(&self) -> std::string::String {
5781 use std::clone::Clone;
5782 self.next_page_token.clone()
5783 }
5784}
5785
5786#[derive(Clone, Default, PartialEq)]
5788#[non_exhaustive]
5789pub struct CreatePullRequestCommentRequest {
5790 pub parent: std::string::String,
5794
5795 pub pull_request_comment: std::option::Option<crate::model::PullRequestComment>,
5797
5798 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5799}
5800
5801impl CreatePullRequestCommentRequest {
5802 pub fn new() -> Self {
5803 std::default::Default::default()
5804 }
5805
5806 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5808 self.parent = v.into();
5809 self
5810 }
5811
5812 pub fn set_pull_request_comment<T>(mut self, v: T) -> Self
5814 where
5815 T: std::convert::Into<crate::model::PullRequestComment>,
5816 {
5817 self.pull_request_comment = std::option::Option::Some(v.into());
5818 self
5819 }
5820
5821 pub fn set_or_clear_pull_request_comment<T>(mut self, v: std::option::Option<T>) -> Self
5823 where
5824 T: std::convert::Into<crate::model::PullRequestComment>,
5825 {
5826 self.pull_request_comment = v.map(|x| x.into());
5827 self
5828 }
5829}
5830
5831impl wkt::message::Message for CreatePullRequestCommentRequest {
5832 fn typename() -> &'static str {
5833 "type.googleapis.com/google.cloud.securesourcemanager.v1.CreatePullRequestCommentRequest"
5834 }
5835}
5836
5837#[derive(Clone, Default, PartialEq)]
5839#[non_exhaustive]
5840pub struct BatchCreatePullRequestCommentsRequest {
5841 pub parent: std::string::String,
5845
5846 pub requests: std::vec::Vec<crate::model::CreatePullRequestCommentRequest>,
5851
5852 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5853}
5854
5855impl BatchCreatePullRequestCommentsRequest {
5856 pub fn new() -> Self {
5857 std::default::Default::default()
5858 }
5859
5860 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5862 self.parent = v.into();
5863 self
5864 }
5865
5866 pub fn set_requests<T, V>(mut self, v: T) -> Self
5868 where
5869 T: std::iter::IntoIterator<Item = V>,
5870 V: std::convert::Into<crate::model::CreatePullRequestCommentRequest>,
5871 {
5872 use std::iter::Iterator;
5873 self.requests = v.into_iter().map(|i| i.into()).collect();
5874 self
5875 }
5876}
5877
5878impl wkt::message::Message for BatchCreatePullRequestCommentsRequest {
5879 fn typename() -> &'static str {
5880 "type.googleapis.com/google.cloud.securesourcemanager.v1.BatchCreatePullRequestCommentsRequest"
5881 }
5882}
5883
5884#[derive(Clone, Default, PartialEq)]
5886#[non_exhaustive]
5887pub struct BatchCreatePullRequestCommentsResponse {
5888 pub pull_request_comments: std::vec::Vec<crate::model::PullRequestComment>,
5890
5891 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5892}
5893
5894impl BatchCreatePullRequestCommentsResponse {
5895 pub fn new() -> Self {
5896 std::default::Default::default()
5897 }
5898
5899 pub fn set_pull_request_comments<T, V>(mut self, v: T) -> Self
5901 where
5902 T: std::iter::IntoIterator<Item = V>,
5903 V: std::convert::Into<crate::model::PullRequestComment>,
5904 {
5905 use std::iter::Iterator;
5906 self.pull_request_comments = v.into_iter().map(|i| i.into()).collect();
5907 self
5908 }
5909}
5910
5911impl wkt::message::Message for BatchCreatePullRequestCommentsResponse {
5912 fn typename() -> &'static str {
5913 "type.googleapis.com/google.cloud.securesourcemanager.v1.BatchCreatePullRequestCommentsResponse"
5914 }
5915}
5916
5917#[derive(Clone, Default, PartialEq)]
5919#[non_exhaustive]
5920pub struct UpdatePullRequestCommentRequest {
5921 pub pull_request_comment: std::option::Option<crate::model::PullRequestComment>,
5923
5924 pub update_mask: std::option::Option<wkt::FieldMask>,
5928
5929 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5930}
5931
5932impl UpdatePullRequestCommentRequest {
5933 pub fn new() -> Self {
5934 std::default::Default::default()
5935 }
5936
5937 pub fn set_pull_request_comment<T>(mut self, v: T) -> Self
5939 where
5940 T: std::convert::Into<crate::model::PullRequestComment>,
5941 {
5942 self.pull_request_comment = std::option::Option::Some(v.into());
5943 self
5944 }
5945
5946 pub fn set_or_clear_pull_request_comment<T>(mut self, v: std::option::Option<T>) -> Self
5948 where
5949 T: std::convert::Into<crate::model::PullRequestComment>,
5950 {
5951 self.pull_request_comment = v.map(|x| x.into());
5952 self
5953 }
5954
5955 pub fn set_update_mask<T>(mut self, v: T) -> Self
5957 where
5958 T: std::convert::Into<wkt::FieldMask>,
5959 {
5960 self.update_mask = std::option::Option::Some(v.into());
5961 self
5962 }
5963
5964 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
5966 where
5967 T: std::convert::Into<wkt::FieldMask>,
5968 {
5969 self.update_mask = v.map(|x| x.into());
5970 self
5971 }
5972}
5973
5974impl wkt::message::Message for UpdatePullRequestCommentRequest {
5975 fn typename() -> &'static str {
5976 "type.googleapis.com/google.cloud.securesourcemanager.v1.UpdatePullRequestCommentRequest"
5977 }
5978}
5979
5980#[derive(Clone, Default, PartialEq)]
5983#[non_exhaustive]
5984pub struct DeletePullRequestCommentRequest {
5985 pub name: std::string::String,
5989
5990 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5991}
5992
5993impl DeletePullRequestCommentRequest {
5994 pub fn new() -> Self {
5995 std::default::Default::default()
5996 }
5997
5998 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6000 self.name = v.into();
6001 self
6002 }
6003}
6004
6005impl wkt::message::Message for DeletePullRequestCommentRequest {
6006 fn typename() -> &'static str {
6007 "type.googleapis.com/google.cloud.securesourcemanager.v1.DeletePullRequestCommentRequest"
6008 }
6009}
6010
6011#[derive(Clone, Default, PartialEq)]
6013#[non_exhaustive]
6014pub struct GetPullRequestCommentRequest {
6015 pub name: std::string::String,
6019
6020 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6021}
6022
6023impl GetPullRequestCommentRequest {
6024 pub fn new() -> Self {
6025 std::default::Default::default()
6026 }
6027
6028 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6030 self.name = v.into();
6031 self
6032 }
6033}
6034
6035impl wkt::message::Message for GetPullRequestCommentRequest {
6036 fn typename() -> &'static str {
6037 "type.googleapis.com/google.cloud.securesourcemanager.v1.GetPullRequestCommentRequest"
6038 }
6039}
6040
6041#[derive(Clone, Default, PartialEq)]
6043#[non_exhaustive]
6044pub struct ResolvePullRequestCommentsRequest {
6045 pub parent: std::string::String,
6049
6050 pub names: std::vec::Vec<std::string::String>,
6054
6055 pub auto_fill: bool,
6059
6060 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6061}
6062
6063impl ResolvePullRequestCommentsRequest {
6064 pub fn new() -> Self {
6065 std::default::Default::default()
6066 }
6067
6068 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6070 self.parent = v.into();
6071 self
6072 }
6073
6074 pub fn set_names<T, V>(mut self, v: T) -> Self
6076 where
6077 T: std::iter::IntoIterator<Item = V>,
6078 V: std::convert::Into<std::string::String>,
6079 {
6080 use std::iter::Iterator;
6081 self.names = v.into_iter().map(|i| i.into()).collect();
6082 self
6083 }
6084
6085 pub fn set_auto_fill<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6087 self.auto_fill = v.into();
6088 self
6089 }
6090}
6091
6092impl wkt::message::Message for ResolvePullRequestCommentsRequest {
6093 fn typename() -> &'static str {
6094 "type.googleapis.com/google.cloud.securesourcemanager.v1.ResolvePullRequestCommentsRequest"
6095 }
6096}
6097
6098#[derive(Clone, Default, PartialEq)]
6100#[non_exhaustive]
6101pub struct ResolvePullRequestCommentsResponse {
6102 pub pull_request_comments: std::vec::Vec<crate::model::PullRequestComment>,
6104
6105 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6106}
6107
6108impl ResolvePullRequestCommentsResponse {
6109 pub fn new() -> Self {
6110 std::default::Default::default()
6111 }
6112
6113 pub fn set_pull_request_comments<T, V>(mut self, v: T) -> Self
6115 where
6116 T: std::iter::IntoIterator<Item = V>,
6117 V: std::convert::Into<crate::model::PullRequestComment>,
6118 {
6119 use std::iter::Iterator;
6120 self.pull_request_comments = v.into_iter().map(|i| i.into()).collect();
6121 self
6122 }
6123}
6124
6125impl wkt::message::Message for ResolvePullRequestCommentsResponse {
6126 fn typename() -> &'static str {
6127 "type.googleapis.com/google.cloud.securesourcemanager.v1.ResolvePullRequestCommentsResponse"
6128 }
6129}
6130
6131#[derive(Clone, Default, PartialEq)]
6133#[non_exhaustive]
6134pub struct UnresolvePullRequestCommentsRequest {
6135 pub parent: std::string::String,
6139
6140 pub names: std::vec::Vec<std::string::String>,
6144
6145 pub auto_fill: bool,
6149
6150 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6151}
6152
6153impl UnresolvePullRequestCommentsRequest {
6154 pub fn new() -> Self {
6155 std::default::Default::default()
6156 }
6157
6158 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6160 self.parent = v.into();
6161 self
6162 }
6163
6164 pub fn set_names<T, V>(mut self, v: T) -> Self
6166 where
6167 T: std::iter::IntoIterator<Item = V>,
6168 V: std::convert::Into<std::string::String>,
6169 {
6170 use std::iter::Iterator;
6171 self.names = v.into_iter().map(|i| i.into()).collect();
6172 self
6173 }
6174
6175 pub fn set_auto_fill<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6177 self.auto_fill = v.into();
6178 self
6179 }
6180}
6181
6182impl wkt::message::Message for UnresolvePullRequestCommentsRequest {
6183 fn typename() -> &'static str {
6184 "type.googleapis.com/google.cloud.securesourcemanager.v1.UnresolvePullRequestCommentsRequest"
6185 }
6186}
6187
6188#[derive(Clone, Default, PartialEq)]
6190#[non_exhaustive]
6191pub struct UnresolvePullRequestCommentsResponse {
6192 pub pull_request_comments: std::vec::Vec<crate::model::PullRequestComment>,
6194
6195 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6196}
6197
6198impl UnresolvePullRequestCommentsResponse {
6199 pub fn new() -> Self {
6200 std::default::Default::default()
6201 }
6202
6203 pub fn set_pull_request_comments<T, V>(mut self, v: T) -> Self
6205 where
6206 T: std::iter::IntoIterator<Item = V>,
6207 V: std::convert::Into<crate::model::PullRequestComment>,
6208 {
6209 use std::iter::Iterator;
6210 self.pull_request_comments = v.into_iter().map(|i| i.into()).collect();
6211 self
6212 }
6213}
6214
6215impl wkt::message::Message for UnresolvePullRequestCommentsResponse {
6216 fn typename() -> &'static str {
6217 "type.googleapis.com/google.cloud.securesourcemanager.v1.UnresolvePullRequestCommentsResponse"
6218 }
6219}
6220
6221#[derive(Clone, Default, PartialEq)]
6223#[non_exhaustive]
6224pub struct CreateIssueCommentRequest {
6225 pub parent: std::string::String,
6228
6229 pub issue_comment: std::option::Option<crate::model::IssueComment>,
6231
6232 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6233}
6234
6235impl CreateIssueCommentRequest {
6236 pub fn new() -> Self {
6237 std::default::Default::default()
6238 }
6239
6240 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6242 self.parent = v.into();
6243 self
6244 }
6245
6246 pub fn set_issue_comment<T>(mut self, v: T) -> Self
6248 where
6249 T: std::convert::Into<crate::model::IssueComment>,
6250 {
6251 self.issue_comment = std::option::Option::Some(v.into());
6252 self
6253 }
6254
6255 pub fn set_or_clear_issue_comment<T>(mut self, v: std::option::Option<T>) -> Self
6257 where
6258 T: std::convert::Into<crate::model::IssueComment>,
6259 {
6260 self.issue_comment = v.map(|x| x.into());
6261 self
6262 }
6263}
6264
6265impl wkt::message::Message for CreateIssueCommentRequest {
6266 fn typename() -> &'static str {
6267 "type.googleapis.com/google.cloud.securesourcemanager.v1.CreateIssueCommentRequest"
6268 }
6269}
6270
6271#[derive(Clone, Default, PartialEq)]
6273#[non_exhaustive]
6274pub struct GetIssueCommentRequest {
6275 pub name: std::string::String,
6279
6280 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6281}
6282
6283impl GetIssueCommentRequest {
6284 pub fn new() -> Self {
6285 std::default::Default::default()
6286 }
6287
6288 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6290 self.name = v.into();
6291 self
6292 }
6293}
6294
6295impl wkt::message::Message for GetIssueCommentRequest {
6296 fn typename() -> &'static str {
6297 "type.googleapis.com/google.cloud.securesourcemanager.v1.GetIssueCommentRequest"
6298 }
6299}
6300
6301#[derive(Clone, Default, PartialEq)]
6303#[non_exhaustive]
6304pub struct ListIssueCommentsRequest {
6305 pub parent: std::string::String,
6308
6309 pub page_size: i32,
6312
6313 pub page_token: std::string::String,
6315
6316 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6317}
6318
6319impl ListIssueCommentsRequest {
6320 pub fn new() -> Self {
6321 std::default::Default::default()
6322 }
6323
6324 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6326 self.parent = v.into();
6327 self
6328 }
6329
6330 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6332 self.page_size = v.into();
6333 self
6334 }
6335
6336 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6338 self.page_token = v.into();
6339 self
6340 }
6341}
6342
6343impl wkt::message::Message for ListIssueCommentsRequest {
6344 fn typename() -> &'static str {
6345 "type.googleapis.com/google.cloud.securesourcemanager.v1.ListIssueCommentsRequest"
6346 }
6347}
6348
6349#[derive(Clone, Default, PartialEq)]
6351#[non_exhaustive]
6352pub struct ListIssueCommentsResponse {
6353 pub issue_comments: std::vec::Vec<crate::model::IssueComment>,
6355
6356 pub next_page_token: std::string::String,
6358
6359 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6360}
6361
6362impl ListIssueCommentsResponse {
6363 pub fn new() -> Self {
6364 std::default::Default::default()
6365 }
6366
6367 pub fn set_issue_comments<T, V>(mut self, v: T) -> Self
6369 where
6370 T: std::iter::IntoIterator<Item = V>,
6371 V: std::convert::Into<crate::model::IssueComment>,
6372 {
6373 use std::iter::Iterator;
6374 self.issue_comments = v.into_iter().map(|i| i.into()).collect();
6375 self
6376 }
6377
6378 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6380 self.next_page_token = v.into();
6381 self
6382 }
6383}
6384
6385impl wkt::message::Message for ListIssueCommentsResponse {
6386 fn typename() -> &'static str {
6387 "type.googleapis.com/google.cloud.securesourcemanager.v1.ListIssueCommentsResponse"
6388 }
6389}
6390
6391#[doc(hidden)]
6392impl gax::paginator::internal::PageableResponse for ListIssueCommentsResponse {
6393 type PageItem = crate::model::IssueComment;
6394
6395 fn items(self) -> std::vec::Vec<Self::PageItem> {
6396 self.issue_comments
6397 }
6398
6399 fn next_page_token(&self) -> std::string::String {
6400 use std::clone::Clone;
6401 self.next_page_token.clone()
6402 }
6403}
6404
6405#[derive(Clone, Default, PartialEq)]
6407#[non_exhaustive]
6408pub struct UpdateIssueCommentRequest {
6409 pub issue_comment: std::option::Option<crate::model::IssueComment>,
6411
6412 pub update_mask: std::option::Option<wkt::FieldMask>,
6418
6419 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6420}
6421
6422impl UpdateIssueCommentRequest {
6423 pub fn new() -> Self {
6424 std::default::Default::default()
6425 }
6426
6427 pub fn set_issue_comment<T>(mut self, v: T) -> Self
6429 where
6430 T: std::convert::Into<crate::model::IssueComment>,
6431 {
6432 self.issue_comment = std::option::Option::Some(v.into());
6433 self
6434 }
6435
6436 pub fn set_or_clear_issue_comment<T>(mut self, v: std::option::Option<T>) -> Self
6438 where
6439 T: std::convert::Into<crate::model::IssueComment>,
6440 {
6441 self.issue_comment = v.map(|x| x.into());
6442 self
6443 }
6444
6445 pub fn set_update_mask<T>(mut self, v: T) -> Self
6447 where
6448 T: std::convert::Into<wkt::FieldMask>,
6449 {
6450 self.update_mask = std::option::Option::Some(v.into());
6451 self
6452 }
6453
6454 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
6456 where
6457 T: std::convert::Into<wkt::FieldMask>,
6458 {
6459 self.update_mask = v.map(|x| x.into());
6460 self
6461 }
6462}
6463
6464impl wkt::message::Message for UpdateIssueCommentRequest {
6465 fn typename() -> &'static str {
6466 "type.googleapis.com/google.cloud.securesourcemanager.v1.UpdateIssueCommentRequest"
6467 }
6468}
6469
6470#[derive(Clone, Default, PartialEq)]
6472#[non_exhaustive]
6473pub struct DeleteIssueCommentRequest {
6474 pub name: std::string::String,
6478
6479 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6480}
6481
6482impl DeleteIssueCommentRequest {
6483 pub fn new() -> Self {
6484 std::default::Default::default()
6485 }
6486
6487 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6489 self.name = v.into();
6490 self
6491 }
6492}
6493
6494impl wkt::message::Message for DeleteIssueCommentRequest {
6495 fn typename() -> &'static str {
6496 "type.googleapis.com/google.cloud.securesourcemanager.v1.DeleteIssueCommentRequest"
6497 }
6498}