1#![allow(rustdoc::redundant_explicit_links)]
18#![allow(rustdoc::broken_intra_doc_links)]
19#![no_implicit_prelude]
20extern crate api;
21extern crate async_trait;
22extern crate bytes;
23extern crate gax;
24extern crate gaxi;
25extern crate iam_v1;
26extern crate lazy_static;
27extern crate longrunning;
28extern crate lro;
29extern crate reqwest;
30extern crate serde;
31extern crate serde_json;
32extern crate serde_with;
33extern crate std;
34extern crate tracing;
35extern crate wkt;
36
37#[derive(Clone, Default, PartialEq)]
39#[non_exhaustive]
40pub struct OperationMetadata {
41 pub create_time: std::option::Option<wkt::Timestamp>,
43
44 pub end_time: std::option::Option<wkt::Timestamp>,
46
47 pub target: std::string::String,
49
50 pub verb: std::string::String,
52
53 pub status_message: std::string::String,
55
56 pub requested_cancellation: bool,
64
65 pub api_version: std::string::String,
67
68 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
69}
70
71impl OperationMetadata {
72 pub fn new() -> Self {
73 std::default::Default::default()
74 }
75
76 pub fn set_create_time<T>(mut self, v: T) -> Self
78 where
79 T: std::convert::Into<wkt::Timestamp>,
80 {
81 self.create_time = std::option::Option::Some(v.into());
82 self
83 }
84
85 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
87 where
88 T: std::convert::Into<wkt::Timestamp>,
89 {
90 self.create_time = v.map(|x| x.into());
91 self
92 }
93
94 pub fn set_end_time<T>(mut self, v: T) -> Self
96 where
97 T: std::convert::Into<wkt::Timestamp>,
98 {
99 self.end_time = std::option::Option::Some(v.into());
100 self
101 }
102
103 pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
105 where
106 T: std::convert::Into<wkt::Timestamp>,
107 {
108 self.end_time = v.map(|x| x.into());
109 self
110 }
111
112 pub fn set_target<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
114 self.target = v.into();
115 self
116 }
117
118 pub fn set_verb<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
120 self.verb = v.into();
121 self
122 }
123
124 pub fn set_status_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
126 self.status_message = v.into();
127 self
128 }
129
130 pub fn set_requested_cancellation<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
132 self.requested_cancellation = v.into();
133 self
134 }
135
136 pub fn set_api_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
138 self.api_version = v.into();
139 self
140 }
141}
142
143impl wkt::message::Message for OperationMetadata {
144 fn typename() -> &'static str {
145 "type.googleapis.com/google.devtools.cloudbuild.v2.OperationMetadata"
146 }
147}
148
149#[doc(hidden)]
150impl<'de> serde::de::Deserialize<'de> for OperationMetadata {
151 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
152 where
153 D: serde::Deserializer<'de>,
154 {
155 #[allow(non_camel_case_types)]
156 #[doc(hidden)]
157 #[derive(PartialEq, Eq, Hash)]
158 enum __FieldTag {
159 __create_time,
160 __end_time,
161 __target,
162 __verb,
163 __status_message,
164 __requested_cancellation,
165 __api_version,
166 Unknown(std::string::String),
167 }
168 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
169 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
170 where
171 D: serde::Deserializer<'de>,
172 {
173 struct Visitor;
174 impl<'de> serde::de::Visitor<'de> for Visitor {
175 type Value = __FieldTag;
176 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
177 formatter.write_str("a field name for OperationMetadata")
178 }
179 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
180 where
181 E: serde::de::Error,
182 {
183 use std::result::Result::Ok;
184 use std::string::ToString;
185 match value {
186 "createTime" => Ok(__FieldTag::__create_time),
187 "create_time" => Ok(__FieldTag::__create_time),
188 "endTime" => Ok(__FieldTag::__end_time),
189 "end_time" => Ok(__FieldTag::__end_time),
190 "target" => Ok(__FieldTag::__target),
191 "verb" => Ok(__FieldTag::__verb),
192 "statusMessage" => Ok(__FieldTag::__status_message),
193 "status_message" => Ok(__FieldTag::__status_message),
194 "requestedCancellation" => Ok(__FieldTag::__requested_cancellation),
195 "requested_cancellation" => Ok(__FieldTag::__requested_cancellation),
196 "apiVersion" => Ok(__FieldTag::__api_version),
197 "api_version" => Ok(__FieldTag::__api_version),
198 _ => Ok(__FieldTag::Unknown(value.to_string())),
199 }
200 }
201 }
202 deserializer.deserialize_identifier(Visitor)
203 }
204 }
205 struct Visitor;
206 impl<'de> serde::de::Visitor<'de> for Visitor {
207 type Value = OperationMetadata;
208 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
209 formatter.write_str("struct OperationMetadata")
210 }
211 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
212 where
213 A: serde::de::MapAccess<'de>,
214 {
215 #[allow(unused_imports)]
216 use serde::de::Error;
217 use std::option::Option::Some;
218 let mut fields = std::collections::HashSet::new();
219 let mut result = Self::Value::new();
220 while let Some(tag) = map.next_key::<__FieldTag>()? {
221 #[allow(clippy::match_single_binding)]
222 match tag {
223 __FieldTag::__create_time => {
224 if !fields.insert(__FieldTag::__create_time) {
225 return std::result::Result::Err(A::Error::duplicate_field(
226 "multiple values for create_time",
227 ));
228 }
229 result.create_time =
230 map.next_value::<std::option::Option<wkt::Timestamp>>()?;
231 }
232 __FieldTag::__end_time => {
233 if !fields.insert(__FieldTag::__end_time) {
234 return std::result::Result::Err(A::Error::duplicate_field(
235 "multiple values for end_time",
236 ));
237 }
238 result.end_time =
239 map.next_value::<std::option::Option<wkt::Timestamp>>()?;
240 }
241 __FieldTag::__target => {
242 if !fields.insert(__FieldTag::__target) {
243 return std::result::Result::Err(A::Error::duplicate_field(
244 "multiple values for target",
245 ));
246 }
247 result.target = map
248 .next_value::<std::option::Option<std::string::String>>()?
249 .unwrap_or_default();
250 }
251 __FieldTag::__verb => {
252 if !fields.insert(__FieldTag::__verb) {
253 return std::result::Result::Err(A::Error::duplicate_field(
254 "multiple values for verb",
255 ));
256 }
257 result.verb = map
258 .next_value::<std::option::Option<std::string::String>>()?
259 .unwrap_or_default();
260 }
261 __FieldTag::__status_message => {
262 if !fields.insert(__FieldTag::__status_message) {
263 return std::result::Result::Err(A::Error::duplicate_field(
264 "multiple values for status_message",
265 ));
266 }
267 result.status_message = map
268 .next_value::<std::option::Option<std::string::String>>()?
269 .unwrap_or_default();
270 }
271 __FieldTag::__requested_cancellation => {
272 if !fields.insert(__FieldTag::__requested_cancellation) {
273 return std::result::Result::Err(A::Error::duplicate_field(
274 "multiple values for requested_cancellation",
275 ));
276 }
277 result.requested_cancellation = map
278 .next_value::<std::option::Option<bool>>()?
279 .unwrap_or_default();
280 }
281 __FieldTag::__api_version => {
282 if !fields.insert(__FieldTag::__api_version) {
283 return std::result::Result::Err(A::Error::duplicate_field(
284 "multiple values for api_version",
285 ));
286 }
287 result.api_version = map
288 .next_value::<std::option::Option<std::string::String>>()?
289 .unwrap_or_default();
290 }
291 __FieldTag::Unknown(key) => {
292 let value = map.next_value::<serde_json::Value>()?;
293 result._unknown_fields.insert(key, value);
294 }
295 }
296 }
297 std::result::Result::Ok(result)
298 }
299 }
300 deserializer.deserialize_any(Visitor)
301 }
302}
303
304#[doc(hidden)]
305impl serde::ser::Serialize for OperationMetadata {
306 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
307 where
308 S: serde::ser::Serializer,
309 {
310 use serde::ser::SerializeMap;
311 #[allow(unused_imports)]
312 use std::option::Option::Some;
313 let mut state = serializer.serialize_map(std::option::Option::None)?;
314 if self.create_time.is_some() {
315 state.serialize_entry("createTime", &self.create_time)?;
316 }
317 if self.end_time.is_some() {
318 state.serialize_entry("endTime", &self.end_time)?;
319 }
320 if !self.target.is_empty() {
321 state.serialize_entry("target", &self.target)?;
322 }
323 if !self.verb.is_empty() {
324 state.serialize_entry("verb", &self.verb)?;
325 }
326 if !self.status_message.is_empty() {
327 state.serialize_entry("statusMessage", &self.status_message)?;
328 }
329 if !wkt::internal::is_default(&self.requested_cancellation) {
330 state.serialize_entry("requestedCancellation", &self.requested_cancellation)?;
331 }
332 if !self.api_version.is_empty() {
333 state.serialize_entry("apiVersion", &self.api_version)?;
334 }
335 if !self._unknown_fields.is_empty() {
336 for (key, value) in self._unknown_fields.iter() {
337 state.serialize_entry(key, &value)?;
338 }
339 }
340 state.end()
341 }
342}
343
344impl std::fmt::Debug for OperationMetadata {
345 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
346 let mut debug_struct = f.debug_struct("OperationMetadata");
347 debug_struct.field("create_time", &self.create_time);
348 debug_struct.field("end_time", &self.end_time);
349 debug_struct.field("target", &self.target);
350 debug_struct.field("verb", &self.verb);
351 debug_struct.field("status_message", &self.status_message);
352 debug_struct.field("requested_cancellation", &self.requested_cancellation);
353 debug_struct.field("api_version", &self.api_version);
354 if !self._unknown_fields.is_empty() {
355 debug_struct.field("_unknown_fields", &self._unknown_fields);
356 }
357 debug_struct.finish()
358 }
359}
360
361#[derive(Clone, Default, PartialEq)]
363#[non_exhaustive]
364pub struct RunWorkflowCustomOperationMetadata {
365 pub create_time: std::option::Option<wkt::Timestamp>,
367
368 pub end_time: std::option::Option<wkt::Timestamp>,
370
371 pub verb: std::string::String,
373
374 pub requested_cancellation: bool,
382
383 pub api_version: std::string::String,
385
386 pub target: std::string::String,
388
389 pub pipeline_run_id: std::string::String,
391
392 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
393}
394
395impl RunWorkflowCustomOperationMetadata {
396 pub fn new() -> Self {
397 std::default::Default::default()
398 }
399
400 pub fn set_create_time<T>(mut self, v: T) -> Self
402 where
403 T: std::convert::Into<wkt::Timestamp>,
404 {
405 self.create_time = std::option::Option::Some(v.into());
406 self
407 }
408
409 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
411 where
412 T: std::convert::Into<wkt::Timestamp>,
413 {
414 self.create_time = v.map(|x| x.into());
415 self
416 }
417
418 pub fn set_end_time<T>(mut self, v: T) -> Self
420 where
421 T: std::convert::Into<wkt::Timestamp>,
422 {
423 self.end_time = std::option::Option::Some(v.into());
424 self
425 }
426
427 pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
429 where
430 T: std::convert::Into<wkt::Timestamp>,
431 {
432 self.end_time = v.map(|x| x.into());
433 self
434 }
435
436 pub fn set_verb<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
438 self.verb = v.into();
439 self
440 }
441
442 pub fn set_requested_cancellation<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
444 self.requested_cancellation = v.into();
445 self
446 }
447
448 pub fn set_api_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
450 self.api_version = v.into();
451 self
452 }
453
454 pub fn set_target<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
456 self.target = v.into();
457 self
458 }
459
460 pub fn set_pipeline_run_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
462 self.pipeline_run_id = v.into();
463 self
464 }
465}
466
467impl wkt::message::Message for RunWorkflowCustomOperationMetadata {
468 fn typename() -> &'static str {
469 "type.googleapis.com/google.devtools.cloudbuild.v2.RunWorkflowCustomOperationMetadata"
470 }
471}
472
473#[doc(hidden)]
474impl<'de> serde::de::Deserialize<'de> for RunWorkflowCustomOperationMetadata {
475 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
476 where
477 D: serde::Deserializer<'de>,
478 {
479 #[allow(non_camel_case_types)]
480 #[doc(hidden)]
481 #[derive(PartialEq, Eq, Hash)]
482 enum __FieldTag {
483 __create_time,
484 __end_time,
485 __verb,
486 __requested_cancellation,
487 __api_version,
488 __target,
489 __pipeline_run_id,
490 Unknown(std::string::String),
491 }
492 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
493 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
494 where
495 D: serde::Deserializer<'de>,
496 {
497 struct Visitor;
498 impl<'de> serde::de::Visitor<'de> for Visitor {
499 type Value = __FieldTag;
500 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
501 formatter.write_str("a field name for RunWorkflowCustomOperationMetadata")
502 }
503 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
504 where
505 E: serde::de::Error,
506 {
507 use std::result::Result::Ok;
508 use std::string::ToString;
509 match value {
510 "createTime" => Ok(__FieldTag::__create_time),
511 "create_time" => Ok(__FieldTag::__create_time),
512 "endTime" => Ok(__FieldTag::__end_time),
513 "end_time" => Ok(__FieldTag::__end_time),
514 "verb" => Ok(__FieldTag::__verb),
515 "requestedCancellation" => Ok(__FieldTag::__requested_cancellation),
516 "requested_cancellation" => Ok(__FieldTag::__requested_cancellation),
517 "apiVersion" => Ok(__FieldTag::__api_version),
518 "api_version" => Ok(__FieldTag::__api_version),
519 "target" => Ok(__FieldTag::__target),
520 "pipelineRunId" => Ok(__FieldTag::__pipeline_run_id),
521 "pipeline_run_id" => Ok(__FieldTag::__pipeline_run_id),
522 _ => Ok(__FieldTag::Unknown(value.to_string())),
523 }
524 }
525 }
526 deserializer.deserialize_identifier(Visitor)
527 }
528 }
529 struct Visitor;
530 impl<'de> serde::de::Visitor<'de> for Visitor {
531 type Value = RunWorkflowCustomOperationMetadata;
532 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
533 formatter.write_str("struct RunWorkflowCustomOperationMetadata")
534 }
535 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
536 where
537 A: serde::de::MapAccess<'de>,
538 {
539 #[allow(unused_imports)]
540 use serde::de::Error;
541 use std::option::Option::Some;
542 let mut fields = std::collections::HashSet::new();
543 let mut result = Self::Value::new();
544 while let Some(tag) = map.next_key::<__FieldTag>()? {
545 #[allow(clippy::match_single_binding)]
546 match tag {
547 __FieldTag::__create_time => {
548 if !fields.insert(__FieldTag::__create_time) {
549 return std::result::Result::Err(A::Error::duplicate_field(
550 "multiple values for create_time",
551 ));
552 }
553 result.create_time =
554 map.next_value::<std::option::Option<wkt::Timestamp>>()?;
555 }
556 __FieldTag::__end_time => {
557 if !fields.insert(__FieldTag::__end_time) {
558 return std::result::Result::Err(A::Error::duplicate_field(
559 "multiple values for end_time",
560 ));
561 }
562 result.end_time =
563 map.next_value::<std::option::Option<wkt::Timestamp>>()?;
564 }
565 __FieldTag::__verb => {
566 if !fields.insert(__FieldTag::__verb) {
567 return std::result::Result::Err(A::Error::duplicate_field(
568 "multiple values for verb",
569 ));
570 }
571 result.verb = map
572 .next_value::<std::option::Option<std::string::String>>()?
573 .unwrap_or_default();
574 }
575 __FieldTag::__requested_cancellation => {
576 if !fields.insert(__FieldTag::__requested_cancellation) {
577 return std::result::Result::Err(A::Error::duplicate_field(
578 "multiple values for requested_cancellation",
579 ));
580 }
581 result.requested_cancellation = map
582 .next_value::<std::option::Option<bool>>()?
583 .unwrap_or_default();
584 }
585 __FieldTag::__api_version => {
586 if !fields.insert(__FieldTag::__api_version) {
587 return std::result::Result::Err(A::Error::duplicate_field(
588 "multiple values for api_version",
589 ));
590 }
591 result.api_version = map
592 .next_value::<std::option::Option<std::string::String>>()?
593 .unwrap_or_default();
594 }
595 __FieldTag::__target => {
596 if !fields.insert(__FieldTag::__target) {
597 return std::result::Result::Err(A::Error::duplicate_field(
598 "multiple values for target",
599 ));
600 }
601 result.target = map
602 .next_value::<std::option::Option<std::string::String>>()?
603 .unwrap_or_default();
604 }
605 __FieldTag::__pipeline_run_id => {
606 if !fields.insert(__FieldTag::__pipeline_run_id) {
607 return std::result::Result::Err(A::Error::duplicate_field(
608 "multiple values for pipeline_run_id",
609 ));
610 }
611 result.pipeline_run_id = map
612 .next_value::<std::option::Option<std::string::String>>()?
613 .unwrap_or_default();
614 }
615 __FieldTag::Unknown(key) => {
616 let value = map.next_value::<serde_json::Value>()?;
617 result._unknown_fields.insert(key, value);
618 }
619 }
620 }
621 std::result::Result::Ok(result)
622 }
623 }
624 deserializer.deserialize_any(Visitor)
625 }
626}
627
628#[doc(hidden)]
629impl serde::ser::Serialize for RunWorkflowCustomOperationMetadata {
630 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
631 where
632 S: serde::ser::Serializer,
633 {
634 use serde::ser::SerializeMap;
635 #[allow(unused_imports)]
636 use std::option::Option::Some;
637 let mut state = serializer.serialize_map(std::option::Option::None)?;
638 if self.create_time.is_some() {
639 state.serialize_entry("createTime", &self.create_time)?;
640 }
641 if self.end_time.is_some() {
642 state.serialize_entry("endTime", &self.end_time)?;
643 }
644 if !self.verb.is_empty() {
645 state.serialize_entry("verb", &self.verb)?;
646 }
647 if !wkt::internal::is_default(&self.requested_cancellation) {
648 state.serialize_entry("requestedCancellation", &self.requested_cancellation)?;
649 }
650 if !self.api_version.is_empty() {
651 state.serialize_entry("apiVersion", &self.api_version)?;
652 }
653 if !self.target.is_empty() {
654 state.serialize_entry("target", &self.target)?;
655 }
656 if !self.pipeline_run_id.is_empty() {
657 state.serialize_entry("pipelineRunId", &self.pipeline_run_id)?;
658 }
659 if !self._unknown_fields.is_empty() {
660 for (key, value) in self._unknown_fields.iter() {
661 state.serialize_entry(key, &value)?;
662 }
663 }
664 state.end()
665 }
666}
667
668impl std::fmt::Debug for RunWorkflowCustomOperationMetadata {
669 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
670 let mut debug_struct = f.debug_struct("RunWorkflowCustomOperationMetadata");
671 debug_struct.field("create_time", &self.create_time);
672 debug_struct.field("end_time", &self.end_time);
673 debug_struct.field("verb", &self.verb);
674 debug_struct.field("requested_cancellation", &self.requested_cancellation);
675 debug_struct.field("api_version", &self.api_version);
676 debug_struct.field("target", &self.target);
677 debug_struct.field("pipeline_run_id", &self.pipeline_run_id);
678 if !self._unknown_fields.is_empty() {
679 debug_struct.field("_unknown_fields", &self._unknown_fields);
680 }
681 debug_struct.finish()
682 }
683}
684
685#[derive(Clone, Default, PartialEq)]
688#[non_exhaustive]
689pub struct Connection {
690 pub name: std::string::String,
693
694 pub create_time: std::option::Option<wkt::Timestamp>,
696
697 pub update_time: std::option::Option<wkt::Timestamp>,
699
700 pub installation_state: std::option::Option<crate::model::InstallationState>,
702
703 pub disabled: bool,
707
708 pub reconciling: bool,
711
712 pub annotations: std::collections::HashMap<std::string::String, std::string::String>,
714
715 pub etag: std::string::String,
719
720 pub connection_config: std::option::Option<crate::model::connection::ConnectionConfig>,
722
723 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
724}
725
726impl Connection {
727 pub fn new() -> Self {
728 std::default::Default::default()
729 }
730
731 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
733 self.name = v.into();
734 self
735 }
736
737 pub fn set_create_time<T>(mut self, v: T) -> Self
739 where
740 T: std::convert::Into<wkt::Timestamp>,
741 {
742 self.create_time = std::option::Option::Some(v.into());
743 self
744 }
745
746 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
748 where
749 T: std::convert::Into<wkt::Timestamp>,
750 {
751 self.create_time = v.map(|x| x.into());
752 self
753 }
754
755 pub fn set_update_time<T>(mut self, v: T) -> Self
757 where
758 T: std::convert::Into<wkt::Timestamp>,
759 {
760 self.update_time = std::option::Option::Some(v.into());
761 self
762 }
763
764 pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
766 where
767 T: std::convert::Into<wkt::Timestamp>,
768 {
769 self.update_time = v.map(|x| x.into());
770 self
771 }
772
773 pub fn set_installation_state<T>(mut self, v: T) -> Self
775 where
776 T: std::convert::Into<crate::model::InstallationState>,
777 {
778 self.installation_state = std::option::Option::Some(v.into());
779 self
780 }
781
782 pub fn set_or_clear_installation_state<T>(mut self, v: std::option::Option<T>) -> Self
784 where
785 T: std::convert::Into<crate::model::InstallationState>,
786 {
787 self.installation_state = v.map(|x| x.into());
788 self
789 }
790
791 pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
793 self.disabled = v.into();
794 self
795 }
796
797 pub fn set_reconciling<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
799 self.reconciling = v.into();
800 self
801 }
802
803 pub fn set_annotations<T, K, V>(mut self, v: T) -> Self
805 where
806 T: std::iter::IntoIterator<Item = (K, V)>,
807 K: std::convert::Into<std::string::String>,
808 V: std::convert::Into<std::string::String>,
809 {
810 use std::iter::Iterator;
811 self.annotations = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
812 self
813 }
814
815 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
817 self.etag = v.into();
818 self
819 }
820
821 pub fn set_connection_config<
826 T: std::convert::Into<std::option::Option<crate::model::connection::ConnectionConfig>>,
827 >(
828 mut self,
829 v: T,
830 ) -> Self {
831 self.connection_config = v.into();
832 self
833 }
834
835 pub fn github_config(
839 &self,
840 ) -> std::option::Option<&std::boxed::Box<crate::model::GitHubConfig>> {
841 #[allow(unreachable_patterns)]
842 self.connection_config.as_ref().and_then(|v| match v {
843 crate::model::connection::ConnectionConfig::GithubConfig(v) => {
844 std::option::Option::Some(v)
845 }
846 _ => std::option::Option::None,
847 })
848 }
849
850 pub fn set_github_config<T: std::convert::Into<std::boxed::Box<crate::model::GitHubConfig>>>(
856 mut self,
857 v: T,
858 ) -> Self {
859 self.connection_config = std::option::Option::Some(
860 crate::model::connection::ConnectionConfig::GithubConfig(v.into()),
861 );
862 self
863 }
864
865 pub fn github_enterprise_config(
869 &self,
870 ) -> std::option::Option<&std::boxed::Box<crate::model::GitHubEnterpriseConfig>> {
871 #[allow(unreachable_patterns)]
872 self.connection_config.as_ref().and_then(|v| match v {
873 crate::model::connection::ConnectionConfig::GithubEnterpriseConfig(v) => {
874 std::option::Option::Some(v)
875 }
876 _ => std::option::Option::None,
877 })
878 }
879
880 pub fn set_github_enterprise_config<
886 T: std::convert::Into<std::boxed::Box<crate::model::GitHubEnterpriseConfig>>,
887 >(
888 mut self,
889 v: T,
890 ) -> Self {
891 self.connection_config = std::option::Option::Some(
892 crate::model::connection::ConnectionConfig::GithubEnterpriseConfig(v.into()),
893 );
894 self
895 }
896
897 pub fn gitlab_config(
901 &self,
902 ) -> std::option::Option<&std::boxed::Box<crate::model::GitLabConfig>> {
903 #[allow(unreachable_patterns)]
904 self.connection_config.as_ref().and_then(|v| match v {
905 crate::model::connection::ConnectionConfig::GitlabConfig(v) => {
906 std::option::Option::Some(v)
907 }
908 _ => std::option::Option::None,
909 })
910 }
911
912 pub fn set_gitlab_config<T: std::convert::Into<std::boxed::Box<crate::model::GitLabConfig>>>(
918 mut self,
919 v: T,
920 ) -> Self {
921 self.connection_config = std::option::Option::Some(
922 crate::model::connection::ConnectionConfig::GitlabConfig(v.into()),
923 );
924 self
925 }
926
927 pub fn bitbucket_data_center_config(
931 &self,
932 ) -> std::option::Option<&std::boxed::Box<crate::model::BitbucketDataCenterConfig>> {
933 #[allow(unreachable_patterns)]
934 self.connection_config.as_ref().and_then(|v| match v {
935 crate::model::connection::ConnectionConfig::BitbucketDataCenterConfig(v) => {
936 std::option::Option::Some(v)
937 }
938 _ => std::option::Option::None,
939 })
940 }
941
942 pub fn set_bitbucket_data_center_config<
948 T: std::convert::Into<std::boxed::Box<crate::model::BitbucketDataCenterConfig>>,
949 >(
950 mut self,
951 v: T,
952 ) -> Self {
953 self.connection_config = std::option::Option::Some(
954 crate::model::connection::ConnectionConfig::BitbucketDataCenterConfig(v.into()),
955 );
956 self
957 }
958
959 pub fn bitbucket_cloud_config(
963 &self,
964 ) -> std::option::Option<&std::boxed::Box<crate::model::BitbucketCloudConfig>> {
965 #[allow(unreachable_patterns)]
966 self.connection_config.as_ref().and_then(|v| match v {
967 crate::model::connection::ConnectionConfig::BitbucketCloudConfig(v) => {
968 std::option::Option::Some(v)
969 }
970 _ => std::option::Option::None,
971 })
972 }
973
974 pub fn set_bitbucket_cloud_config<
980 T: std::convert::Into<std::boxed::Box<crate::model::BitbucketCloudConfig>>,
981 >(
982 mut self,
983 v: T,
984 ) -> Self {
985 self.connection_config = std::option::Option::Some(
986 crate::model::connection::ConnectionConfig::BitbucketCloudConfig(v.into()),
987 );
988 self
989 }
990}
991
992impl wkt::message::Message for Connection {
993 fn typename() -> &'static str {
994 "type.googleapis.com/google.devtools.cloudbuild.v2.Connection"
995 }
996}
997
998#[doc(hidden)]
999impl<'de> serde::de::Deserialize<'de> for Connection {
1000 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1001 where
1002 D: serde::Deserializer<'de>,
1003 {
1004 #[allow(non_camel_case_types)]
1005 #[doc(hidden)]
1006 #[derive(PartialEq, Eq, Hash)]
1007 enum __FieldTag {
1008 __name,
1009 __create_time,
1010 __update_time,
1011 __github_config,
1012 __github_enterprise_config,
1013 __gitlab_config,
1014 __bitbucket_data_center_config,
1015 __bitbucket_cloud_config,
1016 __installation_state,
1017 __disabled,
1018 __reconciling,
1019 __annotations,
1020 __etag,
1021 Unknown(std::string::String),
1022 }
1023 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
1024 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1025 where
1026 D: serde::Deserializer<'de>,
1027 {
1028 struct Visitor;
1029 impl<'de> serde::de::Visitor<'de> for Visitor {
1030 type Value = __FieldTag;
1031 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
1032 formatter.write_str("a field name for Connection")
1033 }
1034 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
1035 where
1036 E: serde::de::Error,
1037 {
1038 use std::result::Result::Ok;
1039 use std::string::ToString;
1040 match value {
1041 "name" => Ok(__FieldTag::__name),
1042 "createTime" => Ok(__FieldTag::__create_time),
1043 "create_time" => Ok(__FieldTag::__create_time),
1044 "updateTime" => Ok(__FieldTag::__update_time),
1045 "update_time" => Ok(__FieldTag::__update_time),
1046 "githubConfig" => Ok(__FieldTag::__github_config),
1047 "github_config" => Ok(__FieldTag::__github_config),
1048 "githubEnterpriseConfig" => Ok(__FieldTag::__github_enterprise_config),
1049 "github_enterprise_config" => {
1050 Ok(__FieldTag::__github_enterprise_config)
1051 }
1052 "gitlabConfig" => Ok(__FieldTag::__gitlab_config),
1053 "gitlab_config" => Ok(__FieldTag::__gitlab_config),
1054 "bitbucketDataCenterConfig" => {
1055 Ok(__FieldTag::__bitbucket_data_center_config)
1056 }
1057 "bitbucket_data_center_config" => {
1058 Ok(__FieldTag::__bitbucket_data_center_config)
1059 }
1060 "bitbucketCloudConfig" => Ok(__FieldTag::__bitbucket_cloud_config),
1061 "bitbucket_cloud_config" => Ok(__FieldTag::__bitbucket_cloud_config),
1062 "installationState" => Ok(__FieldTag::__installation_state),
1063 "installation_state" => Ok(__FieldTag::__installation_state),
1064 "disabled" => Ok(__FieldTag::__disabled),
1065 "reconciling" => Ok(__FieldTag::__reconciling),
1066 "annotations" => Ok(__FieldTag::__annotations),
1067 "etag" => Ok(__FieldTag::__etag),
1068 _ => Ok(__FieldTag::Unknown(value.to_string())),
1069 }
1070 }
1071 }
1072 deserializer.deserialize_identifier(Visitor)
1073 }
1074 }
1075 struct Visitor;
1076 impl<'de> serde::de::Visitor<'de> for Visitor {
1077 type Value = Connection;
1078 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
1079 formatter.write_str("struct Connection")
1080 }
1081 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
1082 where
1083 A: serde::de::MapAccess<'de>,
1084 {
1085 #[allow(unused_imports)]
1086 use serde::de::Error;
1087 use std::option::Option::Some;
1088 let mut fields = std::collections::HashSet::new();
1089 let mut result = Self::Value::new();
1090 while let Some(tag) = map.next_key::<__FieldTag>()? {
1091 #[allow(clippy::match_single_binding)]
1092 match tag {
1093 __FieldTag::__name => {
1094 if !fields.insert(__FieldTag::__name) {
1095 return std::result::Result::Err(A::Error::duplicate_field(
1096 "multiple values for name",
1097 ));
1098 }
1099 result.name = map
1100 .next_value::<std::option::Option<std::string::String>>()?
1101 .unwrap_or_default();
1102 }
1103 __FieldTag::__create_time => {
1104 if !fields.insert(__FieldTag::__create_time) {
1105 return std::result::Result::Err(A::Error::duplicate_field(
1106 "multiple values for create_time",
1107 ));
1108 }
1109 result.create_time =
1110 map.next_value::<std::option::Option<wkt::Timestamp>>()?;
1111 }
1112 __FieldTag::__update_time => {
1113 if !fields.insert(__FieldTag::__update_time) {
1114 return std::result::Result::Err(A::Error::duplicate_field(
1115 "multiple values for update_time",
1116 ));
1117 }
1118 result.update_time =
1119 map.next_value::<std::option::Option<wkt::Timestamp>>()?;
1120 }
1121 __FieldTag::__github_config => {
1122 if !fields.insert(__FieldTag::__github_config) {
1123 return std::result::Result::Err(A::Error::duplicate_field(
1124 "multiple values for github_config",
1125 ));
1126 }
1127 if result.connection_config.is_some() {
1128 return std::result::Result::Err(A::Error::duplicate_field(
1129 "multiple values for `connection_config`, a oneof with full ID .google.devtools.cloudbuild.v2.Connection.github_config, latest field was githubConfig",
1130 ));
1131 }
1132 result.connection_config = std::option::Option::Some(
1133 crate::model::connection::ConnectionConfig::GithubConfig(
1134 map.next_value::<std::option::Option<
1135 std::boxed::Box<crate::model::GitHubConfig>,
1136 >>()?
1137 .unwrap_or_default(),
1138 ),
1139 );
1140 }
1141 __FieldTag::__github_enterprise_config => {
1142 if !fields.insert(__FieldTag::__github_enterprise_config) {
1143 return std::result::Result::Err(A::Error::duplicate_field(
1144 "multiple values for github_enterprise_config",
1145 ));
1146 }
1147 if result.connection_config.is_some() {
1148 return std::result::Result::Err(A::Error::duplicate_field(
1149 "multiple values for `connection_config`, a oneof with full ID .google.devtools.cloudbuild.v2.Connection.github_enterprise_config, latest field was githubEnterpriseConfig",
1150 ));
1151 }
1152 result.connection_config = std::option::Option::Some(
1153 crate::model::connection::ConnectionConfig::GithubEnterpriseConfig(
1154 map.next_value::<std::option::Option<
1155 std::boxed::Box<crate::model::GitHubEnterpriseConfig>,
1156 >>()?
1157 .unwrap_or_default(),
1158 ),
1159 );
1160 }
1161 __FieldTag::__gitlab_config => {
1162 if !fields.insert(__FieldTag::__gitlab_config) {
1163 return std::result::Result::Err(A::Error::duplicate_field(
1164 "multiple values for gitlab_config",
1165 ));
1166 }
1167 if result.connection_config.is_some() {
1168 return std::result::Result::Err(A::Error::duplicate_field(
1169 "multiple values for `connection_config`, a oneof with full ID .google.devtools.cloudbuild.v2.Connection.gitlab_config, latest field was gitlabConfig",
1170 ));
1171 }
1172 result.connection_config = std::option::Option::Some(
1173 crate::model::connection::ConnectionConfig::GitlabConfig(
1174 map.next_value::<std::option::Option<
1175 std::boxed::Box<crate::model::GitLabConfig>,
1176 >>()?
1177 .unwrap_or_default(),
1178 ),
1179 );
1180 }
1181 __FieldTag::__bitbucket_data_center_config => {
1182 if !fields.insert(__FieldTag::__bitbucket_data_center_config) {
1183 return std::result::Result::Err(A::Error::duplicate_field(
1184 "multiple values for bitbucket_data_center_config",
1185 ));
1186 }
1187 if result.connection_config.is_some() {
1188 return std::result::Result::Err(A::Error::duplicate_field(
1189 "multiple values for `connection_config`, a oneof with full ID .google.devtools.cloudbuild.v2.Connection.bitbucket_data_center_config, latest field was bitbucketDataCenterConfig",
1190 ));
1191 }
1192 result.connection_config = std::option::Option::Some(
1193 crate::model::connection::ConnectionConfig::BitbucketDataCenterConfig(
1194 map.next_value::<std::option::Option<std::boxed::Box<crate::model::BitbucketDataCenterConfig>>>()?.unwrap_or_default()
1195 ),
1196 );
1197 }
1198 __FieldTag::__bitbucket_cloud_config => {
1199 if !fields.insert(__FieldTag::__bitbucket_cloud_config) {
1200 return std::result::Result::Err(A::Error::duplicate_field(
1201 "multiple values for bitbucket_cloud_config",
1202 ));
1203 }
1204 if result.connection_config.is_some() {
1205 return std::result::Result::Err(A::Error::duplicate_field(
1206 "multiple values for `connection_config`, a oneof with full ID .google.devtools.cloudbuild.v2.Connection.bitbucket_cloud_config, latest field was bitbucketCloudConfig",
1207 ));
1208 }
1209 result.connection_config = std::option::Option::Some(
1210 crate::model::connection::ConnectionConfig::BitbucketCloudConfig(
1211 map.next_value::<std::option::Option<
1212 std::boxed::Box<crate::model::BitbucketCloudConfig>,
1213 >>()?
1214 .unwrap_or_default(),
1215 ),
1216 );
1217 }
1218 __FieldTag::__installation_state => {
1219 if !fields.insert(__FieldTag::__installation_state) {
1220 return std::result::Result::Err(A::Error::duplicate_field(
1221 "multiple values for installation_state",
1222 ));
1223 }
1224 result.installation_state = map
1225 .next_value::<std::option::Option<crate::model::InstallationState>>(
1226 )?;
1227 }
1228 __FieldTag::__disabled => {
1229 if !fields.insert(__FieldTag::__disabled) {
1230 return std::result::Result::Err(A::Error::duplicate_field(
1231 "multiple values for disabled",
1232 ));
1233 }
1234 result.disabled = map
1235 .next_value::<std::option::Option<bool>>()?
1236 .unwrap_or_default();
1237 }
1238 __FieldTag::__reconciling => {
1239 if !fields.insert(__FieldTag::__reconciling) {
1240 return std::result::Result::Err(A::Error::duplicate_field(
1241 "multiple values for reconciling",
1242 ));
1243 }
1244 result.reconciling = map
1245 .next_value::<std::option::Option<bool>>()?
1246 .unwrap_or_default();
1247 }
1248 __FieldTag::__annotations => {
1249 if !fields.insert(__FieldTag::__annotations) {
1250 return std::result::Result::Err(A::Error::duplicate_field(
1251 "multiple values for annotations",
1252 ));
1253 }
1254 result.annotations = map
1255 .next_value::<std::option::Option<
1256 std::collections::HashMap<
1257 std::string::String,
1258 std::string::String,
1259 >,
1260 >>()?
1261 .unwrap_or_default();
1262 }
1263 __FieldTag::__etag => {
1264 if !fields.insert(__FieldTag::__etag) {
1265 return std::result::Result::Err(A::Error::duplicate_field(
1266 "multiple values for etag",
1267 ));
1268 }
1269 result.etag = map
1270 .next_value::<std::option::Option<std::string::String>>()?
1271 .unwrap_or_default();
1272 }
1273 __FieldTag::Unknown(key) => {
1274 let value = map.next_value::<serde_json::Value>()?;
1275 result._unknown_fields.insert(key, value);
1276 }
1277 }
1278 }
1279 std::result::Result::Ok(result)
1280 }
1281 }
1282 deserializer.deserialize_any(Visitor)
1283 }
1284}
1285
1286#[doc(hidden)]
1287impl serde::ser::Serialize for Connection {
1288 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1289 where
1290 S: serde::ser::Serializer,
1291 {
1292 use serde::ser::SerializeMap;
1293 #[allow(unused_imports)]
1294 use std::option::Option::Some;
1295 let mut state = serializer.serialize_map(std::option::Option::None)?;
1296 if !self.name.is_empty() {
1297 state.serialize_entry("name", &self.name)?;
1298 }
1299 if self.create_time.is_some() {
1300 state.serialize_entry("createTime", &self.create_time)?;
1301 }
1302 if self.update_time.is_some() {
1303 state.serialize_entry("updateTime", &self.update_time)?;
1304 }
1305 if let Some(value) = self.github_config() {
1306 state.serialize_entry("githubConfig", value)?;
1307 }
1308 if let Some(value) = self.github_enterprise_config() {
1309 state.serialize_entry("githubEnterpriseConfig", value)?;
1310 }
1311 if let Some(value) = self.gitlab_config() {
1312 state.serialize_entry("gitlabConfig", value)?;
1313 }
1314 if let Some(value) = self.bitbucket_data_center_config() {
1315 state.serialize_entry("bitbucketDataCenterConfig", value)?;
1316 }
1317 if let Some(value) = self.bitbucket_cloud_config() {
1318 state.serialize_entry("bitbucketCloudConfig", value)?;
1319 }
1320 if self.installation_state.is_some() {
1321 state.serialize_entry("installationState", &self.installation_state)?;
1322 }
1323 if !wkt::internal::is_default(&self.disabled) {
1324 state.serialize_entry("disabled", &self.disabled)?;
1325 }
1326 if !wkt::internal::is_default(&self.reconciling) {
1327 state.serialize_entry("reconciling", &self.reconciling)?;
1328 }
1329 if !self.annotations.is_empty() {
1330 state.serialize_entry("annotations", &self.annotations)?;
1331 }
1332 if !self.etag.is_empty() {
1333 state.serialize_entry("etag", &self.etag)?;
1334 }
1335 if !self._unknown_fields.is_empty() {
1336 for (key, value) in self._unknown_fields.iter() {
1337 state.serialize_entry(key, &value)?;
1338 }
1339 }
1340 state.end()
1341 }
1342}
1343
1344impl std::fmt::Debug for Connection {
1345 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1346 let mut debug_struct = f.debug_struct("Connection");
1347 debug_struct.field("name", &self.name);
1348 debug_struct.field("create_time", &self.create_time);
1349 debug_struct.field("update_time", &self.update_time);
1350 debug_struct.field("installation_state", &self.installation_state);
1351 debug_struct.field("disabled", &self.disabled);
1352 debug_struct.field("reconciling", &self.reconciling);
1353 debug_struct.field("annotations", &self.annotations);
1354 debug_struct.field("etag", &self.etag);
1355 debug_struct.field("connection_config", &self.connection_config);
1356 if !self._unknown_fields.is_empty() {
1357 debug_struct.field("_unknown_fields", &self._unknown_fields);
1358 }
1359 debug_struct.finish()
1360 }
1361}
1362
1363pub mod connection {
1365 #[allow(unused_imports)]
1366 use super::*;
1367
1368 #[derive(Clone, Debug, PartialEq)]
1370 #[non_exhaustive]
1371 pub enum ConnectionConfig {
1372 GithubConfig(std::boxed::Box<crate::model::GitHubConfig>),
1374 GithubEnterpriseConfig(std::boxed::Box<crate::model::GitHubEnterpriseConfig>),
1376 GitlabConfig(std::boxed::Box<crate::model::GitLabConfig>),
1379 BitbucketDataCenterConfig(std::boxed::Box<crate::model::BitbucketDataCenterConfig>),
1381 BitbucketCloudConfig(std::boxed::Box<crate::model::BitbucketCloudConfig>),
1383 }
1384}
1385
1386#[derive(Clone, Default, PartialEq)]
1390#[non_exhaustive]
1391pub struct InstallationState {
1392 pub stage: crate::model::installation_state::Stage,
1394
1395 pub message: std::string::String,
1398
1399 pub action_uri: std::string::String,
1402
1403 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1404}
1405
1406impl InstallationState {
1407 pub fn new() -> Self {
1408 std::default::Default::default()
1409 }
1410
1411 pub fn set_stage<T: std::convert::Into<crate::model::installation_state::Stage>>(
1413 mut self,
1414 v: T,
1415 ) -> Self {
1416 self.stage = v.into();
1417 self
1418 }
1419
1420 pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1422 self.message = v.into();
1423 self
1424 }
1425
1426 pub fn set_action_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1428 self.action_uri = v.into();
1429 self
1430 }
1431}
1432
1433impl wkt::message::Message for InstallationState {
1434 fn typename() -> &'static str {
1435 "type.googleapis.com/google.devtools.cloudbuild.v2.InstallationState"
1436 }
1437}
1438
1439#[doc(hidden)]
1440impl<'de> serde::de::Deserialize<'de> for InstallationState {
1441 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1442 where
1443 D: serde::Deserializer<'de>,
1444 {
1445 #[allow(non_camel_case_types)]
1446 #[doc(hidden)]
1447 #[derive(PartialEq, Eq, Hash)]
1448 enum __FieldTag {
1449 __stage,
1450 __message,
1451 __action_uri,
1452 Unknown(std::string::String),
1453 }
1454 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
1455 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1456 where
1457 D: serde::Deserializer<'de>,
1458 {
1459 struct Visitor;
1460 impl<'de> serde::de::Visitor<'de> for Visitor {
1461 type Value = __FieldTag;
1462 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
1463 formatter.write_str("a field name for InstallationState")
1464 }
1465 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
1466 where
1467 E: serde::de::Error,
1468 {
1469 use std::result::Result::Ok;
1470 use std::string::ToString;
1471 match value {
1472 "stage" => Ok(__FieldTag::__stage),
1473 "message" => Ok(__FieldTag::__message),
1474 "actionUri" => Ok(__FieldTag::__action_uri),
1475 "action_uri" => Ok(__FieldTag::__action_uri),
1476 _ => Ok(__FieldTag::Unknown(value.to_string())),
1477 }
1478 }
1479 }
1480 deserializer.deserialize_identifier(Visitor)
1481 }
1482 }
1483 struct Visitor;
1484 impl<'de> serde::de::Visitor<'de> for Visitor {
1485 type Value = InstallationState;
1486 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
1487 formatter.write_str("struct InstallationState")
1488 }
1489 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
1490 where
1491 A: serde::de::MapAccess<'de>,
1492 {
1493 #[allow(unused_imports)]
1494 use serde::de::Error;
1495 use std::option::Option::Some;
1496 let mut fields = std::collections::HashSet::new();
1497 let mut result = Self::Value::new();
1498 while let Some(tag) = map.next_key::<__FieldTag>()? {
1499 #[allow(clippy::match_single_binding)]
1500 match tag {
1501 __FieldTag::__stage => {
1502 if !fields.insert(__FieldTag::__stage) {
1503 return std::result::Result::Err(A::Error::duplicate_field(
1504 "multiple values for stage",
1505 ));
1506 }
1507 result.stage = map.next_value::<std::option::Option<crate::model::installation_state::Stage>>()?.unwrap_or_default();
1508 }
1509 __FieldTag::__message => {
1510 if !fields.insert(__FieldTag::__message) {
1511 return std::result::Result::Err(A::Error::duplicate_field(
1512 "multiple values for message",
1513 ));
1514 }
1515 result.message = map
1516 .next_value::<std::option::Option<std::string::String>>()?
1517 .unwrap_or_default();
1518 }
1519 __FieldTag::__action_uri => {
1520 if !fields.insert(__FieldTag::__action_uri) {
1521 return std::result::Result::Err(A::Error::duplicate_field(
1522 "multiple values for action_uri",
1523 ));
1524 }
1525 result.action_uri = map
1526 .next_value::<std::option::Option<std::string::String>>()?
1527 .unwrap_or_default();
1528 }
1529 __FieldTag::Unknown(key) => {
1530 let value = map.next_value::<serde_json::Value>()?;
1531 result._unknown_fields.insert(key, value);
1532 }
1533 }
1534 }
1535 std::result::Result::Ok(result)
1536 }
1537 }
1538 deserializer.deserialize_any(Visitor)
1539 }
1540}
1541
1542#[doc(hidden)]
1543impl serde::ser::Serialize for InstallationState {
1544 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1545 where
1546 S: serde::ser::Serializer,
1547 {
1548 use serde::ser::SerializeMap;
1549 #[allow(unused_imports)]
1550 use std::option::Option::Some;
1551 let mut state = serializer.serialize_map(std::option::Option::None)?;
1552 if !wkt::internal::is_default(&self.stage) {
1553 state.serialize_entry("stage", &self.stage)?;
1554 }
1555 if !self.message.is_empty() {
1556 state.serialize_entry("message", &self.message)?;
1557 }
1558 if !self.action_uri.is_empty() {
1559 state.serialize_entry("actionUri", &self.action_uri)?;
1560 }
1561 if !self._unknown_fields.is_empty() {
1562 for (key, value) in self._unknown_fields.iter() {
1563 state.serialize_entry(key, &value)?;
1564 }
1565 }
1566 state.end()
1567 }
1568}
1569
1570impl std::fmt::Debug for InstallationState {
1571 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1572 let mut debug_struct = f.debug_struct("InstallationState");
1573 debug_struct.field("stage", &self.stage);
1574 debug_struct.field("message", &self.message);
1575 debug_struct.field("action_uri", &self.action_uri);
1576 if !self._unknown_fields.is_empty() {
1577 debug_struct.field("_unknown_fields", &self._unknown_fields);
1578 }
1579 debug_struct.finish()
1580 }
1581}
1582
1583pub mod installation_state {
1585 #[allow(unused_imports)]
1586 use super::*;
1587
1588 #[derive(Clone, Debug, PartialEq)]
1604 #[non_exhaustive]
1605 pub enum Stage {
1606 Unspecified,
1608 PendingCreateApp,
1611 PendingUserOauth,
1613 PendingInstallApp,
1615 Complete,
1617 UnknownValue(stage::UnknownValue),
1622 }
1623
1624 #[doc(hidden)]
1625 pub mod stage {
1626 #[allow(unused_imports)]
1627 use super::*;
1628 #[derive(Clone, Debug, PartialEq)]
1629 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
1630 }
1631
1632 impl Stage {
1633 pub fn value(&self) -> std::option::Option<i32> {
1638 match self {
1639 Self::Unspecified => std::option::Option::Some(0),
1640 Self::PendingCreateApp => std::option::Option::Some(1),
1641 Self::PendingUserOauth => std::option::Option::Some(2),
1642 Self::PendingInstallApp => std::option::Option::Some(3),
1643 Self::Complete => std::option::Option::Some(10),
1644 Self::UnknownValue(u) => u.0.value(),
1645 }
1646 }
1647
1648 pub fn name(&self) -> std::option::Option<&str> {
1653 match self {
1654 Self::Unspecified => std::option::Option::Some("STAGE_UNSPECIFIED"),
1655 Self::PendingCreateApp => std::option::Option::Some("PENDING_CREATE_APP"),
1656 Self::PendingUserOauth => std::option::Option::Some("PENDING_USER_OAUTH"),
1657 Self::PendingInstallApp => std::option::Option::Some("PENDING_INSTALL_APP"),
1658 Self::Complete => std::option::Option::Some("COMPLETE"),
1659 Self::UnknownValue(u) => u.0.name(),
1660 }
1661 }
1662 }
1663
1664 impl std::default::Default for Stage {
1665 fn default() -> Self {
1666 use std::convert::From;
1667 Self::from(0)
1668 }
1669 }
1670
1671 impl std::fmt::Display for Stage {
1672 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
1673 wkt::internal::display_enum(f, self.name(), self.value())
1674 }
1675 }
1676
1677 impl std::convert::From<i32> for Stage {
1678 fn from(value: i32) -> Self {
1679 match value {
1680 0 => Self::Unspecified,
1681 1 => Self::PendingCreateApp,
1682 2 => Self::PendingUserOauth,
1683 3 => Self::PendingInstallApp,
1684 10 => Self::Complete,
1685 _ => Self::UnknownValue(stage::UnknownValue(
1686 wkt::internal::UnknownEnumValue::Integer(value),
1687 )),
1688 }
1689 }
1690 }
1691
1692 impl std::convert::From<&str> for Stage {
1693 fn from(value: &str) -> Self {
1694 use std::string::ToString;
1695 match value {
1696 "STAGE_UNSPECIFIED" => Self::Unspecified,
1697 "PENDING_CREATE_APP" => Self::PendingCreateApp,
1698 "PENDING_USER_OAUTH" => Self::PendingUserOauth,
1699 "PENDING_INSTALL_APP" => Self::PendingInstallApp,
1700 "COMPLETE" => Self::Complete,
1701 _ => Self::UnknownValue(stage::UnknownValue(
1702 wkt::internal::UnknownEnumValue::String(value.to_string()),
1703 )),
1704 }
1705 }
1706 }
1707
1708 impl serde::ser::Serialize for Stage {
1709 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1710 where
1711 S: serde::Serializer,
1712 {
1713 match self {
1714 Self::Unspecified => serializer.serialize_i32(0),
1715 Self::PendingCreateApp => serializer.serialize_i32(1),
1716 Self::PendingUserOauth => serializer.serialize_i32(2),
1717 Self::PendingInstallApp => serializer.serialize_i32(3),
1718 Self::Complete => serializer.serialize_i32(10),
1719 Self::UnknownValue(u) => u.0.serialize(serializer),
1720 }
1721 }
1722 }
1723
1724 impl<'de> serde::de::Deserialize<'de> for Stage {
1725 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1726 where
1727 D: serde::Deserializer<'de>,
1728 {
1729 deserializer.deserialize_any(wkt::internal::EnumVisitor::<Stage>::new(
1730 ".google.devtools.cloudbuild.v2.InstallationState.Stage",
1731 ))
1732 }
1733 }
1734}
1735
1736#[derive(Clone, Default, PartialEq)]
1738#[non_exhaustive]
1739pub struct FetchLinkableRepositoriesRequest {
1740 pub connection: std::string::String,
1743
1744 pub page_size: i32,
1746
1747 pub page_token: std::string::String,
1749
1750 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1751}
1752
1753impl FetchLinkableRepositoriesRequest {
1754 pub fn new() -> Self {
1755 std::default::Default::default()
1756 }
1757
1758 pub fn set_connection<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1760 self.connection = v.into();
1761 self
1762 }
1763
1764 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1766 self.page_size = v.into();
1767 self
1768 }
1769
1770 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1772 self.page_token = v.into();
1773 self
1774 }
1775}
1776
1777impl wkt::message::Message for FetchLinkableRepositoriesRequest {
1778 fn typename() -> &'static str {
1779 "type.googleapis.com/google.devtools.cloudbuild.v2.FetchLinkableRepositoriesRequest"
1780 }
1781}
1782
1783#[doc(hidden)]
1784impl<'de> serde::de::Deserialize<'de> for FetchLinkableRepositoriesRequest {
1785 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1786 where
1787 D: serde::Deserializer<'de>,
1788 {
1789 #[allow(non_camel_case_types)]
1790 #[doc(hidden)]
1791 #[derive(PartialEq, Eq, Hash)]
1792 enum __FieldTag {
1793 __connection,
1794 __page_size,
1795 __page_token,
1796 Unknown(std::string::String),
1797 }
1798 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
1799 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1800 where
1801 D: serde::Deserializer<'de>,
1802 {
1803 struct Visitor;
1804 impl<'de> serde::de::Visitor<'de> for Visitor {
1805 type Value = __FieldTag;
1806 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
1807 formatter.write_str("a field name for FetchLinkableRepositoriesRequest")
1808 }
1809 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
1810 where
1811 E: serde::de::Error,
1812 {
1813 use std::result::Result::Ok;
1814 use std::string::ToString;
1815 match value {
1816 "connection" => Ok(__FieldTag::__connection),
1817 "pageSize" => Ok(__FieldTag::__page_size),
1818 "page_size" => Ok(__FieldTag::__page_size),
1819 "pageToken" => Ok(__FieldTag::__page_token),
1820 "page_token" => Ok(__FieldTag::__page_token),
1821 _ => Ok(__FieldTag::Unknown(value.to_string())),
1822 }
1823 }
1824 }
1825 deserializer.deserialize_identifier(Visitor)
1826 }
1827 }
1828 struct Visitor;
1829 impl<'de> serde::de::Visitor<'de> for Visitor {
1830 type Value = FetchLinkableRepositoriesRequest;
1831 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
1832 formatter.write_str("struct FetchLinkableRepositoriesRequest")
1833 }
1834 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
1835 where
1836 A: serde::de::MapAccess<'de>,
1837 {
1838 #[allow(unused_imports)]
1839 use serde::de::Error;
1840 use std::option::Option::Some;
1841 let mut fields = std::collections::HashSet::new();
1842 let mut result = Self::Value::new();
1843 while let Some(tag) = map.next_key::<__FieldTag>()? {
1844 #[allow(clippy::match_single_binding)]
1845 match tag {
1846 __FieldTag::__connection => {
1847 if !fields.insert(__FieldTag::__connection) {
1848 return std::result::Result::Err(A::Error::duplicate_field(
1849 "multiple values for connection",
1850 ));
1851 }
1852 result.connection = map
1853 .next_value::<std::option::Option<std::string::String>>()?
1854 .unwrap_or_default();
1855 }
1856 __FieldTag::__page_size => {
1857 if !fields.insert(__FieldTag::__page_size) {
1858 return std::result::Result::Err(A::Error::duplicate_field(
1859 "multiple values for page_size",
1860 ));
1861 }
1862 struct __With(std::option::Option<i32>);
1863 impl<'de> serde::de::Deserialize<'de> for __With {
1864 fn deserialize<D>(
1865 deserializer: D,
1866 ) -> std::result::Result<Self, D::Error>
1867 where
1868 D: serde::de::Deserializer<'de>,
1869 {
1870 serde_with::As::< std::option::Option<wkt::internal::I32> >::deserialize(deserializer).map(__With)
1871 }
1872 }
1873 result.page_size = map.next_value::<__With>()?.0.unwrap_or_default();
1874 }
1875 __FieldTag::__page_token => {
1876 if !fields.insert(__FieldTag::__page_token) {
1877 return std::result::Result::Err(A::Error::duplicate_field(
1878 "multiple values for page_token",
1879 ));
1880 }
1881 result.page_token = map
1882 .next_value::<std::option::Option<std::string::String>>()?
1883 .unwrap_or_default();
1884 }
1885 __FieldTag::Unknown(key) => {
1886 let value = map.next_value::<serde_json::Value>()?;
1887 result._unknown_fields.insert(key, value);
1888 }
1889 }
1890 }
1891 std::result::Result::Ok(result)
1892 }
1893 }
1894 deserializer.deserialize_any(Visitor)
1895 }
1896}
1897
1898#[doc(hidden)]
1899impl serde::ser::Serialize for FetchLinkableRepositoriesRequest {
1900 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1901 where
1902 S: serde::ser::Serializer,
1903 {
1904 use serde::ser::SerializeMap;
1905 #[allow(unused_imports)]
1906 use std::option::Option::Some;
1907 let mut state = serializer.serialize_map(std::option::Option::None)?;
1908 if !self.connection.is_empty() {
1909 state.serialize_entry("connection", &self.connection)?;
1910 }
1911 if !wkt::internal::is_default(&self.page_size) {
1912 struct __With<'a>(&'a i32);
1913 impl<'a> serde::ser::Serialize for __With<'a> {
1914 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1915 where
1916 S: serde::ser::Serializer,
1917 {
1918 serde_with::As::<wkt::internal::I32>::serialize(self.0, serializer)
1919 }
1920 }
1921 state.serialize_entry("pageSize", &__With(&self.page_size))?;
1922 }
1923 if !self.page_token.is_empty() {
1924 state.serialize_entry("pageToken", &self.page_token)?;
1925 }
1926 if !self._unknown_fields.is_empty() {
1927 for (key, value) in self._unknown_fields.iter() {
1928 state.serialize_entry(key, &value)?;
1929 }
1930 }
1931 state.end()
1932 }
1933}
1934
1935impl std::fmt::Debug for FetchLinkableRepositoriesRequest {
1936 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1937 let mut debug_struct = f.debug_struct("FetchLinkableRepositoriesRequest");
1938 debug_struct.field("connection", &self.connection);
1939 debug_struct.field("page_size", &self.page_size);
1940 debug_struct.field("page_token", &self.page_token);
1941 if !self._unknown_fields.is_empty() {
1942 debug_struct.field("_unknown_fields", &self._unknown_fields);
1943 }
1944 debug_struct.finish()
1945 }
1946}
1947
1948#[derive(Clone, Default, PartialEq)]
1950#[non_exhaustive]
1951pub struct FetchLinkableRepositoriesResponse {
1952 pub repositories: std::vec::Vec<crate::model::Repository>,
1954
1955 pub next_page_token: std::string::String,
1957
1958 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1959}
1960
1961impl FetchLinkableRepositoriesResponse {
1962 pub fn new() -> Self {
1963 std::default::Default::default()
1964 }
1965
1966 pub fn set_repositories<T, V>(mut self, v: T) -> Self
1968 where
1969 T: std::iter::IntoIterator<Item = V>,
1970 V: std::convert::Into<crate::model::Repository>,
1971 {
1972 use std::iter::Iterator;
1973 self.repositories = v.into_iter().map(|i| i.into()).collect();
1974 self
1975 }
1976
1977 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1979 self.next_page_token = v.into();
1980 self
1981 }
1982}
1983
1984impl wkt::message::Message for FetchLinkableRepositoriesResponse {
1985 fn typename() -> &'static str {
1986 "type.googleapis.com/google.devtools.cloudbuild.v2.FetchLinkableRepositoriesResponse"
1987 }
1988}
1989
1990#[doc(hidden)]
1991impl gax::paginator::internal::PageableResponse for FetchLinkableRepositoriesResponse {
1992 type PageItem = crate::model::Repository;
1993
1994 fn items(self) -> std::vec::Vec<Self::PageItem> {
1995 self.repositories
1996 }
1997
1998 fn next_page_token(&self) -> std::string::String {
1999 use std::clone::Clone;
2000 self.next_page_token.clone()
2001 }
2002}
2003
2004#[doc(hidden)]
2005impl<'de> serde::de::Deserialize<'de> for FetchLinkableRepositoriesResponse {
2006 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2007 where
2008 D: serde::Deserializer<'de>,
2009 {
2010 #[allow(non_camel_case_types)]
2011 #[doc(hidden)]
2012 #[derive(PartialEq, Eq, Hash)]
2013 enum __FieldTag {
2014 __repositories,
2015 __next_page_token,
2016 Unknown(std::string::String),
2017 }
2018 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
2019 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2020 where
2021 D: serde::Deserializer<'de>,
2022 {
2023 struct Visitor;
2024 impl<'de> serde::de::Visitor<'de> for Visitor {
2025 type Value = __FieldTag;
2026 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
2027 formatter.write_str("a field name for FetchLinkableRepositoriesResponse")
2028 }
2029 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
2030 where
2031 E: serde::de::Error,
2032 {
2033 use std::result::Result::Ok;
2034 use std::string::ToString;
2035 match value {
2036 "repositories" => Ok(__FieldTag::__repositories),
2037 "nextPageToken" => Ok(__FieldTag::__next_page_token),
2038 "next_page_token" => Ok(__FieldTag::__next_page_token),
2039 _ => Ok(__FieldTag::Unknown(value.to_string())),
2040 }
2041 }
2042 }
2043 deserializer.deserialize_identifier(Visitor)
2044 }
2045 }
2046 struct Visitor;
2047 impl<'de> serde::de::Visitor<'de> for Visitor {
2048 type Value = FetchLinkableRepositoriesResponse;
2049 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
2050 formatter.write_str("struct FetchLinkableRepositoriesResponse")
2051 }
2052 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
2053 where
2054 A: serde::de::MapAccess<'de>,
2055 {
2056 #[allow(unused_imports)]
2057 use serde::de::Error;
2058 use std::option::Option::Some;
2059 let mut fields = std::collections::HashSet::new();
2060 let mut result = Self::Value::new();
2061 while let Some(tag) = map.next_key::<__FieldTag>()? {
2062 #[allow(clippy::match_single_binding)]
2063 match tag {
2064 __FieldTag::__repositories => {
2065 if !fields.insert(__FieldTag::__repositories) {
2066 return std::result::Result::Err(A::Error::duplicate_field(
2067 "multiple values for repositories",
2068 ));
2069 }
2070 result.repositories = map.next_value::<std::option::Option<std::vec::Vec<crate::model::Repository>>>()?.unwrap_or_default();
2071 }
2072 __FieldTag::__next_page_token => {
2073 if !fields.insert(__FieldTag::__next_page_token) {
2074 return std::result::Result::Err(A::Error::duplicate_field(
2075 "multiple values for next_page_token",
2076 ));
2077 }
2078 result.next_page_token = map
2079 .next_value::<std::option::Option<std::string::String>>()?
2080 .unwrap_or_default();
2081 }
2082 __FieldTag::Unknown(key) => {
2083 let value = map.next_value::<serde_json::Value>()?;
2084 result._unknown_fields.insert(key, value);
2085 }
2086 }
2087 }
2088 std::result::Result::Ok(result)
2089 }
2090 }
2091 deserializer.deserialize_any(Visitor)
2092 }
2093}
2094
2095#[doc(hidden)]
2096impl serde::ser::Serialize for FetchLinkableRepositoriesResponse {
2097 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2098 where
2099 S: serde::ser::Serializer,
2100 {
2101 use serde::ser::SerializeMap;
2102 #[allow(unused_imports)]
2103 use std::option::Option::Some;
2104 let mut state = serializer.serialize_map(std::option::Option::None)?;
2105 if !self.repositories.is_empty() {
2106 state.serialize_entry("repositories", &self.repositories)?;
2107 }
2108 if !self.next_page_token.is_empty() {
2109 state.serialize_entry("nextPageToken", &self.next_page_token)?;
2110 }
2111 if !self._unknown_fields.is_empty() {
2112 for (key, value) in self._unknown_fields.iter() {
2113 state.serialize_entry(key, &value)?;
2114 }
2115 }
2116 state.end()
2117 }
2118}
2119
2120impl std::fmt::Debug for FetchLinkableRepositoriesResponse {
2121 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2122 let mut debug_struct = f.debug_struct("FetchLinkableRepositoriesResponse");
2123 debug_struct.field("repositories", &self.repositories);
2124 debug_struct.field("next_page_token", &self.next_page_token);
2125 if !self._unknown_fields.is_empty() {
2126 debug_struct.field("_unknown_fields", &self._unknown_fields);
2127 }
2128 debug_struct.finish()
2129 }
2130}
2131
2132#[derive(Clone, Default, PartialEq)]
2134#[non_exhaustive]
2135pub struct GitHubConfig {
2136 pub authorizer_credential: std::option::Option<crate::model::OAuthCredential>,
2140
2141 pub app_installation_id: i64,
2143
2144 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2145}
2146
2147impl GitHubConfig {
2148 pub fn new() -> Self {
2149 std::default::Default::default()
2150 }
2151
2152 pub fn set_authorizer_credential<T>(mut self, v: T) -> Self
2154 where
2155 T: std::convert::Into<crate::model::OAuthCredential>,
2156 {
2157 self.authorizer_credential = std::option::Option::Some(v.into());
2158 self
2159 }
2160
2161 pub fn set_or_clear_authorizer_credential<T>(mut self, v: std::option::Option<T>) -> Self
2163 where
2164 T: std::convert::Into<crate::model::OAuthCredential>,
2165 {
2166 self.authorizer_credential = v.map(|x| x.into());
2167 self
2168 }
2169
2170 pub fn set_app_installation_id<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
2172 self.app_installation_id = v.into();
2173 self
2174 }
2175}
2176
2177impl wkt::message::Message for GitHubConfig {
2178 fn typename() -> &'static str {
2179 "type.googleapis.com/google.devtools.cloudbuild.v2.GitHubConfig"
2180 }
2181}
2182
2183#[doc(hidden)]
2184impl<'de> serde::de::Deserialize<'de> for GitHubConfig {
2185 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2186 where
2187 D: serde::Deserializer<'de>,
2188 {
2189 #[allow(non_camel_case_types)]
2190 #[doc(hidden)]
2191 #[derive(PartialEq, Eq, Hash)]
2192 enum __FieldTag {
2193 __authorizer_credential,
2194 __app_installation_id,
2195 Unknown(std::string::String),
2196 }
2197 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
2198 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2199 where
2200 D: serde::Deserializer<'de>,
2201 {
2202 struct Visitor;
2203 impl<'de> serde::de::Visitor<'de> for Visitor {
2204 type Value = __FieldTag;
2205 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
2206 formatter.write_str("a field name for GitHubConfig")
2207 }
2208 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
2209 where
2210 E: serde::de::Error,
2211 {
2212 use std::result::Result::Ok;
2213 use std::string::ToString;
2214 match value {
2215 "authorizerCredential" => Ok(__FieldTag::__authorizer_credential),
2216 "authorizer_credential" => Ok(__FieldTag::__authorizer_credential),
2217 "appInstallationId" => Ok(__FieldTag::__app_installation_id),
2218 "app_installation_id" => Ok(__FieldTag::__app_installation_id),
2219 _ => Ok(__FieldTag::Unknown(value.to_string())),
2220 }
2221 }
2222 }
2223 deserializer.deserialize_identifier(Visitor)
2224 }
2225 }
2226 struct Visitor;
2227 impl<'de> serde::de::Visitor<'de> for Visitor {
2228 type Value = GitHubConfig;
2229 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
2230 formatter.write_str("struct GitHubConfig")
2231 }
2232 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
2233 where
2234 A: serde::de::MapAccess<'de>,
2235 {
2236 #[allow(unused_imports)]
2237 use serde::de::Error;
2238 use std::option::Option::Some;
2239 let mut fields = std::collections::HashSet::new();
2240 let mut result = Self::Value::new();
2241 while let Some(tag) = map.next_key::<__FieldTag>()? {
2242 #[allow(clippy::match_single_binding)]
2243 match tag {
2244 __FieldTag::__authorizer_credential => {
2245 if !fields.insert(__FieldTag::__authorizer_credential) {
2246 return std::result::Result::Err(A::Error::duplicate_field(
2247 "multiple values for authorizer_credential",
2248 ));
2249 }
2250 result.authorizer_credential = map
2251 .next_value::<std::option::Option<crate::model::OAuthCredential>>(
2252 )?;
2253 }
2254 __FieldTag::__app_installation_id => {
2255 if !fields.insert(__FieldTag::__app_installation_id) {
2256 return std::result::Result::Err(A::Error::duplicate_field(
2257 "multiple values for app_installation_id",
2258 ));
2259 }
2260 struct __With(std::option::Option<i64>);
2261 impl<'de> serde::de::Deserialize<'de> for __With {
2262 fn deserialize<D>(
2263 deserializer: D,
2264 ) -> std::result::Result<Self, D::Error>
2265 where
2266 D: serde::de::Deserializer<'de>,
2267 {
2268 serde_with::As::< std::option::Option<wkt::internal::I64> >::deserialize(deserializer).map(__With)
2269 }
2270 }
2271 result.app_installation_id =
2272 map.next_value::<__With>()?.0.unwrap_or_default();
2273 }
2274 __FieldTag::Unknown(key) => {
2275 let value = map.next_value::<serde_json::Value>()?;
2276 result._unknown_fields.insert(key, value);
2277 }
2278 }
2279 }
2280 std::result::Result::Ok(result)
2281 }
2282 }
2283 deserializer.deserialize_any(Visitor)
2284 }
2285}
2286
2287#[doc(hidden)]
2288impl serde::ser::Serialize for GitHubConfig {
2289 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2290 where
2291 S: serde::ser::Serializer,
2292 {
2293 use serde::ser::SerializeMap;
2294 #[allow(unused_imports)]
2295 use std::option::Option::Some;
2296 let mut state = serializer.serialize_map(std::option::Option::None)?;
2297 if self.authorizer_credential.is_some() {
2298 state.serialize_entry("authorizerCredential", &self.authorizer_credential)?;
2299 }
2300 if !wkt::internal::is_default(&self.app_installation_id) {
2301 struct __With<'a>(&'a i64);
2302 impl<'a> serde::ser::Serialize for __With<'a> {
2303 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2304 where
2305 S: serde::ser::Serializer,
2306 {
2307 serde_with::As::<wkt::internal::I64>::serialize(self.0, serializer)
2308 }
2309 }
2310 state.serialize_entry("appInstallationId", &__With(&self.app_installation_id))?;
2311 }
2312 if !self._unknown_fields.is_empty() {
2313 for (key, value) in self._unknown_fields.iter() {
2314 state.serialize_entry(key, &value)?;
2315 }
2316 }
2317 state.end()
2318 }
2319}
2320
2321impl std::fmt::Debug for GitHubConfig {
2322 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2323 let mut debug_struct = f.debug_struct("GitHubConfig");
2324 debug_struct.field("authorizer_credential", &self.authorizer_credential);
2325 debug_struct.field("app_installation_id", &self.app_installation_id);
2326 if !self._unknown_fields.is_empty() {
2327 debug_struct.field("_unknown_fields", &self._unknown_fields);
2328 }
2329 debug_struct.finish()
2330 }
2331}
2332
2333#[derive(Clone, Default, PartialEq)]
2335#[non_exhaustive]
2336pub struct GitHubEnterpriseConfig {
2337 pub host_uri: std::string::String,
2339
2340 pub api_key: std::string::String,
2342
2343 pub app_id: i64,
2345
2346 pub app_slug: std::string::String,
2348
2349 pub private_key_secret_version: std::string::String,
2352
2353 pub webhook_secret_secret_version: std::string::String,
2356
2357 pub app_installation_id: i64,
2359
2360 pub service_directory_config: std::option::Option<crate::model::ServiceDirectoryConfig>,
2366
2367 pub ssl_ca: std::string::String,
2369
2370 pub server_version: std::string::String,
2372
2373 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2374}
2375
2376impl GitHubEnterpriseConfig {
2377 pub fn new() -> Self {
2378 std::default::Default::default()
2379 }
2380
2381 pub fn set_host_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2383 self.host_uri = v.into();
2384 self
2385 }
2386
2387 pub fn set_api_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2389 self.api_key = v.into();
2390 self
2391 }
2392
2393 pub fn set_app_id<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
2395 self.app_id = v.into();
2396 self
2397 }
2398
2399 pub fn set_app_slug<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2401 self.app_slug = v.into();
2402 self
2403 }
2404
2405 pub fn set_private_key_secret_version<T: std::convert::Into<std::string::String>>(
2407 mut self,
2408 v: T,
2409 ) -> Self {
2410 self.private_key_secret_version = v.into();
2411 self
2412 }
2413
2414 pub fn set_webhook_secret_secret_version<T: std::convert::Into<std::string::String>>(
2416 mut self,
2417 v: T,
2418 ) -> Self {
2419 self.webhook_secret_secret_version = v.into();
2420 self
2421 }
2422
2423 pub fn set_app_installation_id<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
2425 self.app_installation_id = v.into();
2426 self
2427 }
2428
2429 pub fn set_service_directory_config<T>(mut self, v: T) -> Self
2431 where
2432 T: std::convert::Into<crate::model::ServiceDirectoryConfig>,
2433 {
2434 self.service_directory_config = std::option::Option::Some(v.into());
2435 self
2436 }
2437
2438 pub fn set_or_clear_service_directory_config<T>(mut self, v: std::option::Option<T>) -> Self
2440 where
2441 T: std::convert::Into<crate::model::ServiceDirectoryConfig>,
2442 {
2443 self.service_directory_config = v.map(|x| x.into());
2444 self
2445 }
2446
2447 pub fn set_ssl_ca<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2449 self.ssl_ca = v.into();
2450 self
2451 }
2452
2453 pub fn set_server_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2455 self.server_version = v.into();
2456 self
2457 }
2458}
2459
2460impl wkt::message::Message for GitHubEnterpriseConfig {
2461 fn typename() -> &'static str {
2462 "type.googleapis.com/google.devtools.cloudbuild.v2.GitHubEnterpriseConfig"
2463 }
2464}
2465
2466#[doc(hidden)]
2467impl<'de> serde::de::Deserialize<'de> for GitHubEnterpriseConfig {
2468 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2469 where
2470 D: serde::Deserializer<'de>,
2471 {
2472 #[allow(non_camel_case_types)]
2473 #[doc(hidden)]
2474 #[derive(PartialEq, Eq, Hash)]
2475 enum __FieldTag {
2476 __host_uri,
2477 __api_key,
2478 __app_id,
2479 __app_slug,
2480 __private_key_secret_version,
2481 __webhook_secret_secret_version,
2482 __app_installation_id,
2483 __service_directory_config,
2484 __ssl_ca,
2485 __server_version,
2486 Unknown(std::string::String),
2487 }
2488 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
2489 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2490 where
2491 D: serde::Deserializer<'de>,
2492 {
2493 struct Visitor;
2494 impl<'de> serde::de::Visitor<'de> for Visitor {
2495 type Value = __FieldTag;
2496 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
2497 formatter.write_str("a field name for GitHubEnterpriseConfig")
2498 }
2499 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
2500 where
2501 E: serde::de::Error,
2502 {
2503 use std::result::Result::Ok;
2504 use std::string::ToString;
2505 match value {
2506 "hostUri" => Ok(__FieldTag::__host_uri),
2507 "host_uri" => Ok(__FieldTag::__host_uri),
2508 "apiKey" => Ok(__FieldTag::__api_key),
2509 "api_key" => Ok(__FieldTag::__api_key),
2510 "appId" => Ok(__FieldTag::__app_id),
2511 "app_id" => Ok(__FieldTag::__app_id),
2512 "appSlug" => Ok(__FieldTag::__app_slug),
2513 "app_slug" => Ok(__FieldTag::__app_slug),
2514 "privateKeySecretVersion" => {
2515 Ok(__FieldTag::__private_key_secret_version)
2516 }
2517 "private_key_secret_version" => {
2518 Ok(__FieldTag::__private_key_secret_version)
2519 }
2520 "webhookSecretSecretVersion" => {
2521 Ok(__FieldTag::__webhook_secret_secret_version)
2522 }
2523 "webhook_secret_secret_version" => {
2524 Ok(__FieldTag::__webhook_secret_secret_version)
2525 }
2526 "appInstallationId" => Ok(__FieldTag::__app_installation_id),
2527 "app_installation_id" => Ok(__FieldTag::__app_installation_id),
2528 "serviceDirectoryConfig" => Ok(__FieldTag::__service_directory_config),
2529 "service_directory_config" => {
2530 Ok(__FieldTag::__service_directory_config)
2531 }
2532 "sslCa" => Ok(__FieldTag::__ssl_ca),
2533 "ssl_ca" => Ok(__FieldTag::__ssl_ca),
2534 "serverVersion" => Ok(__FieldTag::__server_version),
2535 "server_version" => Ok(__FieldTag::__server_version),
2536 _ => Ok(__FieldTag::Unknown(value.to_string())),
2537 }
2538 }
2539 }
2540 deserializer.deserialize_identifier(Visitor)
2541 }
2542 }
2543 struct Visitor;
2544 impl<'de> serde::de::Visitor<'de> for Visitor {
2545 type Value = GitHubEnterpriseConfig;
2546 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
2547 formatter.write_str("struct GitHubEnterpriseConfig")
2548 }
2549 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
2550 where
2551 A: serde::de::MapAccess<'de>,
2552 {
2553 #[allow(unused_imports)]
2554 use serde::de::Error;
2555 use std::option::Option::Some;
2556 let mut fields = std::collections::HashSet::new();
2557 let mut result = Self::Value::new();
2558 while let Some(tag) = map.next_key::<__FieldTag>()? {
2559 #[allow(clippy::match_single_binding)]
2560 match tag {
2561 __FieldTag::__host_uri => {
2562 if !fields.insert(__FieldTag::__host_uri) {
2563 return std::result::Result::Err(A::Error::duplicate_field(
2564 "multiple values for host_uri",
2565 ));
2566 }
2567 result.host_uri = map
2568 .next_value::<std::option::Option<std::string::String>>()?
2569 .unwrap_or_default();
2570 }
2571 __FieldTag::__api_key => {
2572 if !fields.insert(__FieldTag::__api_key) {
2573 return std::result::Result::Err(A::Error::duplicate_field(
2574 "multiple values for api_key",
2575 ));
2576 }
2577 result.api_key = map
2578 .next_value::<std::option::Option<std::string::String>>()?
2579 .unwrap_or_default();
2580 }
2581 __FieldTag::__app_id => {
2582 if !fields.insert(__FieldTag::__app_id) {
2583 return std::result::Result::Err(A::Error::duplicate_field(
2584 "multiple values for app_id",
2585 ));
2586 }
2587 struct __With(std::option::Option<i64>);
2588 impl<'de> serde::de::Deserialize<'de> for __With {
2589 fn deserialize<D>(
2590 deserializer: D,
2591 ) -> std::result::Result<Self, D::Error>
2592 where
2593 D: serde::de::Deserializer<'de>,
2594 {
2595 serde_with::As::< std::option::Option<wkt::internal::I64> >::deserialize(deserializer).map(__With)
2596 }
2597 }
2598 result.app_id = map.next_value::<__With>()?.0.unwrap_or_default();
2599 }
2600 __FieldTag::__app_slug => {
2601 if !fields.insert(__FieldTag::__app_slug) {
2602 return std::result::Result::Err(A::Error::duplicate_field(
2603 "multiple values for app_slug",
2604 ));
2605 }
2606 result.app_slug = map
2607 .next_value::<std::option::Option<std::string::String>>()?
2608 .unwrap_or_default();
2609 }
2610 __FieldTag::__private_key_secret_version => {
2611 if !fields.insert(__FieldTag::__private_key_secret_version) {
2612 return std::result::Result::Err(A::Error::duplicate_field(
2613 "multiple values for private_key_secret_version",
2614 ));
2615 }
2616 result.private_key_secret_version = map
2617 .next_value::<std::option::Option<std::string::String>>()?
2618 .unwrap_or_default();
2619 }
2620 __FieldTag::__webhook_secret_secret_version => {
2621 if !fields.insert(__FieldTag::__webhook_secret_secret_version) {
2622 return std::result::Result::Err(A::Error::duplicate_field(
2623 "multiple values for webhook_secret_secret_version",
2624 ));
2625 }
2626 result.webhook_secret_secret_version = map
2627 .next_value::<std::option::Option<std::string::String>>()?
2628 .unwrap_or_default();
2629 }
2630 __FieldTag::__app_installation_id => {
2631 if !fields.insert(__FieldTag::__app_installation_id) {
2632 return std::result::Result::Err(A::Error::duplicate_field(
2633 "multiple values for app_installation_id",
2634 ));
2635 }
2636 struct __With(std::option::Option<i64>);
2637 impl<'de> serde::de::Deserialize<'de> for __With {
2638 fn deserialize<D>(
2639 deserializer: D,
2640 ) -> std::result::Result<Self, D::Error>
2641 where
2642 D: serde::de::Deserializer<'de>,
2643 {
2644 serde_with::As::< std::option::Option<wkt::internal::I64> >::deserialize(deserializer).map(__With)
2645 }
2646 }
2647 result.app_installation_id =
2648 map.next_value::<__With>()?.0.unwrap_or_default();
2649 }
2650 __FieldTag::__service_directory_config => {
2651 if !fields.insert(__FieldTag::__service_directory_config) {
2652 return std::result::Result::Err(A::Error::duplicate_field(
2653 "multiple values for service_directory_config",
2654 ));
2655 }
2656 result.service_directory_config = map.next_value::<std::option::Option<crate::model::ServiceDirectoryConfig>>()?
2657 ;
2658 }
2659 __FieldTag::__ssl_ca => {
2660 if !fields.insert(__FieldTag::__ssl_ca) {
2661 return std::result::Result::Err(A::Error::duplicate_field(
2662 "multiple values for ssl_ca",
2663 ));
2664 }
2665 result.ssl_ca = map
2666 .next_value::<std::option::Option<std::string::String>>()?
2667 .unwrap_or_default();
2668 }
2669 __FieldTag::__server_version => {
2670 if !fields.insert(__FieldTag::__server_version) {
2671 return std::result::Result::Err(A::Error::duplicate_field(
2672 "multiple values for server_version",
2673 ));
2674 }
2675 result.server_version = map
2676 .next_value::<std::option::Option<std::string::String>>()?
2677 .unwrap_or_default();
2678 }
2679 __FieldTag::Unknown(key) => {
2680 let value = map.next_value::<serde_json::Value>()?;
2681 result._unknown_fields.insert(key, value);
2682 }
2683 }
2684 }
2685 std::result::Result::Ok(result)
2686 }
2687 }
2688 deserializer.deserialize_any(Visitor)
2689 }
2690}
2691
2692#[doc(hidden)]
2693impl serde::ser::Serialize for GitHubEnterpriseConfig {
2694 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2695 where
2696 S: serde::ser::Serializer,
2697 {
2698 use serde::ser::SerializeMap;
2699 #[allow(unused_imports)]
2700 use std::option::Option::Some;
2701 let mut state = serializer.serialize_map(std::option::Option::None)?;
2702 if !self.host_uri.is_empty() {
2703 state.serialize_entry("hostUri", &self.host_uri)?;
2704 }
2705 if !self.api_key.is_empty() {
2706 state.serialize_entry("apiKey", &self.api_key)?;
2707 }
2708 if !wkt::internal::is_default(&self.app_id) {
2709 struct __With<'a>(&'a i64);
2710 impl<'a> serde::ser::Serialize for __With<'a> {
2711 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2712 where
2713 S: serde::ser::Serializer,
2714 {
2715 serde_with::As::<wkt::internal::I64>::serialize(self.0, serializer)
2716 }
2717 }
2718 state.serialize_entry("appId", &__With(&self.app_id))?;
2719 }
2720 if !self.app_slug.is_empty() {
2721 state.serialize_entry("appSlug", &self.app_slug)?;
2722 }
2723 if !self.private_key_secret_version.is_empty() {
2724 state.serialize_entry("privateKeySecretVersion", &self.private_key_secret_version)?;
2725 }
2726 if !self.webhook_secret_secret_version.is_empty() {
2727 state.serialize_entry(
2728 "webhookSecretSecretVersion",
2729 &self.webhook_secret_secret_version,
2730 )?;
2731 }
2732 if !wkt::internal::is_default(&self.app_installation_id) {
2733 struct __With<'a>(&'a i64);
2734 impl<'a> serde::ser::Serialize for __With<'a> {
2735 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2736 where
2737 S: serde::ser::Serializer,
2738 {
2739 serde_with::As::<wkt::internal::I64>::serialize(self.0, serializer)
2740 }
2741 }
2742 state.serialize_entry("appInstallationId", &__With(&self.app_installation_id))?;
2743 }
2744 if self.service_directory_config.is_some() {
2745 state.serialize_entry("serviceDirectoryConfig", &self.service_directory_config)?;
2746 }
2747 if !self.ssl_ca.is_empty() {
2748 state.serialize_entry("sslCa", &self.ssl_ca)?;
2749 }
2750 if !self.server_version.is_empty() {
2751 state.serialize_entry("serverVersion", &self.server_version)?;
2752 }
2753 if !self._unknown_fields.is_empty() {
2754 for (key, value) in self._unknown_fields.iter() {
2755 state.serialize_entry(key, &value)?;
2756 }
2757 }
2758 state.end()
2759 }
2760}
2761
2762impl std::fmt::Debug for GitHubEnterpriseConfig {
2763 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2764 let mut debug_struct = f.debug_struct("GitHubEnterpriseConfig");
2765 debug_struct.field("host_uri", &self.host_uri);
2766 debug_struct.field("api_key", &self.api_key);
2767 debug_struct.field("app_id", &self.app_id);
2768 debug_struct.field("app_slug", &self.app_slug);
2769 debug_struct.field(
2770 "private_key_secret_version",
2771 &self.private_key_secret_version,
2772 );
2773 debug_struct.field(
2774 "webhook_secret_secret_version",
2775 &self.webhook_secret_secret_version,
2776 );
2777 debug_struct.field("app_installation_id", &self.app_installation_id);
2778 debug_struct.field("service_directory_config", &self.service_directory_config);
2779 debug_struct.field("ssl_ca", &self.ssl_ca);
2780 debug_struct.field("server_version", &self.server_version);
2781 if !self._unknown_fields.is_empty() {
2782 debug_struct.field("_unknown_fields", &self._unknown_fields);
2783 }
2784 debug_struct.finish()
2785 }
2786}
2787
2788#[derive(Clone, Default, PartialEq)]
2791#[non_exhaustive]
2792pub struct GitLabConfig {
2793 pub host_uri: std::string::String,
2796
2797 pub webhook_secret_secret_version: std::string::String,
2801
2802 pub read_authorizer_credential: std::option::Option<crate::model::UserCredential>,
2805
2806 pub authorizer_credential: std::option::Option<crate::model::UserCredential>,
2808
2809 pub service_directory_config: std::option::Option<crate::model::ServiceDirectoryConfig>,
2815
2816 pub ssl_ca: std::string::String,
2818
2819 pub server_version: std::string::String,
2822
2823 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2824}
2825
2826impl GitLabConfig {
2827 pub fn new() -> Self {
2828 std::default::Default::default()
2829 }
2830
2831 pub fn set_host_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2833 self.host_uri = v.into();
2834 self
2835 }
2836
2837 pub fn set_webhook_secret_secret_version<T: std::convert::Into<std::string::String>>(
2839 mut self,
2840 v: T,
2841 ) -> Self {
2842 self.webhook_secret_secret_version = v.into();
2843 self
2844 }
2845
2846 pub fn set_read_authorizer_credential<T>(mut self, v: T) -> Self
2848 where
2849 T: std::convert::Into<crate::model::UserCredential>,
2850 {
2851 self.read_authorizer_credential = std::option::Option::Some(v.into());
2852 self
2853 }
2854
2855 pub fn set_or_clear_read_authorizer_credential<T>(mut self, v: std::option::Option<T>) -> Self
2857 where
2858 T: std::convert::Into<crate::model::UserCredential>,
2859 {
2860 self.read_authorizer_credential = v.map(|x| x.into());
2861 self
2862 }
2863
2864 pub fn set_authorizer_credential<T>(mut self, v: T) -> Self
2866 where
2867 T: std::convert::Into<crate::model::UserCredential>,
2868 {
2869 self.authorizer_credential = std::option::Option::Some(v.into());
2870 self
2871 }
2872
2873 pub fn set_or_clear_authorizer_credential<T>(mut self, v: std::option::Option<T>) -> Self
2875 where
2876 T: std::convert::Into<crate::model::UserCredential>,
2877 {
2878 self.authorizer_credential = v.map(|x| x.into());
2879 self
2880 }
2881
2882 pub fn set_service_directory_config<T>(mut self, v: T) -> Self
2884 where
2885 T: std::convert::Into<crate::model::ServiceDirectoryConfig>,
2886 {
2887 self.service_directory_config = std::option::Option::Some(v.into());
2888 self
2889 }
2890
2891 pub fn set_or_clear_service_directory_config<T>(mut self, v: std::option::Option<T>) -> Self
2893 where
2894 T: std::convert::Into<crate::model::ServiceDirectoryConfig>,
2895 {
2896 self.service_directory_config = v.map(|x| x.into());
2897 self
2898 }
2899
2900 pub fn set_ssl_ca<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2902 self.ssl_ca = v.into();
2903 self
2904 }
2905
2906 pub fn set_server_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2908 self.server_version = v.into();
2909 self
2910 }
2911}
2912
2913impl wkt::message::Message for GitLabConfig {
2914 fn typename() -> &'static str {
2915 "type.googleapis.com/google.devtools.cloudbuild.v2.GitLabConfig"
2916 }
2917}
2918
2919#[doc(hidden)]
2920impl<'de> serde::de::Deserialize<'de> for GitLabConfig {
2921 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2922 where
2923 D: serde::Deserializer<'de>,
2924 {
2925 #[allow(non_camel_case_types)]
2926 #[doc(hidden)]
2927 #[derive(PartialEq, Eq, Hash)]
2928 enum __FieldTag {
2929 __host_uri,
2930 __webhook_secret_secret_version,
2931 __read_authorizer_credential,
2932 __authorizer_credential,
2933 __service_directory_config,
2934 __ssl_ca,
2935 __server_version,
2936 Unknown(std::string::String),
2937 }
2938 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
2939 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2940 where
2941 D: serde::Deserializer<'de>,
2942 {
2943 struct Visitor;
2944 impl<'de> serde::de::Visitor<'de> for Visitor {
2945 type Value = __FieldTag;
2946 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
2947 formatter.write_str("a field name for GitLabConfig")
2948 }
2949 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
2950 where
2951 E: serde::de::Error,
2952 {
2953 use std::result::Result::Ok;
2954 use std::string::ToString;
2955 match value {
2956 "hostUri" => Ok(__FieldTag::__host_uri),
2957 "host_uri" => Ok(__FieldTag::__host_uri),
2958 "webhookSecretSecretVersion" => {
2959 Ok(__FieldTag::__webhook_secret_secret_version)
2960 }
2961 "webhook_secret_secret_version" => {
2962 Ok(__FieldTag::__webhook_secret_secret_version)
2963 }
2964 "readAuthorizerCredential" => {
2965 Ok(__FieldTag::__read_authorizer_credential)
2966 }
2967 "read_authorizer_credential" => {
2968 Ok(__FieldTag::__read_authorizer_credential)
2969 }
2970 "authorizerCredential" => Ok(__FieldTag::__authorizer_credential),
2971 "authorizer_credential" => Ok(__FieldTag::__authorizer_credential),
2972 "serviceDirectoryConfig" => Ok(__FieldTag::__service_directory_config),
2973 "service_directory_config" => {
2974 Ok(__FieldTag::__service_directory_config)
2975 }
2976 "sslCa" => Ok(__FieldTag::__ssl_ca),
2977 "ssl_ca" => Ok(__FieldTag::__ssl_ca),
2978 "serverVersion" => Ok(__FieldTag::__server_version),
2979 "server_version" => Ok(__FieldTag::__server_version),
2980 _ => Ok(__FieldTag::Unknown(value.to_string())),
2981 }
2982 }
2983 }
2984 deserializer.deserialize_identifier(Visitor)
2985 }
2986 }
2987 struct Visitor;
2988 impl<'de> serde::de::Visitor<'de> for Visitor {
2989 type Value = GitLabConfig;
2990 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
2991 formatter.write_str("struct GitLabConfig")
2992 }
2993 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
2994 where
2995 A: serde::de::MapAccess<'de>,
2996 {
2997 #[allow(unused_imports)]
2998 use serde::de::Error;
2999 use std::option::Option::Some;
3000 let mut fields = std::collections::HashSet::new();
3001 let mut result = Self::Value::new();
3002 while let Some(tag) = map.next_key::<__FieldTag>()? {
3003 #[allow(clippy::match_single_binding)]
3004 match tag {
3005 __FieldTag::__host_uri => {
3006 if !fields.insert(__FieldTag::__host_uri) {
3007 return std::result::Result::Err(A::Error::duplicate_field(
3008 "multiple values for host_uri",
3009 ));
3010 }
3011 result.host_uri = map
3012 .next_value::<std::option::Option<std::string::String>>()?
3013 .unwrap_or_default();
3014 }
3015 __FieldTag::__webhook_secret_secret_version => {
3016 if !fields.insert(__FieldTag::__webhook_secret_secret_version) {
3017 return std::result::Result::Err(A::Error::duplicate_field(
3018 "multiple values for webhook_secret_secret_version",
3019 ));
3020 }
3021 result.webhook_secret_secret_version = map
3022 .next_value::<std::option::Option<std::string::String>>()?
3023 .unwrap_or_default();
3024 }
3025 __FieldTag::__read_authorizer_credential => {
3026 if !fields.insert(__FieldTag::__read_authorizer_credential) {
3027 return std::result::Result::Err(A::Error::duplicate_field(
3028 "multiple values for read_authorizer_credential",
3029 ));
3030 }
3031 result.read_authorizer_credential = map
3032 .next_value::<std::option::Option<crate::model::UserCredential>>(
3033 )?;
3034 }
3035 __FieldTag::__authorizer_credential => {
3036 if !fields.insert(__FieldTag::__authorizer_credential) {
3037 return std::result::Result::Err(A::Error::duplicate_field(
3038 "multiple values for authorizer_credential",
3039 ));
3040 }
3041 result.authorizer_credential = map
3042 .next_value::<std::option::Option<crate::model::UserCredential>>(
3043 )?;
3044 }
3045 __FieldTag::__service_directory_config => {
3046 if !fields.insert(__FieldTag::__service_directory_config) {
3047 return std::result::Result::Err(A::Error::duplicate_field(
3048 "multiple values for service_directory_config",
3049 ));
3050 }
3051 result.service_directory_config = map.next_value::<std::option::Option<crate::model::ServiceDirectoryConfig>>()?
3052 ;
3053 }
3054 __FieldTag::__ssl_ca => {
3055 if !fields.insert(__FieldTag::__ssl_ca) {
3056 return std::result::Result::Err(A::Error::duplicate_field(
3057 "multiple values for ssl_ca",
3058 ));
3059 }
3060 result.ssl_ca = map
3061 .next_value::<std::option::Option<std::string::String>>()?
3062 .unwrap_or_default();
3063 }
3064 __FieldTag::__server_version => {
3065 if !fields.insert(__FieldTag::__server_version) {
3066 return std::result::Result::Err(A::Error::duplicate_field(
3067 "multiple values for server_version",
3068 ));
3069 }
3070 result.server_version = map
3071 .next_value::<std::option::Option<std::string::String>>()?
3072 .unwrap_or_default();
3073 }
3074 __FieldTag::Unknown(key) => {
3075 let value = map.next_value::<serde_json::Value>()?;
3076 result._unknown_fields.insert(key, value);
3077 }
3078 }
3079 }
3080 std::result::Result::Ok(result)
3081 }
3082 }
3083 deserializer.deserialize_any(Visitor)
3084 }
3085}
3086
3087#[doc(hidden)]
3088impl serde::ser::Serialize for GitLabConfig {
3089 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3090 where
3091 S: serde::ser::Serializer,
3092 {
3093 use serde::ser::SerializeMap;
3094 #[allow(unused_imports)]
3095 use std::option::Option::Some;
3096 let mut state = serializer.serialize_map(std::option::Option::None)?;
3097 if !self.host_uri.is_empty() {
3098 state.serialize_entry("hostUri", &self.host_uri)?;
3099 }
3100 if !self.webhook_secret_secret_version.is_empty() {
3101 state.serialize_entry(
3102 "webhookSecretSecretVersion",
3103 &self.webhook_secret_secret_version,
3104 )?;
3105 }
3106 if self.read_authorizer_credential.is_some() {
3107 state.serialize_entry("readAuthorizerCredential", &self.read_authorizer_credential)?;
3108 }
3109 if self.authorizer_credential.is_some() {
3110 state.serialize_entry("authorizerCredential", &self.authorizer_credential)?;
3111 }
3112 if self.service_directory_config.is_some() {
3113 state.serialize_entry("serviceDirectoryConfig", &self.service_directory_config)?;
3114 }
3115 if !self.ssl_ca.is_empty() {
3116 state.serialize_entry("sslCa", &self.ssl_ca)?;
3117 }
3118 if !self.server_version.is_empty() {
3119 state.serialize_entry("serverVersion", &self.server_version)?;
3120 }
3121 if !self._unknown_fields.is_empty() {
3122 for (key, value) in self._unknown_fields.iter() {
3123 state.serialize_entry(key, &value)?;
3124 }
3125 }
3126 state.end()
3127 }
3128}
3129
3130impl std::fmt::Debug for GitLabConfig {
3131 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3132 let mut debug_struct = f.debug_struct("GitLabConfig");
3133 debug_struct.field("host_uri", &self.host_uri);
3134 debug_struct.field(
3135 "webhook_secret_secret_version",
3136 &self.webhook_secret_secret_version,
3137 );
3138 debug_struct.field(
3139 "read_authorizer_credential",
3140 &self.read_authorizer_credential,
3141 );
3142 debug_struct.field("authorizer_credential", &self.authorizer_credential);
3143 debug_struct.field("service_directory_config", &self.service_directory_config);
3144 debug_struct.field("ssl_ca", &self.ssl_ca);
3145 debug_struct.field("server_version", &self.server_version);
3146 if !self._unknown_fields.is_empty() {
3147 debug_struct.field("_unknown_fields", &self._unknown_fields);
3148 }
3149 debug_struct.finish()
3150 }
3151}
3152
3153#[derive(Clone, Default, PartialEq)]
3155#[non_exhaustive]
3156pub struct BitbucketDataCenterConfig {
3157 pub host_uri: std::string::String,
3160
3161 pub webhook_secret_secret_version: std::string::String,
3165
3166 pub read_authorizer_credential: std::option::Option<crate::model::UserCredential>,
3168
3169 pub authorizer_credential: std::option::Option<crate::model::UserCredential>,
3171
3172 pub service_directory_config: std::option::Option<crate::model::ServiceDirectoryConfig>,
3178
3179 pub ssl_ca: std::string::String,
3181
3182 pub server_version: std::string::String,
3185
3186 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3187}
3188
3189impl BitbucketDataCenterConfig {
3190 pub fn new() -> Self {
3191 std::default::Default::default()
3192 }
3193
3194 pub fn set_host_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3196 self.host_uri = v.into();
3197 self
3198 }
3199
3200 pub fn set_webhook_secret_secret_version<T: std::convert::Into<std::string::String>>(
3202 mut self,
3203 v: T,
3204 ) -> Self {
3205 self.webhook_secret_secret_version = v.into();
3206 self
3207 }
3208
3209 pub fn set_read_authorizer_credential<T>(mut self, v: T) -> Self
3211 where
3212 T: std::convert::Into<crate::model::UserCredential>,
3213 {
3214 self.read_authorizer_credential = std::option::Option::Some(v.into());
3215 self
3216 }
3217
3218 pub fn set_or_clear_read_authorizer_credential<T>(mut self, v: std::option::Option<T>) -> Self
3220 where
3221 T: std::convert::Into<crate::model::UserCredential>,
3222 {
3223 self.read_authorizer_credential = v.map(|x| x.into());
3224 self
3225 }
3226
3227 pub fn set_authorizer_credential<T>(mut self, v: T) -> Self
3229 where
3230 T: std::convert::Into<crate::model::UserCredential>,
3231 {
3232 self.authorizer_credential = std::option::Option::Some(v.into());
3233 self
3234 }
3235
3236 pub fn set_or_clear_authorizer_credential<T>(mut self, v: std::option::Option<T>) -> Self
3238 where
3239 T: std::convert::Into<crate::model::UserCredential>,
3240 {
3241 self.authorizer_credential = v.map(|x| x.into());
3242 self
3243 }
3244
3245 pub fn set_service_directory_config<T>(mut self, v: T) -> Self
3247 where
3248 T: std::convert::Into<crate::model::ServiceDirectoryConfig>,
3249 {
3250 self.service_directory_config = std::option::Option::Some(v.into());
3251 self
3252 }
3253
3254 pub fn set_or_clear_service_directory_config<T>(mut self, v: std::option::Option<T>) -> Self
3256 where
3257 T: std::convert::Into<crate::model::ServiceDirectoryConfig>,
3258 {
3259 self.service_directory_config = v.map(|x| x.into());
3260 self
3261 }
3262
3263 pub fn set_ssl_ca<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3265 self.ssl_ca = v.into();
3266 self
3267 }
3268
3269 pub fn set_server_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3271 self.server_version = v.into();
3272 self
3273 }
3274}
3275
3276impl wkt::message::Message for BitbucketDataCenterConfig {
3277 fn typename() -> &'static str {
3278 "type.googleapis.com/google.devtools.cloudbuild.v2.BitbucketDataCenterConfig"
3279 }
3280}
3281
3282#[doc(hidden)]
3283impl<'de> serde::de::Deserialize<'de> for BitbucketDataCenterConfig {
3284 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3285 where
3286 D: serde::Deserializer<'de>,
3287 {
3288 #[allow(non_camel_case_types)]
3289 #[doc(hidden)]
3290 #[derive(PartialEq, Eq, Hash)]
3291 enum __FieldTag {
3292 __host_uri,
3293 __webhook_secret_secret_version,
3294 __read_authorizer_credential,
3295 __authorizer_credential,
3296 __service_directory_config,
3297 __ssl_ca,
3298 __server_version,
3299 Unknown(std::string::String),
3300 }
3301 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
3302 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3303 where
3304 D: serde::Deserializer<'de>,
3305 {
3306 struct Visitor;
3307 impl<'de> serde::de::Visitor<'de> for Visitor {
3308 type Value = __FieldTag;
3309 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
3310 formatter.write_str("a field name for BitbucketDataCenterConfig")
3311 }
3312 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
3313 where
3314 E: serde::de::Error,
3315 {
3316 use std::result::Result::Ok;
3317 use std::string::ToString;
3318 match value {
3319 "hostUri" => Ok(__FieldTag::__host_uri),
3320 "host_uri" => Ok(__FieldTag::__host_uri),
3321 "webhookSecretSecretVersion" => {
3322 Ok(__FieldTag::__webhook_secret_secret_version)
3323 }
3324 "webhook_secret_secret_version" => {
3325 Ok(__FieldTag::__webhook_secret_secret_version)
3326 }
3327 "readAuthorizerCredential" => {
3328 Ok(__FieldTag::__read_authorizer_credential)
3329 }
3330 "read_authorizer_credential" => {
3331 Ok(__FieldTag::__read_authorizer_credential)
3332 }
3333 "authorizerCredential" => Ok(__FieldTag::__authorizer_credential),
3334 "authorizer_credential" => Ok(__FieldTag::__authorizer_credential),
3335 "serviceDirectoryConfig" => Ok(__FieldTag::__service_directory_config),
3336 "service_directory_config" => {
3337 Ok(__FieldTag::__service_directory_config)
3338 }
3339 "sslCa" => Ok(__FieldTag::__ssl_ca),
3340 "ssl_ca" => Ok(__FieldTag::__ssl_ca),
3341 "serverVersion" => Ok(__FieldTag::__server_version),
3342 "server_version" => Ok(__FieldTag::__server_version),
3343 _ => Ok(__FieldTag::Unknown(value.to_string())),
3344 }
3345 }
3346 }
3347 deserializer.deserialize_identifier(Visitor)
3348 }
3349 }
3350 struct Visitor;
3351 impl<'de> serde::de::Visitor<'de> for Visitor {
3352 type Value = BitbucketDataCenterConfig;
3353 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
3354 formatter.write_str("struct BitbucketDataCenterConfig")
3355 }
3356 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
3357 where
3358 A: serde::de::MapAccess<'de>,
3359 {
3360 #[allow(unused_imports)]
3361 use serde::de::Error;
3362 use std::option::Option::Some;
3363 let mut fields = std::collections::HashSet::new();
3364 let mut result = Self::Value::new();
3365 while let Some(tag) = map.next_key::<__FieldTag>()? {
3366 #[allow(clippy::match_single_binding)]
3367 match tag {
3368 __FieldTag::__host_uri => {
3369 if !fields.insert(__FieldTag::__host_uri) {
3370 return std::result::Result::Err(A::Error::duplicate_field(
3371 "multiple values for host_uri",
3372 ));
3373 }
3374 result.host_uri = map
3375 .next_value::<std::option::Option<std::string::String>>()?
3376 .unwrap_or_default();
3377 }
3378 __FieldTag::__webhook_secret_secret_version => {
3379 if !fields.insert(__FieldTag::__webhook_secret_secret_version) {
3380 return std::result::Result::Err(A::Error::duplicate_field(
3381 "multiple values for webhook_secret_secret_version",
3382 ));
3383 }
3384 result.webhook_secret_secret_version = map
3385 .next_value::<std::option::Option<std::string::String>>()?
3386 .unwrap_or_default();
3387 }
3388 __FieldTag::__read_authorizer_credential => {
3389 if !fields.insert(__FieldTag::__read_authorizer_credential) {
3390 return std::result::Result::Err(A::Error::duplicate_field(
3391 "multiple values for read_authorizer_credential",
3392 ));
3393 }
3394 result.read_authorizer_credential = map
3395 .next_value::<std::option::Option<crate::model::UserCredential>>(
3396 )?;
3397 }
3398 __FieldTag::__authorizer_credential => {
3399 if !fields.insert(__FieldTag::__authorizer_credential) {
3400 return std::result::Result::Err(A::Error::duplicate_field(
3401 "multiple values for authorizer_credential",
3402 ));
3403 }
3404 result.authorizer_credential = map
3405 .next_value::<std::option::Option<crate::model::UserCredential>>(
3406 )?;
3407 }
3408 __FieldTag::__service_directory_config => {
3409 if !fields.insert(__FieldTag::__service_directory_config) {
3410 return std::result::Result::Err(A::Error::duplicate_field(
3411 "multiple values for service_directory_config",
3412 ));
3413 }
3414 result.service_directory_config = map.next_value::<std::option::Option<crate::model::ServiceDirectoryConfig>>()?
3415 ;
3416 }
3417 __FieldTag::__ssl_ca => {
3418 if !fields.insert(__FieldTag::__ssl_ca) {
3419 return std::result::Result::Err(A::Error::duplicate_field(
3420 "multiple values for ssl_ca",
3421 ));
3422 }
3423 result.ssl_ca = map
3424 .next_value::<std::option::Option<std::string::String>>()?
3425 .unwrap_or_default();
3426 }
3427 __FieldTag::__server_version => {
3428 if !fields.insert(__FieldTag::__server_version) {
3429 return std::result::Result::Err(A::Error::duplicate_field(
3430 "multiple values for server_version",
3431 ));
3432 }
3433 result.server_version = map
3434 .next_value::<std::option::Option<std::string::String>>()?
3435 .unwrap_or_default();
3436 }
3437 __FieldTag::Unknown(key) => {
3438 let value = map.next_value::<serde_json::Value>()?;
3439 result._unknown_fields.insert(key, value);
3440 }
3441 }
3442 }
3443 std::result::Result::Ok(result)
3444 }
3445 }
3446 deserializer.deserialize_any(Visitor)
3447 }
3448}
3449
3450#[doc(hidden)]
3451impl serde::ser::Serialize for BitbucketDataCenterConfig {
3452 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3453 where
3454 S: serde::ser::Serializer,
3455 {
3456 use serde::ser::SerializeMap;
3457 #[allow(unused_imports)]
3458 use std::option::Option::Some;
3459 let mut state = serializer.serialize_map(std::option::Option::None)?;
3460 if !self.host_uri.is_empty() {
3461 state.serialize_entry("hostUri", &self.host_uri)?;
3462 }
3463 if !self.webhook_secret_secret_version.is_empty() {
3464 state.serialize_entry(
3465 "webhookSecretSecretVersion",
3466 &self.webhook_secret_secret_version,
3467 )?;
3468 }
3469 if self.read_authorizer_credential.is_some() {
3470 state.serialize_entry("readAuthorizerCredential", &self.read_authorizer_credential)?;
3471 }
3472 if self.authorizer_credential.is_some() {
3473 state.serialize_entry("authorizerCredential", &self.authorizer_credential)?;
3474 }
3475 if self.service_directory_config.is_some() {
3476 state.serialize_entry("serviceDirectoryConfig", &self.service_directory_config)?;
3477 }
3478 if !self.ssl_ca.is_empty() {
3479 state.serialize_entry("sslCa", &self.ssl_ca)?;
3480 }
3481 if !self.server_version.is_empty() {
3482 state.serialize_entry("serverVersion", &self.server_version)?;
3483 }
3484 if !self._unknown_fields.is_empty() {
3485 for (key, value) in self._unknown_fields.iter() {
3486 state.serialize_entry(key, &value)?;
3487 }
3488 }
3489 state.end()
3490 }
3491}
3492
3493impl std::fmt::Debug for BitbucketDataCenterConfig {
3494 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3495 let mut debug_struct = f.debug_struct("BitbucketDataCenterConfig");
3496 debug_struct.field("host_uri", &self.host_uri);
3497 debug_struct.field(
3498 "webhook_secret_secret_version",
3499 &self.webhook_secret_secret_version,
3500 );
3501 debug_struct.field(
3502 "read_authorizer_credential",
3503 &self.read_authorizer_credential,
3504 );
3505 debug_struct.field("authorizer_credential", &self.authorizer_credential);
3506 debug_struct.field("service_directory_config", &self.service_directory_config);
3507 debug_struct.field("ssl_ca", &self.ssl_ca);
3508 debug_struct.field("server_version", &self.server_version);
3509 if !self._unknown_fields.is_empty() {
3510 debug_struct.field("_unknown_fields", &self._unknown_fields);
3511 }
3512 debug_struct.finish()
3513 }
3514}
3515
3516#[derive(Clone, Default, PartialEq)]
3518#[non_exhaustive]
3519pub struct BitbucketCloudConfig {
3520 pub workspace: std::string::String,
3523
3524 pub webhook_secret_secret_version: std::string::String,
3527
3528 pub read_authorizer_credential: std::option::Option<crate::model::UserCredential>,
3532
3533 pub authorizer_credential: std::option::Option<crate::model::UserCredential>,
3538
3539 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3540}
3541
3542impl BitbucketCloudConfig {
3543 pub fn new() -> Self {
3544 std::default::Default::default()
3545 }
3546
3547 pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3549 self.workspace = v.into();
3550 self
3551 }
3552
3553 pub fn set_webhook_secret_secret_version<T: std::convert::Into<std::string::String>>(
3555 mut self,
3556 v: T,
3557 ) -> Self {
3558 self.webhook_secret_secret_version = v.into();
3559 self
3560 }
3561
3562 pub fn set_read_authorizer_credential<T>(mut self, v: T) -> Self
3564 where
3565 T: std::convert::Into<crate::model::UserCredential>,
3566 {
3567 self.read_authorizer_credential = std::option::Option::Some(v.into());
3568 self
3569 }
3570
3571 pub fn set_or_clear_read_authorizer_credential<T>(mut self, v: std::option::Option<T>) -> Self
3573 where
3574 T: std::convert::Into<crate::model::UserCredential>,
3575 {
3576 self.read_authorizer_credential = v.map(|x| x.into());
3577 self
3578 }
3579
3580 pub fn set_authorizer_credential<T>(mut self, v: T) -> Self
3582 where
3583 T: std::convert::Into<crate::model::UserCredential>,
3584 {
3585 self.authorizer_credential = std::option::Option::Some(v.into());
3586 self
3587 }
3588
3589 pub fn set_or_clear_authorizer_credential<T>(mut self, v: std::option::Option<T>) -> Self
3591 where
3592 T: std::convert::Into<crate::model::UserCredential>,
3593 {
3594 self.authorizer_credential = v.map(|x| x.into());
3595 self
3596 }
3597}
3598
3599impl wkt::message::Message for BitbucketCloudConfig {
3600 fn typename() -> &'static str {
3601 "type.googleapis.com/google.devtools.cloudbuild.v2.BitbucketCloudConfig"
3602 }
3603}
3604
3605#[doc(hidden)]
3606impl<'de> serde::de::Deserialize<'de> for BitbucketCloudConfig {
3607 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3608 where
3609 D: serde::Deserializer<'de>,
3610 {
3611 #[allow(non_camel_case_types)]
3612 #[doc(hidden)]
3613 #[derive(PartialEq, Eq, Hash)]
3614 enum __FieldTag {
3615 __workspace,
3616 __webhook_secret_secret_version,
3617 __read_authorizer_credential,
3618 __authorizer_credential,
3619 Unknown(std::string::String),
3620 }
3621 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
3622 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3623 where
3624 D: serde::Deserializer<'de>,
3625 {
3626 struct Visitor;
3627 impl<'de> serde::de::Visitor<'de> for Visitor {
3628 type Value = __FieldTag;
3629 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
3630 formatter.write_str("a field name for BitbucketCloudConfig")
3631 }
3632 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
3633 where
3634 E: serde::de::Error,
3635 {
3636 use std::result::Result::Ok;
3637 use std::string::ToString;
3638 match value {
3639 "workspace" => Ok(__FieldTag::__workspace),
3640 "webhookSecretSecretVersion" => {
3641 Ok(__FieldTag::__webhook_secret_secret_version)
3642 }
3643 "webhook_secret_secret_version" => {
3644 Ok(__FieldTag::__webhook_secret_secret_version)
3645 }
3646 "readAuthorizerCredential" => {
3647 Ok(__FieldTag::__read_authorizer_credential)
3648 }
3649 "read_authorizer_credential" => {
3650 Ok(__FieldTag::__read_authorizer_credential)
3651 }
3652 "authorizerCredential" => Ok(__FieldTag::__authorizer_credential),
3653 "authorizer_credential" => Ok(__FieldTag::__authorizer_credential),
3654 _ => Ok(__FieldTag::Unknown(value.to_string())),
3655 }
3656 }
3657 }
3658 deserializer.deserialize_identifier(Visitor)
3659 }
3660 }
3661 struct Visitor;
3662 impl<'de> serde::de::Visitor<'de> for Visitor {
3663 type Value = BitbucketCloudConfig;
3664 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
3665 formatter.write_str("struct BitbucketCloudConfig")
3666 }
3667 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
3668 where
3669 A: serde::de::MapAccess<'de>,
3670 {
3671 #[allow(unused_imports)]
3672 use serde::de::Error;
3673 use std::option::Option::Some;
3674 let mut fields = std::collections::HashSet::new();
3675 let mut result = Self::Value::new();
3676 while let Some(tag) = map.next_key::<__FieldTag>()? {
3677 #[allow(clippy::match_single_binding)]
3678 match tag {
3679 __FieldTag::__workspace => {
3680 if !fields.insert(__FieldTag::__workspace) {
3681 return std::result::Result::Err(A::Error::duplicate_field(
3682 "multiple values for workspace",
3683 ));
3684 }
3685 result.workspace = map
3686 .next_value::<std::option::Option<std::string::String>>()?
3687 .unwrap_or_default();
3688 }
3689 __FieldTag::__webhook_secret_secret_version => {
3690 if !fields.insert(__FieldTag::__webhook_secret_secret_version) {
3691 return std::result::Result::Err(A::Error::duplicate_field(
3692 "multiple values for webhook_secret_secret_version",
3693 ));
3694 }
3695 result.webhook_secret_secret_version = map
3696 .next_value::<std::option::Option<std::string::String>>()?
3697 .unwrap_or_default();
3698 }
3699 __FieldTag::__read_authorizer_credential => {
3700 if !fields.insert(__FieldTag::__read_authorizer_credential) {
3701 return std::result::Result::Err(A::Error::duplicate_field(
3702 "multiple values for read_authorizer_credential",
3703 ));
3704 }
3705 result.read_authorizer_credential = map
3706 .next_value::<std::option::Option<crate::model::UserCredential>>(
3707 )?;
3708 }
3709 __FieldTag::__authorizer_credential => {
3710 if !fields.insert(__FieldTag::__authorizer_credential) {
3711 return std::result::Result::Err(A::Error::duplicate_field(
3712 "multiple values for authorizer_credential",
3713 ));
3714 }
3715 result.authorizer_credential = map
3716 .next_value::<std::option::Option<crate::model::UserCredential>>(
3717 )?;
3718 }
3719 __FieldTag::Unknown(key) => {
3720 let value = map.next_value::<serde_json::Value>()?;
3721 result._unknown_fields.insert(key, value);
3722 }
3723 }
3724 }
3725 std::result::Result::Ok(result)
3726 }
3727 }
3728 deserializer.deserialize_any(Visitor)
3729 }
3730}
3731
3732#[doc(hidden)]
3733impl serde::ser::Serialize for BitbucketCloudConfig {
3734 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3735 where
3736 S: serde::ser::Serializer,
3737 {
3738 use serde::ser::SerializeMap;
3739 #[allow(unused_imports)]
3740 use std::option::Option::Some;
3741 let mut state = serializer.serialize_map(std::option::Option::None)?;
3742 if !self.workspace.is_empty() {
3743 state.serialize_entry("workspace", &self.workspace)?;
3744 }
3745 if !self.webhook_secret_secret_version.is_empty() {
3746 state.serialize_entry(
3747 "webhookSecretSecretVersion",
3748 &self.webhook_secret_secret_version,
3749 )?;
3750 }
3751 if self.read_authorizer_credential.is_some() {
3752 state.serialize_entry("readAuthorizerCredential", &self.read_authorizer_credential)?;
3753 }
3754 if self.authorizer_credential.is_some() {
3755 state.serialize_entry("authorizerCredential", &self.authorizer_credential)?;
3756 }
3757 if !self._unknown_fields.is_empty() {
3758 for (key, value) in self._unknown_fields.iter() {
3759 state.serialize_entry(key, &value)?;
3760 }
3761 }
3762 state.end()
3763 }
3764}
3765
3766impl std::fmt::Debug for BitbucketCloudConfig {
3767 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3768 let mut debug_struct = f.debug_struct("BitbucketCloudConfig");
3769 debug_struct.field("workspace", &self.workspace);
3770 debug_struct.field(
3771 "webhook_secret_secret_version",
3772 &self.webhook_secret_secret_version,
3773 );
3774 debug_struct.field(
3775 "read_authorizer_credential",
3776 &self.read_authorizer_credential,
3777 );
3778 debug_struct.field("authorizer_credential", &self.authorizer_credential);
3779 if !self._unknown_fields.is_empty() {
3780 debug_struct.field("_unknown_fields", &self._unknown_fields);
3781 }
3782 debug_struct.finish()
3783 }
3784}
3785
3786#[derive(Clone, Default, PartialEq)]
3789#[non_exhaustive]
3790pub struct ServiceDirectoryConfig {
3791 pub service: std::string::String,
3795
3796 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3797}
3798
3799impl ServiceDirectoryConfig {
3800 pub fn new() -> Self {
3801 std::default::Default::default()
3802 }
3803
3804 pub fn set_service<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3806 self.service = v.into();
3807 self
3808 }
3809}
3810
3811impl wkt::message::Message for ServiceDirectoryConfig {
3812 fn typename() -> &'static str {
3813 "type.googleapis.com/google.devtools.cloudbuild.v2.ServiceDirectoryConfig"
3814 }
3815}
3816
3817#[doc(hidden)]
3818impl<'de> serde::de::Deserialize<'de> for ServiceDirectoryConfig {
3819 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3820 where
3821 D: serde::Deserializer<'de>,
3822 {
3823 #[allow(non_camel_case_types)]
3824 #[doc(hidden)]
3825 #[derive(PartialEq, Eq, Hash)]
3826 enum __FieldTag {
3827 __service,
3828 Unknown(std::string::String),
3829 }
3830 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
3831 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3832 where
3833 D: serde::Deserializer<'de>,
3834 {
3835 struct Visitor;
3836 impl<'de> serde::de::Visitor<'de> for Visitor {
3837 type Value = __FieldTag;
3838 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
3839 formatter.write_str("a field name for ServiceDirectoryConfig")
3840 }
3841 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
3842 where
3843 E: serde::de::Error,
3844 {
3845 use std::result::Result::Ok;
3846 use std::string::ToString;
3847 match value {
3848 "service" => Ok(__FieldTag::__service),
3849 _ => Ok(__FieldTag::Unknown(value.to_string())),
3850 }
3851 }
3852 }
3853 deserializer.deserialize_identifier(Visitor)
3854 }
3855 }
3856 struct Visitor;
3857 impl<'de> serde::de::Visitor<'de> for Visitor {
3858 type Value = ServiceDirectoryConfig;
3859 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
3860 formatter.write_str("struct ServiceDirectoryConfig")
3861 }
3862 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
3863 where
3864 A: serde::de::MapAccess<'de>,
3865 {
3866 #[allow(unused_imports)]
3867 use serde::de::Error;
3868 use std::option::Option::Some;
3869 let mut fields = std::collections::HashSet::new();
3870 let mut result = Self::Value::new();
3871 while let Some(tag) = map.next_key::<__FieldTag>()? {
3872 #[allow(clippy::match_single_binding)]
3873 match tag {
3874 __FieldTag::__service => {
3875 if !fields.insert(__FieldTag::__service) {
3876 return std::result::Result::Err(A::Error::duplicate_field(
3877 "multiple values for service",
3878 ));
3879 }
3880 result.service = map
3881 .next_value::<std::option::Option<std::string::String>>()?
3882 .unwrap_or_default();
3883 }
3884 __FieldTag::Unknown(key) => {
3885 let value = map.next_value::<serde_json::Value>()?;
3886 result._unknown_fields.insert(key, value);
3887 }
3888 }
3889 }
3890 std::result::Result::Ok(result)
3891 }
3892 }
3893 deserializer.deserialize_any(Visitor)
3894 }
3895}
3896
3897#[doc(hidden)]
3898impl serde::ser::Serialize for ServiceDirectoryConfig {
3899 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3900 where
3901 S: serde::ser::Serializer,
3902 {
3903 use serde::ser::SerializeMap;
3904 #[allow(unused_imports)]
3905 use std::option::Option::Some;
3906 let mut state = serializer.serialize_map(std::option::Option::None)?;
3907 if !self.service.is_empty() {
3908 state.serialize_entry("service", &self.service)?;
3909 }
3910 if !self._unknown_fields.is_empty() {
3911 for (key, value) in self._unknown_fields.iter() {
3912 state.serialize_entry(key, &value)?;
3913 }
3914 }
3915 state.end()
3916 }
3917}
3918
3919impl std::fmt::Debug for ServiceDirectoryConfig {
3920 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3921 let mut debug_struct = f.debug_struct("ServiceDirectoryConfig");
3922 debug_struct.field("service", &self.service);
3923 if !self._unknown_fields.is_empty() {
3924 debug_struct.field("_unknown_fields", &self._unknown_fields);
3925 }
3926 debug_struct.finish()
3927 }
3928}
3929
3930#[derive(Clone, Default, PartialEq)]
3932#[non_exhaustive]
3933pub struct Repository {
3934 pub name: std::string::String,
3937
3938 pub remote_uri: std::string::String,
3940
3941 pub create_time: std::option::Option<wkt::Timestamp>,
3943
3944 pub update_time: std::option::Option<wkt::Timestamp>,
3946
3947 pub annotations: std::collections::HashMap<std::string::String, std::string::String>,
3949
3950 pub etag: std::string::String,
3954
3955 pub webhook_id: std::string::String,
3957
3958 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3959}
3960
3961impl Repository {
3962 pub fn new() -> Self {
3963 std::default::Default::default()
3964 }
3965
3966 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3968 self.name = v.into();
3969 self
3970 }
3971
3972 pub fn set_remote_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3974 self.remote_uri = v.into();
3975 self
3976 }
3977
3978 pub fn set_create_time<T>(mut self, v: T) -> Self
3980 where
3981 T: std::convert::Into<wkt::Timestamp>,
3982 {
3983 self.create_time = std::option::Option::Some(v.into());
3984 self
3985 }
3986
3987 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
3989 where
3990 T: std::convert::Into<wkt::Timestamp>,
3991 {
3992 self.create_time = v.map(|x| x.into());
3993 self
3994 }
3995
3996 pub fn set_update_time<T>(mut self, v: T) -> Self
3998 where
3999 T: std::convert::Into<wkt::Timestamp>,
4000 {
4001 self.update_time = std::option::Option::Some(v.into());
4002 self
4003 }
4004
4005 pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
4007 where
4008 T: std::convert::Into<wkt::Timestamp>,
4009 {
4010 self.update_time = v.map(|x| x.into());
4011 self
4012 }
4013
4014 pub fn set_annotations<T, K, V>(mut self, v: T) -> Self
4016 where
4017 T: std::iter::IntoIterator<Item = (K, V)>,
4018 K: std::convert::Into<std::string::String>,
4019 V: std::convert::Into<std::string::String>,
4020 {
4021 use std::iter::Iterator;
4022 self.annotations = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
4023 self
4024 }
4025
4026 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4028 self.etag = v.into();
4029 self
4030 }
4031
4032 pub fn set_webhook_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4034 self.webhook_id = v.into();
4035 self
4036 }
4037}
4038
4039impl wkt::message::Message for Repository {
4040 fn typename() -> &'static str {
4041 "type.googleapis.com/google.devtools.cloudbuild.v2.Repository"
4042 }
4043}
4044
4045#[doc(hidden)]
4046impl<'de> serde::de::Deserialize<'de> for Repository {
4047 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4048 where
4049 D: serde::Deserializer<'de>,
4050 {
4051 #[allow(non_camel_case_types)]
4052 #[doc(hidden)]
4053 #[derive(PartialEq, Eq, Hash)]
4054 enum __FieldTag {
4055 __name,
4056 __remote_uri,
4057 __create_time,
4058 __update_time,
4059 __annotations,
4060 __etag,
4061 __webhook_id,
4062 Unknown(std::string::String),
4063 }
4064 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
4065 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4066 where
4067 D: serde::Deserializer<'de>,
4068 {
4069 struct Visitor;
4070 impl<'de> serde::de::Visitor<'de> for Visitor {
4071 type Value = __FieldTag;
4072 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
4073 formatter.write_str("a field name for Repository")
4074 }
4075 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
4076 where
4077 E: serde::de::Error,
4078 {
4079 use std::result::Result::Ok;
4080 use std::string::ToString;
4081 match value {
4082 "name" => Ok(__FieldTag::__name),
4083 "remoteUri" => Ok(__FieldTag::__remote_uri),
4084 "remote_uri" => Ok(__FieldTag::__remote_uri),
4085 "createTime" => Ok(__FieldTag::__create_time),
4086 "create_time" => Ok(__FieldTag::__create_time),
4087 "updateTime" => Ok(__FieldTag::__update_time),
4088 "update_time" => Ok(__FieldTag::__update_time),
4089 "annotations" => Ok(__FieldTag::__annotations),
4090 "etag" => Ok(__FieldTag::__etag),
4091 "webhookId" => Ok(__FieldTag::__webhook_id),
4092 "webhook_id" => Ok(__FieldTag::__webhook_id),
4093 _ => Ok(__FieldTag::Unknown(value.to_string())),
4094 }
4095 }
4096 }
4097 deserializer.deserialize_identifier(Visitor)
4098 }
4099 }
4100 struct Visitor;
4101 impl<'de> serde::de::Visitor<'de> for Visitor {
4102 type Value = Repository;
4103 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
4104 formatter.write_str("struct Repository")
4105 }
4106 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
4107 where
4108 A: serde::de::MapAccess<'de>,
4109 {
4110 #[allow(unused_imports)]
4111 use serde::de::Error;
4112 use std::option::Option::Some;
4113 let mut fields = std::collections::HashSet::new();
4114 let mut result = Self::Value::new();
4115 while let Some(tag) = map.next_key::<__FieldTag>()? {
4116 #[allow(clippy::match_single_binding)]
4117 match tag {
4118 __FieldTag::__name => {
4119 if !fields.insert(__FieldTag::__name) {
4120 return std::result::Result::Err(A::Error::duplicate_field(
4121 "multiple values for name",
4122 ));
4123 }
4124 result.name = map
4125 .next_value::<std::option::Option<std::string::String>>()?
4126 .unwrap_or_default();
4127 }
4128 __FieldTag::__remote_uri => {
4129 if !fields.insert(__FieldTag::__remote_uri) {
4130 return std::result::Result::Err(A::Error::duplicate_field(
4131 "multiple values for remote_uri",
4132 ));
4133 }
4134 result.remote_uri = map
4135 .next_value::<std::option::Option<std::string::String>>()?
4136 .unwrap_or_default();
4137 }
4138 __FieldTag::__create_time => {
4139 if !fields.insert(__FieldTag::__create_time) {
4140 return std::result::Result::Err(A::Error::duplicate_field(
4141 "multiple values for create_time",
4142 ));
4143 }
4144 result.create_time =
4145 map.next_value::<std::option::Option<wkt::Timestamp>>()?;
4146 }
4147 __FieldTag::__update_time => {
4148 if !fields.insert(__FieldTag::__update_time) {
4149 return std::result::Result::Err(A::Error::duplicate_field(
4150 "multiple values for update_time",
4151 ));
4152 }
4153 result.update_time =
4154 map.next_value::<std::option::Option<wkt::Timestamp>>()?;
4155 }
4156 __FieldTag::__annotations => {
4157 if !fields.insert(__FieldTag::__annotations) {
4158 return std::result::Result::Err(A::Error::duplicate_field(
4159 "multiple values for annotations",
4160 ));
4161 }
4162 result.annotations = map
4163 .next_value::<std::option::Option<
4164 std::collections::HashMap<
4165 std::string::String,
4166 std::string::String,
4167 >,
4168 >>()?
4169 .unwrap_or_default();
4170 }
4171 __FieldTag::__etag => {
4172 if !fields.insert(__FieldTag::__etag) {
4173 return std::result::Result::Err(A::Error::duplicate_field(
4174 "multiple values for etag",
4175 ));
4176 }
4177 result.etag = map
4178 .next_value::<std::option::Option<std::string::String>>()?
4179 .unwrap_or_default();
4180 }
4181 __FieldTag::__webhook_id => {
4182 if !fields.insert(__FieldTag::__webhook_id) {
4183 return std::result::Result::Err(A::Error::duplicate_field(
4184 "multiple values for webhook_id",
4185 ));
4186 }
4187 result.webhook_id = map
4188 .next_value::<std::option::Option<std::string::String>>()?
4189 .unwrap_or_default();
4190 }
4191 __FieldTag::Unknown(key) => {
4192 let value = map.next_value::<serde_json::Value>()?;
4193 result._unknown_fields.insert(key, value);
4194 }
4195 }
4196 }
4197 std::result::Result::Ok(result)
4198 }
4199 }
4200 deserializer.deserialize_any(Visitor)
4201 }
4202}
4203
4204#[doc(hidden)]
4205impl serde::ser::Serialize for Repository {
4206 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4207 where
4208 S: serde::ser::Serializer,
4209 {
4210 use serde::ser::SerializeMap;
4211 #[allow(unused_imports)]
4212 use std::option::Option::Some;
4213 let mut state = serializer.serialize_map(std::option::Option::None)?;
4214 if !self.name.is_empty() {
4215 state.serialize_entry("name", &self.name)?;
4216 }
4217 if !self.remote_uri.is_empty() {
4218 state.serialize_entry("remoteUri", &self.remote_uri)?;
4219 }
4220 if self.create_time.is_some() {
4221 state.serialize_entry("createTime", &self.create_time)?;
4222 }
4223 if self.update_time.is_some() {
4224 state.serialize_entry("updateTime", &self.update_time)?;
4225 }
4226 if !self.annotations.is_empty() {
4227 state.serialize_entry("annotations", &self.annotations)?;
4228 }
4229 if !self.etag.is_empty() {
4230 state.serialize_entry("etag", &self.etag)?;
4231 }
4232 if !self.webhook_id.is_empty() {
4233 state.serialize_entry("webhookId", &self.webhook_id)?;
4234 }
4235 if !self._unknown_fields.is_empty() {
4236 for (key, value) in self._unknown_fields.iter() {
4237 state.serialize_entry(key, &value)?;
4238 }
4239 }
4240 state.end()
4241 }
4242}
4243
4244impl std::fmt::Debug for Repository {
4245 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4246 let mut debug_struct = f.debug_struct("Repository");
4247 debug_struct.field("name", &self.name);
4248 debug_struct.field("remote_uri", &self.remote_uri);
4249 debug_struct.field("create_time", &self.create_time);
4250 debug_struct.field("update_time", &self.update_time);
4251 debug_struct.field("annotations", &self.annotations);
4252 debug_struct.field("etag", &self.etag);
4253 debug_struct.field("webhook_id", &self.webhook_id);
4254 if !self._unknown_fields.is_empty() {
4255 debug_struct.field("_unknown_fields", &self._unknown_fields);
4256 }
4257 debug_struct.finish()
4258 }
4259}
4260
4261#[derive(Clone, Default, PartialEq)]
4264#[non_exhaustive]
4265pub struct OAuthCredential {
4266 pub oauth_token_secret_version: std::string::String,
4269
4270 pub username: std::string::String,
4272
4273 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4274}
4275
4276impl OAuthCredential {
4277 pub fn new() -> Self {
4278 std::default::Default::default()
4279 }
4280
4281 pub fn set_oauth_token_secret_version<T: std::convert::Into<std::string::String>>(
4283 mut self,
4284 v: T,
4285 ) -> Self {
4286 self.oauth_token_secret_version = v.into();
4287 self
4288 }
4289
4290 pub fn set_username<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4292 self.username = v.into();
4293 self
4294 }
4295}
4296
4297impl wkt::message::Message for OAuthCredential {
4298 fn typename() -> &'static str {
4299 "type.googleapis.com/google.devtools.cloudbuild.v2.OAuthCredential"
4300 }
4301}
4302
4303#[doc(hidden)]
4304impl<'de> serde::de::Deserialize<'de> for OAuthCredential {
4305 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4306 where
4307 D: serde::Deserializer<'de>,
4308 {
4309 #[allow(non_camel_case_types)]
4310 #[doc(hidden)]
4311 #[derive(PartialEq, Eq, Hash)]
4312 enum __FieldTag {
4313 __oauth_token_secret_version,
4314 __username,
4315 Unknown(std::string::String),
4316 }
4317 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
4318 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4319 where
4320 D: serde::Deserializer<'de>,
4321 {
4322 struct Visitor;
4323 impl<'de> serde::de::Visitor<'de> for Visitor {
4324 type Value = __FieldTag;
4325 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
4326 formatter.write_str("a field name for OAuthCredential")
4327 }
4328 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
4329 where
4330 E: serde::de::Error,
4331 {
4332 use std::result::Result::Ok;
4333 use std::string::ToString;
4334 match value {
4335 "oauthTokenSecretVersion" => {
4336 Ok(__FieldTag::__oauth_token_secret_version)
4337 }
4338 "oauth_token_secret_version" => {
4339 Ok(__FieldTag::__oauth_token_secret_version)
4340 }
4341 "username" => Ok(__FieldTag::__username),
4342 _ => Ok(__FieldTag::Unknown(value.to_string())),
4343 }
4344 }
4345 }
4346 deserializer.deserialize_identifier(Visitor)
4347 }
4348 }
4349 struct Visitor;
4350 impl<'de> serde::de::Visitor<'de> for Visitor {
4351 type Value = OAuthCredential;
4352 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
4353 formatter.write_str("struct OAuthCredential")
4354 }
4355 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
4356 where
4357 A: serde::de::MapAccess<'de>,
4358 {
4359 #[allow(unused_imports)]
4360 use serde::de::Error;
4361 use std::option::Option::Some;
4362 let mut fields = std::collections::HashSet::new();
4363 let mut result = Self::Value::new();
4364 while let Some(tag) = map.next_key::<__FieldTag>()? {
4365 #[allow(clippy::match_single_binding)]
4366 match tag {
4367 __FieldTag::__oauth_token_secret_version => {
4368 if !fields.insert(__FieldTag::__oauth_token_secret_version) {
4369 return std::result::Result::Err(A::Error::duplicate_field(
4370 "multiple values for oauth_token_secret_version",
4371 ));
4372 }
4373 result.oauth_token_secret_version = map
4374 .next_value::<std::option::Option<std::string::String>>()?
4375 .unwrap_or_default();
4376 }
4377 __FieldTag::__username => {
4378 if !fields.insert(__FieldTag::__username) {
4379 return std::result::Result::Err(A::Error::duplicate_field(
4380 "multiple values for username",
4381 ));
4382 }
4383 result.username = map
4384 .next_value::<std::option::Option<std::string::String>>()?
4385 .unwrap_or_default();
4386 }
4387 __FieldTag::Unknown(key) => {
4388 let value = map.next_value::<serde_json::Value>()?;
4389 result._unknown_fields.insert(key, value);
4390 }
4391 }
4392 }
4393 std::result::Result::Ok(result)
4394 }
4395 }
4396 deserializer.deserialize_any(Visitor)
4397 }
4398}
4399
4400#[doc(hidden)]
4401impl serde::ser::Serialize for OAuthCredential {
4402 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4403 where
4404 S: serde::ser::Serializer,
4405 {
4406 use serde::ser::SerializeMap;
4407 #[allow(unused_imports)]
4408 use std::option::Option::Some;
4409 let mut state = serializer.serialize_map(std::option::Option::None)?;
4410 if !self.oauth_token_secret_version.is_empty() {
4411 state.serialize_entry("oauthTokenSecretVersion", &self.oauth_token_secret_version)?;
4412 }
4413 if !self.username.is_empty() {
4414 state.serialize_entry("username", &self.username)?;
4415 }
4416 if !self._unknown_fields.is_empty() {
4417 for (key, value) in self._unknown_fields.iter() {
4418 state.serialize_entry(key, &value)?;
4419 }
4420 }
4421 state.end()
4422 }
4423}
4424
4425impl std::fmt::Debug for OAuthCredential {
4426 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4427 let mut debug_struct = f.debug_struct("OAuthCredential");
4428 debug_struct.field(
4429 "oauth_token_secret_version",
4430 &self.oauth_token_secret_version,
4431 );
4432 debug_struct.field("username", &self.username);
4433 if !self._unknown_fields.is_empty() {
4434 debug_struct.field("_unknown_fields", &self._unknown_fields);
4435 }
4436 debug_struct.finish()
4437 }
4438}
4439
4440#[derive(Clone, Default, PartialEq)]
4443#[non_exhaustive]
4444pub struct UserCredential {
4445 pub user_token_secret_version: std::string::String,
4449
4450 pub username: std::string::String,
4452
4453 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4454}
4455
4456impl UserCredential {
4457 pub fn new() -> Self {
4458 std::default::Default::default()
4459 }
4460
4461 pub fn set_user_token_secret_version<T: std::convert::Into<std::string::String>>(
4463 mut self,
4464 v: T,
4465 ) -> Self {
4466 self.user_token_secret_version = v.into();
4467 self
4468 }
4469
4470 pub fn set_username<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4472 self.username = v.into();
4473 self
4474 }
4475}
4476
4477impl wkt::message::Message for UserCredential {
4478 fn typename() -> &'static str {
4479 "type.googleapis.com/google.devtools.cloudbuild.v2.UserCredential"
4480 }
4481}
4482
4483#[doc(hidden)]
4484impl<'de> serde::de::Deserialize<'de> for UserCredential {
4485 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4486 where
4487 D: serde::Deserializer<'de>,
4488 {
4489 #[allow(non_camel_case_types)]
4490 #[doc(hidden)]
4491 #[derive(PartialEq, Eq, Hash)]
4492 enum __FieldTag {
4493 __user_token_secret_version,
4494 __username,
4495 Unknown(std::string::String),
4496 }
4497 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
4498 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4499 where
4500 D: serde::Deserializer<'de>,
4501 {
4502 struct Visitor;
4503 impl<'de> serde::de::Visitor<'de> for Visitor {
4504 type Value = __FieldTag;
4505 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
4506 formatter.write_str("a field name for UserCredential")
4507 }
4508 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
4509 where
4510 E: serde::de::Error,
4511 {
4512 use std::result::Result::Ok;
4513 use std::string::ToString;
4514 match value {
4515 "userTokenSecretVersion" => Ok(__FieldTag::__user_token_secret_version),
4516 "user_token_secret_version" => {
4517 Ok(__FieldTag::__user_token_secret_version)
4518 }
4519 "username" => Ok(__FieldTag::__username),
4520 _ => Ok(__FieldTag::Unknown(value.to_string())),
4521 }
4522 }
4523 }
4524 deserializer.deserialize_identifier(Visitor)
4525 }
4526 }
4527 struct Visitor;
4528 impl<'de> serde::de::Visitor<'de> for Visitor {
4529 type Value = UserCredential;
4530 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
4531 formatter.write_str("struct UserCredential")
4532 }
4533 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
4534 where
4535 A: serde::de::MapAccess<'de>,
4536 {
4537 #[allow(unused_imports)]
4538 use serde::de::Error;
4539 use std::option::Option::Some;
4540 let mut fields = std::collections::HashSet::new();
4541 let mut result = Self::Value::new();
4542 while let Some(tag) = map.next_key::<__FieldTag>()? {
4543 #[allow(clippy::match_single_binding)]
4544 match tag {
4545 __FieldTag::__user_token_secret_version => {
4546 if !fields.insert(__FieldTag::__user_token_secret_version) {
4547 return std::result::Result::Err(A::Error::duplicate_field(
4548 "multiple values for user_token_secret_version",
4549 ));
4550 }
4551 result.user_token_secret_version = map
4552 .next_value::<std::option::Option<std::string::String>>()?
4553 .unwrap_or_default();
4554 }
4555 __FieldTag::__username => {
4556 if !fields.insert(__FieldTag::__username) {
4557 return std::result::Result::Err(A::Error::duplicate_field(
4558 "multiple values for username",
4559 ));
4560 }
4561 result.username = map
4562 .next_value::<std::option::Option<std::string::String>>()?
4563 .unwrap_or_default();
4564 }
4565 __FieldTag::Unknown(key) => {
4566 let value = map.next_value::<serde_json::Value>()?;
4567 result._unknown_fields.insert(key, value);
4568 }
4569 }
4570 }
4571 std::result::Result::Ok(result)
4572 }
4573 }
4574 deserializer.deserialize_any(Visitor)
4575 }
4576}
4577
4578#[doc(hidden)]
4579impl serde::ser::Serialize for UserCredential {
4580 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4581 where
4582 S: serde::ser::Serializer,
4583 {
4584 use serde::ser::SerializeMap;
4585 #[allow(unused_imports)]
4586 use std::option::Option::Some;
4587 let mut state = serializer.serialize_map(std::option::Option::None)?;
4588 if !self.user_token_secret_version.is_empty() {
4589 state.serialize_entry("userTokenSecretVersion", &self.user_token_secret_version)?;
4590 }
4591 if !self.username.is_empty() {
4592 state.serialize_entry("username", &self.username)?;
4593 }
4594 if !self._unknown_fields.is_empty() {
4595 for (key, value) in self._unknown_fields.iter() {
4596 state.serialize_entry(key, &value)?;
4597 }
4598 }
4599 state.end()
4600 }
4601}
4602
4603impl std::fmt::Debug for UserCredential {
4604 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4605 let mut debug_struct = f.debug_struct("UserCredential");
4606 debug_struct.field("user_token_secret_version", &self.user_token_secret_version);
4607 debug_struct.field("username", &self.username);
4608 if !self._unknown_fields.is_empty() {
4609 debug_struct.field("_unknown_fields", &self._unknown_fields);
4610 }
4611 debug_struct.finish()
4612 }
4613}
4614
4615#[derive(Clone, Default, PartialEq)]
4617#[non_exhaustive]
4618pub struct CreateConnectionRequest {
4619 pub parent: std::string::String,
4622
4623 pub connection: std::option::Option<crate::model::Connection>,
4625
4626 pub connection_id: std::string::String,
4631
4632 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4633}
4634
4635impl CreateConnectionRequest {
4636 pub fn new() -> Self {
4637 std::default::Default::default()
4638 }
4639
4640 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4642 self.parent = v.into();
4643 self
4644 }
4645
4646 pub fn set_connection<T>(mut self, v: T) -> Self
4648 where
4649 T: std::convert::Into<crate::model::Connection>,
4650 {
4651 self.connection = std::option::Option::Some(v.into());
4652 self
4653 }
4654
4655 pub fn set_or_clear_connection<T>(mut self, v: std::option::Option<T>) -> Self
4657 where
4658 T: std::convert::Into<crate::model::Connection>,
4659 {
4660 self.connection = v.map(|x| x.into());
4661 self
4662 }
4663
4664 pub fn set_connection_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4666 self.connection_id = v.into();
4667 self
4668 }
4669}
4670
4671impl wkt::message::Message for CreateConnectionRequest {
4672 fn typename() -> &'static str {
4673 "type.googleapis.com/google.devtools.cloudbuild.v2.CreateConnectionRequest"
4674 }
4675}
4676
4677#[doc(hidden)]
4678impl<'de> serde::de::Deserialize<'de> for CreateConnectionRequest {
4679 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4680 where
4681 D: serde::Deserializer<'de>,
4682 {
4683 #[allow(non_camel_case_types)]
4684 #[doc(hidden)]
4685 #[derive(PartialEq, Eq, Hash)]
4686 enum __FieldTag {
4687 __parent,
4688 __connection,
4689 __connection_id,
4690 Unknown(std::string::String),
4691 }
4692 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
4693 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4694 where
4695 D: serde::Deserializer<'de>,
4696 {
4697 struct Visitor;
4698 impl<'de> serde::de::Visitor<'de> for Visitor {
4699 type Value = __FieldTag;
4700 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
4701 formatter.write_str("a field name for CreateConnectionRequest")
4702 }
4703 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
4704 where
4705 E: serde::de::Error,
4706 {
4707 use std::result::Result::Ok;
4708 use std::string::ToString;
4709 match value {
4710 "parent" => Ok(__FieldTag::__parent),
4711 "connection" => Ok(__FieldTag::__connection),
4712 "connectionId" => Ok(__FieldTag::__connection_id),
4713 "connection_id" => Ok(__FieldTag::__connection_id),
4714 _ => Ok(__FieldTag::Unknown(value.to_string())),
4715 }
4716 }
4717 }
4718 deserializer.deserialize_identifier(Visitor)
4719 }
4720 }
4721 struct Visitor;
4722 impl<'de> serde::de::Visitor<'de> for Visitor {
4723 type Value = CreateConnectionRequest;
4724 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
4725 formatter.write_str("struct CreateConnectionRequest")
4726 }
4727 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
4728 where
4729 A: serde::de::MapAccess<'de>,
4730 {
4731 #[allow(unused_imports)]
4732 use serde::de::Error;
4733 use std::option::Option::Some;
4734 let mut fields = std::collections::HashSet::new();
4735 let mut result = Self::Value::new();
4736 while let Some(tag) = map.next_key::<__FieldTag>()? {
4737 #[allow(clippy::match_single_binding)]
4738 match tag {
4739 __FieldTag::__parent => {
4740 if !fields.insert(__FieldTag::__parent) {
4741 return std::result::Result::Err(A::Error::duplicate_field(
4742 "multiple values for parent",
4743 ));
4744 }
4745 result.parent = map
4746 .next_value::<std::option::Option<std::string::String>>()?
4747 .unwrap_or_default();
4748 }
4749 __FieldTag::__connection => {
4750 if !fields.insert(__FieldTag::__connection) {
4751 return std::result::Result::Err(A::Error::duplicate_field(
4752 "multiple values for connection",
4753 ));
4754 }
4755 result.connection =
4756 map.next_value::<std::option::Option<crate::model::Connection>>()?;
4757 }
4758 __FieldTag::__connection_id => {
4759 if !fields.insert(__FieldTag::__connection_id) {
4760 return std::result::Result::Err(A::Error::duplicate_field(
4761 "multiple values for connection_id",
4762 ));
4763 }
4764 result.connection_id = map
4765 .next_value::<std::option::Option<std::string::String>>()?
4766 .unwrap_or_default();
4767 }
4768 __FieldTag::Unknown(key) => {
4769 let value = map.next_value::<serde_json::Value>()?;
4770 result._unknown_fields.insert(key, value);
4771 }
4772 }
4773 }
4774 std::result::Result::Ok(result)
4775 }
4776 }
4777 deserializer.deserialize_any(Visitor)
4778 }
4779}
4780
4781#[doc(hidden)]
4782impl serde::ser::Serialize for CreateConnectionRequest {
4783 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4784 where
4785 S: serde::ser::Serializer,
4786 {
4787 use serde::ser::SerializeMap;
4788 #[allow(unused_imports)]
4789 use std::option::Option::Some;
4790 let mut state = serializer.serialize_map(std::option::Option::None)?;
4791 if !self.parent.is_empty() {
4792 state.serialize_entry("parent", &self.parent)?;
4793 }
4794 if self.connection.is_some() {
4795 state.serialize_entry("connection", &self.connection)?;
4796 }
4797 if !self.connection_id.is_empty() {
4798 state.serialize_entry("connectionId", &self.connection_id)?;
4799 }
4800 if !self._unknown_fields.is_empty() {
4801 for (key, value) in self._unknown_fields.iter() {
4802 state.serialize_entry(key, &value)?;
4803 }
4804 }
4805 state.end()
4806 }
4807}
4808
4809impl std::fmt::Debug for CreateConnectionRequest {
4810 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4811 let mut debug_struct = f.debug_struct("CreateConnectionRequest");
4812 debug_struct.field("parent", &self.parent);
4813 debug_struct.field("connection", &self.connection);
4814 debug_struct.field("connection_id", &self.connection_id);
4815 if !self._unknown_fields.is_empty() {
4816 debug_struct.field("_unknown_fields", &self._unknown_fields);
4817 }
4818 debug_struct.finish()
4819 }
4820}
4821
4822#[derive(Clone, Default, PartialEq)]
4824#[non_exhaustive]
4825pub struct GetConnectionRequest {
4826 pub name: std::string::String,
4829
4830 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4831}
4832
4833impl GetConnectionRequest {
4834 pub fn new() -> Self {
4835 std::default::Default::default()
4836 }
4837
4838 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4840 self.name = v.into();
4841 self
4842 }
4843}
4844
4845impl wkt::message::Message for GetConnectionRequest {
4846 fn typename() -> &'static str {
4847 "type.googleapis.com/google.devtools.cloudbuild.v2.GetConnectionRequest"
4848 }
4849}
4850
4851#[doc(hidden)]
4852impl<'de> serde::de::Deserialize<'de> for GetConnectionRequest {
4853 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4854 where
4855 D: serde::Deserializer<'de>,
4856 {
4857 #[allow(non_camel_case_types)]
4858 #[doc(hidden)]
4859 #[derive(PartialEq, Eq, Hash)]
4860 enum __FieldTag {
4861 __name,
4862 Unknown(std::string::String),
4863 }
4864 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
4865 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4866 where
4867 D: serde::Deserializer<'de>,
4868 {
4869 struct Visitor;
4870 impl<'de> serde::de::Visitor<'de> for Visitor {
4871 type Value = __FieldTag;
4872 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
4873 formatter.write_str("a field name for GetConnectionRequest")
4874 }
4875 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
4876 where
4877 E: serde::de::Error,
4878 {
4879 use std::result::Result::Ok;
4880 use std::string::ToString;
4881 match value {
4882 "name" => Ok(__FieldTag::__name),
4883 _ => Ok(__FieldTag::Unknown(value.to_string())),
4884 }
4885 }
4886 }
4887 deserializer.deserialize_identifier(Visitor)
4888 }
4889 }
4890 struct Visitor;
4891 impl<'de> serde::de::Visitor<'de> for Visitor {
4892 type Value = GetConnectionRequest;
4893 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
4894 formatter.write_str("struct GetConnectionRequest")
4895 }
4896 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
4897 where
4898 A: serde::de::MapAccess<'de>,
4899 {
4900 #[allow(unused_imports)]
4901 use serde::de::Error;
4902 use std::option::Option::Some;
4903 let mut fields = std::collections::HashSet::new();
4904 let mut result = Self::Value::new();
4905 while let Some(tag) = map.next_key::<__FieldTag>()? {
4906 #[allow(clippy::match_single_binding)]
4907 match tag {
4908 __FieldTag::__name => {
4909 if !fields.insert(__FieldTag::__name) {
4910 return std::result::Result::Err(A::Error::duplicate_field(
4911 "multiple values for name",
4912 ));
4913 }
4914 result.name = map
4915 .next_value::<std::option::Option<std::string::String>>()?
4916 .unwrap_or_default();
4917 }
4918 __FieldTag::Unknown(key) => {
4919 let value = map.next_value::<serde_json::Value>()?;
4920 result._unknown_fields.insert(key, value);
4921 }
4922 }
4923 }
4924 std::result::Result::Ok(result)
4925 }
4926 }
4927 deserializer.deserialize_any(Visitor)
4928 }
4929}
4930
4931#[doc(hidden)]
4932impl serde::ser::Serialize for GetConnectionRequest {
4933 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4934 where
4935 S: serde::ser::Serializer,
4936 {
4937 use serde::ser::SerializeMap;
4938 #[allow(unused_imports)]
4939 use std::option::Option::Some;
4940 let mut state = serializer.serialize_map(std::option::Option::None)?;
4941 if !self.name.is_empty() {
4942 state.serialize_entry("name", &self.name)?;
4943 }
4944 if !self._unknown_fields.is_empty() {
4945 for (key, value) in self._unknown_fields.iter() {
4946 state.serialize_entry(key, &value)?;
4947 }
4948 }
4949 state.end()
4950 }
4951}
4952
4953impl std::fmt::Debug for GetConnectionRequest {
4954 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4955 let mut debug_struct = f.debug_struct("GetConnectionRequest");
4956 debug_struct.field("name", &self.name);
4957 if !self._unknown_fields.is_empty() {
4958 debug_struct.field("_unknown_fields", &self._unknown_fields);
4959 }
4960 debug_struct.finish()
4961 }
4962}
4963
4964#[derive(Clone, Default, PartialEq)]
4966#[non_exhaustive]
4967pub struct ListConnectionsRequest {
4968 pub parent: std::string::String,
4971
4972 pub page_size: i32,
4974
4975 pub page_token: std::string::String,
4977
4978 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4979}
4980
4981impl ListConnectionsRequest {
4982 pub fn new() -> Self {
4983 std::default::Default::default()
4984 }
4985
4986 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4988 self.parent = v.into();
4989 self
4990 }
4991
4992 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4994 self.page_size = v.into();
4995 self
4996 }
4997
4998 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5000 self.page_token = v.into();
5001 self
5002 }
5003}
5004
5005impl wkt::message::Message for ListConnectionsRequest {
5006 fn typename() -> &'static str {
5007 "type.googleapis.com/google.devtools.cloudbuild.v2.ListConnectionsRequest"
5008 }
5009}
5010
5011#[doc(hidden)]
5012impl<'de> serde::de::Deserialize<'de> for ListConnectionsRequest {
5013 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
5014 where
5015 D: serde::Deserializer<'de>,
5016 {
5017 #[allow(non_camel_case_types)]
5018 #[doc(hidden)]
5019 #[derive(PartialEq, Eq, Hash)]
5020 enum __FieldTag {
5021 __parent,
5022 __page_size,
5023 __page_token,
5024 Unknown(std::string::String),
5025 }
5026 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
5027 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
5028 where
5029 D: serde::Deserializer<'de>,
5030 {
5031 struct Visitor;
5032 impl<'de> serde::de::Visitor<'de> for Visitor {
5033 type Value = __FieldTag;
5034 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
5035 formatter.write_str("a field name for ListConnectionsRequest")
5036 }
5037 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
5038 where
5039 E: serde::de::Error,
5040 {
5041 use std::result::Result::Ok;
5042 use std::string::ToString;
5043 match value {
5044 "parent" => Ok(__FieldTag::__parent),
5045 "pageSize" => Ok(__FieldTag::__page_size),
5046 "page_size" => Ok(__FieldTag::__page_size),
5047 "pageToken" => Ok(__FieldTag::__page_token),
5048 "page_token" => Ok(__FieldTag::__page_token),
5049 _ => Ok(__FieldTag::Unknown(value.to_string())),
5050 }
5051 }
5052 }
5053 deserializer.deserialize_identifier(Visitor)
5054 }
5055 }
5056 struct Visitor;
5057 impl<'de> serde::de::Visitor<'de> for Visitor {
5058 type Value = ListConnectionsRequest;
5059 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
5060 formatter.write_str("struct ListConnectionsRequest")
5061 }
5062 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
5063 where
5064 A: serde::de::MapAccess<'de>,
5065 {
5066 #[allow(unused_imports)]
5067 use serde::de::Error;
5068 use std::option::Option::Some;
5069 let mut fields = std::collections::HashSet::new();
5070 let mut result = Self::Value::new();
5071 while let Some(tag) = map.next_key::<__FieldTag>()? {
5072 #[allow(clippy::match_single_binding)]
5073 match tag {
5074 __FieldTag::__parent => {
5075 if !fields.insert(__FieldTag::__parent) {
5076 return std::result::Result::Err(A::Error::duplicate_field(
5077 "multiple values for parent",
5078 ));
5079 }
5080 result.parent = map
5081 .next_value::<std::option::Option<std::string::String>>()?
5082 .unwrap_or_default();
5083 }
5084 __FieldTag::__page_size => {
5085 if !fields.insert(__FieldTag::__page_size) {
5086 return std::result::Result::Err(A::Error::duplicate_field(
5087 "multiple values for page_size",
5088 ));
5089 }
5090 struct __With(std::option::Option<i32>);
5091 impl<'de> serde::de::Deserialize<'de> for __With {
5092 fn deserialize<D>(
5093 deserializer: D,
5094 ) -> std::result::Result<Self, D::Error>
5095 where
5096 D: serde::de::Deserializer<'de>,
5097 {
5098 serde_with::As::< std::option::Option<wkt::internal::I32> >::deserialize(deserializer).map(__With)
5099 }
5100 }
5101 result.page_size = map.next_value::<__With>()?.0.unwrap_or_default();
5102 }
5103 __FieldTag::__page_token => {
5104 if !fields.insert(__FieldTag::__page_token) {
5105 return std::result::Result::Err(A::Error::duplicate_field(
5106 "multiple values for page_token",
5107 ));
5108 }
5109 result.page_token = map
5110 .next_value::<std::option::Option<std::string::String>>()?
5111 .unwrap_or_default();
5112 }
5113 __FieldTag::Unknown(key) => {
5114 let value = map.next_value::<serde_json::Value>()?;
5115 result._unknown_fields.insert(key, value);
5116 }
5117 }
5118 }
5119 std::result::Result::Ok(result)
5120 }
5121 }
5122 deserializer.deserialize_any(Visitor)
5123 }
5124}
5125
5126#[doc(hidden)]
5127impl serde::ser::Serialize for ListConnectionsRequest {
5128 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
5129 where
5130 S: serde::ser::Serializer,
5131 {
5132 use serde::ser::SerializeMap;
5133 #[allow(unused_imports)]
5134 use std::option::Option::Some;
5135 let mut state = serializer.serialize_map(std::option::Option::None)?;
5136 if !self.parent.is_empty() {
5137 state.serialize_entry("parent", &self.parent)?;
5138 }
5139 if !wkt::internal::is_default(&self.page_size) {
5140 struct __With<'a>(&'a i32);
5141 impl<'a> serde::ser::Serialize for __With<'a> {
5142 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
5143 where
5144 S: serde::ser::Serializer,
5145 {
5146 serde_with::As::<wkt::internal::I32>::serialize(self.0, serializer)
5147 }
5148 }
5149 state.serialize_entry("pageSize", &__With(&self.page_size))?;
5150 }
5151 if !self.page_token.is_empty() {
5152 state.serialize_entry("pageToken", &self.page_token)?;
5153 }
5154 if !self._unknown_fields.is_empty() {
5155 for (key, value) in self._unknown_fields.iter() {
5156 state.serialize_entry(key, &value)?;
5157 }
5158 }
5159 state.end()
5160 }
5161}
5162
5163impl std::fmt::Debug for ListConnectionsRequest {
5164 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5165 let mut debug_struct = f.debug_struct("ListConnectionsRequest");
5166 debug_struct.field("parent", &self.parent);
5167 debug_struct.field("page_size", &self.page_size);
5168 debug_struct.field("page_token", &self.page_token);
5169 if !self._unknown_fields.is_empty() {
5170 debug_struct.field("_unknown_fields", &self._unknown_fields);
5171 }
5172 debug_struct.finish()
5173 }
5174}
5175
5176#[derive(Clone, Default, PartialEq)]
5178#[non_exhaustive]
5179pub struct ListConnectionsResponse {
5180 pub connections: std::vec::Vec<crate::model::Connection>,
5182
5183 pub next_page_token: std::string::String,
5185
5186 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5187}
5188
5189impl ListConnectionsResponse {
5190 pub fn new() -> Self {
5191 std::default::Default::default()
5192 }
5193
5194 pub fn set_connections<T, V>(mut self, v: T) -> Self
5196 where
5197 T: std::iter::IntoIterator<Item = V>,
5198 V: std::convert::Into<crate::model::Connection>,
5199 {
5200 use std::iter::Iterator;
5201 self.connections = v.into_iter().map(|i| i.into()).collect();
5202 self
5203 }
5204
5205 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5207 self.next_page_token = v.into();
5208 self
5209 }
5210}
5211
5212impl wkt::message::Message for ListConnectionsResponse {
5213 fn typename() -> &'static str {
5214 "type.googleapis.com/google.devtools.cloudbuild.v2.ListConnectionsResponse"
5215 }
5216}
5217
5218#[doc(hidden)]
5219impl gax::paginator::internal::PageableResponse for ListConnectionsResponse {
5220 type PageItem = crate::model::Connection;
5221
5222 fn items(self) -> std::vec::Vec<Self::PageItem> {
5223 self.connections
5224 }
5225
5226 fn next_page_token(&self) -> std::string::String {
5227 use std::clone::Clone;
5228 self.next_page_token.clone()
5229 }
5230}
5231
5232#[doc(hidden)]
5233impl<'de> serde::de::Deserialize<'de> for ListConnectionsResponse {
5234 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
5235 where
5236 D: serde::Deserializer<'de>,
5237 {
5238 #[allow(non_camel_case_types)]
5239 #[doc(hidden)]
5240 #[derive(PartialEq, Eq, Hash)]
5241 enum __FieldTag {
5242 __connections,
5243 __next_page_token,
5244 Unknown(std::string::String),
5245 }
5246 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
5247 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
5248 where
5249 D: serde::Deserializer<'de>,
5250 {
5251 struct Visitor;
5252 impl<'de> serde::de::Visitor<'de> for Visitor {
5253 type Value = __FieldTag;
5254 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
5255 formatter.write_str("a field name for ListConnectionsResponse")
5256 }
5257 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
5258 where
5259 E: serde::de::Error,
5260 {
5261 use std::result::Result::Ok;
5262 use std::string::ToString;
5263 match value {
5264 "connections" => Ok(__FieldTag::__connections),
5265 "nextPageToken" => Ok(__FieldTag::__next_page_token),
5266 "next_page_token" => Ok(__FieldTag::__next_page_token),
5267 _ => Ok(__FieldTag::Unknown(value.to_string())),
5268 }
5269 }
5270 }
5271 deserializer.deserialize_identifier(Visitor)
5272 }
5273 }
5274 struct Visitor;
5275 impl<'de> serde::de::Visitor<'de> for Visitor {
5276 type Value = ListConnectionsResponse;
5277 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
5278 formatter.write_str("struct ListConnectionsResponse")
5279 }
5280 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
5281 where
5282 A: serde::de::MapAccess<'de>,
5283 {
5284 #[allow(unused_imports)]
5285 use serde::de::Error;
5286 use std::option::Option::Some;
5287 let mut fields = std::collections::HashSet::new();
5288 let mut result = Self::Value::new();
5289 while let Some(tag) = map.next_key::<__FieldTag>()? {
5290 #[allow(clippy::match_single_binding)]
5291 match tag {
5292 __FieldTag::__connections => {
5293 if !fields.insert(__FieldTag::__connections) {
5294 return std::result::Result::Err(A::Error::duplicate_field(
5295 "multiple values for connections",
5296 ));
5297 }
5298 result.connections = map.next_value::<std::option::Option<std::vec::Vec<crate::model::Connection>>>()?.unwrap_or_default();
5299 }
5300 __FieldTag::__next_page_token => {
5301 if !fields.insert(__FieldTag::__next_page_token) {
5302 return std::result::Result::Err(A::Error::duplicate_field(
5303 "multiple values for next_page_token",
5304 ));
5305 }
5306 result.next_page_token = map
5307 .next_value::<std::option::Option<std::string::String>>()?
5308 .unwrap_or_default();
5309 }
5310 __FieldTag::Unknown(key) => {
5311 let value = map.next_value::<serde_json::Value>()?;
5312 result._unknown_fields.insert(key, value);
5313 }
5314 }
5315 }
5316 std::result::Result::Ok(result)
5317 }
5318 }
5319 deserializer.deserialize_any(Visitor)
5320 }
5321}
5322
5323#[doc(hidden)]
5324impl serde::ser::Serialize for ListConnectionsResponse {
5325 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
5326 where
5327 S: serde::ser::Serializer,
5328 {
5329 use serde::ser::SerializeMap;
5330 #[allow(unused_imports)]
5331 use std::option::Option::Some;
5332 let mut state = serializer.serialize_map(std::option::Option::None)?;
5333 if !self.connections.is_empty() {
5334 state.serialize_entry("connections", &self.connections)?;
5335 }
5336 if !self.next_page_token.is_empty() {
5337 state.serialize_entry("nextPageToken", &self.next_page_token)?;
5338 }
5339 if !self._unknown_fields.is_empty() {
5340 for (key, value) in self._unknown_fields.iter() {
5341 state.serialize_entry(key, &value)?;
5342 }
5343 }
5344 state.end()
5345 }
5346}
5347
5348impl std::fmt::Debug for ListConnectionsResponse {
5349 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5350 let mut debug_struct = f.debug_struct("ListConnectionsResponse");
5351 debug_struct.field("connections", &self.connections);
5352 debug_struct.field("next_page_token", &self.next_page_token);
5353 if !self._unknown_fields.is_empty() {
5354 debug_struct.field("_unknown_fields", &self._unknown_fields);
5355 }
5356 debug_struct.finish()
5357 }
5358}
5359
5360#[derive(Clone, Default, PartialEq)]
5362#[non_exhaustive]
5363pub struct UpdateConnectionRequest {
5364 pub connection: std::option::Option<crate::model::Connection>,
5366
5367 pub update_mask: std::option::Option<wkt::FieldMask>,
5369
5370 pub allow_missing: bool,
5376
5377 pub etag: std::string::String,
5381
5382 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5383}
5384
5385impl UpdateConnectionRequest {
5386 pub fn new() -> Self {
5387 std::default::Default::default()
5388 }
5389
5390 pub fn set_connection<T>(mut self, v: T) -> Self
5392 where
5393 T: std::convert::Into<crate::model::Connection>,
5394 {
5395 self.connection = std::option::Option::Some(v.into());
5396 self
5397 }
5398
5399 pub fn set_or_clear_connection<T>(mut self, v: std::option::Option<T>) -> Self
5401 where
5402 T: std::convert::Into<crate::model::Connection>,
5403 {
5404 self.connection = v.map(|x| x.into());
5405 self
5406 }
5407
5408 pub fn set_update_mask<T>(mut self, v: T) -> Self
5410 where
5411 T: std::convert::Into<wkt::FieldMask>,
5412 {
5413 self.update_mask = std::option::Option::Some(v.into());
5414 self
5415 }
5416
5417 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
5419 where
5420 T: std::convert::Into<wkt::FieldMask>,
5421 {
5422 self.update_mask = v.map(|x| x.into());
5423 self
5424 }
5425
5426 pub fn set_allow_missing<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5428 self.allow_missing = v.into();
5429 self
5430 }
5431
5432 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5434 self.etag = v.into();
5435 self
5436 }
5437}
5438
5439impl wkt::message::Message for UpdateConnectionRequest {
5440 fn typename() -> &'static str {
5441 "type.googleapis.com/google.devtools.cloudbuild.v2.UpdateConnectionRequest"
5442 }
5443}
5444
5445#[doc(hidden)]
5446impl<'de> serde::de::Deserialize<'de> for UpdateConnectionRequest {
5447 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
5448 where
5449 D: serde::Deserializer<'de>,
5450 {
5451 #[allow(non_camel_case_types)]
5452 #[doc(hidden)]
5453 #[derive(PartialEq, Eq, Hash)]
5454 enum __FieldTag {
5455 __connection,
5456 __update_mask,
5457 __allow_missing,
5458 __etag,
5459 Unknown(std::string::String),
5460 }
5461 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
5462 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
5463 where
5464 D: serde::Deserializer<'de>,
5465 {
5466 struct Visitor;
5467 impl<'de> serde::de::Visitor<'de> for Visitor {
5468 type Value = __FieldTag;
5469 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
5470 formatter.write_str("a field name for UpdateConnectionRequest")
5471 }
5472 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
5473 where
5474 E: serde::de::Error,
5475 {
5476 use std::result::Result::Ok;
5477 use std::string::ToString;
5478 match value {
5479 "connection" => Ok(__FieldTag::__connection),
5480 "updateMask" => Ok(__FieldTag::__update_mask),
5481 "update_mask" => Ok(__FieldTag::__update_mask),
5482 "allowMissing" => Ok(__FieldTag::__allow_missing),
5483 "allow_missing" => Ok(__FieldTag::__allow_missing),
5484 "etag" => Ok(__FieldTag::__etag),
5485 _ => Ok(__FieldTag::Unknown(value.to_string())),
5486 }
5487 }
5488 }
5489 deserializer.deserialize_identifier(Visitor)
5490 }
5491 }
5492 struct Visitor;
5493 impl<'de> serde::de::Visitor<'de> for Visitor {
5494 type Value = UpdateConnectionRequest;
5495 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
5496 formatter.write_str("struct UpdateConnectionRequest")
5497 }
5498 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
5499 where
5500 A: serde::de::MapAccess<'de>,
5501 {
5502 #[allow(unused_imports)]
5503 use serde::de::Error;
5504 use std::option::Option::Some;
5505 let mut fields = std::collections::HashSet::new();
5506 let mut result = Self::Value::new();
5507 while let Some(tag) = map.next_key::<__FieldTag>()? {
5508 #[allow(clippy::match_single_binding)]
5509 match tag {
5510 __FieldTag::__connection => {
5511 if !fields.insert(__FieldTag::__connection) {
5512 return std::result::Result::Err(A::Error::duplicate_field(
5513 "multiple values for connection",
5514 ));
5515 }
5516 result.connection =
5517 map.next_value::<std::option::Option<crate::model::Connection>>()?;
5518 }
5519 __FieldTag::__update_mask => {
5520 if !fields.insert(__FieldTag::__update_mask) {
5521 return std::result::Result::Err(A::Error::duplicate_field(
5522 "multiple values for update_mask",
5523 ));
5524 }
5525 result.update_mask =
5526 map.next_value::<std::option::Option<wkt::FieldMask>>()?;
5527 }
5528 __FieldTag::__allow_missing => {
5529 if !fields.insert(__FieldTag::__allow_missing) {
5530 return std::result::Result::Err(A::Error::duplicate_field(
5531 "multiple values for allow_missing",
5532 ));
5533 }
5534 result.allow_missing = map
5535 .next_value::<std::option::Option<bool>>()?
5536 .unwrap_or_default();
5537 }
5538 __FieldTag::__etag => {
5539 if !fields.insert(__FieldTag::__etag) {
5540 return std::result::Result::Err(A::Error::duplicate_field(
5541 "multiple values for etag",
5542 ));
5543 }
5544 result.etag = map
5545 .next_value::<std::option::Option<std::string::String>>()?
5546 .unwrap_or_default();
5547 }
5548 __FieldTag::Unknown(key) => {
5549 let value = map.next_value::<serde_json::Value>()?;
5550 result._unknown_fields.insert(key, value);
5551 }
5552 }
5553 }
5554 std::result::Result::Ok(result)
5555 }
5556 }
5557 deserializer.deserialize_any(Visitor)
5558 }
5559}
5560
5561#[doc(hidden)]
5562impl serde::ser::Serialize for UpdateConnectionRequest {
5563 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
5564 where
5565 S: serde::ser::Serializer,
5566 {
5567 use serde::ser::SerializeMap;
5568 #[allow(unused_imports)]
5569 use std::option::Option::Some;
5570 let mut state = serializer.serialize_map(std::option::Option::None)?;
5571 if self.connection.is_some() {
5572 state.serialize_entry("connection", &self.connection)?;
5573 }
5574 if self.update_mask.is_some() {
5575 state.serialize_entry("updateMask", &self.update_mask)?;
5576 }
5577 if !wkt::internal::is_default(&self.allow_missing) {
5578 state.serialize_entry("allowMissing", &self.allow_missing)?;
5579 }
5580 if !self.etag.is_empty() {
5581 state.serialize_entry("etag", &self.etag)?;
5582 }
5583 if !self._unknown_fields.is_empty() {
5584 for (key, value) in self._unknown_fields.iter() {
5585 state.serialize_entry(key, &value)?;
5586 }
5587 }
5588 state.end()
5589 }
5590}
5591
5592impl std::fmt::Debug for UpdateConnectionRequest {
5593 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5594 let mut debug_struct = f.debug_struct("UpdateConnectionRequest");
5595 debug_struct.field("connection", &self.connection);
5596 debug_struct.field("update_mask", &self.update_mask);
5597 debug_struct.field("allow_missing", &self.allow_missing);
5598 debug_struct.field("etag", &self.etag);
5599 if !self._unknown_fields.is_empty() {
5600 debug_struct.field("_unknown_fields", &self._unknown_fields);
5601 }
5602 debug_struct.finish()
5603 }
5604}
5605
5606#[derive(Clone, Default, PartialEq)]
5608#[non_exhaustive]
5609pub struct DeleteConnectionRequest {
5610 pub name: std::string::String,
5613
5614 pub etag: std::string::String,
5618
5619 pub validate_only: bool,
5621
5622 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5623}
5624
5625impl DeleteConnectionRequest {
5626 pub fn new() -> Self {
5627 std::default::Default::default()
5628 }
5629
5630 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5632 self.name = v.into();
5633 self
5634 }
5635
5636 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5638 self.etag = v.into();
5639 self
5640 }
5641
5642 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5644 self.validate_only = v.into();
5645 self
5646 }
5647}
5648
5649impl wkt::message::Message for DeleteConnectionRequest {
5650 fn typename() -> &'static str {
5651 "type.googleapis.com/google.devtools.cloudbuild.v2.DeleteConnectionRequest"
5652 }
5653}
5654
5655#[doc(hidden)]
5656impl<'de> serde::de::Deserialize<'de> for DeleteConnectionRequest {
5657 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
5658 where
5659 D: serde::Deserializer<'de>,
5660 {
5661 #[allow(non_camel_case_types)]
5662 #[doc(hidden)]
5663 #[derive(PartialEq, Eq, Hash)]
5664 enum __FieldTag {
5665 __name,
5666 __etag,
5667 __validate_only,
5668 Unknown(std::string::String),
5669 }
5670 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
5671 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
5672 where
5673 D: serde::Deserializer<'de>,
5674 {
5675 struct Visitor;
5676 impl<'de> serde::de::Visitor<'de> for Visitor {
5677 type Value = __FieldTag;
5678 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
5679 formatter.write_str("a field name for DeleteConnectionRequest")
5680 }
5681 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
5682 where
5683 E: serde::de::Error,
5684 {
5685 use std::result::Result::Ok;
5686 use std::string::ToString;
5687 match value {
5688 "name" => Ok(__FieldTag::__name),
5689 "etag" => Ok(__FieldTag::__etag),
5690 "validateOnly" => Ok(__FieldTag::__validate_only),
5691 "validate_only" => Ok(__FieldTag::__validate_only),
5692 _ => Ok(__FieldTag::Unknown(value.to_string())),
5693 }
5694 }
5695 }
5696 deserializer.deserialize_identifier(Visitor)
5697 }
5698 }
5699 struct Visitor;
5700 impl<'de> serde::de::Visitor<'de> for Visitor {
5701 type Value = DeleteConnectionRequest;
5702 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
5703 formatter.write_str("struct DeleteConnectionRequest")
5704 }
5705 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
5706 where
5707 A: serde::de::MapAccess<'de>,
5708 {
5709 #[allow(unused_imports)]
5710 use serde::de::Error;
5711 use std::option::Option::Some;
5712 let mut fields = std::collections::HashSet::new();
5713 let mut result = Self::Value::new();
5714 while let Some(tag) = map.next_key::<__FieldTag>()? {
5715 #[allow(clippy::match_single_binding)]
5716 match tag {
5717 __FieldTag::__name => {
5718 if !fields.insert(__FieldTag::__name) {
5719 return std::result::Result::Err(A::Error::duplicate_field(
5720 "multiple values for name",
5721 ));
5722 }
5723 result.name = map
5724 .next_value::<std::option::Option<std::string::String>>()?
5725 .unwrap_or_default();
5726 }
5727 __FieldTag::__etag => {
5728 if !fields.insert(__FieldTag::__etag) {
5729 return std::result::Result::Err(A::Error::duplicate_field(
5730 "multiple values for etag",
5731 ));
5732 }
5733 result.etag = map
5734 .next_value::<std::option::Option<std::string::String>>()?
5735 .unwrap_or_default();
5736 }
5737 __FieldTag::__validate_only => {
5738 if !fields.insert(__FieldTag::__validate_only) {
5739 return std::result::Result::Err(A::Error::duplicate_field(
5740 "multiple values for validate_only",
5741 ));
5742 }
5743 result.validate_only = map
5744 .next_value::<std::option::Option<bool>>()?
5745 .unwrap_or_default();
5746 }
5747 __FieldTag::Unknown(key) => {
5748 let value = map.next_value::<serde_json::Value>()?;
5749 result._unknown_fields.insert(key, value);
5750 }
5751 }
5752 }
5753 std::result::Result::Ok(result)
5754 }
5755 }
5756 deserializer.deserialize_any(Visitor)
5757 }
5758}
5759
5760#[doc(hidden)]
5761impl serde::ser::Serialize for DeleteConnectionRequest {
5762 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
5763 where
5764 S: serde::ser::Serializer,
5765 {
5766 use serde::ser::SerializeMap;
5767 #[allow(unused_imports)]
5768 use std::option::Option::Some;
5769 let mut state = serializer.serialize_map(std::option::Option::None)?;
5770 if !self.name.is_empty() {
5771 state.serialize_entry("name", &self.name)?;
5772 }
5773 if !self.etag.is_empty() {
5774 state.serialize_entry("etag", &self.etag)?;
5775 }
5776 if !wkt::internal::is_default(&self.validate_only) {
5777 state.serialize_entry("validateOnly", &self.validate_only)?;
5778 }
5779 if !self._unknown_fields.is_empty() {
5780 for (key, value) in self._unknown_fields.iter() {
5781 state.serialize_entry(key, &value)?;
5782 }
5783 }
5784 state.end()
5785 }
5786}
5787
5788impl std::fmt::Debug for DeleteConnectionRequest {
5789 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5790 let mut debug_struct = f.debug_struct("DeleteConnectionRequest");
5791 debug_struct.field("name", &self.name);
5792 debug_struct.field("etag", &self.etag);
5793 debug_struct.field("validate_only", &self.validate_only);
5794 if !self._unknown_fields.is_empty() {
5795 debug_struct.field("_unknown_fields", &self._unknown_fields);
5796 }
5797 debug_struct.finish()
5798 }
5799}
5800
5801#[derive(Clone, Default, PartialEq)]
5803#[non_exhaustive]
5804pub struct CreateRepositoryRequest {
5805 pub parent: std::string::String,
5809
5810 pub repository: std::option::Option<crate::model::Repository>,
5812
5813 pub repository_id: std::string::String,
5818
5819 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5820}
5821
5822impl CreateRepositoryRequest {
5823 pub fn new() -> Self {
5824 std::default::Default::default()
5825 }
5826
5827 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5829 self.parent = v.into();
5830 self
5831 }
5832
5833 pub fn set_repository<T>(mut self, v: T) -> Self
5835 where
5836 T: std::convert::Into<crate::model::Repository>,
5837 {
5838 self.repository = std::option::Option::Some(v.into());
5839 self
5840 }
5841
5842 pub fn set_or_clear_repository<T>(mut self, v: std::option::Option<T>) -> Self
5844 where
5845 T: std::convert::Into<crate::model::Repository>,
5846 {
5847 self.repository = v.map(|x| x.into());
5848 self
5849 }
5850
5851 pub fn set_repository_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5853 self.repository_id = v.into();
5854 self
5855 }
5856}
5857
5858impl wkt::message::Message for CreateRepositoryRequest {
5859 fn typename() -> &'static str {
5860 "type.googleapis.com/google.devtools.cloudbuild.v2.CreateRepositoryRequest"
5861 }
5862}
5863
5864#[doc(hidden)]
5865impl<'de> serde::de::Deserialize<'de> for CreateRepositoryRequest {
5866 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
5867 where
5868 D: serde::Deserializer<'de>,
5869 {
5870 #[allow(non_camel_case_types)]
5871 #[doc(hidden)]
5872 #[derive(PartialEq, Eq, Hash)]
5873 enum __FieldTag {
5874 __parent,
5875 __repository,
5876 __repository_id,
5877 Unknown(std::string::String),
5878 }
5879 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
5880 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
5881 where
5882 D: serde::Deserializer<'de>,
5883 {
5884 struct Visitor;
5885 impl<'de> serde::de::Visitor<'de> for Visitor {
5886 type Value = __FieldTag;
5887 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
5888 formatter.write_str("a field name for CreateRepositoryRequest")
5889 }
5890 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
5891 where
5892 E: serde::de::Error,
5893 {
5894 use std::result::Result::Ok;
5895 use std::string::ToString;
5896 match value {
5897 "parent" => Ok(__FieldTag::__parent),
5898 "repository" => Ok(__FieldTag::__repository),
5899 "repositoryId" => Ok(__FieldTag::__repository_id),
5900 "repository_id" => Ok(__FieldTag::__repository_id),
5901 _ => Ok(__FieldTag::Unknown(value.to_string())),
5902 }
5903 }
5904 }
5905 deserializer.deserialize_identifier(Visitor)
5906 }
5907 }
5908 struct Visitor;
5909 impl<'de> serde::de::Visitor<'de> for Visitor {
5910 type Value = CreateRepositoryRequest;
5911 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
5912 formatter.write_str("struct CreateRepositoryRequest")
5913 }
5914 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
5915 where
5916 A: serde::de::MapAccess<'de>,
5917 {
5918 #[allow(unused_imports)]
5919 use serde::de::Error;
5920 use std::option::Option::Some;
5921 let mut fields = std::collections::HashSet::new();
5922 let mut result = Self::Value::new();
5923 while let Some(tag) = map.next_key::<__FieldTag>()? {
5924 #[allow(clippy::match_single_binding)]
5925 match tag {
5926 __FieldTag::__parent => {
5927 if !fields.insert(__FieldTag::__parent) {
5928 return std::result::Result::Err(A::Error::duplicate_field(
5929 "multiple values for parent",
5930 ));
5931 }
5932 result.parent = map
5933 .next_value::<std::option::Option<std::string::String>>()?
5934 .unwrap_or_default();
5935 }
5936 __FieldTag::__repository => {
5937 if !fields.insert(__FieldTag::__repository) {
5938 return std::result::Result::Err(A::Error::duplicate_field(
5939 "multiple values for repository",
5940 ));
5941 }
5942 result.repository =
5943 map.next_value::<std::option::Option<crate::model::Repository>>()?;
5944 }
5945 __FieldTag::__repository_id => {
5946 if !fields.insert(__FieldTag::__repository_id) {
5947 return std::result::Result::Err(A::Error::duplicate_field(
5948 "multiple values for repository_id",
5949 ));
5950 }
5951 result.repository_id = map
5952 .next_value::<std::option::Option<std::string::String>>()?
5953 .unwrap_or_default();
5954 }
5955 __FieldTag::Unknown(key) => {
5956 let value = map.next_value::<serde_json::Value>()?;
5957 result._unknown_fields.insert(key, value);
5958 }
5959 }
5960 }
5961 std::result::Result::Ok(result)
5962 }
5963 }
5964 deserializer.deserialize_any(Visitor)
5965 }
5966}
5967
5968#[doc(hidden)]
5969impl serde::ser::Serialize for CreateRepositoryRequest {
5970 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
5971 where
5972 S: serde::ser::Serializer,
5973 {
5974 use serde::ser::SerializeMap;
5975 #[allow(unused_imports)]
5976 use std::option::Option::Some;
5977 let mut state = serializer.serialize_map(std::option::Option::None)?;
5978 if !self.parent.is_empty() {
5979 state.serialize_entry("parent", &self.parent)?;
5980 }
5981 if self.repository.is_some() {
5982 state.serialize_entry("repository", &self.repository)?;
5983 }
5984 if !self.repository_id.is_empty() {
5985 state.serialize_entry("repositoryId", &self.repository_id)?;
5986 }
5987 if !self._unknown_fields.is_empty() {
5988 for (key, value) in self._unknown_fields.iter() {
5989 state.serialize_entry(key, &value)?;
5990 }
5991 }
5992 state.end()
5993 }
5994}
5995
5996impl std::fmt::Debug for CreateRepositoryRequest {
5997 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5998 let mut debug_struct = f.debug_struct("CreateRepositoryRequest");
5999 debug_struct.field("parent", &self.parent);
6000 debug_struct.field("repository", &self.repository);
6001 debug_struct.field("repository_id", &self.repository_id);
6002 if !self._unknown_fields.is_empty() {
6003 debug_struct.field("_unknown_fields", &self._unknown_fields);
6004 }
6005 debug_struct.finish()
6006 }
6007}
6008
6009#[derive(Clone, Default, PartialEq)]
6011#[non_exhaustive]
6012pub struct BatchCreateRepositoriesRequest {
6013 pub parent: std::string::String,
6018
6019 pub requests: std::vec::Vec<crate::model::CreateRepositoryRequest>,
6021
6022 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6023}
6024
6025impl BatchCreateRepositoriesRequest {
6026 pub fn new() -> Self {
6027 std::default::Default::default()
6028 }
6029
6030 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6032 self.parent = v.into();
6033 self
6034 }
6035
6036 pub fn set_requests<T, V>(mut self, v: T) -> Self
6038 where
6039 T: std::iter::IntoIterator<Item = V>,
6040 V: std::convert::Into<crate::model::CreateRepositoryRequest>,
6041 {
6042 use std::iter::Iterator;
6043 self.requests = v.into_iter().map(|i| i.into()).collect();
6044 self
6045 }
6046}
6047
6048impl wkt::message::Message for BatchCreateRepositoriesRequest {
6049 fn typename() -> &'static str {
6050 "type.googleapis.com/google.devtools.cloudbuild.v2.BatchCreateRepositoriesRequest"
6051 }
6052}
6053
6054#[doc(hidden)]
6055impl<'de> serde::de::Deserialize<'de> for BatchCreateRepositoriesRequest {
6056 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6057 where
6058 D: serde::Deserializer<'de>,
6059 {
6060 #[allow(non_camel_case_types)]
6061 #[doc(hidden)]
6062 #[derive(PartialEq, Eq, Hash)]
6063 enum __FieldTag {
6064 __parent,
6065 __requests,
6066 Unknown(std::string::String),
6067 }
6068 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
6069 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6070 where
6071 D: serde::Deserializer<'de>,
6072 {
6073 struct Visitor;
6074 impl<'de> serde::de::Visitor<'de> for Visitor {
6075 type Value = __FieldTag;
6076 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
6077 formatter.write_str("a field name for BatchCreateRepositoriesRequest")
6078 }
6079 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
6080 where
6081 E: serde::de::Error,
6082 {
6083 use std::result::Result::Ok;
6084 use std::string::ToString;
6085 match value {
6086 "parent" => Ok(__FieldTag::__parent),
6087 "requests" => Ok(__FieldTag::__requests),
6088 _ => Ok(__FieldTag::Unknown(value.to_string())),
6089 }
6090 }
6091 }
6092 deserializer.deserialize_identifier(Visitor)
6093 }
6094 }
6095 struct Visitor;
6096 impl<'de> serde::de::Visitor<'de> for Visitor {
6097 type Value = BatchCreateRepositoriesRequest;
6098 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
6099 formatter.write_str("struct BatchCreateRepositoriesRequest")
6100 }
6101 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
6102 where
6103 A: serde::de::MapAccess<'de>,
6104 {
6105 #[allow(unused_imports)]
6106 use serde::de::Error;
6107 use std::option::Option::Some;
6108 let mut fields = std::collections::HashSet::new();
6109 let mut result = Self::Value::new();
6110 while let Some(tag) = map.next_key::<__FieldTag>()? {
6111 #[allow(clippy::match_single_binding)]
6112 match tag {
6113 __FieldTag::__parent => {
6114 if !fields.insert(__FieldTag::__parent) {
6115 return std::result::Result::Err(A::Error::duplicate_field(
6116 "multiple values for parent",
6117 ));
6118 }
6119 result.parent = map
6120 .next_value::<std::option::Option<std::string::String>>()?
6121 .unwrap_or_default();
6122 }
6123 __FieldTag::__requests => {
6124 if !fields.insert(__FieldTag::__requests) {
6125 return std::result::Result::Err(A::Error::duplicate_field(
6126 "multiple values for requests",
6127 ));
6128 }
6129 result.requests = map
6130 .next_value::<std::option::Option<
6131 std::vec::Vec<crate::model::CreateRepositoryRequest>,
6132 >>()?
6133 .unwrap_or_default();
6134 }
6135 __FieldTag::Unknown(key) => {
6136 let value = map.next_value::<serde_json::Value>()?;
6137 result._unknown_fields.insert(key, value);
6138 }
6139 }
6140 }
6141 std::result::Result::Ok(result)
6142 }
6143 }
6144 deserializer.deserialize_any(Visitor)
6145 }
6146}
6147
6148#[doc(hidden)]
6149impl serde::ser::Serialize for BatchCreateRepositoriesRequest {
6150 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
6151 where
6152 S: serde::ser::Serializer,
6153 {
6154 use serde::ser::SerializeMap;
6155 #[allow(unused_imports)]
6156 use std::option::Option::Some;
6157 let mut state = serializer.serialize_map(std::option::Option::None)?;
6158 if !self.parent.is_empty() {
6159 state.serialize_entry("parent", &self.parent)?;
6160 }
6161 if !self.requests.is_empty() {
6162 state.serialize_entry("requests", &self.requests)?;
6163 }
6164 if !self._unknown_fields.is_empty() {
6165 for (key, value) in self._unknown_fields.iter() {
6166 state.serialize_entry(key, &value)?;
6167 }
6168 }
6169 state.end()
6170 }
6171}
6172
6173impl std::fmt::Debug for BatchCreateRepositoriesRequest {
6174 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6175 let mut debug_struct = f.debug_struct("BatchCreateRepositoriesRequest");
6176 debug_struct.field("parent", &self.parent);
6177 debug_struct.field("requests", &self.requests);
6178 if !self._unknown_fields.is_empty() {
6179 debug_struct.field("_unknown_fields", &self._unknown_fields);
6180 }
6181 debug_struct.finish()
6182 }
6183}
6184
6185#[derive(Clone, Default, PartialEq)]
6187#[non_exhaustive]
6188pub struct BatchCreateRepositoriesResponse {
6189 pub repositories: std::vec::Vec<crate::model::Repository>,
6191
6192 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6193}
6194
6195impl BatchCreateRepositoriesResponse {
6196 pub fn new() -> Self {
6197 std::default::Default::default()
6198 }
6199
6200 pub fn set_repositories<T, V>(mut self, v: T) -> Self
6202 where
6203 T: std::iter::IntoIterator<Item = V>,
6204 V: std::convert::Into<crate::model::Repository>,
6205 {
6206 use std::iter::Iterator;
6207 self.repositories = v.into_iter().map(|i| i.into()).collect();
6208 self
6209 }
6210}
6211
6212impl wkt::message::Message for BatchCreateRepositoriesResponse {
6213 fn typename() -> &'static str {
6214 "type.googleapis.com/google.devtools.cloudbuild.v2.BatchCreateRepositoriesResponse"
6215 }
6216}
6217
6218#[doc(hidden)]
6219impl<'de> serde::de::Deserialize<'de> for BatchCreateRepositoriesResponse {
6220 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6221 where
6222 D: serde::Deserializer<'de>,
6223 {
6224 #[allow(non_camel_case_types)]
6225 #[doc(hidden)]
6226 #[derive(PartialEq, Eq, Hash)]
6227 enum __FieldTag {
6228 __repositories,
6229 Unknown(std::string::String),
6230 }
6231 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
6232 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6233 where
6234 D: serde::Deserializer<'de>,
6235 {
6236 struct Visitor;
6237 impl<'de> serde::de::Visitor<'de> for Visitor {
6238 type Value = __FieldTag;
6239 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
6240 formatter.write_str("a field name for BatchCreateRepositoriesResponse")
6241 }
6242 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
6243 where
6244 E: serde::de::Error,
6245 {
6246 use std::result::Result::Ok;
6247 use std::string::ToString;
6248 match value {
6249 "repositories" => Ok(__FieldTag::__repositories),
6250 _ => Ok(__FieldTag::Unknown(value.to_string())),
6251 }
6252 }
6253 }
6254 deserializer.deserialize_identifier(Visitor)
6255 }
6256 }
6257 struct Visitor;
6258 impl<'de> serde::de::Visitor<'de> for Visitor {
6259 type Value = BatchCreateRepositoriesResponse;
6260 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
6261 formatter.write_str("struct BatchCreateRepositoriesResponse")
6262 }
6263 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
6264 where
6265 A: serde::de::MapAccess<'de>,
6266 {
6267 #[allow(unused_imports)]
6268 use serde::de::Error;
6269 use std::option::Option::Some;
6270 let mut fields = std::collections::HashSet::new();
6271 let mut result = Self::Value::new();
6272 while let Some(tag) = map.next_key::<__FieldTag>()? {
6273 #[allow(clippy::match_single_binding)]
6274 match tag {
6275 __FieldTag::__repositories => {
6276 if !fields.insert(__FieldTag::__repositories) {
6277 return std::result::Result::Err(A::Error::duplicate_field(
6278 "multiple values for repositories",
6279 ));
6280 }
6281 result.repositories = map.next_value::<std::option::Option<std::vec::Vec<crate::model::Repository>>>()?.unwrap_or_default();
6282 }
6283 __FieldTag::Unknown(key) => {
6284 let value = map.next_value::<serde_json::Value>()?;
6285 result._unknown_fields.insert(key, value);
6286 }
6287 }
6288 }
6289 std::result::Result::Ok(result)
6290 }
6291 }
6292 deserializer.deserialize_any(Visitor)
6293 }
6294}
6295
6296#[doc(hidden)]
6297impl serde::ser::Serialize for BatchCreateRepositoriesResponse {
6298 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
6299 where
6300 S: serde::ser::Serializer,
6301 {
6302 use serde::ser::SerializeMap;
6303 #[allow(unused_imports)]
6304 use std::option::Option::Some;
6305 let mut state = serializer.serialize_map(std::option::Option::None)?;
6306 if !self.repositories.is_empty() {
6307 state.serialize_entry("repositories", &self.repositories)?;
6308 }
6309 if !self._unknown_fields.is_empty() {
6310 for (key, value) in self._unknown_fields.iter() {
6311 state.serialize_entry(key, &value)?;
6312 }
6313 }
6314 state.end()
6315 }
6316}
6317
6318impl std::fmt::Debug for BatchCreateRepositoriesResponse {
6319 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6320 let mut debug_struct = f.debug_struct("BatchCreateRepositoriesResponse");
6321 debug_struct.field("repositories", &self.repositories);
6322 if !self._unknown_fields.is_empty() {
6323 debug_struct.field("_unknown_fields", &self._unknown_fields);
6324 }
6325 debug_struct.finish()
6326 }
6327}
6328
6329#[derive(Clone, Default, PartialEq)]
6331#[non_exhaustive]
6332pub struct GetRepositoryRequest {
6333 pub name: std::string::String,
6336
6337 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6338}
6339
6340impl GetRepositoryRequest {
6341 pub fn new() -> Self {
6342 std::default::Default::default()
6343 }
6344
6345 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6347 self.name = v.into();
6348 self
6349 }
6350}
6351
6352impl wkt::message::Message for GetRepositoryRequest {
6353 fn typename() -> &'static str {
6354 "type.googleapis.com/google.devtools.cloudbuild.v2.GetRepositoryRequest"
6355 }
6356}
6357
6358#[doc(hidden)]
6359impl<'de> serde::de::Deserialize<'de> for GetRepositoryRequest {
6360 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6361 where
6362 D: serde::Deserializer<'de>,
6363 {
6364 #[allow(non_camel_case_types)]
6365 #[doc(hidden)]
6366 #[derive(PartialEq, Eq, Hash)]
6367 enum __FieldTag {
6368 __name,
6369 Unknown(std::string::String),
6370 }
6371 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
6372 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6373 where
6374 D: serde::Deserializer<'de>,
6375 {
6376 struct Visitor;
6377 impl<'de> serde::de::Visitor<'de> for Visitor {
6378 type Value = __FieldTag;
6379 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
6380 formatter.write_str("a field name for GetRepositoryRequest")
6381 }
6382 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
6383 where
6384 E: serde::de::Error,
6385 {
6386 use std::result::Result::Ok;
6387 use std::string::ToString;
6388 match value {
6389 "name" => Ok(__FieldTag::__name),
6390 _ => Ok(__FieldTag::Unknown(value.to_string())),
6391 }
6392 }
6393 }
6394 deserializer.deserialize_identifier(Visitor)
6395 }
6396 }
6397 struct Visitor;
6398 impl<'de> serde::de::Visitor<'de> for Visitor {
6399 type Value = GetRepositoryRequest;
6400 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
6401 formatter.write_str("struct GetRepositoryRequest")
6402 }
6403 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
6404 where
6405 A: serde::de::MapAccess<'de>,
6406 {
6407 #[allow(unused_imports)]
6408 use serde::de::Error;
6409 use std::option::Option::Some;
6410 let mut fields = std::collections::HashSet::new();
6411 let mut result = Self::Value::new();
6412 while let Some(tag) = map.next_key::<__FieldTag>()? {
6413 #[allow(clippy::match_single_binding)]
6414 match tag {
6415 __FieldTag::__name => {
6416 if !fields.insert(__FieldTag::__name) {
6417 return std::result::Result::Err(A::Error::duplicate_field(
6418 "multiple values for name",
6419 ));
6420 }
6421 result.name = map
6422 .next_value::<std::option::Option<std::string::String>>()?
6423 .unwrap_or_default();
6424 }
6425 __FieldTag::Unknown(key) => {
6426 let value = map.next_value::<serde_json::Value>()?;
6427 result._unknown_fields.insert(key, value);
6428 }
6429 }
6430 }
6431 std::result::Result::Ok(result)
6432 }
6433 }
6434 deserializer.deserialize_any(Visitor)
6435 }
6436}
6437
6438#[doc(hidden)]
6439impl serde::ser::Serialize for GetRepositoryRequest {
6440 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
6441 where
6442 S: serde::ser::Serializer,
6443 {
6444 use serde::ser::SerializeMap;
6445 #[allow(unused_imports)]
6446 use std::option::Option::Some;
6447 let mut state = serializer.serialize_map(std::option::Option::None)?;
6448 if !self.name.is_empty() {
6449 state.serialize_entry("name", &self.name)?;
6450 }
6451 if !self._unknown_fields.is_empty() {
6452 for (key, value) in self._unknown_fields.iter() {
6453 state.serialize_entry(key, &value)?;
6454 }
6455 }
6456 state.end()
6457 }
6458}
6459
6460impl std::fmt::Debug for GetRepositoryRequest {
6461 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6462 let mut debug_struct = f.debug_struct("GetRepositoryRequest");
6463 debug_struct.field("name", &self.name);
6464 if !self._unknown_fields.is_empty() {
6465 debug_struct.field("_unknown_fields", &self._unknown_fields);
6466 }
6467 debug_struct.finish()
6468 }
6469}
6470
6471#[derive(Clone, Default, PartialEq)]
6473#[non_exhaustive]
6474pub struct ListRepositoriesRequest {
6475 pub parent: std::string::String,
6478
6479 pub page_size: i32,
6481
6482 pub page_token: std::string::String,
6484
6485 pub filter: std::string::String,
6490
6491 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6492}
6493
6494impl ListRepositoriesRequest {
6495 pub fn new() -> Self {
6496 std::default::Default::default()
6497 }
6498
6499 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6501 self.parent = v.into();
6502 self
6503 }
6504
6505 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6507 self.page_size = v.into();
6508 self
6509 }
6510
6511 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6513 self.page_token = v.into();
6514 self
6515 }
6516
6517 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6519 self.filter = v.into();
6520 self
6521 }
6522}
6523
6524impl wkt::message::Message for ListRepositoriesRequest {
6525 fn typename() -> &'static str {
6526 "type.googleapis.com/google.devtools.cloudbuild.v2.ListRepositoriesRequest"
6527 }
6528}
6529
6530#[doc(hidden)]
6531impl<'de> serde::de::Deserialize<'de> for ListRepositoriesRequest {
6532 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6533 where
6534 D: serde::Deserializer<'de>,
6535 {
6536 #[allow(non_camel_case_types)]
6537 #[doc(hidden)]
6538 #[derive(PartialEq, Eq, Hash)]
6539 enum __FieldTag {
6540 __parent,
6541 __page_size,
6542 __page_token,
6543 __filter,
6544 Unknown(std::string::String),
6545 }
6546 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
6547 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6548 where
6549 D: serde::Deserializer<'de>,
6550 {
6551 struct Visitor;
6552 impl<'de> serde::de::Visitor<'de> for Visitor {
6553 type Value = __FieldTag;
6554 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
6555 formatter.write_str("a field name for ListRepositoriesRequest")
6556 }
6557 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
6558 where
6559 E: serde::de::Error,
6560 {
6561 use std::result::Result::Ok;
6562 use std::string::ToString;
6563 match value {
6564 "parent" => Ok(__FieldTag::__parent),
6565 "pageSize" => Ok(__FieldTag::__page_size),
6566 "page_size" => Ok(__FieldTag::__page_size),
6567 "pageToken" => Ok(__FieldTag::__page_token),
6568 "page_token" => Ok(__FieldTag::__page_token),
6569 "filter" => Ok(__FieldTag::__filter),
6570 _ => Ok(__FieldTag::Unknown(value.to_string())),
6571 }
6572 }
6573 }
6574 deserializer.deserialize_identifier(Visitor)
6575 }
6576 }
6577 struct Visitor;
6578 impl<'de> serde::de::Visitor<'de> for Visitor {
6579 type Value = ListRepositoriesRequest;
6580 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
6581 formatter.write_str("struct ListRepositoriesRequest")
6582 }
6583 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
6584 where
6585 A: serde::de::MapAccess<'de>,
6586 {
6587 #[allow(unused_imports)]
6588 use serde::de::Error;
6589 use std::option::Option::Some;
6590 let mut fields = std::collections::HashSet::new();
6591 let mut result = Self::Value::new();
6592 while let Some(tag) = map.next_key::<__FieldTag>()? {
6593 #[allow(clippy::match_single_binding)]
6594 match tag {
6595 __FieldTag::__parent => {
6596 if !fields.insert(__FieldTag::__parent) {
6597 return std::result::Result::Err(A::Error::duplicate_field(
6598 "multiple values for parent",
6599 ));
6600 }
6601 result.parent = map
6602 .next_value::<std::option::Option<std::string::String>>()?
6603 .unwrap_or_default();
6604 }
6605 __FieldTag::__page_size => {
6606 if !fields.insert(__FieldTag::__page_size) {
6607 return std::result::Result::Err(A::Error::duplicate_field(
6608 "multiple values for page_size",
6609 ));
6610 }
6611 struct __With(std::option::Option<i32>);
6612 impl<'de> serde::de::Deserialize<'de> for __With {
6613 fn deserialize<D>(
6614 deserializer: D,
6615 ) -> std::result::Result<Self, D::Error>
6616 where
6617 D: serde::de::Deserializer<'de>,
6618 {
6619 serde_with::As::< std::option::Option<wkt::internal::I32> >::deserialize(deserializer).map(__With)
6620 }
6621 }
6622 result.page_size = map.next_value::<__With>()?.0.unwrap_or_default();
6623 }
6624 __FieldTag::__page_token => {
6625 if !fields.insert(__FieldTag::__page_token) {
6626 return std::result::Result::Err(A::Error::duplicate_field(
6627 "multiple values for page_token",
6628 ));
6629 }
6630 result.page_token = map
6631 .next_value::<std::option::Option<std::string::String>>()?
6632 .unwrap_or_default();
6633 }
6634 __FieldTag::__filter => {
6635 if !fields.insert(__FieldTag::__filter) {
6636 return std::result::Result::Err(A::Error::duplicate_field(
6637 "multiple values for filter",
6638 ));
6639 }
6640 result.filter = map
6641 .next_value::<std::option::Option<std::string::String>>()?
6642 .unwrap_or_default();
6643 }
6644 __FieldTag::Unknown(key) => {
6645 let value = map.next_value::<serde_json::Value>()?;
6646 result._unknown_fields.insert(key, value);
6647 }
6648 }
6649 }
6650 std::result::Result::Ok(result)
6651 }
6652 }
6653 deserializer.deserialize_any(Visitor)
6654 }
6655}
6656
6657#[doc(hidden)]
6658impl serde::ser::Serialize for ListRepositoriesRequest {
6659 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
6660 where
6661 S: serde::ser::Serializer,
6662 {
6663 use serde::ser::SerializeMap;
6664 #[allow(unused_imports)]
6665 use std::option::Option::Some;
6666 let mut state = serializer.serialize_map(std::option::Option::None)?;
6667 if !self.parent.is_empty() {
6668 state.serialize_entry("parent", &self.parent)?;
6669 }
6670 if !wkt::internal::is_default(&self.page_size) {
6671 struct __With<'a>(&'a i32);
6672 impl<'a> serde::ser::Serialize for __With<'a> {
6673 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
6674 where
6675 S: serde::ser::Serializer,
6676 {
6677 serde_with::As::<wkt::internal::I32>::serialize(self.0, serializer)
6678 }
6679 }
6680 state.serialize_entry("pageSize", &__With(&self.page_size))?;
6681 }
6682 if !self.page_token.is_empty() {
6683 state.serialize_entry("pageToken", &self.page_token)?;
6684 }
6685 if !self.filter.is_empty() {
6686 state.serialize_entry("filter", &self.filter)?;
6687 }
6688 if !self._unknown_fields.is_empty() {
6689 for (key, value) in self._unknown_fields.iter() {
6690 state.serialize_entry(key, &value)?;
6691 }
6692 }
6693 state.end()
6694 }
6695}
6696
6697impl std::fmt::Debug for ListRepositoriesRequest {
6698 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6699 let mut debug_struct = f.debug_struct("ListRepositoriesRequest");
6700 debug_struct.field("parent", &self.parent);
6701 debug_struct.field("page_size", &self.page_size);
6702 debug_struct.field("page_token", &self.page_token);
6703 debug_struct.field("filter", &self.filter);
6704 if !self._unknown_fields.is_empty() {
6705 debug_struct.field("_unknown_fields", &self._unknown_fields);
6706 }
6707 debug_struct.finish()
6708 }
6709}
6710
6711#[derive(Clone, Default, PartialEq)]
6713#[non_exhaustive]
6714pub struct ListRepositoriesResponse {
6715 pub repositories: std::vec::Vec<crate::model::Repository>,
6717
6718 pub next_page_token: std::string::String,
6720
6721 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6722}
6723
6724impl ListRepositoriesResponse {
6725 pub fn new() -> Self {
6726 std::default::Default::default()
6727 }
6728
6729 pub fn set_repositories<T, V>(mut self, v: T) -> Self
6731 where
6732 T: std::iter::IntoIterator<Item = V>,
6733 V: std::convert::Into<crate::model::Repository>,
6734 {
6735 use std::iter::Iterator;
6736 self.repositories = v.into_iter().map(|i| i.into()).collect();
6737 self
6738 }
6739
6740 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6742 self.next_page_token = v.into();
6743 self
6744 }
6745}
6746
6747impl wkt::message::Message for ListRepositoriesResponse {
6748 fn typename() -> &'static str {
6749 "type.googleapis.com/google.devtools.cloudbuild.v2.ListRepositoriesResponse"
6750 }
6751}
6752
6753#[doc(hidden)]
6754impl gax::paginator::internal::PageableResponse for ListRepositoriesResponse {
6755 type PageItem = crate::model::Repository;
6756
6757 fn items(self) -> std::vec::Vec<Self::PageItem> {
6758 self.repositories
6759 }
6760
6761 fn next_page_token(&self) -> std::string::String {
6762 use std::clone::Clone;
6763 self.next_page_token.clone()
6764 }
6765}
6766
6767#[doc(hidden)]
6768impl<'de> serde::de::Deserialize<'de> for ListRepositoriesResponse {
6769 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6770 where
6771 D: serde::Deserializer<'de>,
6772 {
6773 #[allow(non_camel_case_types)]
6774 #[doc(hidden)]
6775 #[derive(PartialEq, Eq, Hash)]
6776 enum __FieldTag {
6777 __repositories,
6778 __next_page_token,
6779 Unknown(std::string::String),
6780 }
6781 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
6782 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6783 where
6784 D: serde::Deserializer<'de>,
6785 {
6786 struct Visitor;
6787 impl<'de> serde::de::Visitor<'de> for Visitor {
6788 type Value = __FieldTag;
6789 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
6790 formatter.write_str("a field name for ListRepositoriesResponse")
6791 }
6792 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
6793 where
6794 E: serde::de::Error,
6795 {
6796 use std::result::Result::Ok;
6797 use std::string::ToString;
6798 match value {
6799 "repositories" => Ok(__FieldTag::__repositories),
6800 "nextPageToken" => Ok(__FieldTag::__next_page_token),
6801 "next_page_token" => Ok(__FieldTag::__next_page_token),
6802 _ => Ok(__FieldTag::Unknown(value.to_string())),
6803 }
6804 }
6805 }
6806 deserializer.deserialize_identifier(Visitor)
6807 }
6808 }
6809 struct Visitor;
6810 impl<'de> serde::de::Visitor<'de> for Visitor {
6811 type Value = ListRepositoriesResponse;
6812 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
6813 formatter.write_str("struct ListRepositoriesResponse")
6814 }
6815 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
6816 where
6817 A: serde::de::MapAccess<'de>,
6818 {
6819 #[allow(unused_imports)]
6820 use serde::de::Error;
6821 use std::option::Option::Some;
6822 let mut fields = std::collections::HashSet::new();
6823 let mut result = Self::Value::new();
6824 while let Some(tag) = map.next_key::<__FieldTag>()? {
6825 #[allow(clippy::match_single_binding)]
6826 match tag {
6827 __FieldTag::__repositories => {
6828 if !fields.insert(__FieldTag::__repositories) {
6829 return std::result::Result::Err(A::Error::duplicate_field(
6830 "multiple values for repositories",
6831 ));
6832 }
6833 result.repositories = map.next_value::<std::option::Option<std::vec::Vec<crate::model::Repository>>>()?.unwrap_or_default();
6834 }
6835 __FieldTag::__next_page_token => {
6836 if !fields.insert(__FieldTag::__next_page_token) {
6837 return std::result::Result::Err(A::Error::duplicate_field(
6838 "multiple values for next_page_token",
6839 ));
6840 }
6841 result.next_page_token = map
6842 .next_value::<std::option::Option<std::string::String>>()?
6843 .unwrap_or_default();
6844 }
6845 __FieldTag::Unknown(key) => {
6846 let value = map.next_value::<serde_json::Value>()?;
6847 result._unknown_fields.insert(key, value);
6848 }
6849 }
6850 }
6851 std::result::Result::Ok(result)
6852 }
6853 }
6854 deserializer.deserialize_any(Visitor)
6855 }
6856}
6857
6858#[doc(hidden)]
6859impl serde::ser::Serialize for ListRepositoriesResponse {
6860 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
6861 where
6862 S: serde::ser::Serializer,
6863 {
6864 use serde::ser::SerializeMap;
6865 #[allow(unused_imports)]
6866 use std::option::Option::Some;
6867 let mut state = serializer.serialize_map(std::option::Option::None)?;
6868 if !self.repositories.is_empty() {
6869 state.serialize_entry("repositories", &self.repositories)?;
6870 }
6871 if !self.next_page_token.is_empty() {
6872 state.serialize_entry("nextPageToken", &self.next_page_token)?;
6873 }
6874 if !self._unknown_fields.is_empty() {
6875 for (key, value) in self._unknown_fields.iter() {
6876 state.serialize_entry(key, &value)?;
6877 }
6878 }
6879 state.end()
6880 }
6881}
6882
6883impl std::fmt::Debug for ListRepositoriesResponse {
6884 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6885 let mut debug_struct = f.debug_struct("ListRepositoriesResponse");
6886 debug_struct.field("repositories", &self.repositories);
6887 debug_struct.field("next_page_token", &self.next_page_token);
6888 if !self._unknown_fields.is_empty() {
6889 debug_struct.field("_unknown_fields", &self._unknown_fields);
6890 }
6891 debug_struct.finish()
6892 }
6893}
6894
6895#[derive(Clone, Default, PartialEq)]
6897#[non_exhaustive]
6898pub struct DeleteRepositoryRequest {
6899 pub name: std::string::String,
6902
6903 pub etag: std::string::String,
6907
6908 pub validate_only: bool,
6910
6911 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6912}
6913
6914impl DeleteRepositoryRequest {
6915 pub fn new() -> Self {
6916 std::default::Default::default()
6917 }
6918
6919 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6921 self.name = v.into();
6922 self
6923 }
6924
6925 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6927 self.etag = v.into();
6928 self
6929 }
6930
6931 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6933 self.validate_only = v.into();
6934 self
6935 }
6936}
6937
6938impl wkt::message::Message for DeleteRepositoryRequest {
6939 fn typename() -> &'static str {
6940 "type.googleapis.com/google.devtools.cloudbuild.v2.DeleteRepositoryRequest"
6941 }
6942}
6943
6944#[doc(hidden)]
6945impl<'de> serde::de::Deserialize<'de> for DeleteRepositoryRequest {
6946 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6947 where
6948 D: serde::Deserializer<'de>,
6949 {
6950 #[allow(non_camel_case_types)]
6951 #[doc(hidden)]
6952 #[derive(PartialEq, Eq, Hash)]
6953 enum __FieldTag {
6954 __name,
6955 __etag,
6956 __validate_only,
6957 Unknown(std::string::String),
6958 }
6959 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
6960 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6961 where
6962 D: serde::Deserializer<'de>,
6963 {
6964 struct Visitor;
6965 impl<'de> serde::de::Visitor<'de> for Visitor {
6966 type Value = __FieldTag;
6967 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
6968 formatter.write_str("a field name for DeleteRepositoryRequest")
6969 }
6970 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
6971 where
6972 E: serde::de::Error,
6973 {
6974 use std::result::Result::Ok;
6975 use std::string::ToString;
6976 match value {
6977 "name" => Ok(__FieldTag::__name),
6978 "etag" => Ok(__FieldTag::__etag),
6979 "validateOnly" => Ok(__FieldTag::__validate_only),
6980 "validate_only" => Ok(__FieldTag::__validate_only),
6981 _ => Ok(__FieldTag::Unknown(value.to_string())),
6982 }
6983 }
6984 }
6985 deserializer.deserialize_identifier(Visitor)
6986 }
6987 }
6988 struct Visitor;
6989 impl<'de> serde::de::Visitor<'de> for Visitor {
6990 type Value = DeleteRepositoryRequest;
6991 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
6992 formatter.write_str("struct DeleteRepositoryRequest")
6993 }
6994 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
6995 where
6996 A: serde::de::MapAccess<'de>,
6997 {
6998 #[allow(unused_imports)]
6999 use serde::de::Error;
7000 use std::option::Option::Some;
7001 let mut fields = std::collections::HashSet::new();
7002 let mut result = Self::Value::new();
7003 while let Some(tag) = map.next_key::<__FieldTag>()? {
7004 #[allow(clippy::match_single_binding)]
7005 match tag {
7006 __FieldTag::__name => {
7007 if !fields.insert(__FieldTag::__name) {
7008 return std::result::Result::Err(A::Error::duplicate_field(
7009 "multiple values for name",
7010 ));
7011 }
7012 result.name = map
7013 .next_value::<std::option::Option<std::string::String>>()?
7014 .unwrap_or_default();
7015 }
7016 __FieldTag::__etag => {
7017 if !fields.insert(__FieldTag::__etag) {
7018 return std::result::Result::Err(A::Error::duplicate_field(
7019 "multiple values for etag",
7020 ));
7021 }
7022 result.etag = map
7023 .next_value::<std::option::Option<std::string::String>>()?
7024 .unwrap_or_default();
7025 }
7026 __FieldTag::__validate_only => {
7027 if !fields.insert(__FieldTag::__validate_only) {
7028 return std::result::Result::Err(A::Error::duplicate_field(
7029 "multiple values for validate_only",
7030 ));
7031 }
7032 result.validate_only = map
7033 .next_value::<std::option::Option<bool>>()?
7034 .unwrap_or_default();
7035 }
7036 __FieldTag::Unknown(key) => {
7037 let value = map.next_value::<serde_json::Value>()?;
7038 result._unknown_fields.insert(key, value);
7039 }
7040 }
7041 }
7042 std::result::Result::Ok(result)
7043 }
7044 }
7045 deserializer.deserialize_any(Visitor)
7046 }
7047}
7048
7049#[doc(hidden)]
7050impl serde::ser::Serialize for DeleteRepositoryRequest {
7051 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
7052 where
7053 S: serde::ser::Serializer,
7054 {
7055 use serde::ser::SerializeMap;
7056 #[allow(unused_imports)]
7057 use std::option::Option::Some;
7058 let mut state = serializer.serialize_map(std::option::Option::None)?;
7059 if !self.name.is_empty() {
7060 state.serialize_entry("name", &self.name)?;
7061 }
7062 if !self.etag.is_empty() {
7063 state.serialize_entry("etag", &self.etag)?;
7064 }
7065 if !wkt::internal::is_default(&self.validate_only) {
7066 state.serialize_entry("validateOnly", &self.validate_only)?;
7067 }
7068 if !self._unknown_fields.is_empty() {
7069 for (key, value) in self._unknown_fields.iter() {
7070 state.serialize_entry(key, &value)?;
7071 }
7072 }
7073 state.end()
7074 }
7075}
7076
7077impl std::fmt::Debug for DeleteRepositoryRequest {
7078 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
7079 let mut debug_struct = f.debug_struct("DeleteRepositoryRequest");
7080 debug_struct.field("name", &self.name);
7081 debug_struct.field("etag", &self.etag);
7082 debug_struct.field("validate_only", &self.validate_only);
7083 if !self._unknown_fields.is_empty() {
7084 debug_struct.field("_unknown_fields", &self._unknown_fields);
7085 }
7086 debug_struct.finish()
7087 }
7088}
7089
7090#[derive(Clone, Default, PartialEq)]
7092#[non_exhaustive]
7093pub struct FetchReadWriteTokenRequest {
7094 pub repository: std::string::String,
7097
7098 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7099}
7100
7101impl FetchReadWriteTokenRequest {
7102 pub fn new() -> Self {
7103 std::default::Default::default()
7104 }
7105
7106 pub fn set_repository<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7108 self.repository = v.into();
7109 self
7110 }
7111}
7112
7113impl wkt::message::Message for FetchReadWriteTokenRequest {
7114 fn typename() -> &'static str {
7115 "type.googleapis.com/google.devtools.cloudbuild.v2.FetchReadWriteTokenRequest"
7116 }
7117}
7118
7119#[doc(hidden)]
7120impl<'de> serde::de::Deserialize<'de> for FetchReadWriteTokenRequest {
7121 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7122 where
7123 D: serde::Deserializer<'de>,
7124 {
7125 #[allow(non_camel_case_types)]
7126 #[doc(hidden)]
7127 #[derive(PartialEq, Eq, Hash)]
7128 enum __FieldTag {
7129 __repository,
7130 Unknown(std::string::String),
7131 }
7132 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
7133 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7134 where
7135 D: serde::Deserializer<'de>,
7136 {
7137 struct Visitor;
7138 impl<'de> serde::de::Visitor<'de> for Visitor {
7139 type Value = __FieldTag;
7140 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
7141 formatter.write_str("a field name for FetchReadWriteTokenRequest")
7142 }
7143 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
7144 where
7145 E: serde::de::Error,
7146 {
7147 use std::result::Result::Ok;
7148 use std::string::ToString;
7149 match value {
7150 "repository" => Ok(__FieldTag::__repository),
7151 _ => Ok(__FieldTag::Unknown(value.to_string())),
7152 }
7153 }
7154 }
7155 deserializer.deserialize_identifier(Visitor)
7156 }
7157 }
7158 struct Visitor;
7159 impl<'de> serde::de::Visitor<'de> for Visitor {
7160 type Value = FetchReadWriteTokenRequest;
7161 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
7162 formatter.write_str("struct FetchReadWriteTokenRequest")
7163 }
7164 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
7165 where
7166 A: serde::de::MapAccess<'de>,
7167 {
7168 #[allow(unused_imports)]
7169 use serde::de::Error;
7170 use std::option::Option::Some;
7171 let mut fields = std::collections::HashSet::new();
7172 let mut result = Self::Value::new();
7173 while let Some(tag) = map.next_key::<__FieldTag>()? {
7174 #[allow(clippy::match_single_binding)]
7175 match tag {
7176 __FieldTag::__repository => {
7177 if !fields.insert(__FieldTag::__repository) {
7178 return std::result::Result::Err(A::Error::duplicate_field(
7179 "multiple values for repository",
7180 ));
7181 }
7182 result.repository = map
7183 .next_value::<std::option::Option<std::string::String>>()?
7184 .unwrap_or_default();
7185 }
7186 __FieldTag::Unknown(key) => {
7187 let value = map.next_value::<serde_json::Value>()?;
7188 result._unknown_fields.insert(key, value);
7189 }
7190 }
7191 }
7192 std::result::Result::Ok(result)
7193 }
7194 }
7195 deserializer.deserialize_any(Visitor)
7196 }
7197}
7198
7199#[doc(hidden)]
7200impl serde::ser::Serialize for FetchReadWriteTokenRequest {
7201 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
7202 where
7203 S: serde::ser::Serializer,
7204 {
7205 use serde::ser::SerializeMap;
7206 #[allow(unused_imports)]
7207 use std::option::Option::Some;
7208 let mut state = serializer.serialize_map(std::option::Option::None)?;
7209 if !self.repository.is_empty() {
7210 state.serialize_entry("repository", &self.repository)?;
7211 }
7212 if !self._unknown_fields.is_empty() {
7213 for (key, value) in self._unknown_fields.iter() {
7214 state.serialize_entry(key, &value)?;
7215 }
7216 }
7217 state.end()
7218 }
7219}
7220
7221impl std::fmt::Debug for FetchReadWriteTokenRequest {
7222 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
7223 let mut debug_struct = f.debug_struct("FetchReadWriteTokenRequest");
7224 debug_struct.field("repository", &self.repository);
7225 if !self._unknown_fields.is_empty() {
7226 debug_struct.field("_unknown_fields", &self._unknown_fields);
7227 }
7228 debug_struct.finish()
7229 }
7230}
7231
7232#[derive(Clone, Default, PartialEq)]
7234#[non_exhaustive]
7235pub struct FetchReadTokenRequest {
7236 pub repository: std::string::String,
7239
7240 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7241}
7242
7243impl FetchReadTokenRequest {
7244 pub fn new() -> Self {
7245 std::default::Default::default()
7246 }
7247
7248 pub fn set_repository<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7250 self.repository = v.into();
7251 self
7252 }
7253}
7254
7255impl wkt::message::Message for FetchReadTokenRequest {
7256 fn typename() -> &'static str {
7257 "type.googleapis.com/google.devtools.cloudbuild.v2.FetchReadTokenRequest"
7258 }
7259}
7260
7261#[doc(hidden)]
7262impl<'de> serde::de::Deserialize<'de> for FetchReadTokenRequest {
7263 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7264 where
7265 D: serde::Deserializer<'de>,
7266 {
7267 #[allow(non_camel_case_types)]
7268 #[doc(hidden)]
7269 #[derive(PartialEq, Eq, Hash)]
7270 enum __FieldTag {
7271 __repository,
7272 Unknown(std::string::String),
7273 }
7274 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
7275 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7276 where
7277 D: serde::Deserializer<'de>,
7278 {
7279 struct Visitor;
7280 impl<'de> serde::de::Visitor<'de> for Visitor {
7281 type Value = __FieldTag;
7282 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
7283 formatter.write_str("a field name for FetchReadTokenRequest")
7284 }
7285 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
7286 where
7287 E: serde::de::Error,
7288 {
7289 use std::result::Result::Ok;
7290 use std::string::ToString;
7291 match value {
7292 "repository" => Ok(__FieldTag::__repository),
7293 _ => Ok(__FieldTag::Unknown(value.to_string())),
7294 }
7295 }
7296 }
7297 deserializer.deserialize_identifier(Visitor)
7298 }
7299 }
7300 struct Visitor;
7301 impl<'de> serde::de::Visitor<'de> for Visitor {
7302 type Value = FetchReadTokenRequest;
7303 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
7304 formatter.write_str("struct FetchReadTokenRequest")
7305 }
7306 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
7307 where
7308 A: serde::de::MapAccess<'de>,
7309 {
7310 #[allow(unused_imports)]
7311 use serde::de::Error;
7312 use std::option::Option::Some;
7313 let mut fields = std::collections::HashSet::new();
7314 let mut result = Self::Value::new();
7315 while let Some(tag) = map.next_key::<__FieldTag>()? {
7316 #[allow(clippy::match_single_binding)]
7317 match tag {
7318 __FieldTag::__repository => {
7319 if !fields.insert(__FieldTag::__repository) {
7320 return std::result::Result::Err(A::Error::duplicate_field(
7321 "multiple values for repository",
7322 ));
7323 }
7324 result.repository = map
7325 .next_value::<std::option::Option<std::string::String>>()?
7326 .unwrap_or_default();
7327 }
7328 __FieldTag::Unknown(key) => {
7329 let value = map.next_value::<serde_json::Value>()?;
7330 result._unknown_fields.insert(key, value);
7331 }
7332 }
7333 }
7334 std::result::Result::Ok(result)
7335 }
7336 }
7337 deserializer.deserialize_any(Visitor)
7338 }
7339}
7340
7341#[doc(hidden)]
7342impl serde::ser::Serialize for FetchReadTokenRequest {
7343 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
7344 where
7345 S: serde::ser::Serializer,
7346 {
7347 use serde::ser::SerializeMap;
7348 #[allow(unused_imports)]
7349 use std::option::Option::Some;
7350 let mut state = serializer.serialize_map(std::option::Option::None)?;
7351 if !self.repository.is_empty() {
7352 state.serialize_entry("repository", &self.repository)?;
7353 }
7354 if !self._unknown_fields.is_empty() {
7355 for (key, value) in self._unknown_fields.iter() {
7356 state.serialize_entry(key, &value)?;
7357 }
7358 }
7359 state.end()
7360 }
7361}
7362
7363impl std::fmt::Debug for FetchReadTokenRequest {
7364 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
7365 let mut debug_struct = f.debug_struct("FetchReadTokenRequest");
7366 debug_struct.field("repository", &self.repository);
7367 if !self._unknown_fields.is_empty() {
7368 debug_struct.field("_unknown_fields", &self._unknown_fields);
7369 }
7370 debug_struct.finish()
7371 }
7372}
7373
7374#[derive(Clone, Default, PartialEq)]
7376#[non_exhaustive]
7377pub struct FetchReadTokenResponse {
7378 pub token: std::string::String,
7380
7381 pub expiration_time: std::option::Option<wkt::Timestamp>,
7383
7384 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7385}
7386
7387impl FetchReadTokenResponse {
7388 pub fn new() -> Self {
7389 std::default::Default::default()
7390 }
7391
7392 pub fn set_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7394 self.token = v.into();
7395 self
7396 }
7397
7398 pub fn set_expiration_time<T>(mut self, v: T) -> Self
7400 where
7401 T: std::convert::Into<wkt::Timestamp>,
7402 {
7403 self.expiration_time = std::option::Option::Some(v.into());
7404 self
7405 }
7406
7407 pub fn set_or_clear_expiration_time<T>(mut self, v: std::option::Option<T>) -> Self
7409 where
7410 T: std::convert::Into<wkt::Timestamp>,
7411 {
7412 self.expiration_time = v.map(|x| x.into());
7413 self
7414 }
7415}
7416
7417impl wkt::message::Message for FetchReadTokenResponse {
7418 fn typename() -> &'static str {
7419 "type.googleapis.com/google.devtools.cloudbuild.v2.FetchReadTokenResponse"
7420 }
7421}
7422
7423#[doc(hidden)]
7424impl<'de> serde::de::Deserialize<'de> for FetchReadTokenResponse {
7425 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7426 where
7427 D: serde::Deserializer<'de>,
7428 {
7429 #[allow(non_camel_case_types)]
7430 #[doc(hidden)]
7431 #[derive(PartialEq, Eq, Hash)]
7432 enum __FieldTag {
7433 __token,
7434 __expiration_time,
7435 Unknown(std::string::String),
7436 }
7437 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
7438 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7439 where
7440 D: serde::Deserializer<'de>,
7441 {
7442 struct Visitor;
7443 impl<'de> serde::de::Visitor<'de> for Visitor {
7444 type Value = __FieldTag;
7445 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
7446 formatter.write_str("a field name for FetchReadTokenResponse")
7447 }
7448 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
7449 where
7450 E: serde::de::Error,
7451 {
7452 use std::result::Result::Ok;
7453 use std::string::ToString;
7454 match value {
7455 "token" => Ok(__FieldTag::__token),
7456 "expirationTime" => Ok(__FieldTag::__expiration_time),
7457 "expiration_time" => Ok(__FieldTag::__expiration_time),
7458 _ => Ok(__FieldTag::Unknown(value.to_string())),
7459 }
7460 }
7461 }
7462 deserializer.deserialize_identifier(Visitor)
7463 }
7464 }
7465 struct Visitor;
7466 impl<'de> serde::de::Visitor<'de> for Visitor {
7467 type Value = FetchReadTokenResponse;
7468 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
7469 formatter.write_str("struct FetchReadTokenResponse")
7470 }
7471 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
7472 where
7473 A: serde::de::MapAccess<'de>,
7474 {
7475 #[allow(unused_imports)]
7476 use serde::de::Error;
7477 use std::option::Option::Some;
7478 let mut fields = std::collections::HashSet::new();
7479 let mut result = Self::Value::new();
7480 while let Some(tag) = map.next_key::<__FieldTag>()? {
7481 #[allow(clippy::match_single_binding)]
7482 match tag {
7483 __FieldTag::__token => {
7484 if !fields.insert(__FieldTag::__token) {
7485 return std::result::Result::Err(A::Error::duplicate_field(
7486 "multiple values for token",
7487 ));
7488 }
7489 result.token = map
7490 .next_value::<std::option::Option<std::string::String>>()?
7491 .unwrap_or_default();
7492 }
7493 __FieldTag::__expiration_time => {
7494 if !fields.insert(__FieldTag::__expiration_time) {
7495 return std::result::Result::Err(A::Error::duplicate_field(
7496 "multiple values for expiration_time",
7497 ));
7498 }
7499 result.expiration_time =
7500 map.next_value::<std::option::Option<wkt::Timestamp>>()?;
7501 }
7502 __FieldTag::Unknown(key) => {
7503 let value = map.next_value::<serde_json::Value>()?;
7504 result._unknown_fields.insert(key, value);
7505 }
7506 }
7507 }
7508 std::result::Result::Ok(result)
7509 }
7510 }
7511 deserializer.deserialize_any(Visitor)
7512 }
7513}
7514
7515#[doc(hidden)]
7516impl serde::ser::Serialize for FetchReadTokenResponse {
7517 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
7518 where
7519 S: serde::ser::Serializer,
7520 {
7521 use serde::ser::SerializeMap;
7522 #[allow(unused_imports)]
7523 use std::option::Option::Some;
7524 let mut state = serializer.serialize_map(std::option::Option::None)?;
7525 if !self.token.is_empty() {
7526 state.serialize_entry("token", &self.token)?;
7527 }
7528 if self.expiration_time.is_some() {
7529 state.serialize_entry("expirationTime", &self.expiration_time)?;
7530 }
7531 if !self._unknown_fields.is_empty() {
7532 for (key, value) in self._unknown_fields.iter() {
7533 state.serialize_entry(key, &value)?;
7534 }
7535 }
7536 state.end()
7537 }
7538}
7539
7540impl std::fmt::Debug for FetchReadTokenResponse {
7541 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
7542 let mut debug_struct = f.debug_struct("FetchReadTokenResponse");
7543 debug_struct.field("token", &self.token);
7544 debug_struct.field("expiration_time", &self.expiration_time);
7545 if !self._unknown_fields.is_empty() {
7546 debug_struct.field("_unknown_fields", &self._unknown_fields);
7547 }
7548 debug_struct.finish()
7549 }
7550}
7551
7552#[derive(Clone, Default, PartialEq)]
7554#[non_exhaustive]
7555pub struct FetchReadWriteTokenResponse {
7556 pub token: std::string::String,
7558
7559 pub expiration_time: std::option::Option<wkt::Timestamp>,
7561
7562 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7563}
7564
7565impl FetchReadWriteTokenResponse {
7566 pub fn new() -> Self {
7567 std::default::Default::default()
7568 }
7569
7570 pub fn set_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7572 self.token = v.into();
7573 self
7574 }
7575
7576 pub fn set_expiration_time<T>(mut self, v: T) -> Self
7578 where
7579 T: std::convert::Into<wkt::Timestamp>,
7580 {
7581 self.expiration_time = std::option::Option::Some(v.into());
7582 self
7583 }
7584
7585 pub fn set_or_clear_expiration_time<T>(mut self, v: std::option::Option<T>) -> Self
7587 where
7588 T: std::convert::Into<wkt::Timestamp>,
7589 {
7590 self.expiration_time = v.map(|x| x.into());
7591 self
7592 }
7593}
7594
7595impl wkt::message::Message for FetchReadWriteTokenResponse {
7596 fn typename() -> &'static str {
7597 "type.googleapis.com/google.devtools.cloudbuild.v2.FetchReadWriteTokenResponse"
7598 }
7599}
7600
7601#[doc(hidden)]
7602impl<'de> serde::de::Deserialize<'de> for FetchReadWriteTokenResponse {
7603 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7604 where
7605 D: serde::Deserializer<'de>,
7606 {
7607 #[allow(non_camel_case_types)]
7608 #[doc(hidden)]
7609 #[derive(PartialEq, Eq, Hash)]
7610 enum __FieldTag {
7611 __token,
7612 __expiration_time,
7613 Unknown(std::string::String),
7614 }
7615 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
7616 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7617 where
7618 D: serde::Deserializer<'de>,
7619 {
7620 struct Visitor;
7621 impl<'de> serde::de::Visitor<'de> for Visitor {
7622 type Value = __FieldTag;
7623 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
7624 formatter.write_str("a field name for FetchReadWriteTokenResponse")
7625 }
7626 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
7627 where
7628 E: serde::de::Error,
7629 {
7630 use std::result::Result::Ok;
7631 use std::string::ToString;
7632 match value {
7633 "token" => Ok(__FieldTag::__token),
7634 "expirationTime" => Ok(__FieldTag::__expiration_time),
7635 "expiration_time" => Ok(__FieldTag::__expiration_time),
7636 _ => Ok(__FieldTag::Unknown(value.to_string())),
7637 }
7638 }
7639 }
7640 deserializer.deserialize_identifier(Visitor)
7641 }
7642 }
7643 struct Visitor;
7644 impl<'de> serde::de::Visitor<'de> for Visitor {
7645 type Value = FetchReadWriteTokenResponse;
7646 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
7647 formatter.write_str("struct FetchReadWriteTokenResponse")
7648 }
7649 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
7650 where
7651 A: serde::de::MapAccess<'de>,
7652 {
7653 #[allow(unused_imports)]
7654 use serde::de::Error;
7655 use std::option::Option::Some;
7656 let mut fields = std::collections::HashSet::new();
7657 let mut result = Self::Value::new();
7658 while let Some(tag) = map.next_key::<__FieldTag>()? {
7659 #[allow(clippy::match_single_binding)]
7660 match tag {
7661 __FieldTag::__token => {
7662 if !fields.insert(__FieldTag::__token) {
7663 return std::result::Result::Err(A::Error::duplicate_field(
7664 "multiple values for token",
7665 ));
7666 }
7667 result.token = map
7668 .next_value::<std::option::Option<std::string::String>>()?
7669 .unwrap_or_default();
7670 }
7671 __FieldTag::__expiration_time => {
7672 if !fields.insert(__FieldTag::__expiration_time) {
7673 return std::result::Result::Err(A::Error::duplicate_field(
7674 "multiple values for expiration_time",
7675 ));
7676 }
7677 result.expiration_time =
7678 map.next_value::<std::option::Option<wkt::Timestamp>>()?;
7679 }
7680 __FieldTag::Unknown(key) => {
7681 let value = map.next_value::<serde_json::Value>()?;
7682 result._unknown_fields.insert(key, value);
7683 }
7684 }
7685 }
7686 std::result::Result::Ok(result)
7687 }
7688 }
7689 deserializer.deserialize_any(Visitor)
7690 }
7691}
7692
7693#[doc(hidden)]
7694impl serde::ser::Serialize for FetchReadWriteTokenResponse {
7695 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
7696 where
7697 S: serde::ser::Serializer,
7698 {
7699 use serde::ser::SerializeMap;
7700 #[allow(unused_imports)]
7701 use std::option::Option::Some;
7702 let mut state = serializer.serialize_map(std::option::Option::None)?;
7703 if !self.token.is_empty() {
7704 state.serialize_entry("token", &self.token)?;
7705 }
7706 if self.expiration_time.is_some() {
7707 state.serialize_entry("expirationTime", &self.expiration_time)?;
7708 }
7709 if !self._unknown_fields.is_empty() {
7710 for (key, value) in self._unknown_fields.iter() {
7711 state.serialize_entry(key, &value)?;
7712 }
7713 }
7714 state.end()
7715 }
7716}
7717
7718impl std::fmt::Debug for FetchReadWriteTokenResponse {
7719 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
7720 let mut debug_struct = f.debug_struct("FetchReadWriteTokenResponse");
7721 debug_struct.field("token", &self.token);
7722 debug_struct.field("expiration_time", &self.expiration_time);
7723 if !self._unknown_fields.is_empty() {
7724 debug_struct.field("_unknown_fields", &self._unknown_fields);
7725 }
7726 debug_struct.finish()
7727 }
7728}
7729
7730#[derive(Clone, Default, PartialEq)]
7732#[non_exhaustive]
7733pub struct ProcessWebhookRequest {
7734 pub parent: std::string::String,
7737
7738 pub body: std::option::Option<api::model::HttpBody>,
7740
7741 pub webhook_key: std::string::String,
7744
7745 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7746}
7747
7748impl ProcessWebhookRequest {
7749 pub fn new() -> Self {
7750 std::default::Default::default()
7751 }
7752
7753 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7755 self.parent = v.into();
7756 self
7757 }
7758
7759 pub fn set_body<T>(mut self, v: T) -> Self
7761 where
7762 T: std::convert::Into<api::model::HttpBody>,
7763 {
7764 self.body = std::option::Option::Some(v.into());
7765 self
7766 }
7767
7768 pub fn set_or_clear_body<T>(mut self, v: std::option::Option<T>) -> Self
7770 where
7771 T: std::convert::Into<api::model::HttpBody>,
7772 {
7773 self.body = v.map(|x| x.into());
7774 self
7775 }
7776
7777 pub fn set_webhook_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7779 self.webhook_key = v.into();
7780 self
7781 }
7782}
7783
7784impl wkt::message::Message for ProcessWebhookRequest {
7785 fn typename() -> &'static str {
7786 "type.googleapis.com/google.devtools.cloudbuild.v2.ProcessWebhookRequest"
7787 }
7788}
7789
7790#[doc(hidden)]
7791impl<'de> serde::de::Deserialize<'de> for ProcessWebhookRequest {
7792 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7793 where
7794 D: serde::Deserializer<'de>,
7795 {
7796 #[allow(non_camel_case_types)]
7797 #[doc(hidden)]
7798 #[derive(PartialEq, Eq, Hash)]
7799 enum __FieldTag {
7800 __parent,
7801 __body,
7802 __webhook_key,
7803 Unknown(std::string::String),
7804 }
7805 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
7806 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7807 where
7808 D: serde::Deserializer<'de>,
7809 {
7810 struct Visitor;
7811 impl<'de> serde::de::Visitor<'de> for Visitor {
7812 type Value = __FieldTag;
7813 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
7814 formatter.write_str("a field name for ProcessWebhookRequest")
7815 }
7816 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
7817 where
7818 E: serde::de::Error,
7819 {
7820 use std::result::Result::Ok;
7821 use std::string::ToString;
7822 match value {
7823 "parent" => Ok(__FieldTag::__parent),
7824 "body" => Ok(__FieldTag::__body),
7825 "webhookKey" => Ok(__FieldTag::__webhook_key),
7826 "webhook_key" => Ok(__FieldTag::__webhook_key),
7827 _ => Ok(__FieldTag::Unknown(value.to_string())),
7828 }
7829 }
7830 }
7831 deserializer.deserialize_identifier(Visitor)
7832 }
7833 }
7834 struct Visitor;
7835 impl<'de> serde::de::Visitor<'de> for Visitor {
7836 type Value = ProcessWebhookRequest;
7837 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
7838 formatter.write_str("struct ProcessWebhookRequest")
7839 }
7840 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
7841 where
7842 A: serde::de::MapAccess<'de>,
7843 {
7844 #[allow(unused_imports)]
7845 use serde::de::Error;
7846 use std::option::Option::Some;
7847 let mut fields = std::collections::HashSet::new();
7848 let mut result = Self::Value::new();
7849 while let Some(tag) = map.next_key::<__FieldTag>()? {
7850 #[allow(clippy::match_single_binding)]
7851 match tag {
7852 __FieldTag::__parent => {
7853 if !fields.insert(__FieldTag::__parent) {
7854 return std::result::Result::Err(A::Error::duplicate_field(
7855 "multiple values for parent",
7856 ));
7857 }
7858 result.parent = map
7859 .next_value::<std::option::Option<std::string::String>>()?
7860 .unwrap_or_default();
7861 }
7862 __FieldTag::__body => {
7863 if !fields.insert(__FieldTag::__body) {
7864 return std::result::Result::Err(A::Error::duplicate_field(
7865 "multiple values for body",
7866 ));
7867 }
7868 result.body =
7869 map.next_value::<std::option::Option<api::model::HttpBody>>()?;
7870 }
7871 __FieldTag::__webhook_key => {
7872 if !fields.insert(__FieldTag::__webhook_key) {
7873 return std::result::Result::Err(A::Error::duplicate_field(
7874 "multiple values for webhook_key",
7875 ));
7876 }
7877 result.webhook_key = map
7878 .next_value::<std::option::Option<std::string::String>>()?
7879 .unwrap_or_default();
7880 }
7881 __FieldTag::Unknown(key) => {
7882 let value = map.next_value::<serde_json::Value>()?;
7883 result._unknown_fields.insert(key, value);
7884 }
7885 }
7886 }
7887 std::result::Result::Ok(result)
7888 }
7889 }
7890 deserializer.deserialize_any(Visitor)
7891 }
7892}
7893
7894#[doc(hidden)]
7895impl serde::ser::Serialize for ProcessWebhookRequest {
7896 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
7897 where
7898 S: serde::ser::Serializer,
7899 {
7900 use serde::ser::SerializeMap;
7901 #[allow(unused_imports)]
7902 use std::option::Option::Some;
7903 let mut state = serializer.serialize_map(std::option::Option::None)?;
7904 if !self.parent.is_empty() {
7905 state.serialize_entry("parent", &self.parent)?;
7906 }
7907 if self.body.is_some() {
7908 state.serialize_entry("body", &self.body)?;
7909 }
7910 if !self.webhook_key.is_empty() {
7911 state.serialize_entry("webhookKey", &self.webhook_key)?;
7912 }
7913 if !self._unknown_fields.is_empty() {
7914 for (key, value) in self._unknown_fields.iter() {
7915 state.serialize_entry(key, &value)?;
7916 }
7917 }
7918 state.end()
7919 }
7920}
7921
7922impl std::fmt::Debug for ProcessWebhookRequest {
7923 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
7924 let mut debug_struct = f.debug_struct("ProcessWebhookRequest");
7925 debug_struct.field("parent", &self.parent);
7926 debug_struct.field("body", &self.body);
7927 debug_struct.field("webhook_key", &self.webhook_key);
7928 if !self._unknown_fields.is_empty() {
7929 debug_struct.field("_unknown_fields", &self._unknown_fields);
7930 }
7931 debug_struct.finish()
7932 }
7933}
7934
7935#[derive(Clone, Default, PartialEq)]
7937#[non_exhaustive]
7938pub struct FetchGitRefsRequest {
7939 pub repository: std::string::String,
7942
7943 pub ref_type: crate::model::fetch_git_refs_request::RefType,
7945
7946 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7947}
7948
7949impl FetchGitRefsRequest {
7950 pub fn new() -> Self {
7951 std::default::Default::default()
7952 }
7953
7954 pub fn set_repository<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7956 self.repository = v.into();
7957 self
7958 }
7959
7960 pub fn set_ref_type<T: std::convert::Into<crate::model::fetch_git_refs_request::RefType>>(
7962 mut self,
7963 v: T,
7964 ) -> Self {
7965 self.ref_type = v.into();
7966 self
7967 }
7968}
7969
7970impl wkt::message::Message for FetchGitRefsRequest {
7971 fn typename() -> &'static str {
7972 "type.googleapis.com/google.devtools.cloudbuild.v2.FetchGitRefsRequest"
7973 }
7974}
7975
7976#[doc(hidden)]
7977impl<'de> serde::de::Deserialize<'de> for FetchGitRefsRequest {
7978 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7979 where
7980 D: serde::Deserializer<'de>,
7981 {
7982 #[allow(non_camel_case_types)]
7983 #[doc(hidden)]
7984 #[derive(PartialEq, Eq, Hash)]
7985 enum __FieldTag {
7986 __repository,
7987 __ref_type,
7988 Unknown(std::string::String),
7989 }
7990 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
7991 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7992 where
7993 D: serde::Deserializer<'de>,
7994 {
7995 struct Visitor;
7996 impl<'de> serde::de::Visitor<'de> for Visitor {
7997 type Value = __FieldTag;
7998 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
7999 formatter.write_str("a field name for FetchGitRefsRequest")
8000 }
8001 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
8002 where
8003 E: serde::de::Error,
8004 {
8005 use std::result::Result::Ok;
8006 use std::string::ToString;
8007 match value {
8008 "repository" => Ok(__FieldTag::__repository),
8009 "refType" => Ok(__FieldTag::__ref_type),
8010 "ref_type" => Ok(__FieldTag::__ref_type),
8011 _ => Ok(__FieldTag::Unknown(value.to_string())),
8012 }
8013 }
8014 }
8015 deserializer.deserialize_identifier(Visitor)
8016 }
8017 }
8018 struct Visitor;
8019 impl<'de> serde::de::Visitor<'de> for Visitor {
8020 type Value = FetchGitRefsRequest;
8021 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
8022 formatter.write_str("struct FetchGitRefsRequest")
8023 }
8024 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
8025 where
8026 A: serde::de::MapAccess<'de>,
8027 {
8028 #[allow(unused_imports)]
8029 use serde::de::Error;
8030 use std::option::Option::Some;
8031 let mut fields = std::collections::HashSet::new();
8032 let mut result = Self::Value::new();
8033 while let Some(tag) = map.next_key::<__FieldTag>()? {
8034 #[allow(clippy::match_single_binding)]
8035 match tag {
8036 __FieldTag::__repository => {
8037 if !fields.insert(__FieldTag::__repository) {
8038 return std::result::Result::Err(A::Error::duplicate_field(
8039 "multiple values for repository",
8040 ));
8041 }
8042 result.repository = map
8043 .next_value::<std::option::Option<std::string::String>>()?
8044 .unwrap_or_default();
8045 }
8046 __FieldTag::__ref_type => {
8047 if !fields.insert(__FieldTag::__ref_type) {
8048 return std::result::Result::Err(A::Error::duplicate_field(
8049 "multiple values for ref_type",
8050 ));
8051 }
8052 result.ref_type =
8053 map.next_value::<std::option::Option<
8054 crate::model::fetch_git_refs_request::RefType,
8055 >>()?
8056 .unwrap_or_default();
8057 }
8058 __FieldTag::Unknown(key) => {
8059 let value = map.next_value::<serde_json::Value>()?;
8060 result._unknown_fields.insert(key, value);
8061 }
8062 }
8063 }
8064 std::result::Result::Ok(result)
8065 }
8066 }
8067 deserializer.deserialize_any(Visitor)
8068 }
8069}
8070
8071#[doc(hidden)]
8072impl serde::ser::Serialize for FetchGitRefsRequest {
8073 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
8074 where
8075 S: serde::ser::Serializer,
8076 {
8077 use serde::ser::SerializeMap;
8078 #[allow(unused_imports)]
8079 use std::option::Option::Some;
8080 let mut state = serializer.serialize_map(std::option::Option::None)?;
8081 if !self.repository.is_empty() {
8082 state.serialize_entry("repository", &self.repository)?;
8083 }
8084 if !wkt::internal::is_default(&self.ref_type) {
8085 state.serialize_entry("refType", &self.ref_type)?;
8086 }
8087 if !self._unknown_fields.is_empty() {
8088 for (key, value) in self._unknown_fields.iter() {
8089 state.serialize_entry(key, &value)?;
8090 }
8091 }
8092 state.end()
8093 }
8094}
8095
8096impl std::fmt::Debug for FetchGitRefsRequest {
8097 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
8098 let mut debug_struct = f.debug_struct("FetchGitRefsRequest");
8099 debug_struct.field("repository", &self.repository);
8100 debug_struct.field("ref_type", &self.ref_type);
8101 if !self._unknown_fields.is_empty() {
8102 debug_struct.field("_unknown_fields", &self._unknown_fields);
8103 }
8104 debug_struct.finish()
8105 }
8106}
8107
8108pub mod fetch_git_refs_request {
8110 #[allow(unused_imports)]
8111 use super::*;
8112
8113 #[derive(Clone, Debug, PartialEq)]
8129 #[non_exhaustive]
8130 pub enum RefType {
8131 Unspecified,
8133 Tag,
8135 Branch,
8137 UnknownValue(ref_type::UnknownValue),
8142 }
8143
8144 #[doc(hidden)]
8145 pub mod ref_type {
8146 #[allow(unused_imports)]
8147 use super::*;
8148 #[derive(Clone, Debug, PartialEq)]
8149 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
8150 }
8151
8152 impl RefType {
8153 pub fn value(&self) -> std::option::Option<i32> {
8158 match self {
8159 Self::Unspecified => std::option::Option::Some(0),
8160 Self::Tag => std::option::Option::Some(1),
8161 Self::Branch => std::option::Option::Some(2),
8162 Self::UnknownValue(u) => u.0.value(),
8163 }
8164 }
8165
8166 pub fn name(&self) -> std::option::Option<&str> {
8171 match self {
8172 Self::Unspecified => std::option::Option::Some("REF_TYPE_UNSPECIFIED"),
8173 Self::Tag => std::option::Option::Some("TAG"),
8174 Self::Branch => std::option::Option::Some("BRANCH"),
8175 Self::UnknownValue(u) => u.0.name(),
8176 }
8177 }
8178 }
8179
8180 impl std::default::Default for RefType {
8181 fn default() -> Self {
8182 use std::convert::From;
8183 Self::from(0)
8184 }
8185 }
8186
8187 impl std::fmt::Display for RefType {
8188 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
8189 wkt::internal::display_enum(f, self.name(), self.value())
8190 }
8191 }
8192
8193 impl std::convert::From<i32> for RefType {
8194 fn from(value: i32) -> Self {
8195 match value {
8196 0 => Self::Unspecified,
8197 1 => Self::Tag,
8198 2 => Self::Branch,
8199 _ => Self::UnknownValue(ref_type::UnknownValue(
8200 wkt::internal::UnknownEnumValue::Integer(value),
8201 )),
8202 }
8203 }
8204 }
8205
8206 impl std::convert::From<&str> for RefType {
8207 fn from(value: &str) -> Self {
8208 use std::string::ToString;
8209 match value {
8210 "REF_TYPE_UNSPECIFIED" => Self::Unspecified,
8211 "TAG" => Self::Tag,
8212 "BRANCH" => Self::Branch,
8213 _ => Self::UnknownValue(ref_type::UnknownValue(
8214 wkt::internal::UnknownEnumValue::String(value.to_string()),
8215 )),
8216 }
8217 }
8218 }
8219
8220 impl serde::ser::Serialize for RefType {
8221 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
8222 where
8223 S: serde::Serializer,
8224 {
8225 match self {
8226 Self::Unspecified => serializer.serialize_i32(0),
8227 Self::Tag => serializer.serialize_i32(1),
8228 Self::Branch => serializer.serialize_i32(2),
8229 Self::UnknownValue(u) => u.0.serialize(serializer),
8230 }
8231 }
8232 }
8233
8234 impl<'de> serde::de::Deserialize<'de> for RefType {
8235 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8236 where
8237 D: serde::Deserializer<'de>,
8238 {
8239 deserializer.deserialize_any(wkt::internal::EnumVisitor::<RefType>::new(
8240 ".google.devtools.cloudbuild.v2.FetchGitRefsRequest.RefType",
8241 ))
8242 }
8243 }
8244}
8245
8246#[derive(Clone, Default, PartialEq)]
8248#[non_exhaustive]
8249pub struct FetchGitRefsResponse {
8250 pub ref_names: std::vec::Vec<std::string::String>,
8252
8253 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8254}
8255
8256impl FetchGitRefsResponse {
8257 pub fn new() -> Self {
8258 std::default::Default::default()
8259 }
8260
8261 pub fn set_ref_names<T, V>(mut self, v: T) -> Self
8263 where
8264 T: std::iter::IntoIterator<Item = V>,
8265 V: std::convert::Into<std::string::String>,
8266 {
8267 use std::iter::Iterator;
8268 self.ref_names = v.into_iter().map(|i| i.into()).collect();
8269 self
8270 }
8271}
8272
8273impl wkt::message::Message for FetchGitRefsResponse {
8274 fn typename() -> &'static str {
8275 "type.googleapis.com/google.devtools.cloudbuild.v2.FetchGitRefsResponse"
8276 }
8277}
8278
8279#[doc(hidden)]
8280impl<'de> serde::de::Deserialize<'de> for FetchGitRefsResponse {
8281 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8282 where
8283 D: serde::Deserializer<'de>,
8284 {
8285 #[allow(non_camel_case_types)]
8286 #[doc(hidden)]
8287 #[derive(PartialEq, Eq, Hash)]
8288 enum __FieldTag {
8289 __ref_names,
8290 Unknown(std::string::String),
8291 }
8292 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
8293 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8294 where
8295 D: serde::Deserializer<'de>,
8296 {
8297 struct Visitor;
8298 impl<'de> serde::de::Visitor<'de> for Visitor {
8299 type Value = __FieldTag;
8300 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
8301 formatter.write_str("a field name for FetchGitRefsResponse")
8302 }
8303 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
8304 where
8305 E: serde::de::Error,
8306 {
8307 use std::result::Result::Ok;
8308 use std::string::ToString;
8309 match value {
8310 "refNames" => Ok(__FieldTag::__ref_names),
8311 "ref_names" => Ok(__FieldTag::__ref_names),
8312 _ => Ok(__FieldTag::Unknown(value.to_string())),
8313 }
8314 }
8315 }
8316 deserializer.deserialize_identifier(Visitor)
8317 }
8318 }
8319 struct Visitor;
8320 impl<'de> serde::de::Visitor<'de> for Visitor {
8321 type Value = FetchGitRefsResponse;
8322 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
8323 formatter.write_str("struct FetchGitRefsResponse")
8324 }
8325 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
8326 where
8327 A: serde::de::MapAccess<'de>,
8328 {
8329 #[allow(unused_imports)]
8330 use serde::de::Error;
8331 use std::option::Option::Some;
8332 let mut fields = std::collections::HashSet::new();
8333 let mut result = Self::Value::new();
8334 while let Some(tag) = map.next_key::<__FieldTag>()? {
8335 #[allow(clippy::match_single_binding)]
8336 match tag {
8337 __FieldTag::__ref_names => {
8338 if !fields.insert(__FieldTag::__ref_names) {
8339 return std::result::Result::Err(A::Error::duplicate_field(
8340 "multiple values for ref_names",
8341 ));
8342 }
8343 result.ref_names = map.next_value::<std::option::Option<std::vec::Vec<std::string::String>>>()?.unwrap_or_default();
8344 }
8345 __FieldTag::Unknown(key) => {
8346 let value = map.next_value::<serde_json::Value>()?;
8347 result._unknown_fields.insert(key, value);
8348 }
8349 }
8350 }
8351 std::result::Result::Ok(result)
8352 }
8353 }
8354 deserializer.deserialize_any(Visitor)
8355 }
8356}
8357
8358#[doc(hidden)]
8359impl serde::ser::Serialize for FetchGitRefsResponse {
8360 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
8361 where
8362 S: serde::ser::Serializer,
8363 {
8364 use serde::ser::SerializeMap;
8365 #[allow(unused_imports)]
8366 use std::option::Option::Some;
8367 let mut state = serializer.serialize_map(std::option::Option::None)?;
8368 if !self.ref_names.is_empty() {
8369 state.serialize_entry("refNames", &self.ref_names)?;
8370 }
8371 if !self._unknown_fields.is_empty() {
8372 for (key, value) in self._unknown_fields.iter() {
8373 state.serialize_entry(key, &value)?;
8374 }
8375 }
8376 state.end()
8377 }
8378}
8379
8380impl std::fmt::Debug for FetchGitRefsResponse {
8381 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
8382 let mut debug_struct = f.debug_struct("FetchGitRefsResponse");
8383 debug_struct.field("ref_names", &self.ref_names);
8384 if !self._unknown_fields.is_empty() {
8385 debug_struct.field("_unknown_fields", &self._unknown_fields);
8386 }
8387 debug_struct.finish()
8388 }
8389}