Skip to main content

google_cloud_developerconnect_v1/
model.rs

1// Copyright 2025 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     https://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14//
15// Code generated by sidekick. DO NOT EDIT.
16
17#![allow(rustdoc::redundant_explicit_links)]
18#![allow(rustdoc::broken_intra_doc_links)]
19#![no_implicit_prelude]
20extern crate async_trait;
21extern crate bytes;
22extern crate gaxi;
23extern crate google_cloud_gax;
24extern crate google_cloud_location;
25extern crate google_cloud_longrunning;
26extern crate google_cloud_lro;
27extern crate google_cloud_rpc;
28extern crate serde;
29extern crate serde_json;
30extern crate serde_with;
31extern crate std;
32extern crate tracing;
33extern crate wkt;
34
35mod debug;
36mod deserialize;
37mod serialize;
38
39/// Message for requesting a list of Users
40#[derive(Clone, Default, PartialEq)]
41#[non_exhaustive]
42pub struct ListUsersRequest {
43    /// Required. Parent value for ListUsersRequest
44    pub parent: std::string::String,
45
46    /// Optional. Requested page size. Server may return fewer items than
47    /// requested. If unspecified, server will pick an appropriate default.
48    pub page_size: i32,
49
50    /// Optional. A token identifying a page of results the server should return.
51    pub page_token: std::string::String,
52
53    /// Optional. Filtering results
54    pub filter: std::string::String,
55
56    /// Optional. Hint for how to order the results
57    pub order_by: std::string::String,
58
59    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
60}
61
62impl ListUsersRequest {
63    /// Creates a new default instance.
64    pub fn new() -> Self {
65        std::default::Default::default()
66    }
67
68    /// Sets the value of [parent][crate::model::ListUsersRequest::parent].
69    ///
70    /// # Example
71    /// ```ignore,no_run
72    /// # use google_cloud_developerconnect_v1::model::ListUsersRequest;
73    /// let x = ListUsersRequest::new().set_parent("example");
74    /// ```
75    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
76        self.parent = v.into();
77        self
78    }
79
80    /// Sets the value of [page_size][crate::model::ListUsersRequest::page_size].
81    ///
82    /// # Example
83    /// ```ignore,no_run
84    /// # use google_cloud_developerconnect_v1::model::ListUsersRequest;
85    /// let x = ListUsersRequest::new().set_page_size(42);
86    /// ```
87    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
88        self.page_size = v.into();
89        self
90    }
91
92    /// Sets the value of [page_token][crate::model::ListUsersRequest::page_token].
93    ///
94    /// # Example
95    /// ```ignore,no_run
96    /// # use google_cloud_developerconnect_v1::model::ListUsersRequest;
97    /// let x = ListUsersRequest::new().set_page_token("example");
98    /// ```
99    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
100        self.page_token = v.into();
101        self
102    }
103
104    /// Sets the value of [filter][crate::model::ListUsersRequest::filter].
105    ///
106    /// # Example
107    /// ```ignore,no_run
108    /// # use google_cloud_developerconnect_v1::model::ListUsersRequest;
109    /// let x = ListUsersRequest::new().set_filter("example");
110    /// ```
111    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
112        self.filter = v.into();
113        self
114    }
115
116    /// Sets the value of [order_by][crate::model::ListUsersRequest::order_by].
117    ///
118    /// # Example
119    /// ```ignore,no_run
120    /// # use google_cloud_developerconnect_v1::model::ListUsersRequest;
121    /// let x = ListUsersRequest::new().set_order_by("example");
122    /// ```
123    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
124        self.order_by = v.into();
125        self
126    }
127}
128
129impl wkt::message::Message for ListUsersRequest {
130    fn typename() -> &'static str {
131        "type.googleapis.com/google.cloud.developerconnect.v1.ListUsersRequest"
132    }
133}
134
135/// Message for response to listing Users
136#[derive(Clone, Default, PartialEq)]
137#[non_exhaustive]
138pub struct ListUsersResponse {
139    /// The list of Users
140    pub users: std::vec::Vec<crate::model::User>,
141
142    /// A token identifying a page of results the server should return.
143    pub next_page_token: std::string::String,
144
145    /// Locations that could not be reached.
146    pub unreachable: std::vec::Vec<std::string::String>,
147
148    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
149}
150
151impl ListUsersResponse {
152    /// Creates a new default instance.
153    pub fn new() -> Self {
154        std::default::Default::default()
155    }
156
157    /// Sets the value of [users][crate::model::ListUsersResponse::users].
158    ///
159    /// # Example
160    /// ```ignore,no_run
161    /// # use google_cloud_developerconnect_v1::model::ListUsersResponse;
162    /// use google_cloud_developerconnect_v1::model::User;
163    /// let x = ListUsersResponse::new()
164    ///     .set_users([
165    ///         User::default()/* use setters */,
166    ///         User::default()/* use (different) setters */,
167    ///     ]);
168    /// ```
169    pub fn set_users<T, V>(mut self, v: T) -> Self
170    where
171        T: std::iter::IntoIterator<Item = V>,
172        V: std::convert::Into<crate::model::User>,
173    {
174        use std::iter::Iterator;
175        self.users = v.into_iter().map(|i| i.into()).collect();
176        self
177    }
178
179    /// Sets the value of [next_page_token][crate::model::ListUsersResponse::next_page_token].
180    ///
181    /// # Example
182    /// ```ignore,no_run
183    /// # use google_cloud_developerconnect_v1::model::ListUsersResponse;
184    /// let x = ListUsersResponse::new().set_next_page_token("example");
185    /// ```
186    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
187        self.next_page_token = v.into();
188        self
189    }
190
191    /// Sets the value of [unreachable][crate::model::ListUsersResponse::unreachable].
192    ///
193    /// # Example
194    /// ```ignore,no_run
195    /// # use google_cloud_developerconnect_v1::model::ListUsersResponse;
196    /// let x = ListUsersResponse::new().set_unreachable(["a", "b", "c"]);
197    /// ```
198    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
199    where
200        T: std::iter::IntoIterator<Item = V>,
201        V: std::convert::Into<std::string::String>,
202    {
203        use std::iter::Iterator;
204        self.unreachable = v.into_iter().map(|i| i.into()).collect();
205        self
206    }
207}
208
209impl wkt::message::Message for ListUsersResponse {
210    fn typename() -> &'static str {
211        "type.googleapis.com/google.cloud.developerconnect.v1.ListUsersResponse"
212    }
213}
214
215#[doc(hidden)]
216impl google_cloud_gax::paginator::internal::PageableResponse for ListUsersResponse {
217    type PageItem = crate::model::User;
218
219    fn items(self) -> std::vec::Vec<Self::PageItem> {
220        self.users
221    }
222
223    fn next_page_token(&self) -> std::string::String {
224        use std::clone::Clone;
225        self.next_page_token.clone()
226    }
227}
228
229/// Message describing Connection object
230#[derive(Clone, Default, PartialEq)]
231#[non_exhaustive]
232pub struct Connection {
233    /// Identifier. The resource name of the connection, in the format
234    /// `projects/{project}/locations/{location}/connections/{connection_id}`.
235    pub name: std::string::String,
236
237    /// Output only. [Output only] Create timestamp
238    pub create_time: std::option::Option<wkt::Timestamp>,
239
240    /// Output only. [Output only] Update timestamp
241    pub update_time: std::option::Option<wkt::Timestamp>,
242
243    /// Output only. [Output only] Delete timestamp
244    pub delete_time: std::option::Option<wkt::Timestamp>,
245
246    /// Optional. Labels as key value pairs
247    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
248
249    /// Output only. Installation state of the Connection.
250    pub installation_state: std::option::Option<crate::model::InstallationState>,
251
252    /// Optional. If disabled is set to true, functionality is disabled for this
253    /// connection. Repository based API methods and webhooks processing for
254    /// repositories in this connection will be disabled.
255    pub disabled: bool,
256
257    /// Output only. Set to true when the connection is being set up or updated in
258    /// the background.
259    pub reconciling: bool,
260
261    /// Optional. Allows clients to store small amounts of arbitrary data.
262    pub annotations: std::collections::HashMap<std::string::String, std::string::String>,
263
264    /// Optional. This checksum is computed by the server based on the value of
265    /// other fields, and may be sent on update and delete requests to ensure the
266    /// client has an up-to-date value before proceeding.
267    pub etag: std::string::String,
268
269    /// Output only. A system-assigned unique identifier for the Connection.
270    pub uid: std::string::String,
271
272    /// Optional. The crypto key configuration. This field is used by the
273    /// Customer-Managed Encryption Keys (CMEK) feature.
274    pub crypto_key_config: std::option::Option<crate::model::CryptoKeyConfig>,
275
276    /// Optional. Configuration for the git proxy feature. Enabling the git proxy
277    /// allows clients to perform git operations on the repositories linked in the
278    /// connection.
279    pub git_proxy_config: std::option::Option<crate::model::GitProxyConfig>,
280
281    /// Configuration for the connection depending on the type of provider.
282    pub connection_config: std::option::Option<crate::model::connection::ConnectionConfig>,
283
284    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
285}
286
287impl Connection {
288    /// Creates a new default instance.
289    pub fn new() -> Self {
290        std::default::Default::default()
291    }
292
293    /// Sets the value of [name][crate::model::Connection::name].
294    ///
295    /// # Example
296    /// ```ignore,no_run
297    /// # use google_cloud_developerconnect_v1::model::Connection;
298    /// let x = Connection::new().set_name("example");
299    /// ```
300    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
301        self.name = v.into();
302        self
303    }
304
305    /// Sets the value of [create_time][crate::model::Connection::create_time].
306    ///
307    /// # Example
308    /// ```ignore,no_run
309    /// # use google_cloud_developerconnect_v1::model::Connection;
310    /// use wkt::Timestamp;
311    /// let x = Connection::new().set_create_time(Timestamp::default()/* use setters */);
312    /// ```
313    pub fn set_create_time<T>(mut self, v: T) -> Self
314    where
315        T: std::convert::Into<wkt::Timestamp>,
316    {
317        self.create_time = std::option::Option::Some(v.into());
318        self
319    }
320
321    /// Sets or clears the value of [create_time][crate::model::Connection::create_time].
322    ///
323    /// # Example
324    /// ```ignore,no_run
325    /// # use google_cloud_developerconnect_v1::model::Connection;
326    /// use wkt::Timestamp;
327    /// let x = Connection::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
328    /// let x = Connection::new().set_or_clear_create_time(None::<Timestamp>);
329    /// ```
330    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
331    where
332        T: std::convert::Into<wkt::Timestamp>,
333    {
334        self.create_time = v.map(|x| x.into());
335        self
336    }
337
338    /// Sets the value of [update_time][crate::model::Connection::update_time].
339    ///
340    /// # Example
341    /// ```ignore,no_run
342    /// # use google_cloud_developerconnect_v1::model::Connection;
343    /// use wkt::Timestamp;
344    /// let x = Connection::new().set_update_time(Timestamp::default()/* use setters */);
345    /// ```
346    pub fn set_update_time<T>(mut self, v: T) -> Self
347    where
348        T: std::convert::Into<wkt::Timestamp>,
349    {
350        self.update_time = std::option::Option::Some(v.into());
351        self
352    }
353
354    /// Sets or clears the value of [update_time][crate::model::Connection::update_time].
355    ///
356    /// # Example
357    /// ```ignore,no_run
358    /// # use google_cloud_developerconnect_v1::model::Connection;
359    /// use wkt::Timestamp;
360    /// let x = Connection::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
361    /// let x = Connection::new().set_or_clear_update_time(None::<Timestamp>);
362    /// ```
363    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
364    where
365        T: std::convert::Into<wkt::Timestamp>,
366    {
367        self.update_time = v.map(|x| x.into());
368        self
369    }
370
371    /// Sets the value of [delete_time][crate::model::Connection::delete_time].
372    ///
373    /// # Example
374    /// ```ignore,no_run
375    /// # use google_cloud_developerconnect_v1::model::Connection;
376    /// use wkt::Timestamp;
377    /// let x = Connection::new().set_delete_time(Timestamp::default()/* use setters */);
378    /// ```
379    pub fn set_delete_time<T>(mut self, v: T) -> Self
380    where
381        T: std::convert::Into<wkt::Timestamp>,
382    {
383        self.delete_time = std::option::Option::Some(v.into());
384        self
385    }
386
387    /// Sets or clears the value of [delete_time][crate::model::Connection::delete_time].
388    ///
389    /// # Example
390    /// ```ignore,no_run
391    /// # use google_cloud_developerconnect_v1::model::Connection;
392    /// use wkt::Timestamp;
393    /// let x = Connection::new().set_or_clear_delete_time(Some(Timestamp::default()/* use setters */));
394    /// let x = Connection::new().set_or_clear_delete_time(None::<Timestamp>);
395    /// ```
396    pub fn set_or_clear_delete_time<T>(mut self, v: std::option::Option<T>) -> Self
397    where
398        T: std::convert::Into<wkt::Timestamp>,
399    {
400        self.delete_time = v.map(|x| x.into());
401        self
402    }
403
404    /// Sets the value of [labels][crate::model::Connection::labels].
405    ///
406    /// # Example
407    /// ```ignore,no_run
408    /// # use google_cloud_developerconnect_v1::model::Connection;
409    /// let x = Connection::new().set_labels([
410    ///     ("key0", "abc"),
411    ///     ("key1", "xyz"),
412    /// ]);
413    /// ```
414    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
415    where
416        T: std::iter::IntoIterator<Item = (K, V)>,
417        K: std::convert::Into<std::string::String>,
418        V: std::convert::Into<std::string::String>,
419    {
420        use std::iter::Iterator;
421        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
422        self
423    }
424
425    /// Sets the value of [installation_state][crate::model::Connection::installation_state].
426    ///
427    /// # Example
428    /// ```ignore,no_run
429    /// # use google_cloud_developerconnect_v1::model::Connection;
430    /// use google_cloud_developerconnect_v1::model::InstallationState;
431    /// let x = Connection::new().set_installation_state(InstallationState::default()/* use setters */);
432    /// ```
433    pub fn set_installation_state<T>(mut self, v: T) -> Self
434    where
435        T: std::convert::Into<crate::model::InstallationState>,
436    {
437        self.installation_state = std::option::Option::Some(v.into());
438        self
439    }
440
441    /// Sets or clears the value of [installation_state][crate::model::Connection::installation_state].
442    ///
443    /// # Example
444    /// ```ignore,no_run
445    /// # use google_cloud_developerconnect_v1::model::Connection;
446    /// use google_cloud_developerconnect_v1::model::InstallationState;
447    /// let x = Connection::new().set_or_clear_installation_state(Some(InstallationState::default()/* use setters */));
448    /// let x = Connection::new().set_or_clear_installation_state(None::<InstallationState>);
449    /// ```
450    pub fn set_or_clear_installation_state<T>(mut self, v: std::option::Option<T>) -> Self
451    where
452        T: std::convert::Into<crate::model::InstallationState>,
453    {
454        self.installation_state = v.map(|x| x.into());
455        self
456    }
457
458    /// Sets the value of [disabled][crate::model::Connection::disabled].
459    ///
460    /// # Example
461    /// ```ignore,no_run
462    /// # use google_cloud_developerconnect_v1::model::Connection;
463    /// let x = Connection::new().set_disabled(true);
464    /// ```
465    pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
466        self.disabled = v.into();
467        self
468    }
469
470    /// Sets the value of [reconciling][crate::model::Connection::reconciling].
471    ///
472    /// # Example
473    /// ```ignore,no_run
474    /// # use google_cloud_developerconnect_v1::model::Connection;
475    /// let x = Connection::new().set_reconciling(true);
476    /// ```
477    pub fn set_reconciling<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
478        self.reconciling = v.into();
479        self
480    }
481
482    /// Sets the value of [annotations][crate::model::Connection::annotations].
483    ///
484    /// # Example
485    /// ```ignore,no_run
486    /// # use google_cloud_developerconnect_v1::model::Connection;
487    /// let x = Connection::new().set_annotations([
488    ///     ("key0", "abc"),
489    ///     ("key1", "xyz"),
490    /// ]);
491    /// ```
492    pub fn set_annotations<T, K, V>(mut self, v: T) -> Self
493    where
494        T: std::iter::IntoIterator<Item = (K, V)>,
495        K: std::convert::Into<std::string::String>,
496        V: std::convert::Into<std::string::String>,
497    {
498        use std::iter::Iterator;
499        self.annotations = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
500        self
501    }
502
503    /// Sets the value of [etag][crate::model::Connection::etag].
504    ///
505    /// # Example
506    /// ```ignore,no_run
507    /// # use google_cloud_developerconnect_v1::model::Connection;
508    /// let x = Connection::new().set_etag("example");
509    /// ```
510    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
511        self.etag = v.into();
512        self
513    }
514
515    /// Sets the value of [uid][crate::model::Connection::uid].
516    ///
517    /// # Example
518    /// ```ignore,no_run
519    /// # use google_cloud_developerconnect_v1::model::Connection;
520    /// let x = Connection::new().set_uid("example");
521    /// ```
522    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
523        self.uid = v.into();
524        self
525    }
526
527    /// Sets the value of [crypto_key_config][crate::model::Connection::crypto_key_config].
528    ///
529    /// # Example
530    /// ```ignore,no_run
531    /// # use google_cloud_developerconnect_v1::model::Connection;
532    /// use google_cloud_developerconnect_v1::model::CryptoKeyConfig;
533    /// let x = Connection::new().set_crypto_key_config(CryptoKeyConfig::default()/* use setters */);
534    /// ```
535    pub fn set_crypto_key_config<T>(mut self, v: T) -> Self
536    where
537        T: std::convert::Into<crate::model::CryptoKeyConfig>,
538    {
539        self.crypto_key_config = std::option::Option::Some(v.into());
540        self
541    }
542
543    /// Sets or clears the value of [crypto_key_config][crate::model::Connection::crypto_key_config].
544    ///
545    /// # Example
546    /// ```ignore,no_run
547    /// # use google_cloud_developerconnect_v1::model::Connection;
548    /// use google_cloud_developerconnect_v1::model::CryptoKeyConfig;
549    /// let x = Connection::new().set_or_clear_crypto_key_config(Some(CryptoKeyConfig::default()/* use setters */));
550    /// let x = Connection::new().set_or_clear_crypto_key_config(None::<CryptoKeyConfig>);
551    /// ```
552    pub fn set_or_clear_crypto_key_config<T>(mut self, v: std::option::Option<T>) -> Self
553    where
554        T: std::convert::Into<crate::model::CryptoKeyConfig>,
555    {
556        self.crypto_key_config = v.map(|x| x.into());
557        self
558    }
559
560    /// Sets the value of [git_proxy_config][crate::model::Connection::git_proxy_config].
561    ///
562    /// # Example
563    /// ```ignore,no_run
564    /// # use google_cloud_developerconnect_v1::model::Connection;
565    /// use google_cloud_developerconnect_v1::model::GitProxyConfig;
566    /// let x = Connection::new().set_git_proxy_config(GitProxyConfig::default()/* use setters */);
567    /// ```
568    pub fn set_git_proxy_config<T>(mut self, v: T) -> Self
569    where
570        T: std::convert::Into<crate::model::GitProxyConfig>,
571    {
572        self.git_proxy_config = std::option::Option::Some(v.into());
573        self
574    }
575
576    /// Sets or clears the value of [git_proxy_config][crate::model::Connection::git_proxy_config].
577    ///
578    /// # Example
579    /// ```ignore,no_run
580    /// # use google_cloud_developerconnect_v1::model::Connection;
581    /// use google_cloud_developerconnect_v1::model::GitProxyConfig;
582    /// let x = Connection::new().set_or_clear_git_proxy_config(Some(GitProxyConfig::default()/* use setters */));
583    /// let x = Connection::new().set_or_clear_git_proxy_config(None::<GitProxyConfig>);
584    /// ```
585    pub fn set_or_clear_git_proxy_config<T>(mut self, v: std::option::Option<T>) -> Self
586    where
587        T: std::convert::Into<crate::model::GitProxyConfig>,
588    {
589        self.git_proxy_config = v.map(|x| x.into());
590        self
591    }
592
593    /// Sets the value of [connection_config][crate::model::Connection::connection_config].
594    ///
595    /// Note that all the setters affecting `connection_config` are mutually
596    /// exclusive.
597    ///
598    /// # Example
599    /// ```ignore,no_run
600    /// # use google_cloud_developerconnect_v1::model::Connection;
601    /// use google_cloud_developerconnect_v1::model::GitHubConfig;
602    /// let x = Connection::new().set_connection_config(Some(
603    ///     google_cloud_developerconnect_v1::model::connection::ConnectionConfig::GithubConfig(GitHubConfig::default().into())));
604    /// ```
605    pub fn set_connection_config<
606        T: std::convert::Into<std::option::Option<crate::model::connection::ConnectionConfig>>,
607    >(
608        mut self,
609        v: T,
610    ) -> Self {
611        self.connection_config = v.into();
612        self
613    }
614
615    /// The value of [connection_config][crate::model::Connection::connection_config]
616    /// if it holds a `GithubConfig`, `None` if the field is not set or
617    /// holds a different branch.
618    pub fn github_config(
619        &self,
620    ) -> std::option::Option<&std::boxed::Box<crate::model::GitHubConfig>> {
621        #[allow(unreachable_patterns)]
622        self.connection_config.as_ref().and_then(|v| match v {
623            crate::model::connection::ConnectionConfig::GithubConfig(v) => {
624                std::option::Option::Some(v)
625            }
626            _ => std::option::Option::None,
627        })
628    }
629
630    /// Sets the value of [connection_config][crate::model::Connection::connection_config]
631    /// to hold a `GithubConfig`.
632    ///
633    /// Note that all the setters affecting `connection_config` are
634    /// mutually exclusive.
635    ///
636    /// # Example
637    /// ```ignore,no_run
638    /// # use google_cloud_developerconnect_v1::model::Connection;
639    /// use google_cloud_developerconnect_v1::model::GitHubConfig;
640    /// let x = Connection::new().set_github_config(GitHubConfig::default()/* use setters */);
641    /// assert!(x.github_config().is_some());
642    /// assert!(x.github_enterprise_config().is_none());
643    /// assert!(x.gitlab_config().is_none());
644    /// assert!(x.gitlab_enterprise_config().is_none());
645    /// assert!(x.bitbucket_data_center_config().is_none());
646    /// assert!(x.bitbucket_cloud_config().is_none());
647    /// assert!(x.secure_source_manager_instance_config().is_none());
648    /// assert!(x.http_config().is_none());
649    /// ```
650    pub fn set_github_config<T: std::convert::Into<std::boxed::Box<crate::model::GitHubConfig>>>(
651        mut self,
652        v: T,
653    ) -> Self {
654        self.connection_config = std::option::Option::Some(
655            crate::model::connection::ConnectionConfig::GithubConfig(v.into()),
656        );
657        self
658    }
659
660    /// The value of [connection_config][crate::model::Connection::connection_config]
661    /// if it holds a `GithubEnterpriseConfig`, `None` if the field is not set or
662    /// holds a different branch.
663    pub fn github_enterprise_config(
664        &self,
665    ) -> std::option::Option<&std::boxed::Box<crate::model::GitHubEnterpriseConfig>> {
666        #[allow(unreachable_patterns)]
667        self.connection_config.as_ref().and_then(|v| match v {
668            crate::model::connection::ConnectionConfig::GithubEnterpriseConfig(v) => {
669                std::option::Option::Some(v)
670            }
671            _ => std::option::Option::None,
672        })
673    }
674
675    /// Sets the value of [connection_config][crate::model::Connection::connection_config]
676    /// to hold a `GithubEnterpriseConfig`.
677    ///
678    /// Note that all the setters affecting `connection_config` are
679    /// mutually exclusive.
680    ///
681    /// # Example
682    /// ```ignore,no_run
683    /// # use google_cloud_developerconnect_v1::model::Connection;
684    /// use google_cloud_developerconnect_v1::model::GitHubEnterpriseConfig;
685    /// let x = Connection::new().set_github_enterprise_config(GitHubEnterpriseConfig::default()/* use setters */);
686    /// assert!(x.github_enterprise_config().is_some());
687    /// assert!(x.github_config().is_none());
688    /// assert!(x.gitlab_config().is_none());
689    /// assert!(x.gitlab_enterprise_config().is_none());
690    /// assert!(x.bitbucket_data_center_config().is_none());
691    /// assert!(x.bitbucket_cloud_config().is_none());
692    /// assert!(x.secure_source_manager_instance_config().is_none());
693    /// assert!(x.http_config().is_none());
694    /// ```
695    pub fn set_github_enterprise_config<
696        T: std::convert::Into<std::boxed::Box<crate::model::GitHubEnterpriseConfig>>,
697    >(
698        mut self,
699        v: T,
700    ) -> Self {
701        self.connection_config = std::option::Option::Some(
702            crate::model::connection::ConnectionConfig::GithubEnterpriseConfig(v.into()),
703        );
704        self
705    }
706
707    /// The value of [connection_config][crate::model::Connection::connection_config]
708    /// if it holds a `GitlabConfig`, `None` if the field is not set or
709    /// holds a different branch.
710    pub fn gitlab_config(
711        &self,
712    ) -> std::option::Option<&std::boxed::Box<crate::model::GitLabConfig>> {
713        #[allow(unreachable_patterns)]
714        self.connection_config.as_ref().and_then(|v| match v {
715            crate::model::connection::ConnectionConfig::GitlabConfig(v) => {
716                std::option::Option::Some(v)
717            }
718            _ => std::option::Option::None,
719        })
720    }
721
722    /// Sets the value of [connection_config][crate::model::Connection::connection_config]
723    /// to hold a `GitlabConfig`.
724    ///
725    /// Note that all the setters affecting `connection_config` are
726    /// mutually exclusive.
727    ///
728    /// # Example
729    /// ```ignore,no_run
730    /// # use google_cloud_developerconnect_v1::model::Connection;
731    /// use google_cloud_developerconnect_v1::model::GitLabConfig;
732    /// let x = Connection::new().set_gitlab_config(GitLabConfig::default()/* use setters */);
733    /// assert!(x.gitlab_config().is_some());
734    /// assert!(x.github_config().is_none());
735    /// assert!(x.github_enterprise_config().is_none());
736    /// assert!(x.gitlab_enterprise_config().is_none());
737    /// assert!(x.bitbucket_data_center_config().is_none());
738    /// assert!(x.bitbucket_cloud_config().is_none());
739    /// assert!(x.secure_source_manager_instance_config().is_none());
740    /// assert!(x.http_config().is_none());
741    /// ```
742    pub fn set_gitlab_config<T: std::convert::Into<std::boxed::Box<crate::model::GitLabConfig>>>(
743        mut self,
744        v: T,
745    ) -> Self {
746        self.connection_config = std::option::Option::Some(
747            crate::model::connection::ConnectionConfig::GitlabConfig(v.into()),
748        );
749        self
750    }
751
752    /// The value of [connection_config][crate::model::Connection::connection_config]
753    /// if it holds a `GitlabEnterpriseConfig`, `None` if the field is not set or
754    /// holds a different branch.
755    pub fn gitlab_enterprise_config(
756        &self,
757    ) -> std::option::Option<&std::boxed::Box<crate::model::GitLabEnterpriseConfig>> {
758        #[allow(unreachable_patterns)]
759        self.connection_config.as_ref().and_then(|v| match v {
760            crate::model::connection::ConnectionConfig::GitlabEnterpriseConfig(v) => {
761                std::option::Option::Some(v)
762            }
763            _ => std::option::Option::None,
764        })
765    }
766
767    /// Sets the value of [connection_config][crate::model::Connection::connection_config]
768    /// to hold a `GitlabEnterpriseConfig`.
769    ///
770    /// Note that all the setters affecting `connection_config` are
771    /// mutually exclusive.
772    ///
773    /// # Example
774    /// ```ignore,no_run
775    /// # use google_cloud_developerconnect_v1::model::Connection;
776    /// use google_cloud_developerconnect_v1::model::GitLabEnterpriseConfig;
777    /// let x = Connection::new().set_gitlab_enterprise_config(GitLabEnterpriseConfig::default()/* use setters */);
778    /// assert!(x.gitlab_enterprise_config().is_some());
779    /// assert!(x.github_config().is_none());
780    /// assert!(x.github_enterprise_config().is_none());
781    /// assert!(x.gitlab_config().is_none());
782    /// assert!(x.bitbucket_data_center_config().is_none());
783    /// assert!(x.bitbucket_cloud_config().is_none());
784    /// assert!(x.secure_source_manager_instance_config().is_none());
785    /// assert!(x.http_config().is_none());
786    /// ```
787    pub fn set_gitlab_enterprise_config<
788        T: std::convert::Into<std::boxed::Box<crate::model::GitLabEnterpriseConfig>>,
789    >(
790        mut self,
791        v: T,
792    ) -> Self {
793        self.connection_config = std::option::Option::Some(
794            crate::model::connection::ConnectionConfig::GitlabEnterpriseConfig(v.into()),
795        );
796        self
797    }
798
799    /// The value of [connection_config][crate::model::Connection::connection_config]
800    /// if it holds a `BitbucketDataCenterConfig`, `None` if the field is not set or
801    /// holds a different branch.
802    pub fn bitbucket_data_center_config(
803        &self,
804    ) -> std::option::Option<&std::boxed::Box<crate::model::BitbucketDataCenterConfig>> {
805        #[allow(unreachable_patterns)]
806        self.connection_config.as_ref().and_then(|v| match v {
807            crate::model::connection::ConnectionConfig::BitbucketDataCenterConfig(v) => {
808                std::option::Option::Some(v)
809            }
810            _ => std::option::Option::None,
811        })
812    }
813
814    /// Sets the value of [connection_config][crate::model::Connection::connection_config]
815    /// to hold a `BitbucketDataCenterConfig`.
816    ///
817    /// Note that all the setters affecting `connection_config` are
818    /// mutually exclusive.
819    ///
820    /// # Example
821    /// ```ignore,no_run
822    /// # use google_cloud_developerconnect_v1::model::Connection;
823    /// use google_cloud_developerconnect_v1::model::BitbucketDataCenterConfig;
824    /// let x = Connection::new().set_bitbucket_data_center_config(BitbucketDataCenterConfig::default()/* use setters */);
825    /// assert!(x.bitbucket_data_center_config().is_some());
826    /// assert!(x.github_config().is_none());
827    /// assert!(x.github_enterprise_config().is_none());
828    /// assert!(x.gitlab_config().is_none());
829    /// assert!(x.gitlab_enterprise_config().is_none());
830    /// assert!(x.bitbucket_cloud_config().is_none());
831    /// assert!(x.secure_source_manager_instance_config().is_none());
832    /// assert!(x.http_config().is_none());
833    /// ```
834    pub fn set_bitbucket_data_center_config<
835        T: std::convert::Into<std::boxed::Box<crate::model::BitbucketDataCenterConfig>>,
836    >(
837        mut self,
838        v: T,
839    ) -> Self {
840        self.connection_config = std::option::Option::Some(
841            crate::model::connection::ConnectionConfig::BitbucketDataCenterConfig(v.into()),
842        );
843        self
844    }
845
846    /// The value of [connection_config][crate::model::Connection::connection_config]
847    /// if it holds a `BitbucketCloudConfig`, `None` if the field is not set or
848    /// holds a different branch.
849    pub fn bitbucket_cloud_config(
850        &self,
851    ) -> std::option::Option<&std::boxed::Box<crate::model::BitbucketCloudConfig>> {
852        #[allow(unreachable_patterns)]
853        self.connection_config.as_ref().and_then(|v| match v {
854            crate::model::connection::ConnectionConfig::BitbucketCloudConfig(v) => {
855                std::option::Option::Some(v)
856            }
857            _ => std::option::Option::None,
858        })
859    }
860
861    /// Sets the value of [connection_config][crate::model::Connection::connection_config]
862    /// to hold a `BitbucketCloudConfig`.
863    ///
864    /// Note that all the setters affecting `connection_config` are
865    /// mutually exclusive.
866    ///
867    /// # Example
868    /// ```ignore,no_run
869    /// # use google_cloud_developerconnect_v1::model::Connection;
870    /// use google_cloud_developerconnect_v1::model::BitbucketCloudConfig;
871    /// let x = Connection::new().set_bitbucket_cloud_config(BitbucketCloudConfig::default()/* use setters */);
872    /// assert!(x.bitbucket_cloud_config().is_some());
873    /// assert!(x.github_config().is_none());
874    /// assert!(x.github_enterprise_config().is_none());
875    /// assert!(x.gitlab_config().is_none());
876    /// assert!(x.gitlab_enterprise_config().is_none());
877    /// assert!(x.bitbucket_data_center_config().is_none());
878    /// assert!(x.secure_source_manager_instance_config().is_none());
879    /// assert!(x.http_config().is_none());
880    /// ```
881    pub fn set_bitbucket_cloud_config<
882        T: std::convert::Into<std::boxed::Box<crate::model::BitbucketCloudConfig>>,
883    >(
884        mut self,
885        v: T,
886    ) -> Self {
887        self.connection_config = std::option::Option::Some(
888            crate::model::connection::ConnectionConfig::BitbucketCloudConfig(v.into()),
889        );
890        self
891    }
892
893    /// The value of [connection_config][crate::model::Connection::connection_config]
894    /// if it holds a `SecureSourceManagerInstanceConfig`, `None` if the field is not set or
895    /// holds a different branch.
896    pub fn secure_source_manager_instance_config(
897        &self,
898    ) -> std::option::Option<&std::boxed::Box<crate::model::SecureSourceManagerInstanceConfig>>
899    {
900        #[allow(unreachable_patterns)]
901        self.connection_config.as_ref().and_then(|v| match v {
902            crate::model::connection::ConnectionConfig::SecureSourceManagerInstanceConfig(v) => {
903                std::option::Option::Some(v)
904            }
905            _ => std::option::Option::None,
906        })
907    }
908
909    /// Sets the value of [connection_config][crate::model::Connection::connection_config]
910    /// to hold a `SecureSourceManagerInstanceConfig`.
911    ///
912    /// Note that all the setters affecting `connection_config` are
913    /// mutually exclusive.
914    ///
915    /// # Example
916    /// ```ignore,no_run
917    /// # use google_cloud_developerconnect_v1::model::Connection;
918    /// use google_cloud_developerconnect_v1::model::SecureSourceManagerInstanceConfig;
919    /// let x = Connection::new().set_secure_source_manager_instance_config(SecureSourceManagerInstanceConfig::default()/* use setters */);
920    /// assert!(x.secure_source_manager_instance_config().is_some());
921    /// assert!(x.github_config().is_none());
922    /// assert!(x.github_enterprise_config().is_none());
923    /// assert!(x.gitlab_config().is_none());
924    /// assert!(x.gitlab_enterprise_config().is_none());
925    /// assert!(x.bitbucket_data_center_config().is_none());
926    /// assert!(x.bitbucket_cloud_config().is_none());
927    /// assert!(x.http_config().is_none());
928    /// ```
929    pub fn set_secure_source_manager_instance_config<
930        T: std::convert::Into<std::boxed::Box<crate::model::SecureSourceManagerInstanceConfig>>,
931    >(
932        mut self,
933        v: T,
934    ) -> Self {
935        self.connection_config = std::option::Option::Some(
936            crate::model::connection::ConnectionConfig::SecureSourceManagerInstanceConfig(v.into()),
937        );
938        self
939    }
940
941    /// The value of [connection_config][crate::model::Connection::connection_config]
942    /// if it holds a `HttpConfig`, `None` if the field is not set or
943    /// holds a different branch.
944    pub fn http_config(
945        &self,
946    ) -> std::option::Option<&std::boxed::Box<crate::model::GenericHTTPEndpointConfig>> {
947        #[allow(unreachable_patterns)]
948        self.connection_config.as_ref().and_then(|v| match v {
949            crate::model::connection::ConnectionConfig::HttpConfig(v) => {
950                std::option::Option::Some(v)
951            }
952            _ => std::option::Option::None,
953        })
954    }
955
956    /// Sets the value of [connection_config][crate::model::Connection::connection_config]
957    /// to hold a `HttpConfig`.
958    ///
959    /// Note that all the setters affecting `connection_config` are
960    /// mutually exclusive.
961    ///
962    /// # Example
963    /// ```ignore,no_run
964    /// # use google_cloud_developerconnect_v1::model::Connection;
965    /// use google_cloud_developerconnect_v1::model::GenericHTTPEndpointConfig;
966    /// let x = Connection::new().set_http_config(GenericHTTPEndpointConfig::default()/* use setters */);
967    /// assert!(x.http_config().is_some());
968    /// assert!(x.github_config().is_none());
969    /// assert!(x.github_enterprise_config().is_none());
970    /// assert!(x.gitlab_config().is_none());
971    /// assert!(x.gitlab_enterprise_config().is_none());
972    /// assert!(x.bitbucket_data_center_config().is_none());
973    /// assert!(x.bitbucket_cloud_config().is_none());
974    /// assert!(x.secure_source_manager_instance_config().is_none());
975    /// ```
976    pub fn set_http_config<
977        T: std::convert::Into<std::boxed::Box<crate::model::GenericHTTPEndpointConfig>>,
978    >(
979        mut self,
980        v: T,
981    ) -> Self {
982        self.connection_config = std::option::Option::Some(
983            crate::model::connection::ConnectionConfig::HttpConfig(v.into()),
984        );
985        self
986    }
987}
988
989impl wkt::message::Message for Connection {
990    fn typename() -> &'static str {
991        "type.googleapis.com/google.cloud.developerconnect.v1.Connection"
992    }
993}
994
995/// Defines additional types related to [Connection].
996pub mod connection {
997    #[allow(unused_imports)]
998    use super::*;
999
1000    /// Configuration for the connection depending on the type of provider.
1001    #[derive(Clone, Debug, PartialEq)]
1002    #[non_exhaustive]
1003    pub enum ConnectionConfig {
1004        /// Configuration for connections to github.com.
1005        GithubConfig(std::boxed::Box<crate::model::GitHubConfig>),
1006        /// Configuration for connections to an instance of GitHub Enterprise.
1007        GithubEnterpriseConfig(std::boxed::Box<crate::model::GitHubEnterpriseConfig>),
1008        /// Configuration for connections to gitlab.com.
1009        GitlabConfig(std::boxed::Box<crate::model::GitLabConfig>),
1010        /// Configuration for connections to an instance of GitLab Enterprise.
1011        GitlabEnterpriseConfig(std::boxed::Box<crate::model::GitLabEnterpriseConfig>),
1012        /// Configuration for connections to an instance of Bitbucket Data Center.
1013        BitbucketDataCenterConfig(std::boxed::Box<crate::model::BitbucketDataCenterConfig>),
1014        /// Configuration for connections to an instance of Bitbucket Clouds.
1015        BitbucketCloudConfig(std::boxed::Box<crate::model::BitbucketCloudConfig>),
1016        /// Configuration for connections to an instance of Secure Source Manager.
1017        SecureSourceManagerInstanceConfig(
1018            std::boxed::Box<crate::model::SecureSourceManagerInstanceConfig>,
1019        ),
1020        /// Optional. Configuration for connections to an HTTP service provider.
1021        HttpConfig(std::boxed::Box<crate::model::GenericHTTPEndpointConfig>),
1022    }
1023}
1024
1025/// The crypto key configuration. This field is used by the Customer-managed
1026/// encryption keys (CMEK) feature.
1027#[derive(Clone, Default, PartialEq)]
1028#[non_exhaustive]
1029pub struct CryptoKeyConfig {
1030    /// Required. The name of the key which is used to encrypt/decrypt customer
1031    /// data. For key in Cloud KMS, the key should be in the format of
1032    /// `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
1033    pub key_reference: std::string::String,
1034
1035    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1036}
1037
1038impl CryptoKeyConfig {
1039    /// Creates a new default instance.
1040    pub fn new() -> Self {
1041        std::default::Default::default()
1042    }
1043
1044    /// Sets the value of [key_reference][crate::model::CryptoKeyConfig::key_reference].
1045    ///
1046    /// # Example
1047    /// ```ignore,no_run
1048    /// # use google_cloud_developerconnect_v1::model::CryptoKeyConfig;
1049    /// let x = CryptoKeyConfig::new().set_key_reference("example");
1050    /// ```
1051    pub fn set_key_reference<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1052        self.key_reference = v.into();
1053        self
1054    }
1055}
1056
1057impl wkt::message::Message for CryptoKeyConfig {
1058    fn typename() -> &'static str {
1059        "type.googleapis.com/google.cloud.developerconnect.v1.CryptoKeyConfig"
1060    }
1061}
1062
1063/// The git proxy configuration.
1064#[derive(Clone, Default, PartialEq)]
1065#[non_exhaustive]
1066pub struct GitProxyConfig {
1067    /// Optional. Setting this to true allows the git proxy to be used for
1068    /// performing git operations on the repositories linked in the connection.
1069    pub enabled: bool,
1070
1071    /// Output only. The base URI for the HTTP proxy endpoint. Has
1072    /// the format
1073    /// `https://{generatedID}-c-h-{shortRegion}.developerconnect.dev`
1074    /// Populated only when enabled is set to true.
1075    /// This endpoint is used by other Google services that integrate with
1076    /// Developer Connect.
1077    pub http_proxy_base_uri: std::string::String,
1078
1079    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1080}
1081
1082impl GitProxyConfig {
1083    /// Creates a new default instance.
1084    pub fn new() -> Self {
1085        std::default::Default::default()
1086    }
1087
1088    /// Sets the value of [enabled][crate::model::GitProxyConfig::enabled].
1089    ///
1090    /// # Example
1091    /// ```ignore,no_run
1092    /// # use google_cloud_developerconnect_v1::model::GitProxyConfig;
1093    /// let x = GitProxyConfig::new().set_enabled(true);
1094    /// ```
1095    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1096        self.enabled = v.into();
1097        self
1098    }
1099
1100    /// Sets the value of [http_proxy_base_uri][crate::model::GitProxyConfig::http_proxy_base_uri].
1101    ///
1102    /// # Example
1103    /// ```ignore,no_run
1104    /// # use google_cloud_developerconnect_v1::model::GitProxyConfig;
1105    /// let x = GitProxyConfig::new().set_http_proxy_base_uri("example");
1106    /// ```
1107    pub fn set_http_proxy_base_uri<T: std::convert::Into<std::string::String>>(
1108        mut self,
1109        v: T,
1110    ) -> Self {
1111        self.http_proxy_base_uri = v.into();
1112        self
1113    }
1114}
1115
1116impl wkt::message::Message for GitProxyConfig {
1117    fn typename() -> &'static str {
1118        "type.googleapis.com/google.cloud.developerconnect.v1.GitProxyConfig"
1119    }
1120}
1121
1122/// Describes stage and necessary actions to be taken by the
1123/// user to complete the installation. Used for GitHub and GitHub Enterprise
1124/// based connections.
1125#[derive(Clone, Default, PartialEq)]
1126#[non_exhaustive]
1127pub struct InstallationState {
1128    /// Output only. Current step of the installation process.
1129    pub stage: crate::model::installation_state::Stage,
1130
1131    /// Output only. Message of what the user should do next to continue the
1132    /// installation. Empty string if the installation is already complete.
1133    pub message: std::string::String,
1134
1135    /// Output only. Link to follow for next action. Empty string if the
1136    /// installation is already complete.
1137    pub action_uri: std::string::String,
1138
1139    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1140}
1141
1142impl InstallationState {
1143    /// Creates a new default instance.
1144    pub fn new() -> Self {
1145        std::default::Default::default()
1146    }
1147
1148    /// Sets the value of [stage][crate::model::InstallationState::stage].
1149    ///
1150    /// # Example
1151    /// ```ignore,no_run
1152    /// # use google_cloud_developerconnect_v1::model::InstallationState;
1153    /// use google_cloud_developerconnect_v1::model::installation_state::Stage;
1154    /// let x0 = InstallationState::new().set_stage(Stage::PendingCreateApp);
1155    /// let x1 = InstallationState::new().set_stage(Stage::PendingUserOauth);
1156    /// let x2 = InstallationState::new().set_stage(Stage::PendingInstallApp);
1157    /// ```
1158    pub fn set_stage<T: std::convert::Into<crate::model::installation_state::Stage>>(
1159        mut self,
1160        v: T,
1161    ) -> Self {
1162        self.stage = v.into();
1163        self
1164    }
1165
1166    /// Sets the value of [message][crate::model::InstallationState::message].
1167    ///
1168    /// # Example
1169    /// ```ignore,no_run
1170    /// # use google_cloud_developerconnect_v1::model::InstallationState;
1171    /// let x = InstallationState::new().set_message("example");
1172    /// ```
1173    pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1174        self.message = v.into();
1175        self
1176    }
1177
1178    /// Sets the value of [action_uri][crate::model::InstallationState::action_uri].
1179    ///
1180    /// # Example
1181    /// ```ignore,no_run
1182    /// # use google_cloud_developerconnect_v1::model::InstallationState;
1183    /// let x = InstallationState::new().set_action_uri("example");
1184    /// ```
1185    pub fn set_action_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1186        self.action_uri = v.into();
1187        self
1188    }
1189}
1190
1191impl wkt::message::Message for InstallationState {
1192    fn typename() -> &'static str {
1193        "type.googleapis.com/google.cloud.developerconnect.v1.InstallationState"
1194    }
1195}
1196
1197/// Defines additional types related to [InstallationState].
1198pub mod installation_state {
1199    #[allow(unused_imports)]
1200    use super::*;
1201
1202    /// Stage of the installation process.
1203    ///
1204    /// # Working with unknown values
1205    ///
1206    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
1207    /// additional enum variants at any time. Adding new variants is not considered
1208    /// a breaking change. Applications should write their code in anticipation of:
1209    ///
1210    /// - New values appearing in future releases of the client library, **and**
1211    /// - New values received dynamically, without application changes.
1212    ///
1213    /// Please consult the [Working with enums] section in the user guide for some
1214    /// guidelines.
1215    ///
1216    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
1217    #[derive(Clone, Debug, PartialEq)]
1218    #[non_exhaustive]
1219    pub enum Stage {
1220        /// No stage specified.
1221        Unspecified,
1222        /// Only for GitHub Enterprise. An App creation has been requested.
1223        /// The user needs to confirm the creation in their GitHub enterprise host.
1224        PendingCreateApp,
1225        /// User needs to authorize the GitHub (or Enterprise) App via OAuth.
1226        PendingUserOauth,
1227        /// User needs to follow the link to install the GitHub (or Enterprise) App.
1228        PendingInstallApp,
1229        /// Installation process has been completed.
1230        Complete,
1231        /// If set, the enum was initialized with an unknown value.
1232        ///
1233        /// Applications can examine the value using [Stage::value] or
1234        /// [Stage::name].
1235        UnknownValue(stage::UnknownValue),
1236    }
1237
1238    #[doc(hidden)]
1239    pub mod stage {
1240        #[allow(unused_imports)]
1241        use super::*;
1242        #[derive(Clone, Debug, PartialEq)]
1243        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
1244    }
1245
1246    impl Stage {
1247        /// Gets the enum value.
1248        ///
1249        /// Returns `None` if the enum contains an unknown value deserialized from
1250        /// the string representation of enums.
1251        pub fn value(&self) -> std::option::Option<i32> {
1252            match self {
1253                Self::Unspecified => std::option::Option::Some(0),
1254                Self::PendingCreateApp => std::option::Option::Some(1),
1255                Self::PendingUserOauth => std::option::Option::Some(2),
1256                Self::PendingInstallApp => std::option::Option::Some(3),
1257                Self::Complete => std::option::Option::Some(10),
1258                Self::UnknownValue(u) => u.0.value(),
1259            }
1260        }
1261
1262        /// Gets the enum value as a string.
1263        ///
1264        /// Returns `None` if the enum contains an unknown value deserialized from
1265        /// the integer representation of enums.
1266        pub fn name(&self) -> std::option::Option<&str> {
1267            match self {
1268                Self::Unspecified => std::option::Option::Some("STAGE_UNSPECIFIED"),
1269                Self::PendingCreateApp => std::option::Option::Some("PENDING_CREATE_APP"),
1270                Self::PendingUserOauth => std::option::Option::Some("PENDING_USER_OAUTH"),
1271                Self::PendingInstallApp => std::option::Option::Some("PENDING_INSTALL_APP"),
1272                Self::Complete => std::option::Option::Some("COMPLETE"),
1273                Self::UnknownValue(u) => u.0.name(),
1274            }
1275        }
1276    }
1277
1278    impl std::default::Default for Stage {
1279        fn default() -> Self {
1280            use std::convert::From;
1281            Self::from(0)
1282        }
1283    }
1284
1285    impl std::fmt::Display for Stage {
1286        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
1287            wkt::internal::display_enum(f, self.name(), self.value())
1288        }
1289    }
1290
1291    impl std::convert::From<i32> for Stage {
1292        fn from(value: i32) -> Self {
1293            match value {
1294                0 => Self::Unspecified,
1295                1 => Self::PendingCreateApp,
1296                2 => Self::PendingUserOauth,
1297                3 => Self::PendingInstallApp,
1298                10 => Self::Complete,
1299                _ => Self::UnknownValue(stage::UnknownValue(
1300                    wkt::internal::UnknownEnumValue::Integer(value),
1301                )),
1302            }
1303        }
1304    }
1305
1306    impl std::convert::From<&str> for Stage {
1307        fn from(value: &str) -> Self {
1308            use std::string::ToString;
1309            match value {
1310                "STAGE_UNSPECIFIED" => Self::Unspecified,
1311                "PENDING_CREATE_APP" => Self::PendingCreateApp,
1312                "PENDING_USER_OAUTH" => Self::PendingUserOauth,
1313                "PENDING_INSTALL_APP" => Self::PendingInstallApp,
1314                "COMPLETE" => Self::Complete,
1315                _ => Self::UnknownValue(stage::UnknownValue(
1316                    wkt::internal::UnknownEnumValue::String(value.to_string()),
1317                )),
1318            }
1319        }
1320    }
1321
1322    impl serde::ser::Serialize for Stage {
1323        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1324        where
1325            S: serde::Serializer,
1326        {
1327            match self {
1328                Self::Unspecified => serializer.serialize_i32(0),
1329                Self::PendingCreateApp => serializer.serialize_i32(1),
1330                Self::PendingUserOauth => serializer.serialize_i32(2),
1331                Self::PendingInstallApp => serializer.serialize_i32(3),
1332                Self::Complete => serializer.serialize_i32(10),
1333                Self::UnknownValue(u) => u.0.serialize(serializer),
1334            }
1335        }
1336    }
1337
1338    impl<'de> serde::de::Deserialize<'de> for Stage {
1339        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1340        where
1341            D: serde::Deserializer<'de>,
1342        {
1343            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Stage>::new(
1344                ".google.cloud.developerconnect.v1.InstallationState.Stage",
1345            ))
1346        }
1347    }
1348}
1349
1350/// Defines the configuration for connections to an HTTP service provider.
1351#[derive(Clone, Default, PartialEq)]
1352#[non_exhaustive]
1353pub struct GenericHTTPEndpointConfig {
1354    /// Required. Immutable. The service provider's https endpoint.
1355    pub host_uri: std::string::String,
1356
1357    /// Optional. Configuration for using Service Directory to privately connect to
1358    /// a HTTP service provider. This should only be set if the Http service
1359    /// provider is hosted on-premises and not reachable by public internet. If
1360    /// this field is left empty, calls to the HTTP service provider will be made
1361    /// over the public internet.
1362    pub service_directory_config: std::option::Option<crate::model::ServiceDirectoryConfig>,
1363
1364    /// Optional. The SSL certificate to use for requests to the HTTP service
1365    /// provider.
1366    pub ssl_ca_certificate: std::string::String,
1367
1368    /// The authentication mechanism to use for requests to the HTTP service
1369    /// provider.
1370    pub authentication:
1371        std::option::Option<crate::model::generic_http_endpoint_config::Authentication>,
1372
1373    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1374}
1375
1376impl GenericHTTPEndpointConfig {
1377    /// Creates a new default instance.
1378    pub fn new() -> Self {
1379        std::default::Default::default()
1380    }
1381
1382    /// Sets the value of [host_uri][crate::model::GenericHTTPEndpointConfig::host_uri].
1383    ///
1384    /// # Example
1385    /// ```ignore,no_run
1386    /// # use google_cloud_developerconnect_v1::model::GenericHTTPEndpointConfig;
1387    /// let x = GenericHTTPEndpointConfig::new().set_host_uri("example");
1388    /// ```
1389    pub fn set_host_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1390        self.host_uri = v.into();
1391        self
1392    }
1393
1394    /// Sets the value of [service_directory_config][crate::model::GenericHTTPEndpointConfig::service_directory_config].
1395    ///
1396    /// # Example
1397    /// ```ignore,no_run
1398    /// # use google_cloud_developerconnect_v1::model::GenericHTTPEndpointConfig;
1399    /// use google_cloud_developerconnect_v1::model::ServiceDirectoryConfig;
1400    /// let x = GenericHTTPEndpointConfig::new().set_service_directory_config(ServiceDirectoryConfig::default()/* use setters */);
1401    /// ```
1402    pub fn set_service_directory_config<T>(mut self, v: T) -> Self
1403    where
1404        T: std::convert::Into<crate::model::ServiceDirectoryConfig>,
1405    {
1406        self.service_directory_config = std::option::Option::Some(v.into());
1407        self
1408    }
1409
1410    /// Sets or clears the value of [service_directory_config][crate::model::GenericHTTPEndpointConfig::service_directory_config].
1411    ///
1412    /// # Example
1413    /// ```ignore,no_run
1414    /// # use google_cloud_developerconnect_v1::model::GenericHTTPEndpointConfig;
1415    /// use google_cloud_developerconnect_v1::model::ServiceDirectoryConfig;
1416    /// let x = GenericHTTPEndpointConfig::new().set_or_clear_service_directory_config(Some(ServiceDirectoryConfig::default()/* use setters */));
1417    /// let x = GenericHTTPEndpointConfig::new().set_or_clear_service_directory_config(None::<ServiceDirectoryConfig>);
1418    /// ```
1419    pub fn set_or_clear_service_directory_config<T>(mut self, v: std::option::Option<T>) -> Self
1420    where
1421        T: std::convert::Into<crate::model::ServiceDirectoryConfig>,
1422    {
1423        self.service_directory_config = v.map(|x| x.into());
1424        self
1425    }
1426
1427    /// Sets the value of [ssl_ca_certificate][crate::model::GenericHTTPEndpointConfig::ssl_ca_certificate].
1428    ///
1429    /// # Example
1430    /// ```ignore,no_run
1431    /// # use google_cloud_developerconnect_v1::model::GenericHTTPEndpointConfig;
1432    /// let x = GenericHTTPEndpointConfig::new().set_ssl_ca_certificate("example");
1433    /// ```
1434    pub fn set_ssl_ca_certificate<T: std::convert::Into<std::string::String>>(
1435        mut self,
1436        v: T,
1437    ) -> Self {
1438        self.ssl_ca_certificate = v.into();
1439        self
1440    }
1441
1442    /// Sets the value of [authentication][crate::model::GenericHTTPEndpointConfig::authentication].
1443    ///
1444    /// Note that all the setters affecting `authentication` are mutually
1445    /// exclusive.
1446    ///
1447    /// # Example
1448    /// ```ignore,no_run
1449    /// # use google_cloud_developerconnect_v1::model::GenericHTTPEndpointConfig;
1450    /// use google_cloud_developerconnect_v1::model::generic_http_endpoint_config::BasicAuthentication;
1451    /// let x = GenericHTTPEndpointConfig::new().set_authentication(Some(
1452    ///     google_cloud_developerconnect_v1::model::generic_http_endpoint_config::Authentication::BasicAuthentication(BasicAuthentication::default().into())));
1453    /// ```
1454    pub fn set_authentication<
1455        T: std::convert::Into<
1456                std::option::Option<crate::model::generic_http_endpoint_config::Authentication>,
1457            >,
1458    >(
1459        mut self,
1460        v: T,
1461    ) -> Self {
1462        self.authentication = v.into();
1463        self
1464    }
1465
1466    /// The value of [authentication][crate::model::GenericHTTPEndpointConfig::authentication]
1467    /// if it holds a `BasicAuthentication`, `None` if the field is not set or
1468    /// holds a different branch.
1469    pub fn basic_authentication(
1470        &self,
1471    ) -> std::option::Option<
1472        &std::boxed::Box<crate::model::generic_http_endpoint_config::BasicAuthentication>,
1473    > {
1474        #[allow(unreachable_patterns)]
1475        self.authentication.as_ref().and_then(|v| match v {
1476            crate::model::generic_http_endpoint_config::Authentication::BasicAuthentication(v) => {
1477                std::option::Option::Some(v)
1478            }
1479            _ => std::option::Option::None,
1480        })
1481    }
1482
1483    /// Sets the value of [authentication][crate::model::GenericHTTPEndpointConfig::authentication]
1484    /// to hold a `BasicAuthentication`.
1485    ///
1486    /// Note that all the setters affecting `authentication` are
1487    /// mutually exclusive.
1488    ///
1489    /// # Example
1490    /// ```ignore,no_run
1491    /// # use google_cloud_developerconnect_v1::model::GenericHTTPEndpointConfig;
1492    /// use google_cloud_developerconnect_v1::model::generic_http_endpoint_config::BasicAuthentication;
1493    /// let x = GenericHTTPEndpointConfig::new().set_basic_authentication(BasicAuthentication::default()/* use setters */);
1494    /// assert!(x.basic_authentication().is_some());
1495    /// assert!(x.bearer_token_authentication().is_none());
1496    /// ```
1497    pub fn set_basic_authentication<
1498        T: std::convert::Into<
1499                std::boxed::Box<crate::model::generic_http_endpoint_config::BasicAuthentication>,
1500            >,
1501    >(
1502        mut self,
1503        v: T,
1504    ) -> Self {
1505        self.authentication = std::option::Option::Some(
1506            crate::model::generic_http_endpoint_config::Authentication::BasicAuthentication(
1507                v.into(),
1508            ),
1509        );
1510        self
1511    }
1512
1513    /// The value of [authentication][crate::model::GenericHTTPEndpointConfig::authentication]
1514    /// if it holds a `BearerTokenAuthentication`, `None` if the field is not set or
1515    /// holds a different branch.
1516    pub fn bearer_token_authentication(
1517        &self,
1518    ) -> std::option::Option<
1519        &std::boxed::Box<crate::model::generic_http_endpoint_config::BearerTokenAuthentication>,
1520    > {
1521        #[allow(unreachable_patterns)]
1522        self.authentication.as_ref().and_then(|v| match v {
1523            crate::model::generic_http_endpoint_config::Authentication::BearerTokenAuthentication(v) => std::option::Option::Some(v),
1524            _ => std::option::Option::None,
1525        })
1526    }
1527
1528    /// Sets the value of [authentication][crate::model::GenericHTTPEndpointConfig::authentication]
1529    /// to hold a `BearerTokenAuthentication`.
1530    ///
1531    /// Note that all the setters affecting `authentication` are
1532    /// mutually exclusive.
1533    ///
1534    /// # Example
1535    /// ```ignore,no_run
1536    /// # use google_cloud_developerconnect_v1::model::GenericHTTPEndpointConfig;
1537    /// use google_cloud_developerconnect_v1::model::generic_http_endpoint_config::BearerTokenAuthentication;
1538    /// let x = GenericHTTPEndpointConfig::new().set_bearer_token_authentication(BearerTokenAuthentication::default()/* use setters */);
1539    /// assert!(x.bearer_token_authentication().is_some());
1540    /// assert!(x.basic_authentication().is_none());
1541    /// ```
1542    pub fn set_bearer_token_authentication<
1543        T: std::convert::Into<
1544                std::boxed::Box<
1545                    crate::model::generic_http_endpoint_config::BearerTokenAuthentication,
1546                >,
1547            >,
1548    >(
1549        mut self,
1550        v: T,
1551    ) -> Self {
1552        self.authentication = std::option::Option::Some(
1553            crate::model::generic_http_endpoint_config::Authentication::BearerTokenAuthentication(
1554                v.into(),
1555            ),
1556        );
1557        self
1558    }
1559}
1560
1561impl wkt::message::Message for GenericHTTPEndpointConfig {
1562    fn typename() -> &'static str {
1563        "type.googleapis.com/google.cloud.developerconnect.v1.GenericHTTPEndpointConfig"
1564    }
1565}
1566
1567/// Defines additional types related to [GenericHTTPEndpointConfig].
1568pub mod generic_http_endpoint_config {
1569    #[allow(unused_imports)]
1570    use super::*;
1571
1572    /// Basic authentication with username and password.
1573    #[derive(Clone, Default, PartialEq)]
1574    #[non_exhaustive]
1575    pub struct BasicAuthentication {
1576        /// Required. The username to authenticate as.
1577        pub username: std::string::String,
1578
1579        /// The password to authenticate as.
1580        pub password: std::option::Option<
1581            crate::model::generic_http_endpoint_config::basic_authentication::Password,
1582        >,
1583
1584        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1585    }
1586
1587    impl BasicAuthentication {
1588        /// Creates a new default instance.
1589        pub fn new() -> Self {
1590            std::default::Default::default()
1591        }
1592
1593        /// Sets the value of [username][crate::model::generic_http_endpoint_config::BasicAuthentication::username].
1594        ///
1595        /// # Example
1596        /// ```ignore,no_run
1597        /// # use google_cloud_developerconnect_v1::model::generic_http_endpoint_config::BasicAuthentication;
1598        /// let x = BasicAuthentication::new().set_username("example");
1599        /// ```
1600        pub fn set_username<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1601            self.username = v.into();
1602            self
1603        }
1604
1605        /// Sets the value of [password][crate::model::generic_http_endpoint_config::BasicAuthentication::password].
1606        ///
1607        /// Note that all the setters affecting `password` are mutually
1608        /// exclusive.
1609        ///
1610        /// # Example
1611        /// ```ignore,no_run
1612        /// # use google_cloud_developerconnect_v1::model::generic_http_endpoint_config::BasicAuthentication;
1613        /// use google_cloud_developerconnect_v1::model::generic_http_endpoint_config::basic_authentication::Password;
1614        /// let x = BasicAuthentication::new().set_password(Some(Password::PasswordSecretVersion("example".to_string())));
1615        /// ```
1616        pub fn set_password<
1617            T: std::convert::Into<
1618                    std::option::Option<
1619                        crate::model::generic_http_endpoint_config::basic_authentication::Password,
1620                    >,
1621                >,
1622        >(
1623            mut self,
1624            v: T,
1625        ) -> Self {
1626            self.password = v.into();
1627            self
1628        }
1629
1630        /// The value of [password][crate::model::generic_http_endpoint_config::BasicAuthentication::password]
1631        /// if it holds a `PasswordSecretVersion`, `None` if the field is not set or
1632        /// holds a different branch.
1633        pub fn password_secret_version(&self) -> std::option::Option<&std::string::String> {
1634            #[allow(unreachable_patterns)]
1635            self.password.as_ref().and_then(|v| match v {
1636                crate::model::generic_http_endpoint_config::basic_authentication::Password::PasswordSecretVersion(v) => std::option::Option::Some(v),
1637                _ => std::option::Option::None,
1638            })
1639        }
1640
1641        /// Sets the value of [password][crate::model::generic_http_endpoint_config::BasicAuthentication::password]
1642        /// to hold a `PasswordSecretVersion`.
1643        ///
1644        /// Note that all the setters affecting `password` are
1645        /// mutually exclusive.
1646        ///
1647        /// # Example
1648        /// ```ignore,no_run
1649        /// # use google_cloud_developerconnect_v1::model::generic_http_endpoint_config::BasicAuthentication;
1650        /// let x = BasicAuthentication::new().set_password_secret_version("example");
1651        /// assert!(x.password_secret_version().is_some());
1652        /// ```
1653        pub fn set_password_secret_version<T: std::convert::Into<std::string::String>>(
1654            mut self,
1655            v: T,
1656        ) -> Self {
1657            self.password = std::option::Option::Some(
1658                crate::model::generic_http_endpoint_config::basic_authentication::Password::PasswordSecretVersion(
1659                    v.into()
1660                )
1661            );
1662            self
1663        }
1664    }
1665
1666    impl wkt::message::Message for BasicAuthentication {
1667        fn typename() -> &'static str {
1668            "type.googleapis.com/google.cloud.developerconnect.v1.GenericHTTPEndpointConfig.BasicAuthentication"
1669        }
1670    }
1671
1672    /// Defines additional types related to [BasicAuthentication].
1673    pub mod basic_authentication {
1674        #[allow(unused_imports)]
1675        use super::*;
1676
1677        /// The password to authenticate as.
1678        #[derive(Clone, Debug, PartialEq)]
1679        #[non_exhaustive]
1680        pub enum Password {
1681            /// The password SecretManager secret version to authenticate as.
1682            PasswordSecretVersion(std::string::String),
1683        }
1684    }
1685
1686    /// Bearer token authentication with a token.
1687    #[derive(Clone, Default, PartialEq)]
1688    #[non_exhaustive]
1689    pub struct BearerTokenAuthentication {
1690        /// The token to authenticate as.
1691        pub token: std::option::Option<
1692            crate::model::generic_http_endpoint_config::bearer_token_authentication::Token,
1693        >,
1694
1695        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1696    }
1697
1698    impl BearerTokenAuthentication {
1699        /// Creates a new default instance.
1700        pub fn new() -> Self {
1701            std::default::Default::default()
1702        }
1703
1704        /// Sets the value of [token][crate::model::generic_http_endpoint_config::BearerTokenAuthentication::token].
1705        ///
1706        /// Note that all the setters affecting `token` are mutually
1707        /// exclusive.
1708        ///
1709        /// # Example
1710        /// ```ignore,no_run
1711        /// # use google_cloud_developerconnect_v1::model::generic_http_endpoint_config::BearerTokenAuthentication;
1712        /// use google_cloud_developerconnect_v1::model::generic_http_endpoint_config::bearer_token_authentication::Token;
1713        /// let x = BearerTokenAuthentication::new().set_token(Some(Token::TokenSecretVersion("example".to_string())));
1714        /// ```
1715        pub fn set_token<T: std::convert::Into<std::option::Option<crate::model::generic_http_endpoint_config::bearer_token_authentication::Token>>>(mut self, v: T) -> Self
1716        {
1717            self.token = v.into();
1718            self
1719        }
1720
1721        /// The value of [token][crate::model::generic_http_endpoint_config::BearerTokenAuthentication::token]
1722        /// if it holds a `TokenSecretVersion`, `None` if the field is not set or
1723        /// holds a different branch.
1724        pub fn token_secret_version(&self) -> std::option::Option<&std::string::String> {
1725            #[allow(unreachable_patterns)]
1726            self.token.as_ref().and_then(|v| match v {
1727                crate::model::generic_http_endpoint_config::bearer_token_authentication::Token::TokenSecretVersion(v) => std::option::Option::Some(v),
1728                _ => std::option::Option::None,
1729            })
1730        }
1731
1732        /// Sets the value of [token][crate::model::generic_http_endpoint_config::BearerTokenAuthentication::token]
1733        /// to hold a `TokenSecretVersion`.
1734        ///
1735        /// Note that all the setters affecting `token` are
1736        /// mutually exclusive.
1737        ///
1738        /// # Example
1739        /// ```ignore,no_run
1740        /// # use google_cloud_developerconnect_v1::model::generic_http_endpoint_config::BearerTokenAuthentication;
1741        /// let x = BearerTokenAuthentication::new().set_token_secret_version("example");
1742        /// assert!(x.token_secret_version().is_some());
1743        /// ```
1744        pub fn set_token_secret_version<T: std::convert::Into<std::string::String>>(
1745            mut self,
1746            v: T,
1747        ) -> Self {
1748            self.token = std::option::Option::Some(
1749                crate::model::generic_http_endpoint_config::bearer_token_authentication::Token::TokenSecretVersion(
1750                    v.into()
1751                )
1752            );
1753            self
1754        }
1755    }
1756
1757    impl wkt::message::Message for BearerTokenAuthentication {
1758        fn typename() -> &'static str {
1759            "type.googleapis.com/google.cloud.developerconnect.v1.GenericHTTPEndpointConfig.BearerTokenAuthentication"
1760        }
1761    }
1762
1763    /// Defines additional types related to [BearerTokenAuthentication].
1764    pub mod bearer_token_authentication {
1765        #[allow(unused_imports)]
1766        use super::*;
1767
1768        /// The token to authenticate as.
1769        #[derive(Clone, Debug, PartialEq)]
1770        #[non_exhaustive]
1771        pub enum Token {
1772            /// Optional. The token SecretManager secret version to authenticate as.
1773            TokenSecretVersion(std::string::String),
1774        }
1775    }
1776
1777    /// The authentication mechanism to use for requests to the HTTP service
1778    /// provider.
1779    #[derive(Clone, Debug, PartialEq)]
1780    #[non_exhaustive]
1781    pub enum Authentication {
1782        /// Optional. Basic authentication with username and password.
1783        BasicAuthentication(
1784            std::boxed::Box<crate::model::generic_http_endpoint_config::BasicAuthentication>,
1785        ),
1786        /// Optional. Bearer token authentication with a token.
1787        BearerTokenAuthentication(
1788            std::boxed::Box<crate::model::generic_http_endpoint_config::BearerTokenAuthentication>,
1789        ),
1790    }
1791}
1792
1793/// Configuration for connections to github.com.
1794#[derive(Clone, Default, PartialEq)]
1795#[non_exhaustive]
1796pub struct GitHubConfig {
1797    /// Required. Immutable. The GitHub Application that was installed to the
1798    /// GitHub user or organization.
1799    pub github_app: crate::model::git_hub_config::GitHubApp,
1800
1801    /// Optional. OAuth credential of the account that authorized the GitHub App.
1802    /// It is recommended to use a robot account instead of a human user account.
1803    /// The OAuth token must be tied to the GitHub App of this config.
1804    pub authorizer_credential: std::option::Option<crate::model::OAuthCredential>,
1805
1806    /// Optional. GitHub App installation id.
1807    pub app_installation_id: i64,
1808
1809    /// Output only. The URI to navigate to in order to manage the installation
1810    /// associated with this GitHubConfig.
1811    pub installation_uri: std::string::String,
1812
1813    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1814}
1815
1816impl GitHubConfig {
1817    /// Creates a new default instance.
1818    pub fn new() -> Self {
1819        std::default::Default::default()
1820    }
1821
1822    /// Sets the value of [github_app][crate::model::GitHubConfig::github_app].
1823    ///
1824    /// # Example
1825    /// ```ignore,no_run
1826    /// # use google_cloud_developerconnect_v1::model::GitHubConfig;
1827    /// use google_cloud_developerconnect_v1::model::git_hub_config::GitHubApp;
1828    /// let x0 = GitHubConfig::new().set_github_app(GitHubApp::DeveloperConnect);
1829    /// let x1 = GitHubConfig::new().set_github_app(GitHubApp::Firebase);
1830    /// let x2 = GitHubConfig::new().set_github_app(GitHubApp::GeminiCodeAssist);
1831    /// ```
1832    pub fn set_github_app<T: std::convert::Into<crate::model::git_hub_config::GitHubApp>>(
1833        mut self,
1834        v: T,
1835    ) -> Self {
1836        self.github_app = v.into();
1837        self
1838    }
1839
1840    /// Sets the value of [authorizer_credential][crate::model::GitHubConfig::authorizer_credential].
1841    ///
1842    /// # Example
1843    /// ```ignore,no_run
1844    /// # use google_cloud_developerconnect_v1::model::GitHubConfig;
1845    /// use google_cloud_developerconnect_v1::model::OAuthCredential;
1846    /// let x = GitHubConfig::new().set_authorizer_credential(OAuthCredential::default()/* use setters */);
1847    /// ```
1848    pub fn set_authorizer_credential<T>(mut self, v: T) -> Self
1849    where
1850        T: std::convert::Into<crate::model::OAuthCredential>,
1851    {
1852        self.authorizer_credential = std::option::Option::Some(v.into());
1853        self
1854    }
1855
1856    /// Sets or clears the value of [authorizer_credential][crate::model::GitHubConfig::authorizer_credential].
1857    ///
1858    /// # Example
1859    /// ```ignore,no_run
1860    /// # use google_cloud_developerconnect_v1::model::GitHubConfig;
1861    /// use google_cloud_developerconnect_v1::model::OAuthCredential;
1862    /// let x = GitHubConfig::new().set_or_clear_authorizer_credential(Some(OAuthCredential::default()/* use setters */));
1863    /// let x = GitHubConfig::new().set_or_clear_authorizer_credential(None::<OAuthCredential>);
1864    /// ```
1865    pub fn set_or_clear_authorizer_credential<T>(mut self, v: std::option::Option<T>) -> Self
1866    where
1867        T: std::convert::Into<crate::model::OAuthCredential>,
1868    {
1869        self.authorizer_credential = v.map(|x| x.into());
1870        self
1871    }
1872
1873    /// Sets the value of [app_installation_id][crate::model::GitHubConfig::app_installation_id].
1874    ///
1875    /// # Example
1876    /// ```ignore,no_run
1877    /// # use google_cloud_developerconnect_v1::model::GitHubConfig;
1878    /// let x = GitHubConfig::new().set_app_installation_id(42);
1879    /// ```
1880    pub fn set_app_installation_id<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
1881        self.app_installation_id = v.into();
1882        self
1883    }
1884
1885    /// Sets the value of [installation_uri][crate::model::GitHubConfig::installation_uri].
1886    ///
1887    /// # Example
1888    /// ```ignore,no_run
1889    /// # use google_cloud_developerconnect_v1::model::GitHubConfig;
1890    /// let x = GitHubConfig::new().set_installation_uri("example");
1891    /// ```
1892    pub fn set_installation_uri<T: std::convert::Into<std::string::String>>(
1893        mut self,
1894        v: T,
1895    ) -> Self {
1896        self.installation_uri = v.into();
1897        self
1898    }
1899}
1900
1901impl wkt::message::Message for GitHubConfig {
1902    fn typename() -> &'static str {
1903        "type.googleapis.com/google.cloud.developerconnect.v1.GitHubConfig"
1904    }
1905}
1906
1907/// Defines additional types related to [GitHubConfig].
1908pub mod git_hub_config {
1909    #[allow(unused_imports)]
1910    use super::*;
1911
1912    /// Represents the various GitHub Applications that can be installed to a
1913    /// GitHub user or organization and used with Developer Connect.
1914    ///
1915    /// # Working with unknown values
1916    ///
1917    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
1918    /// additional enum variants at any time. Adding new variants is not considered
1919    /// a breaking change. Applications should write their code in anticipation of:
1920    ///
1921    /// - New values appearing in future releases of the client library, **and**
1922    /// - New values received dynamically, without application changes.
1923    ///
1924    /// Please consult the [Working with enums] section in the user guide for some
1925    /// guidelines.
1926    ///
1927    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
1928    #[derive(Clone, Debug, PartialEq)]
1929    #[non_exhaustive]
1930    pub enum GitHubApp {
1931        /// GitHub App not specified.
1932        Unspecified,
1933        /// The Developer Connect GitHub Application.
1934        DeveloperConnect,
1935        /// The Firebase GitHub Application.
1936        Firebase,
1937        /// The Gemini Code Assist Application.
1938        GeminiCodeAssist,
1939        /// If set, the enum was initialized with an unknown value.
1940        ///
1941        /// Applications can examine the value using [GitHubApp::value] or
1942        /// [GitHubApp::name].
1943        UnknownValue(git_hub_app::UnknownValue),
1944    }
1945
1946    #[doc(hidden)]
1947    pub mod git_hub_app {
1948        #[allow(unused_imports)]
1949        use super::*;
1950        #[derive(Clone, Debug, PartialEq)]
1951        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
1952    }
1953
1954    impl GitHubApp {
1955        /// Gets the enum value.
1956        ///
1957        /// Returns `None` if the enum contains an unknown value deserialized from
1958        /// the string representation of enums.
1959        pub fn value(&self) -> std::option::Option<i32> {
1960            match self {
1961                Self::Unspecified => std::option::Option::Some(0),
1962                Self::DeveloperConnect => std::option::Option::Some(1),
1963                Self::Firebase => std::option::Option::Some(2),
1964                Self::GeminiCodeAssist => std::option::Option::Some(3),
1965                Self::UnknownValue(u) => u.0.value(),
1966            }
1967        }
1968
1969        /// Gets the enum value as a string.
1970        ///
1971        /// Returns `None` if the enum contains an unknown value deserialized from
1972        /// the integer representation of enums.
1973        pub fn name(&self) -> std::option::Option<&str> {
1974            match self {
1975                Self::Unspecified => std::option::Option::Some("GIT_HUB_APP_UNSPECIFIED"),
1976                Self::DeveloperConnect => std::option::Option::Some("DEVELOPER_CONNECT"),
1977                Self::Firebase => std::option::Option::Some("FIREBASE"),
1978                Self::GeminiCodeAssist => std::option::Option::Some("GEMINI_CODE_ASSIST"),
1979                Self::UnknownValue(u) => u.0.name(),
1980            }
1981        }
1982    }
1983
1984    impl std::default::Default for GitHubApp {
1985        fn default() -> Self {
1986            use std::convert::From;
1987            Self::from(0)
1988        }
1989    }
1990
1991    impl std::fmt::Display for GitHubApp {
1992        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
1993            wkt::internal::display_enum(f, self.name(), self.value())
1994        }
1995    }
1996
1997    impl std::convert::From<i32> for GitHubApp {
1998        fn from(value: i32) -> Self {
1999            match value {
2000                0 => Self::Unspecified,
2001                1 => Self::DeveloperConnect,
2002                2 => Self::Firebase,
2003                3 => Self::GeminiCodeAssist,
2004                _ => Self::UnknownValue(git_hub_app::UnknownValue(
2005                    wkt::internal::UnknownEnumValue::Integer(value),
2006                )),
2007            }
2008        }
2009    }
2010
2011    impl std::convert::From<&str> for GitHubApp {
2012        fn from(value: &str) -> Self {
2013            use std::string::ToString;
2014            match value {
2015                "GIT_HUB_APP_UNSPECIFIED" => Self::Unspecified,
2016                "DEVELOPER_CONNECT" => Self::DeveloperConnect,
2017                "FIREBASE" => Self::Firebase,
2018                "GEMINI_CODE_ASSIST" => Self::GeminiCodeAssist,
2019                _ => Self::UnknownValue(git_hub_app::UnknownValue(
2020                    wkt::internal::UnknownEnumValue::String(value.to_string()),
2021                )),
2022            }
2023        }
2024    }
2025
2026    impl serde::ser::Serialize for GitHubApp {
2027        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2028        where
2029            S: serde::Serializer,
2030        {
2031            match self {
2032                Self::Unspecified => serializer.serialize_i32(0),
2033                Self::DeveloperConnect => serializer.serialize_i32(1),
2034                Self::Firebase => serializer.serialize_i32(2),
2035                Self::GeminiCodeAssist => serializer.serialize_i32(3),
2036                Self::UnknownValue(u) => u.0.serialize(serializer),
2037            }
2038        }
2039    }
2040
2041    impl<'de> serde::de::Deserialize<'de> for GitHubApp {
2042        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2043        where
2044            D: serde::Deserializer<'de>,
2045        {
2046            deserializer.deserialize_any(wkt::internal::EnumVisitor::<GitHubApp>::new(
2047                ".google.cloud.developerconnect.v1.GitHubConfig.GitHubApp",
2048            ))
2049        }
2050    }
2051}
2052
2053/// Configuration for connections to an instance of GitHub Enterprise.
2054#[derive(Clone, Default, PartialEq)]
2055#[non_exhaustive]
2056pub struct GitHubEnterpriseConfig {
2057    /// Required. The URI of the GitHub Enterprise host this connection is for.
2058    pub host_uri: std::string::String,
2059
2060    /// Optional. ID of the GitHub App created from the manifest.
2061    pub app_id: i64,
2062
2063    /// Output only. The URL-friendly name of the GitHub App.
2064    pub app_slug: std::string::String,
2065
2066    /// Optional. SecretManager resource containing the private key of the GitHub
2067    /// App, formatted as `projects/*/secrets/*/versions/*` or
2068    /// `projects/*/locations/*/secrets/*/versions/*` (if regional secrets are
2069    /// supported in that location).
2070    pub private_key_secret_version: std::string::String,
2071
2072    /// Optional. SecretManager resource containing the webhook secret of the
2073    /// GitHub App, formatted as `projects/*/secrets/*/versions/*` or
2074    /// `projects/*/locations/*/secrets/*/versions/*` (if regional secrets are
2075    /// supported in that location).
2076    pub webhook_secret_secret_version: std::string::String,
2077
2078    /// Optional. ID of the installation of the GitHub App.
2079    pub app_installation_id: i64,
2080
2081    /// Output only. The URI to navigate to in order to manage the installation
2082    /// associated with this GitHubEnterpriseConfig.
2083    pub installation_uri: std::string::String,
2084
2085    /// Optional. Configuration for using Service Directory to privately connect to
2086    /// a GitHub Enterprise server. This should only be set if the GitHub
2087    /// Enterprise server is hosted on-premises and not reachable by public
2088    /// internet. If this field is left empty, calls to the GitHub Enterprise
2089    /// server will be made over the public internet.
2090    pub service_directory_config: std::option::Option<crate::model::ServiceDirectoryConfig>,
2091
2092    /// Output only. GitHub Enterprise version installed at the host_uri.
2093    pub server_version: std::string::String,
2094
2095    /// Optional. SSL certificate to use for requests to GitHub Enterprise.
2096    pub ssl_ca_certificate: std::string::String,
2097
2098    /// Optional. Immutable. GitHub Enterprise organization in which the GitHub App
2099    /// is created.
2100    pub organization: std::string::String,
2101
2102    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2103}
2104
2105impl GitHubEnterpriseConfig {
2106    /// Creates a new default instance.
2107    pub fn new() -> Self {
2108        std::default::Default::default()
2109    }
2110
2111    /// Sets the value of [host_uri][crate::model::GitHubEnterpriseConfig::host_uri].
2112    ///
2113    /// # Example
2114    /// ```ignore,no_run
2115    /// # use google_cloud_developerconnect_v1::model::GitHubEnterpriseConfig;
2116    /// let x = GitHubEnterpriseConfig::new().set_host_uri("example");
2117    /// ```
2118    pub fn set_host_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2119        self.host_uri = v.into();
2120        self
2121    }
2122
2123    /// Sets the value of [app_id][crate::model::GitHubEnterpriseConfig::app_id].
2124    ///
2125    /// # Example
2126    /// ```ignore,no_run
2127    /// # use google_cloud_developerconnect_v1::model::GitHubEnterpriseConfig;
2128    /// let x = GitHubEnterpriseConfig::new().set_app_id(42);
2129    /// ```
2130    pub fn set_app_id<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
2131        self.app_id = v.into();
2132        self
2133    }
2134
2135    /// Sets the value of [app_slug][crate::model::GitHubEnterpriseConfig::app_slug].
2136    ///
2137    /// # Example
2138    /// ```ignore,no_run
2139    /// # use google_cloud_developerconnect_v1::model::GitHubEnterpriseConfig;
2140    /// let x = GitHubEnterpriseConfig::new().set_app_slug("example");
2141    /// ```
2142    pub fn set_app_slug<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2143        self.app_slug = v.into();
2144        self
2145    }
2146
2147    /// Sets the value of [private_key_secret_version][crate::model::GitHubEnterpriseConfig::private_key_secret_version].
2148    ///
2149    /// # Example
2150    /// ```ignore,no_run
2151    /// # use google_cloud_developerconnect_v1::model::GitHubEnterpriseConfig;
2152    /// let x = GitHubEnterpriseConfig::new().set_private_key_secret_version("example");
2153    /// ```
2154    pub fn set_private_key_secret_version<T: std::convert::Into<std::string::String>>(
2155        mut self,
2156        v: T,
2157    ) -> Self {
2158        self.private_key_secret_version = v.into();
2159        self
2160    }
2161
2162    /// Sets the value of [webhook_secret_secret_version][crate::model::GitHubEnterpriseConfig::webhook_secret_secret_version].
2163    ///
2164    /// # Example
2165    /// ```ignore,no_run
2166    /// # use google_cloud_developerconnect_v1::model::GitHubEnterpriseConfig;
2167    /// let x = GitHubEnterpriseConfig::new().set_webhook_secret_secret_version("example");
2168    /// ```
2169    pub fn set_webhook_secret_secret_version<T: std::convert::Into<std::string::String>>(
2170        mut self,
2171        v: T,
2172    ) -> Self {
2173        self.webhook_secret_secret_version = v.into();
2174        self
2175    }
2176
2177    /// Sets the value of [app_installation_id][crate::model::GitHubEnterpriseConfig::app_installation_id].
2178    ///
2179    /// # Example
2180    /// ```ignore,no_run
2181    /// # use google_cloud_developerconnect_v1::model::GitHubEnterpriseConfig;
2182    /// let x = GitHubEnterpriseConfig::new().set_app_installation_id(42);
2183    /// ```
2184    pub fn set_app_installation_id<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
2185        self.app_installation_id = v.into();
2186        self
2187    }
2188
2189    /// Sets the value of [installation_uri][crate::model::GitHubEnterpriseConfig::installation_uri].
2190    ///
2191    /// # Example
2192    /// ```ignore,no_run
2193    /// # use google_cloud_developerconnect_v1::model::GitHubEnterpriseConfig;
2194    /// let x = GitHubEnterpriseConfig::new().set_installation_uri("example");
2195    /// ```
2196    pub fn set_installation_uri<T: std::convert::Into<std::string::String>>(
2197        mut self,
2198        v: T,
2199    ) -> Self {
2200        self.installation_uri = v.into();
2201        self
2202    }
2203
2204    /// Sets the value of [service_directory_config][crate::model::GitHubEnterpriseConfig::service_directory_config].
2205    ///
2206    /// # Example
2207    /// ```ignore,no_run
2208    /// # use google_cloud_developerconnect_v1::model::GitHubEnterpriseConfig;
2209    /// use google_cloud_developerconnect_v1::model::ServiceDirectoryConfig;
2210    /// let x = GitHubEnterpriseConfig::new().set_service_directory_config(ServiceDirectoryConfig::default()/* use setters */);
2211    /// ```
2212    pub fn set_service_directory_config<T>(mut self, v: T) -> Self
2213    where
2214        T: std::convert::Into<crate::model::ServiceDirectoryConfig>,
2215    {
2216        self.service_directory_config = std::option::Option::Some(v.into());
2217        self
2218    }
2219
2220    /// Sets or clears the value of [service_directory_config][crate::model::GitHubEnterpriseConfig::service_directory_config].
2221    ///
2222    /// # Example
2223    /// ```ignore,no_run
2224    /// # use google_cloud_developerconnect_v1::model::GitHubEnterpriseConfig;
2225    /// use google_cloud_developerconnect_v1::model::ServiceDirectoryConfig;
2226    /// let x = GitHubEnterpriseConfig::new().set_or_clear_service_directory_config(Some(ServiceDirectoryConfig::default()/* use setters */));
2227    /// let x = GitHubEnterpriseConfig::new().set_or_clear_service_directory_config(None::<ServiceDirectoryConfig>);
2228    /// ```
2229    pub fn set_or_clear_service_directory_config<T>(mut self, v: std::option::Option<T>) -> Self
2230    where
2231        T: std::convert::Into<crate::model::ServiceDirectoryConfig>,
2232    {
2233        self.service_directory_config = v.map(|x| x.into());
2234        self
2235    }
2236
2237    /// Sets the value of [server_version][crate::model::GitHubEnterpriseConfig::server_version].
2238    ///
2239    /// # Example
2240    /// ```ignore,no_run
2241    /// # use google_cloud_developerconnect_v1::model::GitHubEnterpriseConfig;
2242    /// let x = GitHubEnterpriseConfig::new().set_server_version("example");
2243    /// ```
2244    pub fn set_server_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2245        self.server_version = v.into();
2246        self
2247    }
2248
2249    /// Sets the value of [ssl_ca_certificate][crate::model::GitHubEnterpriseConfig::ssl_ca_certificate].
2250    ///
2251    /// # Example
2252    /// ```ignore,no_run
2253    /// # use google_cloud_developerconnect_v1::model::GitHubEnterpriseConfig;
2254    /// let x = GitHubEnterpriseConfig::new().set_ssl_ca_certificate("example");
2255    /// ```
2256    pub fn set_ssl_ca_certificate<T: std::convert::Into<std::string::String>>(
2257        mut self,
2258        v: T,
2259    ) -> Self {
2260        self.ssl_ca_certificate = v.into();
2261        self
2262    }
2263
2264    /// Sets the value of [organization][crate::model::GitHubEnterpriseConfig::organization].
2265    ///
2266    /// # Example
2267    /// ```ignore,no_run
2268    /// # use google_cloud_developerconnect_v1::model::GitHubEnterpriseConfig;
2269    /// let x = GitHubEnterpriseConfig::new().set_organization("example");
2270    /// ```
2271    pub fn set_organization<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2272        self.organization = v.into();
2273        self
2274    }
2275}
2276
2277impl wkt::message::Message for GitHubEnterpriseConfig {
2278    fn typename() -> &'static str {
2279        "type.googleapis.com/google.cloud.developerconnect.v1.GitHubEnterpriseConfig"
2280    }
2281}
2282
2283/// ServiceDirectoryConfig represents Service Directory configuration for a
2284/// connection.
2285#[derive(Clone, Default, PartialEq)]
2286#[non_exhaustive]
2287pub struct ServiceDirectoryConfig {
2288    /// Required. The Service Directory service name.
2289    /// Format:
2290    /// projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}.
2291    pub service: std::string::String,
2292
2293    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2294}
2295
2296impl ServiceDirectoryConfig {
2297    /// Creates a new default instance.
2298    pub fn new() -> Self {
2299        std::default::Default::default()
2300    }
2301
2302    /// Sets the value of [service][crate::model::ServiceDirectoryConfig::service].
2303    ///
2304    /// # Example
2305    /// ```ignore,no_run
2306    /// # use google_cloud_developerconnect_v1::model::ServiceDirectoryConfig;
2307    /// let x = ServiceDirectoryConfig::new().set_service("example");
2308    /// ```
2309    pub fn set_service<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2310        self.service = v.into();
2311        self
2312    }
2313}
2314
2315impl wkt::message::Message for ServiceDirectoryConfig {
2316    fn typename() -> &'static str {
2317        "type.googleapis.com/google.cloud.developerconnect.v1.ServiceDirectoryConfig"
2318    }
2319}
2320
2321/// Represents an OAuth token of the account that authorized the Connection,
2322/// and associated metadata.
2323#[derive(Clone, Default, PartialEq)]
2324#[non_exhaustive]
2325pub struct OAuthCredential {
2326    /// Required. A SecretManager resource containing the OAuth token that
2327    /// authorizes the connection. Format: `projects/*/secrets/*/versions/*` or
2328    /// `projects/*/locations/*/secrets/*/versions/*` (if regional secrets are
2329    /// supported in that location).
2330    pub oauth_token_secret_version: std::string::String,
2331
2332    /// Output only. The username associated with this token.
2333    pub username: std::string::String,
2334
2335    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2336}
2337
2338impl OAuthCredential {
2339    /// Creates a new default instance.
2340    pub fn new() -> Self {
2341        std::default::Default::default()
2342    }
2343
2344    /// Sets the value of [oauth_token_secret_version][crate::model::OAuthCredential::oauth_token_secret_version].
2345    ///
2346    /// # Example
2347    /// ```ignore,no_run
2348    /// # use google_cloud_developerconnect_v1::model::OAuthCredential;
2349    /// let x = OAuthCredential::new().set_oauth_token_secret_version("example");
2350    /// ```
2351    pub fn set_oauth_token_secret_version<T: std::convert::Into<std::string::String>>(
2352        mut self,
2353        v: T,
2354    ) -> Self {
2355        self.oauth_token_secret_version = v.into();
2356        self
2357    }
2358
2359    /// Sets the value of [username][crate::model::OAuthCredential::username].
2360    ///
2361    /// # Example
2362    /// ```ignore,no_run
2363    /// # use google_cloud_developerconnect_v1::model::OAuthCredential;
2364    /// let x = OAuthCredential::new().set_username("example");
2365    /// ```
2366    pub fn set_username<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2367        self.username = v.into();
2368        self
2369    }
2370}
2371
2372impl wkt::message::Message for OAuthCredential {
2373    fn typename() -> &'static str {
2374        "type.googleapis.com/google.cloud.developerconnect.v1.OAuthCredential"
2375    }
2376}
2377
2378/// Configuration for connections to gitlab.com.
2379#[derive(Clone, Default, PartialEq)]
2380#[non_exhaustive]
2381pub struct GitLabConfig {
2382    /// Required. Immutable. SecretManager resource containing the webhook secret
2383    /// of a GitLab project, formatted as `projects/*/secrets/*/versions/*` or
2384    /// `projects/*/locations/*/secrets/*/versions/*` (if regional secrets are
2385    /// supported in that location). This is used to validate webhooks.
2386    pub webhook_secret_secret_version: std::string::String,
2387
2388    /// Required. A GitLab personal access token with the minimum `read_api` scope
2389    /// access and a minimum role of `reporter`. The GitLab Projects visible to
2390    /// this Personal Access Token will control which Projects Developer Connect
2391    /// has access to.
2392    pub read_authorizer_credential: std::option::Option<crate::model::UserCredential>,
2393
2394    /// Required. A GitLab personal access token with the minimum `api` scope
2395    /// access and a minimum role of `maintainer`. The GitLab Projects visible to
2396    /// this Personal Access Token will control which Projects Developer Connect
2397    /// has access to.
2398    pub authorizer_credential: std::option::Option<crate::model::UserCredential>,
2399
2400    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2401}
2402
2403impl GitLabConfig {
2404    /// Creates a new default instance.
2405    pub fn new() -> Self {
2406        std::default::Default::default()
2407    }
2408
2409    /// Sets the value of [webhook_secret_secret_version][crate::model::GitLabConfig::webhook_secret_secret_version].
2410    ///
2411    /// # Example
2412    /// ```ignore,no_run
2413    /// # use google_cloud_developerconnect_v1::model::GitLabConfig;
2414    /// let x = GitLabConfig::new().set_webhook_secret_secret_version("example");
2415    /// ```
2416    pub fn set_webhook_secret_secret_version<T: std::convert::Into<std::string::String>>(
2417        mut self,
2418        v: T,
2419    ) -> Self {
2420        self.webhook_secret_secret_version = v.into();
2421        self
2422    }
2423
2424    /// Sets the value of [read_authorizer_credential][crate::model::GitLabConfig::read_authorizer_credential].
2425    ///
2426    /// # Example
2427    /// ```ignore,no_run
2428    /// # use google_cloud_developerconnect_v1::model::GitLabConfig;
2429    /// use google_cloud_developerconnect_v1::model::UserCredential;
2430    /// let x = GitLabConfig::new().set_read_authorizer_credential(UserCredential::default()/* use setters */);
2431    /// ```
2432    pub fn set_read_authorizer_credential<T>(mut self, v: T) -> Self
2433    where
2434        T: std::convert::Into<crate::model::UserCredential>,
2435    {
2436        self.read_authorizer_credential = std::option::Option::Some(v.into());
2437        self
2438    }
2439
2440    /// Sets or clears the value of [read_authorizer_credential][crate::model::GitLabConfig::read_authorizer_credential].
2441    ///
2442    /// # Example
2443    /// ```ignore,no_run
2444    /// # use google_cloud_developerconnect_v1::model::GitLabConfig;
2445    /// use google_cloud_developerconnect_v1::model::UserCredential;
2446    /// let x = GitLabConfig::new().set_or_clear_read_authorizer_credential(Some(UserCredential::default()/* use setters */));
2447    /// let x = GitLabConfig::new().set_or_clear_read_authorizer_credential(None::<UserCredential>);
2448    /// ```
2449    pub fn set_or_clear_read_authorizer_credential<T>(mut self, v: std::option::Option<T>) -> Self
2450    where
2451        T: std::convert::Into<crate::model::UserCredential>,
2452    {
2453        self.read_authorizer_credential = v.map(|x| x.into());
2454        self
2455    }
2456
2457    /// Sets the value of [authorizer_credential][crate::model::GitLabConfig::authorizer_credential].
2458    ///
2459    /// # Example
2460    /// ```ignore,no_run
2461    /// # use google_cloud_developerconnect_v1::model::GitLabConfig;
2462    /// use google_cloud_developerconnect_v1::model::UserCredential;
2463    /// let x = GitLabConfig::new().set_authorizer_credential(UserCredential::default()/* use setters */);
2464    /// ```
2465    pub fn set_authorizer_credential<T>(mut self, v: T) -> Self
2466    where
2467        T: std::convert::Into<crate::model::UserCredential>,
2468    {
2469        self.authorizer_credential = std::option::Option::Some(v.into());
2470        self
2471    }
2472
2473    /// Sets or clears the value of [authorizer_credential][crate::model::GitLabConfig::authorizer_credential].
2474    ///
2475    /// # Example
2476    /// ```ignore,no_run
2477    /// # use google_cloud_developerconnect_v1::model::GitLabConfig;
2478    /// use google_cloud_developerconnect_v1::model::UserCredential;
2479    /// let x = GitLabConfig::new().set_or_clear_authorizer_credential(Some(UserCredential::default()/* use setters */));
2480    /// let x = GitLabConfig::new().set_or_clear_authorizer_credential(None::<UserCredential>);
2481    /// ```
2482    pub fn set_or_clear_authorizer_credential<T>(mut self, v: std::option::Option<T>) -> Self
2483    where
2484        T: std::convert::Into<crate::model::UserCredential>,
2485    {
2486        self.authorizer_credential = v.map(|x| x.into());
2487        self
2488    }
2489}
2490
2491impl wkt::message::Message for GitLabConfig {
2492    fn typename() -> &'static str {
2493        "type.googleapis.com/google.cloud.developerconnect.v1.GitLabConfig"
2494    }
2495}
2496
2497/// Represents a personal access token that authorized the Connection,
2498/// and associated metadata.
2499#[derive(Clone, Default, PartialEq)]
2500#[non_exhaustive]
2501pub struct UserCredential {
2502    /// Required. A SecretManager resource containing the user token that
2503    /// authorizes the Developer Connect connection. Format:
2504    /// `projects/*/secrets/*/versions/*` or
2505    /// `projects/*/locations/*/secrets/*/versions/*` (if regional secrets are
2506    /// supported in that location).
2507    pub user_token_secret_version: std::string::String,
2508
2509    /// Output only. The username associated with this token.
2510    pub username: std::string::String,
2511
2512    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2513}
2514
2515impl UserCredential {
2516    /// Creates a new default instance.
2517    pub fn new() -> Self {
2518        std::default::Default::default()
2519    }
2520
2521    /// Sets the value of [user_token_secret_version][crate::model::UserCredential::user_token_secret_version].
2522    ///
2523    /// # Example
2524    /// ```ignore,no_run
2525    /// # use google_cloud_developerconnect_v1::model::UserCredential;
2526    /// let x = UserCredential::new().set_user_token_secret_version("example");
2527    /// ```
2528    pub fn set_user_token_secret_version<T: std::convert::Into<std::string::String>>(
2529        mut self,
2530        v: T,
2531    ) -> Self {
2532        self.user_token_secret_version = v.into();
2533        self
2534    }
2535
2536    /// Sets the value of [username][crate::model::UserCredential::username].
2537    ///
2538    /// # Example
2539    /// ```ignore,no_run
2540    /// # use google_cloud_developerconnect_v1::model::UserCredential;
2541    /// let x = UserCredential::new().set_username("example");
2542    /// ```
2543    pub fn set_username<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2544        self.username = v.into();
2545        self
2546    }
2547}
2548
2549impl wkt::message::Message for UserCredential {
2550    fn typename() -> &'static str {
2551        "type.googleapis.com/google.cloud.developerconnect.v1.UserCredential"
2552    }
2553}
2554
2555/// Configuration for connections to an instance of GitLab Enterprise.
2556#[derive(Clone, Default, PartialEq)]
2557#[non_exhaustive]
2558pub struct GitLabEnterpriseConfig {
2559    /// Required. The URI of the GitLab Enterprise host this connection is for.
2560    pub host_uri: std::string::String,
2561
2562    /// Required. Immutable. SecretManager resource containing the webhook secret
2563    /// of a GitLab project, formatted as `projects/*/secrets/*/versions/*` or
2564    /// `projects/*/locations/*/secrets/*/versions/*` (if regional secrets are
2565    /// supported in that location). This is used to validate webhooks.
2566    pub webhook_secret_secret_version: std::string::String,
2567
2568    /// Required. A GitLab personal access token with the minimum `read_api` scope
2569    /// access and a minimum role of `reporter`. The GitLab Projects visible to
2570    /// this Personal Access Token will control which Projects Developer Connect
2571    /// has access to.
2572    pub read_authorizer_credential: std::option::Option<crate::model::UserCredential>,
2573
2574    /// Required. A GitLab personal access token with the minimum `api` scope
2575    /// access and a minimum role of `maintainer`. The GitLab Projects visible to
2576    /// this Personal Access Token will control which Projects Developer Connect
2577    /// has access to.
2578    pub authorizer_credential: std::option::Option<crate::model::UserCredential>,
2579
2580    /// Optional. Configuration for using Service Directory to privately connect to
2581    /// a GitLab Enterprise instance. This should only be set if the GitLab
2582    /// Enterprise server is hosted on-premises and not reachable by public
2583    /// internet. If this field is left empty, calls to the GitLab Enterprise
2584    /// server will be made over the public internet.
2585    pub service_directory_config: std::option::Option<crate::model::ServiceDirectoryConfig>,
2586
2587    /// Optional. SSL Certificate Authority certificate to use for requests to
2588    /// GitLab Enterprise instance.
2589    pub ssl_ca_certificate: std::string::String,
2590
2591    /// Output only. Version of the GitLab Enterprise server running on the
2592    /// `host_uri`.
2593    pub server_version: std::string::String,
2594
2595    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2596}
2597
2598impl GitLabEnterpriseConfig {
2599    /// Creates a new default instance.
2600    pub fn new() -> Self {
2601        std::default::Default::default()
2602    }
2603
2604    /// Sets the value of [host_uri][crate::model::GitLabEnterpriseConfig::host_uri].
2605    ///
2606    /// # Example
2607    /// ```ignore,no_run
2608    /// # use google_cloud_developerconnect_v1::model::GitLabEnterpriseConfig;
2609    /// let x = GitLabEnterpriseConfig::new().set_host_uri("example");
2610    /// ```
2611    pub fn set_host_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2612        self.host_uri = v.into();
2613        self
2614    }
2615
2616    /// Sets the value of [webhook_secret_secret_version][crate::model::GitLabEnterpriseConfig::webhook_secret_secret_version].
2617    ///
2618    /// # Example
2619    /// ```ignore,no_run
2620    /// # use google_cloud_developerconnect_v1::model::GitLabEnterpriseConfig;
2621    /// let x = GitLabEnterpriseConfig::new().set_webhook_secret_secret_version("example");
2622    /// ```
2623    pub fn set_webhook_secret_secret_version<T: std::convert::Into<std::string::String>>(
2624        mut self,
2625        v: T,
2626    ) -> Self {
2627        self.webhook_secret_secret_version = v.into();
2628        self
2629    }
2630
2631    /// Sets the value of [read_authorizer_credential][crate::model::GitLabEnterpriseConfig::read_authorizer_credential].
2632    ///
2633    /// # Example
2634    /// ```ignore,no_run
2635    /// # use google_cloud_developerconnect_v1::model::GitLabEnterpriseConfig;
2636    /// use google_cloud_developerconnect_v1::model::UserCredential;
2637    /// let x = GitLabEnterpriseConfig::new().set_read_authorizer_credential(UserCredential::default()/* use setters */);
2638    /// ```
2639    pub fn set_read_authorizer_credential<T>(mut self, v: T) -> Self
2640    where
2641        T: std::convert::Into<crate::model::UserCredential>,
2642    {
2643        self.read_authorizer_credential = std::option::Option::Some(v.into());
2644        self
2645    }
2646
2647    /// Sets or clears the value of [read_authorizer_credential][crate::model::GitLabEnterpriseConfig::read_authorizer_credential].
2648    ///
2649    /// # Example
2650    /// ```ignore,no_run
2651    /// # use google_cloud_developerconnect_v1::model::GitLabEnterpriseConfig;
2652    /// use google_cloud_developerconnect_v1::model::UserCredential;
2653    /// let x = GitLabEnterpriseConfig::new().set_or_clear_read_authorizer_credential(Some(UserCredential::default()/* use setters */));
2654    /// let x = GitLabEnterpriseConfig::new().set_or_clear_read_authorizer_credential(None::<UserCredential>);
2655    /// ```
2656    pub fn set_or_clear_read_authorizer_credential<T>(mut self, v: std::option::Option<T>) -> Self
2657    where
2658        T: std::convert::Into<crate::model::UserCredential>,
2659    {
2660        self.read_authorizer_credential = v.map(|x| x.into());
2661        self
2662    }
2663
2664    /// Sets the value of [authorizer_credential][crate::model::GitLabEnterpriseConfig::authorizer_credential].
2665    ///
2666    /// # Example
2667    /// ```ignore,no_run
2668    /// # use google_cloud_developerconnect_v1::model::GitLabEnterpriseConfig;
2669    /// use google_cloud_developerconnect_v1::model::UserCredential;
2670    /// let x = GitLabEnterpriseConfig::new().set_authorizer_credential(UserCredential::default()/* use setters */);
2671    /// ```
2672    pub fn set_authorizer_credential<T>(mut self, v: T) -> Self
2673    where
2674        T: std::convert::Into<crate::model::UserCredential>,
2675    {
2676        self.authorizer_credential = std::option::Option::Some(v.into());
2677        self
2678    }
2679
2680    /// Sets or clears the value of [authorizer_credential][crate::model::GitLabEnterpriseConfig::authorizer_credential].
2681    ///
2682    /// # Example
2683    /// ```ignore,no_run
2684    /// # use google_cloud_developerconnect_v1::model::GitLabEnterpriseConfig;
2685    /// use google_cloud_developerconnect_v1::model::UserCredential;
2686    /// let x = GitLabEnterpriseConfig::new().set_or_clear_authorizer_credential(Some(UserCredential::default()/* use setters */));
2687    /// let x = GitLabEnterpriseConfig::new().set_or_clear_authorizer_credential(None::<UserCredential>);
2688    /// ```
2689    pub fn set_or_clear_authorizer_credential<T>(mut self, v: std::option::Option<T>) -> Self
2690    where
2691        T: std::convert::Into<crate::model::UserCredential>,
2692    {
2693        self.authorizer_credential = v.map(|x| x.into());
2694        self
2695    }
2696
2697    /// Sets the value of [service_directory_config][crate::model::GitLabEnterpriseConfig::service_directory_config].
2698    ///
2699    /// # Example
2700    /// ```ignore,no_run
2701    /// # use google_cloud_developerconnect_v1::model::GitLabEnterpriseConfig;
2702    /// use google_cloud_developerconnect_v1::model::ServiceDirectoryConfig;
2703    /// let x = GitLabEnterpriseConfig::new().set_service_directory_config(ServiceDirectoryConfig::default()/* use setters */);
2704    /// ```
2705    pub fn set_service_directory_config<T>(mut self, v: T) -> Self
2706    where
2707        T: std::convert::Into<crate::model::ServiceDirectoryConfig>,
2708    {
2709        self.service_directory_config = std::option::Option::Some(v.into());
2710        self
2711    }
2712
2713    /// Sets or clears the value of [service_directory_config][crate::model::GitLabEnterpriseConfig::service_directory_config].
2714    ///
2715    /// # Example
2716    /// ```ignore,no_run
2717    /// # use google_cloud_developerconnect_v1::model::GitLabEnterpriseConfig;
2718    /// use google_cloud_developerconnect_v1::model::ServiceDirectoryConfig;
2719    /// let x = GitLabEnterpriseConfig::new().set_or_clear_service_directory_config(Some(ServiceDirectoryConfig::default()/* use setters */));
2720    /// let x = GitLabEnterpriseConfig::new().set_or_clear_service_directory_config(None::<ServiceDirectoryConfig>);
2721    /// ```
2722    pub fn set_or_clear_service_directory_config<T>(mut self, v: std::option::Option<T>) -> Self
2723    where
2724        T: std::convert::Into<crate::model::ServiceDirectoryConfig>,
2725    {
2726        self.service_directory_config = v.map(|x| x.into());
2727        self
2728    }
2729
2730    /// Sets the value of [ssl_ca_certificate][crate::model::GitLabEnterpriseConfig::ssl_ca_certificate].
2731    ///
2732    /// # Example
2733    /// ```ignore,no_run
2734    /// # use google_cloud_developerconnect_v1::model::GitLabEnterpriseConfig;
2735    /// let x = GitLabEnterpriseConfig::new().set_ssl_ca_certificate("example");
2736    /// ```
2737    pub fn set_ssl_ca_certificate<T: std::convert::Into<std::string::String>>(
2738        mut self,
2739        v: T,
2740    ) -> Self {
2741        self.ssl_ca_certificate = v.into();
2742        self
2743    }
2744
2745    /// Sets the value of [server_version][crate::model::GitLabEnterpriseConfig::server_version].
2746    ///
2747    /// # Example
2748    /// ```ignore,no_run
2749    /// # use google_cloud_developerconnect_v1::model::GitLabEnterpriseConfig;
2750    /// let x = GitLabEnterpriseConfig::new().set_server_version("example");
2751    /// ```
2752    pub fn set_server_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2753        self.server_version = v.into();
2754        self
2755    }
2756}
2757
2758impl wkt::message::Message for GitLabEnterpriseConfig {
2759    fn typename() -> &'static str {
2760        "type.googleapis.com/google.cloud.developerconnect.v1.GitLabEnterpriseConfig"
2761    }
2762}
2763
2764/// Configuration for connections to an instance of Bitbucket Data Center.
2765#[derive(Clone, Default, PartialEq)]
2766#[non_exhaustive]
2767pub struct BitbucketDataCenterConfig {
2768    /// Required. The URI of the Bitbucket Data Center host this connection is for.
2769    pub host_uri: std::string::String,
2770
2771    /// Required. Immutable. SecretManager resource containing the webhook secret
2772    /// used to verify webhook events, formatted as
2773    /// `projects/*/secrets/*/versions/*` or
2774    /// `projects/*/locations/*/secrets/*/versions/*` (if regional secrets are
2775    /// supported in that location). This is used to validate webhooks.
2776    pub webhook_secret_secret_version: std::string::String,
2777
2778    /// Required. An http access token with the minimum `Repository read` access.
2779    /// It's recommended to use a system account to generate the credentials.
2780    pub read_authorizer_credential: std::option::Option<crate::model::UserCredential>,
2781
2782    /// Required. An http access token with the minimum `Repository admin` scope
2783    /// access. This is needed to create webhooks. It's recommended to use a system
2784    /// account to generate these credentials.
2785    pub authorizer_credential: std::option::Option<crate::model::UserCredential>,
2786
2787    /// Optional. Configuration for using Service Directory to privately connect to
2788    /// a Bitbucket Data Center instance. This should only be set if the Bitbucket
2789    /// Data Center is hosted on-premises and not reachable by public internet. If
2790    /// this field is left empty, calls to the Bitbucket Data Center will be made
2791    /// over the public internet.
2792    pub service_directory_config: std::option::Option<crate::model::ServiceDirectoryConfig>,
2793
2794    /// Optional. SSL certificate authority to trust when making requests to
2795    /// Bitbucket Data Center.
2796    pub ssl_ca_certificate: std::string::String,
2797
2798    /// Output only. Version of the Bitbucket Data Center server running on the
2799    /// `host_uri`.
2800    pub server_version: std::string::String,
2801
2802    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2803}
2804
2805impl BitbucketDataCenterConfig {
2806    /// Creates a new default instance.
2807    pub fn new() -> Self {
2808        std::default::Default::default()
2809    }
2810
2811    /// Sets the value of [host_uri][crate::model::BitbucketDataCenterConfig::host_uri].
2812    ///
2813    /// # Example
2814    /// ```ignore,no_run
2815    /// # use google_cloud_developerconnect_v1::model::BitbucketDataCenterConfig;
2816    /// let x = BitbucketDataCenterConfig::new().set_host_uri("example");
2817    /// ```
2818    pub fn set_host_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2819        self.host_uri = v.into();
2820        self
2821    }
2822
2823    /// Sets the value of [webhook_secret_secret_version][crate::model::BitbucketDataCenterConfig::webhook_secret_secret_version].
2824    ///
2825    /// # Example
2826    /// ```ignore,no_run
2827    /// # use google_cloud_developerconnect_v1::model::BitbucketDataCenterConfig;
2828    /// let x = BitbucketDataCenterConfig::new().set_webhook_secret_secret_version("example");
2829    /// ```
2830    pub fn set_webhook_secret_secret_version<T: std::convert::Into<std::string::String>>(
2831        mut self,
2832        v: T,
2833    ) -> Self {
2834        self.webhook_secret_secret_version = v.into();
2835        self
2836    }
2837
2838    /// Sets the value of [read_authorizer_credential][crate::model::BitbucketDataCenterConfig::read_authorizer_credential].
2839    ///
2840    /// # Example
2841    /// ```ignore,no_run
2842    /// # use google_cloud_developerconnect_v1::model::BitbucketDataCenterConfig;
2843    /// use google_cloud_developerconnect_v1::model::UserCredential;
2844    /// let x = BitbucketDataCenterConfig::new().set_read_authorizer_credential(UserCredential::default()/* use setters */);
2845    /// ```
2846    pub fn set_read_authorizer_credential<T>(mut self, v: T) -> Self
2847    where
2848        T: std::convert::Into<crate::model::UserCredential>,
2849    {
2850        self.read_authorizer_credential = std::option::Option::Some(v.into());
2851        self
2852    }
2853
2854    /// Sets or clears the value of [read_authorizer_credential][crate::model::BitbucketDataCenterConfig::read_authorizer_credential].
2855    ///
2856    /// # Example
2857    /// ```ignore,no_run
2858    /// # use google_cloud_developerconnect_v1::model::BitbucketDataCenterConfig;
2859    /// use google_cloud_developerconnect_v1::model::UserCredential;
2860    /// let x = BitbucketDataCenterConfig::new().set_or_clear_read_authorizer_credential(Some(UserCredential::default()/* use setters */));
2861    /// let x = BitbucketDataCenterConfig::new().set_or_clear_read_authorizer_credential(None::<UserCredential>);
2862    /// ```
2863    pub fn set_or_clear_read_authorizer_credential<T>(mut self, v: std::option::Option<T>) -> Self
2864    where
2865        T: std::convert::Into<crate::model::UserCredential>,
2866    {
2867        self.read_authorizer_credential = v.map(|x| x.into());
2868        self
2869    }
2870
2871    /// Sets the value of [authorizer_credential][crate::model::BitbucketDataCenterConfig::authorizer_credential].
2872    ///
2873    /// # Example
2874    /// ```ignore,no_run
2875    /// # use google_cloud_developerconnect_v1::model::BitbucketDataCenterConfig;
2876    /// use google_cloud_developerconnect_v1::model::UserCredential;
2877    /// let x = BitbucketDataCenterConfig::new().set_authorizer_credential(UserCredential::default()/* use setters */);
2878    /// ```
2879    pub fn set_authorizer_credential<T>(mut self, v: T) -> Self
2880    where
2881        T: std::convert::Into<crate::model::UserCredential>,
2882    {
2883        self.authorizer_credential = std::option::Option::Some(v.into());
2884        self
2885    }
2886
2887    /// Sets or clears the value of [authorizer_credential][crate::model::BitbucketDataCenterConfig::authorizer_credential].
2888    ///
2889    /// # Example
2890    /// ```ignore,no_run
2891    /// # use google_cloud_developerconnect_v1::model::BitbucketDataCenterConfig;
2892    /// use google_cloud_developerconnect_v1::model::UserCredential;
2893    /// let x = BitbucketDataCenterConfig::new().set_or_clear_authorizer_credential(Some(UserCredential::default()/* use setters */));
2894    /// let x = BitbucketDataCenterConfig::new().set_or_clear_authorizer_credential(None::<UserCredential>);
2895    /// ```
2896    pub fn set_or_clear_authorizer_credential<T>(mut self, v: std::option::Option<T>) -> Self
2897    where
2898        T: std::convert::Into<crate::model::UserCredential>,
2899    {
2900        self.authorizer_credential = v.map(|x| x.into());
2901        self
2902    }
2903
2904    /// Sets the value of [service_directory_config][crate::model::BitbucketDataCenterConfig::service_directory_config].
2905    ///
2906    /// # Example
2907    /// ```ignore,no_run
2908    /// # use google_cloud_developerconnect_v1::model::BitbucketDataCenterConfig;
2909    /// use google_cloud_developerconnect_v1::model::ServiceDirectoryConfig;
2910    /// let x = BitbucketDataCenterConfig::new().set_service_directory_config(ServiceDirectoryConfig::default()/* use setters */);
2911    /// ```
2912    pub fn set_service_directory_config<T>(mut self, v: T) -> Self
2913    where
2914        T: std::convert::Into<crate::model::ServiceDirectoryConfig>,
2915    {
2916        self.service_directory_config = std::option::Option::Some(v.into());
2917        self
2918    }
2919
2920    /// Sets or clears the value of [service_directory_config][crate::model::BitbucketDataCenterConfig::service_directory_config].
2921    ///
2922    /// # Example
2923    /// ```ignore,no_run
2924    /// # use google_cloud_developerconnect_v1::model::BitbucketDataCenterConfig;
2925    /// use google_cloud_developerconnect_v1::model::ServiceDirectoryConfig;
2926    /// let x = BitbucketDataCenterConfig::new().set_or_clear_service_directory_config(Some(ServiceDirectoryConfig::default()/* use setters */));
2927    /// let x = BitbucketDataCenterConfig::new().set_or_clear_service_directory_config(None::<ServiceDirectoryConfig>);
2928    /// ```
2929    pub fn set_or_clear_service_directory_config<T>(mut self, v: std::option::Option<T>) -> Self
2930    where
2931        T: std::convert::Into<crate::model::ServiceDirectoryConfig>,
2932    {
2933        self.service_directory_config = v.map(|x| x.into());
2934        self
2935    }
2936
2937    /// Sets the value of [ssl_ca_certificate][crate::model::BitbucketDataCenterConfig::ssl_ca_certificate].
2938    ///
2939    /// # Example
2940    /// ```ignore,no_run
2941    /// # use google_cloud_developerconnect_v1::model::BitbucketDataCenterConfig;
2942    /// let x = BitbucketDataCenterConfig::new().set_ssl_ca_certificate("example");
2943    /// ```
2944    pub fn set_ssl_ca_certificate<T: std::convert::Into<std::string::String>>(
2945        mut self,
2946        v: T,
2947    ) -> Self {
2948        self.ssl_ca_certificate = v.into();
2949        self
2950    }
2951
2952    /// Sets the value of [server_version][crate::model::BitbucketDataCenterConfig::server_version].
2953    ///
2954    /// # Example
2955    /// ```ignore,no_run
2956    /// # use google_cloud_developerconnect_v1::model::BitbucketDataCenterConfig;
2957    /// let x = BitbucketDataCenterConfig::new().set_server_version("example");
2958    /// ```
2959    pub fn set_server_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2960        self.server_version = v.into();
2961        self
2962    }
2963}
2964
2965impl wkt::message::Message for BitbucketDataCenterConfig {
2966    fn typename() -> &'static str {
2967        "type.googleapis.com/google.cloud.developerconnect.v1.BitbucketDataCenterConfig"
2968    }
2969}
2970
2971/// Configuration for connections to an instance of Bitbucket Cloud.
2972#[derive(Clone, Default, PartialEq)]
2973#[non_exhaustive]
2974pub struct BitbucketCloudConfig {
2975    /// Required. The Bitbucket Cloud Workspace ID to be connected to Google Cloud
2976    /// Platform.
2977    pub workspace: std::string::String,
2978
2979    /// Required. Immutable. SecretManager resource containing the webhook secret
2980    /// used to verify webhook events, formatted as
2981    /// `projects/*/secrets/*/versions/*` or
2982    /// `projects/*/locations/*/secrets/*/versions/*` (if regional secrets are
2983    /// supported in that location). This is used to validate and create webhooks.
2984    pub webhook_secret_secret_version: std::string::String,
2985
2986    /// Required. An access token with the minimum `repository` access.
2987    /// It can either be a workspace, project or repository access token.
2988    /// It's recommended to use a system account to generate the credentials.
2989    pub read_authorizer_credential: std::option::Option<crate::model::UserCredential>,
2990
2991    /// Required. An access token with the minimum `repository`, `pullrequest` and
2992    /// `webhook` scope access. It can either be a workspace, project or repository
2993    /// access token. This is needed to create webhooks. It's recommended to use a
2994    /// system account to generate these credentials.
2995    pub authorizer_credential: std::option::Option<crate::model::UserCredential>,
2996
2997    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2998}
2999
3000impl BitbucketCloudConfig {
3001    /// Creates a new default instance.
3002    pub fn new() -> Self {
3003        std::default::Default::default()
3004    }
3005
3006    /// Sets the value of [workspace][crate::model::BitbucketCloudConfig::workspace].
3007    ///
3008    /// # Example
3009    /// ```ignore,no_run
3010    /// # use google_cloud_developerconnect_v1::model::BitbucketCloudConfig;
3011    /// let x = BitbucketCloudConfig::new().set_workspace("example");
3012    /// ```
3013    pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3014        self.workspace = v.into();
3015        self
3016    }
3017
3018    /// Sets the value of [webhook_secret_secret_version][crate::model::BitbucketCloudConfig::webhook_secret_secret_version].
3019    ///
3020    /// # Example
3021    /// ```ignore,no_run
3022    /// # use google_cloud_developerconnect_v1::model::BitbucketCloudConfig;
3023    /// let x = BitbucketCloudConfig::new().set_webhook_secret_secret_version("example");
3024    /// ```
3025    pub fn set_webhook_secret_secret_version<T: std::convert::Into<std::string::String>>(
3026        mut self,
3027        v: T,
3028    ) -> Self {
3029        self.webhook_secret_secret_version = v.into();
3030        self
3031    }
3032
3033    /// Sets the value of [read_authorizer_credential][crate::model::BitbucketCloudConfig::read_authorizer_credential].
3034    ///
3035    /// # Example
3036    /// ```ignore,no_run
3037    /// # use google_cloud_developerconnect_v1::model::BitbucketCloudConfig;
3038    /// use google_cloud_developerconnect_v1::model::UserCredential;
3039    /// let x = BitbucketCloudConfig::new().set_read_authorizer_credential(UserCredential::default()/* use setters */);
3040    /// ```
3041    pub fn set_read_authorizer_credential<T>(mut self, v: T) -> Self
3042    where
3043        T: std::convert::Into<crate::model::UserCredential>,
3044    {
3045        self.read_authorizer_credential = std::option::Option::Some(v.into());
3046        self
3047    }
3048
3049    /// Sets or clears the value of [read_authorizer_credential][crate::model::BitbucketCloudConfig::read_authorizer_credential].
3050    ///
3051    /// # Example
3052    /// ```ignore,no_run
3053    /// # use google_cloud_developerconnect_v1::model::BitbucketCloudConfig;
3054    /// use google_cloud_developerconnect_v1::model::UserCredential;
3055    /// let x = BitbucketCloudConfig::new().set_or_clear_read_authorizer_credential(Some(UserCredential::default()/* use setters */));
3056    /// let x = BitbucketCloudConfig::new().set_or_clear_read_authorizer_credential(None::<UserCredential>);
3057    /// ```
3058    pub fn set_or_clear_read_authorizer_credential<T>(mut self, v: std::option::Option<T>) -> Self
3059    where
3060        T: std::convert::Into<crate::model::UserCredential>,
3061    {
3062        self.read_authorizer_credential = v.map(|x| x.into());
3063        self
3064    }
3065
3066    /// Sets the value of [authorizer_credential][crate::model::BitbucketCloudConfig::authorizer_credential].
3067    ///
3068    /// # Example
3069    /// ```ignore,no_run
3070    /// # use google_cloud_developerconnect_v1::model::BitbucketCloudConfig;
3071    /// use google_cloud_developerconnect_v1::model::UserCredential;
3072    /// let x = BitbucketCloudConfig::new().set_authorizer_credential(UserCredential::default()/* use setters */);
3073    /// ```
3074    pub fn set_authorizer_credential<T>(mut self, v: T) -> Self
3075    where
3076        T: std::convert::Into<crate::model::UserCredential>,
3077    {
3078        self.authorizer_credential = std::option::Option::Some(v.into());
3079        self
3080    }
3081
3082    /// Sets or clears the value of [authorizer_credential][crate::model::BitbucketCloudConfig::authorizer_credential].
3083    ///
3084    /// # Example
3085    /// ```ignore,no_run
3086    /// # use google_cloud_developerconnect_v1::model::BitbucketCloudConfig;
3087    /// use google_cloud_developerconnect_v1::model::UserCredential;
3088    /// let x = BitbucketCloudConfig::new().set_or_clear_authorizer_credential(Some(UserCredential::default()/* use setters */));
3089    /// let x = BitbucketCloudConfig::new().set_or_clear_authorizer_credential(None::<UserCredential>);
3090    /// ```
3091    pub fn set_or_clear_authorizer_credential<T>(mut self, v: std::option::Option<T>) -> Self
3092    where
3093        T: std::convert::Into<crate::model::UserCredential>,
3094    {
3095        self.authorizer_credential = v.map(|x| x.into());
3096        self
3097    }
3098}
3099
3100impl wkt::message::Message for BitbucketCloudConfig {
3101    fn typename() -> &'static str {
3102        "type.googleapis.com/google.cloud.developerconnect.v1.BitbucketCloudConfig"
3103    }
3104}
3105
3106/// Configuration for connections to Secure Source Manager instance
3107#[derive(Clone, Default, PartialEq)]
3108#[non_exhaustive]
3109pub struct SecureSourceManagerInstanceConfig {
3110    /// Required. Immutable. Secure Source Manager instance resource, formatted as
3111    /// `projects/*/locations/*/instances/*`
3112    pub instance: std::string::String,
3113
3114    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3115}
3116
3117impl SecureSourceManagerInstanceConfig {
3118    /// Creates a new default instance.
3119    pub fn new() -> Self {
3120        std::default::Default::default()
3121    }
3122
3123    /// Sets the value of [instance][crate::model::SecureSourceManagerInstanceConfig::instance].
3124    ///
3125    /// # Example
3126    /// ```ignore,no_run
3127    /// # use google_cloud_developerconnect_v1::model::SecureSourceManagerInstanceConfig;
3128    /// let x = SecureSourceManagerInstanceConfig::new().set_instance("example");
3129    /// ```
3130    pub fn set_instance<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3131        self.instance = v.into();
3132        self
3133    }
3134}
3135
3136impl wkt::message::Message for SecureSourceManagerInstanceConfig {
3137    fn typename() -> &'static str {
3138        "type.googleapis.com/google.cloud.developerconnect.v1.SecureSourceManagerInstanceConfig"
3139    }
3140}
3141
3142/// Message for requesting list of Connections
3143#[derive(Clone, Default, PartialEq)]
3144#[non_exhaustive]
3145pub struct ListConnectionsRequest {
3146    /// Required. Parent value for ListConnectionsRequest
3147    pub parent: std::string::String,
3148
3149    /// Optional. Requested page size. Server may return fewer items than
3150    /// requested. If unspecified, server will pick an appropriate default.
3151    pub page_size: i32,
3152
3153    /// Optional. A token identifying a page of results the server should return.
3154    pub page_token: std::string::String,
3155
3156    /// Optional. Filtering results
3157    pub filter: std::string::String,
3158
3159    /// Optional. Hint for how to order the results
3160    pub order_by: std::string::String,
3161
3162    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3163}
3164
3165impl ListConnectionsRequest {
3166    /// Creates a new default instance.
3167    pub fn new() -> Self {
3168        std::default::Default::default()
3169    }
3170
3171    /// Sets the value of [parent][crate::model::ListConnectionsRequest::parent].
3172    ///
3173    /// # Example
3174    /// ```ignore,no_run
3175    /// # use google_cloud_developerconnect_v1::model::ListConnectionsRequest;
3176    /// let x = ListConnectionsRequest::new().set_parent("example");
3177    /// ```
3178    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3179        self.parent = v.into();
3180        self
3181    }
3182
3183    /// Sets the value of [page_size][crate::model::ListConnectionsRequest::page_size].
3184    ///
3185    /// # Example
3186    /// ```ignore,no_run
3187    /// # use google_cloud_developerconnect_v1::model::ListConnectionsRequest;
3188    /// let x = ListConnectionsRequest::new().set_page_size(42);
3189    /// ```
3190    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3191        self.page_size = v.into();
3192        self
3193    }
3194
3195    /// Sets the value of [page_token][crate::model::ListConnectionsRequest::page_token].
3196    ///
3197    /// # Example
3198    /// ```ignore,no_run
3199    /// # use google_cloud_developerconnect_v1::model::ListConnectionsRequest;
3200    /// let x = ListConnectionsRequest::new().set_page_token("example");
3201    /// ```
3202    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3203        self.page_token = v.into();
3204        self
3205    }
3206
3207    /// Sets the value of [filter][crate::model::ListConnectionsRequest::filter].
3208    ///
3209    /// # Example
3210    /// ```ignore,no_run
3211    /// # use google_cloud_developerconnect_v1::model::ListConnectionsRequest;
3212    /// let x = ListConnectionsRequest::new().set_filter("example");
3213    /// ```
3214    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3215        self.filter = v.into();
3216        self
3217    }
3218
3219    /// Sets the value of [order_by][crate::model::ListConnectionsRequest::order_by].
3220    ///
3221    /// # Example
3222    /// ```ignore,no_run
3223    /// # use google_cloud_developerconnect_v1::model::ListConnectionsRequest;
3224    /// let x = ListConnectionsRequest::new().set_order_by("example");
3225    /// ```
3226    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3227        self.order_by = v.into();
3228        self
3229    }
3230}
3231
3232impl wkt::message::Message for ListConnectionsRequest {
3233    fn typename() -> &'static str {
3234        "type.googleapis.com/google.cloud.developerconnect.v1.ListConnectionsRequest"
3235    }
3236}
3237
3238/// Message for response to listing Connections
3239#[derive(Clone, Default, PartialEq)]
3240#[non_exhaustive]
3241pub struct ListConnectionsResponse {
3242    /// The list of Connection
3243    pub connections: std::vec::Vec<crate::model::Connection>,
3244
3245    /// A token identifying a page of results the server should return.
3246    pub next_page_token: std::string::String,
3247
3248    /// Locations that could not be reached.
3249    pub unreachable: std::vec::Vec<std::string::String>,
3250
3251    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3252}
3253
3254impl ListConnectionsResponse {
3255    /// Creates a new default instance.
3256    pub fn new() -> Self {
3257        std::default::Default::default()
3258    }
3259
3260    /// Sets the value of [connections][crate::model::ListConnectionsResponse::connections].
3261    ///
3262    /// # Example
3263    /// ```ignore,no_run
3264    /// # use google_cloud_developerconnect_v1::model::ListConnectionsResponse;
3265    /// use google_cloud_developerconnect_v1::model::Connection;
3266    /// let x = ListConnectionsResponse::new()
3267    ///     .set_connections([
3268    ///         Connection::default()/* use setters */,
3269    ///         Connection::default()/* use (different) setters */,
3270    ///     ]);
3271    /// ```
3272    pub fn set_connections<T, V>(mut self, v: T) -> Self
3273    where
3274        T: std::iter::IntoIterator<Item = V>,
3275        V: std::convert::Into<crate::model::Connection>,
3276    {
3277        use std::iter::Iterator;
3278        self.connections = v.into_iter().map(|i| i.into()).collect();
3279        self
3280    }
3281
3282    /// Sets the value of [next_page_token][crate::model::ListConnectionsResponse::next_page_token].
3283    ///
3284    /// # Example
3285    /// ```ignore,no_run
3286    /// # use google_cloud_developerconnect_v1::model::ListConnectionsResponse;
3287    /// let x = ListConnectionsResponse::new().set_next_page_token("example");
3288    /// ```
3289    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3290        self.next_page_token = v.into();
3291        self
3292    }
3293
3294    /// Sets the value of [unreachable][crate::model::ListConnectionsResponse::unreachable].
3295    ///
3296    /// # Example
3297    /// ```ignore,no_run
3298    /// # use google_cloud_developerconnect_v1::model::ListConnectionsResponse;
3299    /// let x = ListConnectionsResponse::new().set_unreachable(["a", "b", "c"]);
3300    /// ```
3301    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
3302    where
3303        T: std::iter::IntoIterator<Item = V>,
3304        V: std::convert::Into<std::string::String>,
3305    {
3306        use std::iter::Iterator;
3307        self.unreachable = v.into_iter().map(|i| i.into()).collect();
3308        self
3309    }
3310}
3311
3312impl wkt::message::Message for ListConnectionsResponse {
3313    fn typename() -> &'static str {
3314        "type.googleapis.com/google.cloud.developerconnect.v1.ListConnectionsResponse"
3315    }
3316}
3317
3318#[doc(hidden)]
3319impl google_cloud_gax::paginator::internal::PageableResponse for ListConnectionsResponse {
3320    type PageItem = crate::model::Connection;
3321
3322    fn items(self) -> std::vec::Vec<Self::PageItem> {
3323        self.connections
3324    }
3325
3326    fn next_page_token(&self) -> std::string::String {
3327        use std::clone::Clone;
3328        self.next_page_token.clone()
3329    }
3330}
3331
3332/// Message for getting a Connection
3333#[derive(Clone, Default, PartialEq)]
3334#[non_exhaustive]
3335pub struct GetConnectionRequest {
3336    /// Required. Name of the resource
3337    pub name: std::string::String,
3338
3339    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3340}
3341
3342impl GetConnectionRequest {
3343    /// Creates a new default instance.
3344    pub fn new() -> Self {
3345        std::default::Default::default()
3346    }
3347
3348    /// Sets the value of [name][crate::model::GetConnectionRequest::name].
3349    ///
3350    /// # Example
3351    /// ```ignore,no_run
3352    /// # use google_cloud_developerconnect_v1::model::GetConnectionRequest;
3353    /// let x = GetConnectionRequest::new().set_name("example");
3354    /// ```
3355    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3356        self.name = v.into();
3357        self
3358    }
3359}
3360
3361impl wkt::message::Message for GetConnectionRequest {
3362    fn typename() -> &'static str {
3363        "type.googleapis.com/google.cloud.developerconnect.v1.GetConnectionRequest"
3364    }
3365}
3366
3367/// Message for creating a Connection
3368#[derive(Clone, Default, PartialEq)]
3369#[non_exhaustive]
3370pub struct CreateConnectionRequest {
3371    /// Required. Value for parent.
3372    pub parent: std::string::String,
3373
3374    /// Required. Id of the requesting object
3375    /// If auto-generating Id server-side, remove this field and
3376    /// connection_id from the method_signature of Create RPC
3377    pub connection_id: std::string::String,
3378
3379    /// Required. The resource being created
3380    pub connection: std::option::Option<crate::model::Connection>,
3381
3382    /// Optional. An optional request ID to identify requests. Specify a unique
3383    /// request ID so that if you must retry your request, the server will know to
3384    /// ignore the request if it has already been completed. The server will
3385    /// guarantee that for at least 60 minutes since the first request.
3386    ///
3387    /// For example, consider a situation where you make an initial request and the
3388    /// request times out. If you make the request again with the same request
3389    /// ID, the server can check if original operation with the same request ID
3390    /// was received, and if so, will ignore the second request. This prevents
3391    /// clients from accidentally creating duplicate commitments.
3392    ///
3393    /// The request ID must be a valid UUID with the exception that zero UUID is
3394    /// not supported (00000000-0000-0000-0000-000000000000).
3395    pub request_id: std::string::String,
3396
3397    /// Optional. If set, validate the request, but do not actually post it.
3398    pub validate_only: bool,
3399
3400    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3401}
3402
3403impl CreateConnectionRequest {
3404    /// Creates a new default instance.
3405    pub fn new() -> Self {
3406        std::default::Default::default()
3407    }
3408
3409    /// Sets the value of [parent][crate::model::CreateConnectionRequest::parent].
3410    ///
3411    /// # Example
3412    /// ```ignore,no_run
3413    /// # use google_cloud_developerconnect_v1::model::CreateConnectionRequest;
3414    /// let x = CreateConnectionRequest::new().set_parent("example");
3415    /// ```
3416    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3417        self.parent = v.into();
3418        self
3419    }
3420
3421    /// Sets the value of [connection_id][crate::model::CreateConnectionRequest::connection_id].
3422    ///
3423    /// # Example
3424    /// ```ignore,no_run
3425    /// # use google_cloud_developerconnect_v1::model::CreateConnectionRequest;
3426    /// let x = CreateConnectionRequest::new().set_connection_id("example");
3427    /// ```
3428    pub fn set_connection_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3429        self.connection_id = v.into();
3430        self
3431    }
3432
3433    /// Sets the value of [connection][crate::model::CreateConnectionRequest::connection].
3434    ///
3435    /// # Example
3436    /// ```ignore,no_run
3437    /// # use google_cloud_developerconnect_v1::model::CreateConnectionRequest;
3438    /// use google_cloud_developerconnect_v1::model::Connection;
3439    /// let x = CreateConnectionRequest::new().set_connection(Connection::default()/* use setters */);
3440    /// ```
3441    pub fn set_connection<T>(mut self, v: T) -> Self
3442    where
3443        T: std::convert::Into<crate::model::Connection>,
3444    {
3445        self.connection = std::option::Option::Some(v.into());
3446        self
3447    }
3448
3449    /// Sets or clears the value of [connection][crate::model::CreateConnectionRequest::connection].
3450    ///
3451    /// # Example
3452    /// ```ignore,no_run
3453    /// # use google_cloud_developerconnect_v1::model::CreateConnectionRequest;
3454    /// use google_cloud_developerconnect_v1::model::Connection;
3455    /// let x = CreateConnectionRequest::new().set_or_clear_connection(Some(Connection::default()/* use setters */));
3456    /// let x = CreateConnectionRequest::new().set_or_clear_connection(None::<Connection>);
3457    /// ```
3458    pub fn set_or_clear_connection<T>(mut self, v: std::option::Option<T>) -> Self
3459    where
3460        T: std::convert::Into<crate::model::Connection>,
3461    {
3462        self.connection = v.map(|x| x.into());
3463        self
3464    }
3465
3466    /// Sets the value of [request_id][crate::model::CreateConnectionRequest::request_id].
3467    ///
3468    /// # Example
3469    /// ```ignore,no_run
3470    /// # use google_cloud_developerconnect_v1::model::CreateConnectionRequest;
3471    /// let x = CreateConnectionRequest::new().set_request_id("example");
3472    /// ```
3473    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3474        self.request_id = v.into();
3475        self
3476    }
3477
3478    /// Sets the value of [validate_only][crate::model::CreateConnectionRequest::validate_only].
3479    ///
3480    /// # Example
3481    /// ```ignore,no_run
3482    /// # use google_cloud_developerconnect_v1::model::CreateConnectionRequest;
3483    /// let x = CreateConnectionRequest::new().set_validate_only(true);
3484    /// ```
3485    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
3486        self.validate_only = v.into();
3487        self
3488    }
3489}
3490
3491impl wkt::message::Message for CreateConnectionRequest {
3492    fn typename() -> &'static str {
3493        "type.googleapis.com/google.cloud.developerconnect.v1.CreateConnectionRequest"
3494    }
3495}
3496
3497/// Message for updating a Connection
3498#[derive(Clone, Default, PartialEq)]
3499#[non_exhaustive]
3500pub struct UpdateConnectionRequest {
3501    /// Required. Field mask is used to specify the fields to be overwritten in the
3502    /// Connection resource by the update.
3503    /// The fields specified in the update_mask are relative to the resource, not
3504    /// the full request. A field will be overwritten if it is in the mask. If the
3505    /// user does not provide a mask then all fields will be overwritten.
3506    pub update_mask: std::option::Option<wkt::FieldMask>,
3507
3508    /// Required. The resource being updated
3509    pub connection: std::option::Option<crate::model::Connection>,
3510
3511    /// Optional. An optional request ID to identify requests. Specify a unique
3512    /// request ID so that if you must retry your request, the server will know to
3513    /// ignore the request if it has already been completed. The server will
3514    /// guarantee that for at least 60 minutes since the first request.
3515    ///
3516    /// For example, consider a situation where you make an initial request and the
3517    /// request times out. If you make the request again with the same request
3518    /// ID, the server can check if original operation with the same request ID
3519    /// was received, and if so, will ignore the second request. This prevents
3520    /// clients from accidentally creating duplicate commitments.
3521    ///
3522    /// The request ID must be a valid UUID with the exception that zero UUID is
3523    /// not supported (00000000-0000-0000-0000-000000000000).
3524    pub request_id: std::string::String,
3525
3526    /// Optional. If set to true, and the connection is not found a new connection
3527    /// will be created. In this situation `update_mask` is ignored.
3528    /// The creation will succeed only if the input connection has all the
3529    /// necessary information (e.g a github_config with both  user_oauth_token and
3530    /// installation_id properties).
3531    pub allow_missing: bool,
3532
3533    /// Optional. If set, validate the request, but do not actually post it.
3534    pub validate_only: bool,
3535
3536    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3537}
3538
3539impl UpdateConnectionRequest {
3540    /// Creates a new default instance.
3541    pub fn new() -> Self {
3542        std::default::Default::default()
3543    }
3544
3545    /// Sets the value of [update_mask][crate::model::UpdateConnectionRequest::update_mask].
3546    ///
3547    /// # Example
3548    /// ```ignore,no_run
3549    /// # use google_cloud_developerconnect_v1::model::UpdateConnectionRequest;
3550    /// use wkt::FieldMask;
3551    /// let x = UpdateConnectionRequest::new().set_update_mask(FieldMask::default()/* use setters */);
3552    /// ```
3553    pub fn set_update_mask<T>(mut self, v: T) -> Self
3554    where
3555        T: std::convert::Into<wkt::FieldMask>,
3556    {
3557        self.update_mask = std::option::Option::Some(v.into());
3558        self
3559    }
3560
3561    /// Sets or clears the value of [update_mask][crate::model::UpdateConnectionRequest::update_mask].
3562    ///
3563    /// # Example
3564    /// ```ignore,no_run
3565    /// # use google_cloud_developerconnect_v1::model::UpdateConnectionRequest;
3566    /// use wkt::FieldMask;
3567    /// let x = UpdateConnectionRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
3568    /// let x = UpdateConnectionRequest::new().set_or_clear_update_mask(None::<FieldMask>);
3569    /// ```
3570    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
3571    where
3572        T: std::convert::Into<wkt::FieldMask>,
3573    {
3574        self.update_mask = v.map(|x| x.into());
3575        self
3576    }
3577
3578    /// Sets the value of [connection][crate::model::UpdateConnectionRequest::connection].
3579    ///
3580    /// # Example
3581    /// ```ignore,no_run
3582    /// # use google_cloud_developerconnect_v1::model::UpdateConnectionRequest;
3583    /// use google_cloud_developerconnect_v1::model::Connection;
3584    /// let x = UpdateConnectionRequest::new().set_connection(Connection::default()/* use setters */);
3585    /// ```
3586    pub fn set_connection<T>(mut self, v: T) -> Self
3587    where
3588        T: std::convert::Into<crate::model::Connection>,
3589    {
3590        self.connection = std::option::Option::Some(v.into());
3591        self
3592    }
3593
3594    /// Sets or clears the value of [connection][crate::model::UpdateConnectionRequest::connection].
3595    ///
3596    /// # Example
3597    /// ```ignore,no_run
3598    /// # use google_cloud_developerconnect_v1::model::UpdateConnectionRequest;
3599    /// use google_cloud_developerconnect_v1::model::Connection;
3600    /// let x = UpdateConnectionRequest::new().set_or_clear_connection(Some(Connection::default()/* use setters */));
3601    /// let x = UpdateConnectionRequest::new().set_or_clear_connection(None::<Connection>);
3602    /// ```
3603    pub fn set_or_clear_connection<T>(mut self, v: std::option::Option<T>) -> Self
3604    where
3605        T: std::convert::Into<crate::model::Connection>,
3606    {
3607        self.connection = v.map(|x| x.into());
3608        self
3609    }
3610
3611    /// Sets the value of [request_id][crate::model::UpdateConnectionRequest::request_id].
3612    ///
3613    /// # Example
3614    /// ```ignore,no_run
3615    /// # use google_cloud_developerconnect_v1::model::UpdateConnectionRequest;
3616    /// let x = UpdateConnectionRequest::new().set_request_id("example");
3617    /// ```
3618    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3619        self.request_id = v.into();
3620        self
3621    }
3622
3623    /// Sets the value of [allow_missing][crate::model::UpdateConnectionRequest::allow_missing].
3624    ///
3625    /// # Example
3626    /// ```ignore,no_run
3627    /// # use google_cloud_developerconnect_v1::model::UpdateConnectionRequest;
3628    /// let x = UpdateConnectionRequest::new().set_allow_missing(true);
3629    /// ```
3630    pub fn set_allow_missing<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
3631        self.allow_missing = v.into();
3632        self
3633    }
3634
3635    /// Sets the value of [validate_only][crate::model::UpdateConnectionRequest::validate_only].
3636    ///
3637    /// # Example
3638    /// ```ignore,no_run
3639    /// # use google_cloud_developerconnect_v1::model::UpdateConnectionRequest;
3640    /// let x = UpdateConnectionRequest::new().set_validate_only(true);
3641    /// ```
3642    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
3643        self.validate_only = v.into();
3644        self
3645    }
3646}
3647
3648impl wkt::message::Message for UpdateConnectionRequest {
3649    fn typename() -> &'static str {
3650        "type.googleapis.com/google.cloud.developerconnect.v1.UpdateConnectionRequest"
3651    }
3652}
3653
3654/// Message for deleting a Connection
3655#[derive(Clone, Default, PartialEq)]
3656#[non_exhaustive]
3657pub struct DeleteConnectionRequest {
3658    /// Required. Name of the resource
3659    pub name: std::string::String,
3660
3661    /// Optional. An optional request ID to identify requests. Specify a unique
3662    /// request ID so that if you must retry your request, the server will know to
3663    /// ignore the request if it has already been completed. The server will
3664    /// guarantee that for at least 60 minutes after the first request.
3665    ///
3666    /// For example, consider a situation where you make an initial request and the
3667    /// request times out. If you make the request again with the same request
3668    /// ID, the server can check if original operation with the same request ID
3669    /// was received, and if so, will ignore the second request. This prevents
3670    /// clients from accidentally creating duplicate commitments.
3671    ///
3672    /// The request ID must be a valid UUID with the exception that zero UUID is
3673    /// not supported (00000000-0000-0000-0000-000000000000).
3674    pub request_id: std::string::String,
3675
3676    /// Optional. If set, validate the request, but do not actually post it.
3677    pub validate_only: bool,
3678
3679    /// Optional. The current etag of the Connection.
3680    /// If an etag is provided and does not match the current etag of the
3681    /// Connection, deletion will be blocked and an ABORTED error will be returned.
3682    pub etag: std::string::String,
3683
3684    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3685}
3686
3687impl DeleteConnectionRequest {
3688    /// Creates a new default instance.
3689    pub fn new() -> Self {
3690        std::default::Default::default()
3691    }
3692
3693    /// Sets the value of [name][crate::model::DeleteConnectionRequest::name].
3694    ///
3695    /// # Example
3696    /// ```ignore,no_run
3697    /// # use google_cloud_developerconnect_v1::model::DeleteConnectionRequest;
3698    /// let x = DeleteConnectionRequest::new().set_name("example");
3699    /// ```
3700    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3701        self.name = v.into();
3702        self
3703    }
3704
3705    /// Sets the value of [request_id][crate::model::DeleteConnectionRequest::request_id].
3706    ///
3707    /// # Example
3708    /// ```ignore,no_run
3709    /// # use google_cloud_developerconnect_v1::model::DeleteConnectionRequest;
3710    /// let x = DeleteConnectionRequest::new().set_request_id("example");
3711    /// ```
3712    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3713        self.request_id = v.into();
3714        self
3715    }
3716
3717    /// Sets the value of [validate_only][crate::model::DeleteConnectionRequest::validate_only].
3718    ///
3719    /// # Example
3720    /// ```ignore,no_run
3721    /// # use google_cloud_developerconnect_v1::model::DeleteConnectionRequest;
3722    /// let x = DeleteConnectionRequest::new().set_validate_only(true);
3723    /// ```
3724    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
3725        self.validate_only = v.into();
3726        self
3727    }
3728
3729    /// Sets the value of [etag][crate::model::DeleteConnectionRequest::etag].
3730    ///
3731    /// # Example
3732    /// ```ignore,no_run
3733    /// # use google_cloud_developerconnect_v1::model::DeleteConnectionRequest;
3734    /// let x = DeleteConnectionRequest::new().set_etag("example");
3735    /// ```
3736    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3737        self.etag = v.into();
3738        self
3739    }
3740}
3741
3742impl wkt::message::Message for DeleteConnectionRequest {
3743    fn typename() -> &'static str {
3744        "type.googleapis.com/google.cloud.developerconnect.v1.DeleteConnectionRequest"
3745    }
3746}
3747
3748/// Message for requesting list of AccountConnectors
3749#[derive(Clone, Default, PartialEq)]
3750#[non_exhaustive]
3751pub struct ListAccountConnectorsRequest {
3752    /// Required. Parent value for ListAccountConnectorsRequest
3753    pub parent: std::string::String,
3754
3755    /// Optional. Requested page size. Server may return fewer items than
3756    /// requested. If unspecified, server will pick an appropriate default.
3757    pub page_size: i32,
3758
3759    /// Optional. A token identifying a page of results the server should return.
3760    pub page_token: std::string::String,
3761
3762    /// Optional. Filtering results
3763    pub filter: std::string::String,
3764
3765    /// Optional. Hint for how to order the results
3766    pub order_by: std::string::String,
3767
3768    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3769}
3770
3771impl ListAccountConnectorsRequest {
3772    /// Creates a new default instance.
3773    pub fn new() -> Self {
3774        std::default::Default::default()
3775    }
3776
3777    /// Sets the value of [parent][crate::model::ListAccountConnectorsRequest::parent].
3778    ///
3779    /// # Example
3780    /// ```ignore,no_run
3781    /// # use google_cloud_developerconnect_v1::model::ListAccountConnectorsRequest;
3782    /// let x = ListAccountConnectorsRequest::new().set_parent("example");
3783    /// ```
3784    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3785        self.parent = v.into();
3786        self
3787    }
3788
3789    /// Sets the value of [page_size][crate::model::ListAccountConnectorsRequest::page_size].
3790    ///
3791    /// # Example
3792    /// ```ignore,no_run
3793    /// # use google_cloud_developerconnect_v1::model::ListAccountConnectorsRequest;
3794    /// let x = ListAccountConnectorsRequest::new().set_page_size(42);
3795    /// ```
3796    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3797        self.page_size = v.into();
3798        self
3799    }
3800
3801    /// Sets the value of [page_token][crate::model::ListAccountConnectorsRequest::page_token].
3802    ///
3803    /// # Example
3804    /// ```ignore,no_run
3805    /// # use google_cloud_developerconnect_v1::model::ListAccountConnectorsRequest;
3806    /// let x = ListAccountConnectorsRequest::new().set_page_token("example");
3807    /// ```
3808    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3809        self.page_token = v.into();
3810        self
3811    }
3812
3813    /// Sets the value of [filter][crate::model::ListAccountConnectorsRequest::filter].
3814    ///
3815    /// # Example
3816    /// ```ignore,no_run
3817    /// # use google_cloud_developerconnect_v1::model::ListAccountConnectorsRequest;
3818    /// let x = ListAccountConnectorsRequest::new().set_filter("example");
3819    /// ```
3820    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3821        self.filter = v.into();
3822        self
3823    }
3824
3825    /// Sets the value of [order_by][crate::model::ListAccountConnectorsRequest::order_by].
3826    ///
3827    /// # Example
3828    /// ```ignore,no_run
3829    /// # use google_cloud_developerconnect_v1::model::ListAccountConnectorsRequest;
3830    /// let x = ListAccountConnectorsRequest::new().set_order_by("example");
3831    /// ```
3832    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3833        self.order_by = v.into();
3834        self
3835    }
3836}
3837
3838impl wkt::message::Message for ListAccountConnectorsRequest {
3839    fn typename() -> &'static str {
3840        "type.googleapis.com/google.cloud.developerconnect.v1.ListAccountConnectorsRequest"
3841    }
3842}
3843
3844/// Message for response to listing AccountConnectors
3845#[derive(Clone, Default, PartialEq)]
3846#[non_exhaustive]
3847pub struct ListAccountConnectorsResponse {
3848    /// The list of AccountConnectors
3849    pub account_connectors: std::vec::Vec<crate::model::AccountConnector>,
3850
3851    /// A token identifying a page of results the server should return.
3852    pub next_page_token: std::string::String,
3853
3854    /// Locations that could not be reached.
3855    pub unreachable: std::vec::Vec<std::string::String>,
3856
3857    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3858}
3859
3860impl ListAccountConnectorsResponse {
3861    /// Creates a new default instance.
3862    pub fn new() -> Self {
3863        std::default::Default::default()
3864    }
3865
3866    /// Sets the value of [account_connectors][crate::model::ListAccountConnectorsResponse::account_connectors].
3867    ///
3868    /// # Example
3869    /// ```ignore,no_run
3870    /// # use google_cloud_developerconnect_v1::model::ListAccountConnectorsResponse;
3871    /// use google_cloud_developerconnect_v1::model::AccountConnector;
3872    /// let x = ListAccountConnectorsResponse::new()
3873    ///     .set_account_connectors([
3874    ///         AccountConnector::default()/* use setters */,
3875    ///         AccountConnector::default()/* use (different) setters */,
3876    ///     ]);
3877    /// ```
3878    pub fn set_account_connectors<T, V>(mut self, v: T) -> Self
3879    where
3880        T: std::iter::IntoIterator<Item = V>,
3881        V: std::convert::Into<crate::model::AccountConnector>,
3882    {
3883        use std::iter::Iterator;
3884        self.account_connectors = v.into_iter().map(|i| i.into()).collect();
3885        self
3886    }
3887
3888    /// Sets the value of [next_page_token][crate::model::ListAccountConnectorsResponse::next_page_token].
3889    ///
3890    /// # Example
3891    /// ```ignore,no_run
3892    /// # use google_cloud_developerconnect_v1::model::ListAccountConnectorsResponse;
3893    /// let x = ListAccountConnectorsResponse::new().set_next_page_token("example");
3894    /// ```
3895    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3896        self.next_page_token = v.into();
3897        self
3898    }
3899
3900    /// Sets the value of [unreachable][crate::model::ListAccountConnectorsResponse::unreachable].
3901    ///
3902    /// # Example
3903    /// ```ignore,no_run
3904    /// # use google_cloud_developerconnect_v1::model::ListAccountConnectorsResponse;
3905    /// let x = ListAccountConnectorsResponse::new().set_unreachable(["a", "b", "c"]);
3906    /// ```
3907    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
3908    where
3909        T: std::iter::IntoIterator<Item = V>,
3910        V: std::convert::Into<std::string::String>,
3911    {
3912        use std::iter::Iterator;
3913        self.unreachable = v.into_iter().map(|i| i.into()).collect();
3914        self
3915    }
3916}
3917
3918impl wkt::message::Message for ListAccountConnectorsResponse {
3919    fn typename() -> &'static str {
3920        "type.googleapis.com/google.cloud.developerconnect.v1.ListAccountConnectorsResponse"
3921    }
3922}
3923
3924#[doc(hidden)]
3925impl google_cloud_gax::paginator::internal::PageableResponse for ListAccountConnectorsResponse {
3926    type PageItem = crate::model::AccountConnector;
3927
3928    fn items(self) -> std::vec::Vec<Self::PageItem> {
3929        self.account_connectors
3930    }
3931
3932    fn next_page_token(&self) -> std::string::String {
3933        use std::clone::Clone;
3934        self.next_page_token.clone()
3935    }
3936}
3937
3938/// Message for getting a AccountConnector
3939#[derive(Clone, Default, PartialEq)]
3940#[non_exhaustive]
3941pub struct GetAccountConnectorRequest {
3942    /// Required. Name of the resource
3943    pub name: std::string::String,
3944
3945    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3946}
3947
3948impl GetAccountConnectorRequest {
3949    /// Creates a new default instance.
3950    pub fn new() -> Self {
3951        std::default::Default::default()
3952    }
3953
3954    /// Sets the value of [name][crate::model::GetAccountConnectorRequest::name].
3955    ///
3956    /// # Example
3957    /// ```ignore,no_run
3958    /// # use google_cloud_developerconnect_v1::model::GetAccountConnectorRequest;
3959    /// let x = GetAccountConnectorRequest::new().set_name("example");
3960    /// ```
3961    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3962        self.name = v.into();
3963        self
3964    }
3965}
3966
3967impl wkt::message::Message for GetAccountConnectorRequest {
3968    fn typename() -> &'static str {
3969        "type.googleapis.com/google.cloud.developerconnect.v1.GetAccountConnectorRequest"
3970    }
3971}
3972
3973#[allow(missing_docs)]
3974#[derive(Clone, Default, PartialEq)]
3975#[non_exhaustive]
3976pub struct CreateAccountConnectorRequest {
3977    /// Required. Location resource name as the account_connector’s parent.
3978    pub parent: std::string::String,
3979
3980    /// Required. The ID to use for the AccountConnector, which will become the
3981    /// final component of the AccountConnector's resource name. Its format should
3982    /// adhere to <https://google.aip.dev/122#resource-id-segments> Names must be
3983    /// unique per-project per-location.
3984    pub account_connector_id: std::string::String,
3985
3986    /// Required. The AccountConnector to create.
3987    pub account_connector: std::option::Option<crate::model::AccountConnector>,
3988
3989    /// Optional. An optional request ID to identify requests. Specify a unique
3990    /// request ID so that if you must retry your request, the server will know to
3991    /// ignore the request if it has already been completed. The server will
3992    /// guarantee that for at least 60 minutes since the first request.
3993    ///
3994    /// For example, consider a situation where you make an initial request and the
3995    /// request times out. If you make the request again with the same request
3996    /// ID, the server can check if original operation with the same request ID
3997    /// was received, and if so, will ignore the second request. This prevents
3998    /// clients from accidentally creating duplicate commitments.
3999    ///
4000    /// The request ID must be a valid UUID with the exception that zero UUID is
4001    /// not supported (00000000-0000-0000-0000-000000000000).
4002    pub request_id: std::string::String,
4003
4004    /// Optional. If set, validate the request, but do not actually post it.
4005    pub validate_only: bool,
4006
4007    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4008}
4009
4010impl CreateAccountConnectorRequest {
4011    /// Creates a new default instance.
4012    pub fn new() -> Self {
4013        std::default::Default::default()
4014    }
4015
4016    /// Sets the value of [parent][crate::model::CreateAccountConnectorRequest::parent].
4017    ///
4018    /// # Example
4019    /// ```ignore,no_run
4020    /// # use google_cloud_developerconnect_v1::model::CreateAccountConnectorRequest;
4021    /// let x = CreateAccountConnectorRequest::new().set_parent("example");
4022    /// ```
4023    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4024        self.parent = v.into();
4025        self
4026    }
4027
4028    /// Sets the value of [account_connector_id][crate::model::CreateAccountConnectorRequest::account_connector_id].
4029    ///
4030    /// # Example
4031    /// ```ignore,no_run
4032    /// # use google_cloud_developerconnect_v1::model::CreateAccountConnectorRequest;
4033    /// let x = CreateAccountConnectorRequest::new().set_account_connector_id("example");
4034    /// ```
4035    pub fn set_account_connector_id<T: std::convert::Into<std::string::String>>(
4036        mut self,
4037        v: T,
4038    ) -> Self {
4039        self.account_connector_id = v.into();
4040        self
4041    }
4042
4043    /// Sets the value of [account_connector][crate::model::CreateAccountConnectorRequest::account_connector].
4044    ///
4045    /// # Example
4046    /// ```ignore,no_run
4047    /// # use google_cloud_developerconnect_v1::model::CreateAccountConnectorRequest;
4048    /// use google_cloud_developerconnect_v1::model::AccountConnector;
4049    /// let x = CreateAccountConnectorRequest::new().set_account_connector(AccountConnector::default()/* use setters */);
4050    /// ```
4051    pub fn set_account_connector<T>(mut self, v: T) -> Self
4052    where
4053        T: std::convert::Into<crate::model::AccountConnector>,
4054    {
4055        self.account_connector = std::option::Option::Some(v.into());
4056        self
4057    }
4058
4059    /// Sets or clears the value of [account_connector][crate::model::CreateAccountConnectorRequest::account_connector].
4060    ///
4061    /// # Example
4062    /// ```ignore,no_run
4063    /// # use google_cloud_developerconnect_v1::model::CreateAccountConnectorRequest;
4064    /// use google_cloud_developerconnect_v1::model::AccountConnector;
4065    /// let x = CreateAccountConnectorRequest::new().set_or_clear_account_connector(Some(AccountConnector::default()/* use setters */));
4066    /// let x = CreateAccountConnectorRequest::new().set_or_clear_account_connector(None::<AccountConnector>);
4067    /// ```
4068    pub fn set_or_clear_account_connector<T>(mut self, v: std::option::Option<T>) -> Self
4069    where
4070        T: std::convert::Into<crate::model::AccountConnector>,
4071    {
4072        self.account_connector = v.map(|x| x.into());
4073        self
4074    }
4075
4076    /// Sets the value of [request_id][crate::model::CreateAccountConnectorRequest::request_id].
4077    ///
4078    /// # Example
4079    /// ```ignore,no_run
4080    /// # use google_cloud_developerconnect_v1::model::CreateAccountConnectorRequest;
4081    /// let x = CreateAccountConnectorRequest::new().set_request_id("example");
4082    /// ```
4083    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4084        self.request_id = v.into();
4085        self
4086    }
4087
4088    /// Sets the value of [validate_only][crate::model::CreateAccountConnectorRequest::validate_only].
4089    ///
4090    /// # Example
4091    /// ```ignore,no_run
4092    /// # use google_cloud_developerconnect_v1::model::CreateAccountConnectorRequest;
4093    /// let x = CreateAccountConnectorRequest::new().set_validate_only(true);
4094    /// ```
4095    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4096        self.validate_only = v.into();
4097        self
4098    }
4099}
4100
4101impl wkt::message::Message for CreateAccountConnectorRequest {
4102    fn typename() -> &'static str {
4103        "type.googleapis.com/google.cloud.developerconnect.v1.CreateAccountConnectorRequest"
4104    }
4105}
4106
4107/// Message for updating a AccountConnector
4108#[derive(Clone, Default, PartialEq)]
4109#[non_exhaustive]
4110pub struct UpdateAccountConnectorRequest {
4111    /// Optional. The list of fields to be updated.
4112    pub update_mask: std::option::Option<wkt::FieldMask>,
4113
4114    /// Required. The AccountConnector to update.
4115    pub account_connector: std::option::Option<crate::model::AccountConnector>,
4116
4117    /// Optional. An optional request ID to identify requests. Specify a unique
4118    /// request ID so that if you must retry your request, the server will know to
4119    /// ignore the request if it has already been completed. The server will
4120    /// guarantee that for at least 60 minutes since the first request.
4121    ///
4122    /// For example, consider a situation where you make an initial request and the
4123    /// request times out. If you make the request again with the same request
4124    /// ID, the server can check if original operation with the same request ID
4125    /// was received, and if so, will ignore the second request. This prevents
4126    /// clients from accidentally creating duplicate commitments.
4127    ///
4128    /// The request ID must be a valid UUID with the exception that zero UUID is
4129    /// not supported (00000000-0000-0000-0000-000000000000).
4130    pub request_id: std::string::String,
4131
4132    /// Optional. If set to true, and the accountConnector is not found a new
4133    /// accountConnector will be created. In this situation `update_mask` is
4134    /// ignored. The creation will succeed only if the input accountConnector has
4135    /// all the necessary
4136    pub allow_missing: bool,
4137
4138    /// Optional. If set, validate the request, but do not actually post it.
4139    pub validate_only: bool,
4140
4141    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4142}
4143
4144impl UpdateAccountConnectorRequest {
4145    /// Creates a new default instance.
4146    pub fn new() -> Self {
4147        std::default::Default::default()
4148    }
4149
4150    /// Sets the value of [update_mask][crate::model::UpdateAccountConnectorRequest::update_mask].
4151    ///
4152    /// # Example
4153    /// ```ignore,no_run
4154    /// # use google_cloud_developerconnect_v1::model::UpdateAccountConnectorRequest;
4155    /// use wkt::FieldMask;
4156    /// let x = UpdateAccountConnectorRequest::new().set_update_mask(FieldMask::default()/* use setters */);
4157    /// ```
4158    pub fn set_update_mask<T>(mut self, v: T) -> Self
4159    where
4160        T: std::convert::Into<wkt::FieldMask>,
4161    {
4162        self.update_mask = std::option::Option::Some(v.into());
4163        self
4164    }
4165
4166    /// Sets or clears the value of [update_mask][crate::model::UpdateAccountConnectorRequest::update_mask].
4167    ///
4168    /// # Example
4169    /// ```ignore,no_run
4170    /// # use google_cloud_developerconnect_v1::model::UpdateAccountConnectorRequest;
4171    /// use wkt::FieldMask;
4172    /// let x = UpdateAccountConnectorRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
4173    /// let x = UpdateAccountConnectorRequest::new().set_or_clear_update_mask(None::<FieldMask>);
4174    /// ```
4175    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
4176    where
4177        T: std::convert::Into<wkt::FieldMask>,
4178    {
4179        self.update_mask = v.map(|x| x.into());
4180        self
4181    }
4182
4183    /// Sets the value of [account_connector][crate::model::UpdateAccountConnectorRequest::account_connector].
4184    ///
4185    /// # Example
4186    /// ```ignore,no_run
4187    /// # use google_cloud_developerconnect_v1::model::UpdateAccountConnectorRequest;
4188    /// use google_cloud_developerconnect_v1::model::AccountConnector;
4189    /// let x = UpdateAccountConnectorRequest::new().set_account_connector(AccountConnector::default()/* use setters */);
4190    /// ```
4191    pub fn set_account_connector<T>(mut self, v: T) -> Self
4192    where
4193        T: std::convert::Into<crate::model::AccountConnector>,
4194    {
4195        self.account_connector = std::option::Option::Some(v.into());
4196        self
4197    }
4198
4199    /// Sets or clears the value of [account_connector][crate::model::UpdateAccountConnectorRequest::account_connector].
4200    ///
4201    /// # Example
4202    /// ```ignore,no_run
4203    /// # use google_cloud_developerconnect_v1::model::UpdateAccountConnectorRequest;
4204    /// use google_cloud_developerconnect_v1::model::AccountConnector;
4205    /// let x = UpdateAccountConnectorRequest::new().set_or_clear_account_connector(Some(AccountConnector::default()/* use setters */));
4206    /// let x = UpdateAccountConnectorRequest::new().set_or_clear_account_connector(None::<AccountConnector>);
4207    /// ```
4208    pub fn set_or_clear_account_connector<T>(mut self, v: std::option::Option<T>) -> Self
4209    where
4210        T: std::convert::Into<crate::model::AccountConnector>,
4211    {
4212        self.account_connector = v.map(|x| x.into());
4213        self
4214    }
4215
4216    /// Sets the value of [request_id][crate::model::UpdateAccountConnectorRequest::request_id].
4217    ///
4218    /// # Example
4219    /// ```ignore,no_run
4220    /// # use google_cloud_developerconnect_v1::model::UpdateAccountConnectorRequest;
4221    /// let x = UpdateAccountConnectorRequest::new().set_request_id("example");
4222    /// ```
4223    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4224        self.request_id = v.into();
4225        self
4226    }
4227
4228    /// Sets the value of [allow_missing][crate::model::UpdateAccountConnectorRequest::allow_missing].
4229    ///
4230    /// # Example
4231    /// ```ignore,no_run
4232    /// # use google_cloud_developerconnect_v1::model::UpdateAccountConnectorRequest;
4233    /// let x = UpdateAccountConnectorRequest::new().set_allow_missing(true);
4234    /// ```
4235    pub fn set_allow_missing<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4236        self.allow_missing = v.into();
4237        self
4238    }
4239
4240    /// Sets the value of [validate_only][crate::model::UpdateAccountConnectorRequest::validate_only].
4241    ///
4242    /// # Example
4243    /// ```ignore,no_run
4244    /// # use google_cloud_developerconnect_v1::model::UpdateAccountConnectorRequest;
4245    /// let x = UpdateAccountConnectorRequest::new().set_validate_only(true);
4246    /// ```
4247    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4248        self.validate_only = v.into();
4249        self
4250    }
4251}
4252
4253impl wkt::message::Message for UpdateAccountConnectorRequest {
4254    fn typename() -> &'static str {
4255        "type.googleapis.com/google.cloud.developerconnect.v1.UpdateAccountConnectorRequest"
4256    }
4257}
4258
4259/// Message for deleting a AccountConnector
4260#[derive(Clone, Default, PartialEq)]
4261#[non_exhaustive]
4262pub struct DeleteAccountConnectorRequest {
4263    /// Required. Name of the resource
4264    pub name: std::string::String,
4265
4266    /// Optional. An optional request ID to identify requests. Specify a unique
4267    /// request ID so that if you must retry your request, the server will know to
4268    /// ignore the request if it has already been completed. The server will
4269    /// guarantee that for at least 60 minutes after the first request.
4270    ///
4271    /// For example, consider a situation where you make an initial request and the
4272    /// request times out. If you make the request again with the same request
4273    /// ID, the server can check if original operation with the same request ID
4274    /// was received, and if so, will ignore the second request. This prevents
4275    /// clients from accidentally creating duplicate commitments.
4276    ///
4277    /// The request ID must be a valid UUID with the exception that zero UUID is
4278    /// not supported (00000000-0000-0000-0000-000000000000).
4279    pub request_id: std::string::String,
4280
4281    /// Optional. If set, validate the request, but do not actually post it.
4282    pub validate_only: bool,
4283
4284    /// Optional. The current etag of the AccountConnectorn.
4285    /// If an etag is provided and does not match the current etag of the
4286    /// AccountConnector, deletion will be blocked and an ABORTED error will be
4287    /// returned.
4288    pub etag: std::string::String,
4289
4290    /// Optional. If set to true, any Users from this AccountConnector will also
4291    /// be deleted. (Otherwise, the request will only work if the AccountConnector
4292    /// has no Users.)
4293    pub force: bool,
4294
4295    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4296}
4297
4298impl DeleteAccountConnectorRequest {
4299    /// Creates a new default instance.
4300    pub fn new() -> Self {
4301        std::default::Default::default()
4302    }
4303
4304    /// Sets the value of [name][crate::model::DeleteAccountConnectorRequest::name].
4305    ///
4306    /// # Example
4307    /// ```ignore,no_run
4308    /// # use google_cloud_developerconnect_v1::model::DeleteAccountConnectorRequest;
4309    /// let x = DeleteAccountConnectorRequest::new().set_name("example");
4310    /// ```
4311    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4312        self.name = v.into();
4313        self
4314    }
4315
4316    /// Sets the value of [request_id][crate::model::DeleteAccountConnectorRequest::request_id].
4317    ///
4318    /// # Example
4319    /// ```ignore,no_run
4320    /// # use google_cloud_developerconnect_v1::model::DeleteAccountConnectorRequest;
4321    /// let x = DeleteAccountConnectorRequest::new().set_request_id("example");
4322    /// ```
4323    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4324        self.request_id = v.into();
4325        self
4326    }
4327
4328    /// Sets the value of [validate_only][crate::model::DeleteAccountConnectorRequest::validate_only].
4329    ///
4330    /// # Example
4331    /// ```ignore,no_run
4332    /// # use google_cloud_developerconnect_v1::model::DeleteAccountConnectorRequest;
4333    /// let x = DeleteAccountConnectorRequest::new().set_validate_only(true);
4334    /// ```
4335    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4336        self.validate_only = v.into();
4337        self
4338    }
4339
4340    /// Sets the value of [etag][crate::model::DeleteAccountConnectorRequest::etag].
4341    ///
4342    /// # Example
4343    /// ```ignore,no_run
4344    /// # use google_cloud_developerconnect_v1::model::DeleteAccountConnectorRequest;
4345    /// let x = DeleteAccountConnectorRequest::new().set_etag("example");
4346    /// ```
4347    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4348        self.etag = v.into();
4349        self
4350    }
4351
4352    /// Sets the value of [force][crate::model::DeleteAccountConnectorRequest::force].
4353    ///
4354    /// # Example
4355    /// ```ignore,no_run
4356    /// # use google_cloud_developerconnect_v1::model::DeleteAccountConnectorRequest;
4357    /// let x = DeleteAccountConnectorRequest::new().set_force(true);
4358    /// ```
4359    pub fn set_force<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4360        self.force = v.into();
4361        self
4362    }
4363}
4364
4365impl wkt::message::Message for DeleteAccountConnectorRequest {
4366    fn typename() -> &'static str {
4367        "type.googleapis.com/google.cloud.developerconnect.v1.DeleteAccountConnectorRequest"
4368    }
4369}
4370
4371/// Message for deleting a User
4372#[derive(Clone, Default, PartialEq)]
4373#[non_exhaustive]
4374pub struct DeleteUserRequest {
4375    /// Required. Name of the resource
4376    pub name: std::string::String,
4377
4378    /// Optional. An optional request ID to identify requests. Specify a unique
4379    /// request ID so that if you must retry your request, the server will know to
4380    /// ignore the request if it has already been completed. The server will
4381    /// guarantee that for at least 60 minutes after the first request.
4382    ///
4383    /// For example, consider a situation where you make an initial request and the
4384    /// request times out. If you make the request again with the same request
4385    /// ID, the server can check if original operation with the same request ID
4386    /// was received, and if so, will ignore the second request. This prevents
4387    /// clients from accidentally creating duplicate commitments.
4388    ///
4389    /// The request ID must be a valid UUID with the exception that zero UUID is
4390    /// not supported (00000000-0000-0000-0000-000000000000).
4391    pub request_id: std::string::String,
4392
4393    /// Optional. If set, validate the request, but do not actually post it.
4394    pub validate_only: bool,
4395
4396    /// Optional. This checksum is computed by the server based on the value of
4397    /// other fields, and may be sent on update and delete requests to ensure the
4398    /// client has an up-to-date value before proceeding.
4399    pub etag: std::string::String,
4400
4401    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4402}
4403
4404impl DeleteUserRequest {
4405    /// Creates a new default instance.
4406    pub fn new() -> Self {
4407        std::default::Default::default()
4408    }
4409
4410    /// Sets the value of [name][crate::model::DeleteUserRequest::name].
4411    ///
4412    /// # Example
4413    /// ```ignore,no_run
4414    /// # use google_cloud_developerconnect_v1::model::DeleteUserRequest;
4415    /// let x = DeleteUserRequest::new().set_name("example");
4416    /// ```
4417    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4418        self.name = v.into();
4419        self
4420    }
4421
4422    /// Sets the value of [request_id][crate::model::DeleteUserRequest::request_id].
4423    ///
4424    /// # Example
4425    /// ```ignore,no_run
4426    /// # use google_cloud_developerconnect_v1::model::DeleteUserRequest;
4427    /// let x = DeleteUserRequest::new().set_request_id("example");
4428    /// ```
4429    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4430        self.request_id = v.into();
4431        self
4432    }
4433
4434    /// Sets the value of [validate_only][crate::model::DeleteUserRequest::validate_only].
4435    ///
4436    /// # Example
4437    /// ```ignore,no_run
4438    /// # use google_cloud_developerconnect_v1::model::DeleteUserRequest;
4439    /// let x = DeleteUserRequest::new().set_validate_only(true);
4440    /// ```
4441    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4442        self.validate_only = v.into();
4443        self
4444    }
4445
4446    /// Sets the value of [etag][crate::model::DeleteUserRequest::etag].
4447    ///
4448    /// # Example
4449    /// ```ignore,no_run
4450    /// # use google_cloud_developerconnect_v1::model::DeleteUserRequest;
4451    /// let x = DeleteUserRequest::new().set_etag("example");
4452    /// ```
4453    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4454        self.etag = v.into();
4455        self
4456    }
4457}
4458
4459impl wkt::message::Message for DeleteUserRequest {
4460    fn typename() -> &'static str {
4461        "type.googleapis.com/google.cloud.developerconnect.v1.DeleteUserRequest"
4462    }
4463}
4464
4465/// Represents the metadata of the long-running operation.
4466#[derive(Clone, Default, PartialEq)]
4467#[non_exhaustive]
4468pub struct OperationMetadata {
4469    /// Output only. The time the operation was created.
4470    pub create_time: std::option::Option<wkt::Timestamp>,
4471
4472    /// Output only. The time the operation finished running.
4473    pub end_time: std::option::Option<wkt::Timestamp>,
4474
4475    /// Output only. Server-defined resource path for the target of the operation.
4476    pub target: std::string::String,
4477
4478    /// Output only. Name of the verb executed by the operation.
4479    pub verb: std::string::String,
4480
4481    /// Output only. Human-readable status of the operation, if any.
4482    pub status_message: std::string::String,
4483
4484    /// Output only. Identifies whether the user has requested cancellation
4485    /// of the operation. Operations that have been cancelled successfully
4486    /// have
4487    /// [google.longrunning.Operation.error][google.longrunning.Operation.error]
4488    /// value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
4489    /// corresponding to `Code.CANCELLED`.
4490    ///
4491    /// [google.longrunning.Operation.error]: google_cloud_longrunning::model::Operation::result
4492    /// [google.rpc.Status.code]: google_cloud_rpc::model::Status::code
4493    pub requested_cancellation: bool,
4494
4495    /// Output only. API version used to start the operation.
4496    pub api_version: std::string::String,
4497
4498    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4499}
4500
4501impl OperationMetadata {
4502    /// Creates a new default instance.
4503    pub fn new() -> Self {
4504        std::default::Default::default()
4505    }
4506
4507    /// Sets the value of [create_time][crate::model::OperationMetadata::create_time].
4508    ///
4509    /// # Example
4510    /// ```ignore,no_run
4511    /// # use google_cloud_developerconnect_v1::model::OperationMetadata;
4512    /// use wkt::Timestamp;
4513    /// let x = OperationMetadata::new().set_create_time(Timestamp::default()/* use setters */);
4514    /// ```
4515    pub fn set_create_time<T>(mut self, v: T) -> Self
4516    where
4517        T: std::convert::Into<wkt::Timestamp>,
4518    {
4519        self.create_time = std::option::Option::Some(v.into());
4520        self
4521    }
4522
4523    /// Sets or clears the value of [create_time][crate::model::OperationMetadata::create_time].
4524    ///
4525    /// # Example
4526    /// ```ignore,no_run
4527    /// # use google_cloud_developerconnect_v1::model::OperationMetadata;
4528    /// use wkt::Timestamp;
4529    /// let x = OperationMetadata::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
4530    /// let x = OperationMetadata::new().set_or_clear_create_time(None::<Timestamp>);
4531    /// ```
4532    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
4533    where
4534        T: std::convert::Into<wkt::Timestamp>,
4535    {
4536        self.create_time = v.map(|x| x.into());
4537        self
4538    }
4539
4540    /// Sets the value of [end_time][crate::model::OperationMetadata::end_time].
4541    ///
4542    /// # Example
4543    /// ```ignore,no_run
4544    /// # use google_cloud_developerconnect_v1::model::OperationMetadata;
4545    /// use wkt::Timestamp;
4546    /// let x = OperationMetadata::new().set_end_time(Timestamp::default()/* use setters */);
4547    /// ```
4548    pub fn set_end_time<T>(mut self, v: T) -> Self
4549    where
4550        T: std::convert::Into<wkt::Timestamp>,
4551    {
4552        self.end_time = std::option::Option::Some(v.into());
4553        self
4554    }
4555
4556    /// Sets or clears the value of [end_time][crate::model::OperationMetadata::end_time].
4557    ///
4558    /// # Example
4559    /// ```ignore,no_run
4560    /// # use google_cloud_developerconnect_v1::model::OperationMetadata;
4561    /// use wkt::Timestamp;
4562    /// let x = OperationMetadata::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
4563    /// let x = OperationMetadata::new().set_or_clear_end_time(None::<Timestamp>);
4564    /// ```
4565    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
4566    where
4567        T: std::convert::Into<wkt::Timestamp>,
4568    {
4569        self.end_time = v.map(|x| x.into());
4570        self
4571    }
4572
4573    /// Sets the value of [target][crate::model::OperationMetadata::target].
4574    ///
4575    /// # Example
4576    /// ```ignore,no_run
4577    /// # use google_cloud_developerconnect_v1::model::OperationMetadata;
4578    /// let x = OperationMetadata::new().set_target("example");
4579    /// ```
4580    pub fn set_target<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4581        self.target = v.into();
4582        self
4583    }
4584
4585    /// Sets the value of [verb][crate::model::OperationMetadata::verb].
4586    ///
4587    /// # Example
4588    /// ```ignore,no_run
4589    /// # use google_cloud_developerconnect_v1::model::OperationMetadata;
4590    /// let x = OperationMetadata::new().set_verb("example");
4591    /// ```
4592    pub fn set_verb<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4593        self.verb = v.into();
4594        self
4595    }
4596
4597    /// Sets the value of [status_message][crate::model::OperationMetadata::status_message].
4598    ///
4599    /// # Example
4600    /// ```ignore,no_run
4601    /// # use google_cloud_developerconnect_v1::model::OperationMetadata;
4602    /// let x = OperationMetadata::new().set_status_message("example");
4603    /// ```
4604    pub fn set_status_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4605        self.status_message = v.into();
4606        self
4607    }
4608
4609    /// Sets the value of [requested_cancellation][crate::model::OperationMetadata::requested_cancellation].
4610    ///
4611    /// # Example
4612    /// ```ignore,no_run
4613    /// # use google_cloud_developerconnect_v1::model::OperationMetadata;
4614    /// let x = OperationMetadata::new().set_requested_cancellation(true);
4615    /// ```
4616    pub fn set_requested_cancellation<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4617        self.requested_cancellation = v.into();
4618        self
4619    }
4620
4621    /// Sets the value of [api_version][crate::model::OperationMetadata::api_version].
4622    ///
4623    /// # Example
4624    /// ```ignore,no_run
4625    /// # use google_cloud_developerconnect_v1::model::OperationMetadata;
4626    /// let x = OperationMetadata::new().set_api_version("example");
4627    /// ```
4628    pub fn set_api_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4629        self.api_version = v.into();
4630        self
4631    }
4632}
4633
4634impl wkt::message::Message for OperationMetadata {
4635    fn typename() -> &'static str {
4636        "type.googleapis.com/google.cloud.developerconnect.v1.OperationMetadata"
4637    }
4638}
4639
4640/// Message for fetching a User of the user themselves.
4641#[derive(Clone, Default, PartialEq)]
4642#[non_exhaustive]
4643pub struct FetchSelfRequest {
4644    /// Required. Name of the AccountConnector resource
4645    pub name: std::string::String,
4646
4647    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4648}
4649
4650impl FetchSelfRequest {
4651    /// Creates a new default instance.
4652    pub fn new() -> Self {
4653        std::default::Default::default()
4654    }
4655
4656    /// Sets the value of [name][crate::model::FetchSelfRequest::name].
4657    ///
4658    /// # Example
4659    /// ```ignore,no_run
4660    /// # use google_cloud_developerconnect_v1::model::FetchSelfRequest;
4661    /// let x = FetchSelfRequest::new().set_name("example");
4662    /// ```
4663    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4664        self.name = v.into();
4665        self
4666    }
4667}
4668
4669impl wkt::message::Message for FetchSelfRequest {
4670    fn typename() -> &'static str {
4671        "type.googleapis.com/google.cloud.developerconnect.v1.FetchSelfRequest"
4672    }
4673}
4674
4675/// Message for deleting a User of the user themselves.
4676#[derive(Clone, Default, PartialEq)]
4677#[non_exhaustive]
4678pub struct DeleteSelfRequest {
4679    /// Required. Name of the AccountConnector resource
4680    pub name: std::string::String,
4681
4682    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4683}
4684
4685impl DeleteSelfRequest {
4686    /// Creates a new default instance.
4687    pub fn new() -> Self {
4688        std::default::Default::default()
4689    }
4690
4691    /// Sets the value of [name][crate::model::DeleteSelfRequest::name].
4692    ///
4693    /// # Example
4694    /// ```ignore,no_run
4695    /// # use google_cloud_developerconnect_v1::model::DeleteSelfRequest;
4696    /// let x = DeleteSelfRequest::new().set_name("example");
4697    /// ```
4698    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4699        self.name = v.into();
4700        self
4701    }
4702}
4703
4704impl wkt::message::Message for DeleteSelfRequest {
4705    fn typename() -> &'static str {
4706        "type.googleapis.com/google.cloud.developerconnect.v1.DeleteSelfRequest"
4707    }
4708}
4709
4710/// Message for fetching an OAuth access token.
4711#[derive(Clone, Default, PartialEq)]
4712#[non_exhaustive]
4713pub struct FetchAccessTokenRequest {
4714    /// Required. The resource name of the AccountConnector in the format
4715    /// `projects/*/locations/*/accountConnectors/*`.
4716    pub account_connector: std::string::String,
4717
4718    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4719}
4720
4721impl FetchAccessTokenRequest {
4722    /// Creates a new default instance.
4723    pub fn new() -> Self {
4724        std::default::Default::default()
4725    }
4726
4727    /// Sets the value of [account_connector][crate::model::FetchAccessTokenRequest::account_connector].
4728    ///
4729    /// # Example
4730    /// ```ignore,no_run
4731    /// # use google_cloud_developerconnect_v1::model::FetchAccessTokenRequest;
4732    /// let x = FetchAccessTokenRequest::new().set_account_connector("example");
4733    /// ```
4734    pub fn set_account_connector<T: std::convert::Into<std::string::String>>(
4735        mut self,
4736        v: T,
4737    ) -> Self {
4738        self.account_connector = v.into();
4739        self
4740    }
4741}
4742
4743impl wkt::message::Message for FetchAccessTokenRequest {
4744    fn typename() -> &'static str {
4745        "type.googleapis.com/google.cloud.developerconnect.v1.FetchAccessTokenRequest"
4746    }
4747}
4748
4749/// Message for responding to getting an OAuth access token.
4750#[derive(Clone, Default, PartialEq)]
4751#[non_exhaustive]
4752pub struct FetchAccessTokenResponse {
4753    /// The token content.
4754    pub token: std::string::String,
4755
4756    /// Expiration timestamp. Can be empty if unknown or non-expiring.
4757    pub expiration_time: std::option::Option<wkt::Timestamp>,
4758
4759    /// The scopes of the access token.
4760    pub scopes: std::vec::Vec<std::string::String>,
4761
4762    /// The error resulted from exchanging OAuth tokens from the service provider.
4763    pub exchange_error: std::option::Option<crate::model::ExchangeError>,
4764
4765    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4766}
4767
4768impl FetchAccessTokenResponse {
4769    /// Creates a new default instance.
4770    pub fn new() -> Self {
4771        std::default::Default::default()
4772    }
4773
4774    /// Sets the value of [token][crate::model::FetchAccessTokenResponse::token].
4775    ///
4776    /// # Example
4777    /// ```ignore,no_run
4778    /// # use google_cloud_developerconnect_v1::model::FetchAccessTokenResponse;
4779    /// let x = FetchAccessTokenResponse::new().set_token("example");
4780    /// ```
4781    pub fn set_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4782        self.token = v.into();
4783        self
4784    }
4785
4786    /// Sets the value of [expiration_time][crate::model::FetchAccessTokenResponse::expiration_time].
4787    ///
4788    /// # Example
4789    /// ```ignore,no_run
4790    /// # use google_cloud_developerconnect_v1::model::FetchAccessTokenResponse;
4791    /// use wkt::Timestamp;
4792    /// let x = FetchAccessTokenResponse::new().set_expiration_time(Timestamp::default()/* use setters */);
4793    /// ```
4794    pub fn set_expiration_time<T>(mut self, v: T) -> Self
4795    where
4796        T: std::convert::Into<wkt::Timestamp>,
4797    {
4798        self.expiration_time = std::option::Option::Some(v.into());
4799        self
4800    }
4801
4802    /// Sets or clears the value of [expiration_time][crate::model::FetchAccessTokenResponse::expiration_time].
4803    ///
4804    /// # Example
4805    /// ```ignore,no_run
4806    /// # use google_cloud_developerconnect_v1::model::FetchAccessTokenResponse;
4807    /// use wkt::Timestamp;
4808    /// let x = FetchAccessTokenResponse::new().set_or_clear_expiration_time(Some(Timestamp::default()/* use setters */));
4809    /// let x = FetchAccessTokenResponse::new().set_or_clear_expiration_time(None::<Timestamp>);
4810    /// ```
4811    pub fn set_or_clear_expiration_time<T>(mut self, v: std::option::Option<T>) -> Self
4812    where
4813        T: std::convert::Into<wkt::Timestamp>,
4814    {
4815        self.expiration_time = v.map(|x| x.into());
4816        self
4817    }
4818
4819    /// Sets the value of [scopes][crate::model::FetchAccessTokenResponse::scopes].
4820    ///
4821    /// # Example
4822    /// ```ignore,no_run
4823    /// # use google_cloud_developerconnect_v1::model::FetchAccessTokenResponse;
4824    /// let x = FetchAccessTokenResponse::new().set_scopes(["a", "b", "c"]);
4825    /// ```
4826    pub fn set_scopes<T, V>(mut self, v: T) -> Self
4827    where
4828        T: std::iter::IntoIterator<Item = V>,
4829        V: std::convert::Into<std::string::String>,
4830    {
4831        use std::iter::Iterator;
4832        self.scopes = v.into_iter().map(|i| i.into()).collect();
4833        self
4834    }
4835
4836    /// Sets the value of [exchange_error][crate::model::FetchAccessTokenResponse::exchange_error].
4837    ///
4838    /// # Example
4839    /// ```ignore,no_run
4840    /// # use google_cloud_developerconnect_v1::model::FetchAccessTokenResponse;
4841    /// use google_cloud_developerconnect_v1::model::ExchangeError;
4842    /// let x = FetchAccessTokenResponse::new().set_exchange_error(ExchangeError::default()/* use setters */);
4843    /// ```
4844    pub fn set_exchange_error<T>(mut self, v: T) -> Self
4845    where
4846        T: std::convert::Into<crate::model::ExchangeError>,
4847    {
4848        self.exchange_error = std::option::Option::Some(v.into());
4849        self
4850    }
4851
4852    /// Sets or clears the value of [exchange_error][crate::model::FetchAccessTokenResponse::exchange_error].
4853    ///
4854    /// # Example
4855    /// ```ignore,no_run
4856    /// # use google_cloud_developerconnect_v1::model::FetchAccessTokenResponse;
4857    /// use google_cloud_developerconnect_v1::model::ExchangeError;
4858    /// let x = FetchAccessTokenResponse::new().set_or_clear_exchange_error(Some(ExchangeError::default()/* use setters */));
4859    /// let x = FetchAccessTokenResponse::new().set_or_clear_exchange_error(None::<ExchangeError>);
4860    /// ```
4861    pub fn set_or_clear_exchange_error<T>(mut self, v: std::option::Option<T>) -> Self
4862    where
4863        T: std::convert::Into<crate::model::ExchangeError>,
4864    {
4865        self.exchange_error = v.map(|x| x.into());
4866        self
4867    }
4868}
4869
4870impl wkt::message::Message for FetchAccessTokenResponse {
4871    fn typename() -> &'static str {
4872        "type.googleapis.com/google.cloud.developerconnect.v1.FetchAccessTokenResponse"
4873    }
4874}
4875
4876/// Message for starting an OAuth flow.
4877#[derive(Clone, Default, PartialEq)]
4878#[non_exhaustive]
4879pub struct StartOAuthRequest {
4880    /// Required. The resource name of the AccountConnector in the format
4881    /// `projects/*/locations/*/accountConnectors/*`.
4882    pub account_connector: std::string::String,
4883
4884    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4885}
4886
4887impl StartOAuthRequest {
4888    /// Creates a new default instance.
4889    pub fn new() -> Self {
4890        std::default::Default::default()
4891    }
4892
4893    /// Sets the value of [account_connector][crate::model::StartOAuthRequest::account_connector].
4894    ///
4895    /// # Example
4896    /// ```ignore,no_run
4897    /// # use google_cloud_developerconnect_v1::model::StartOAuthRequest;
4898    /// let x = StartOAuthRequest::new().set_account_connector("example");
4899    /// ```
4900    pub fn set_account_connector<T: std::convert::Into<std::string::String>>(
4901        mut self,
4902        v: T,
4903    ) -> Self {
4904        self.account_connector = v.into();
4905        self
4906    }
4907}
4908
4909impl wkt::message::Message for StartOAuthRequest {
4910    fn typename() -> &'static str {
4911        "type.googleapis.com/google.cloud.developerconnect.v1.StartOAuthRequest"
4912    }
4913}
4914
4915/// Message for responding to starting an OAuth flow.
4916#[derive(Clone, Default, PartialEq)]
4917#[non_exhaustive]
4918pub struct StartOAuthResponse {
4919    /// The ticket to be used for post processing the callback from the service
4920    /// provider.
4921    pub ticket: std::string::String,
4922
4923    /// Please refer to <https://datatracker.ietf.org/doc/html/rfc7636#section-4.1>
4924    pub code_challenge: std::string::String,
4925
4926    /// Please refer to <https://datatracker.ietf.org/doc/html/rfc7636#section-4.2>
4927    pub code_challenge_method: std::string::String,
4928
4929    /// The client ID to the OAuth App of the service provider.
4930    pub client_id: std::string::String,
4931
4932    /// The list of scopes requested by the application.
4933    pub scopes: std::vec::Vec<std::string::String>,
4934
4935    /// The authorization server URL to the OAuth flow of the service provider.
4936    pub auth_uri: std::string::String,
4937
4938    /// The ID of the service provider.
4939    pub id: std::option::Option<crate::model::start_o_auth_response::Id>,
4940
4941    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4942}
4943
4944impl StartOAuthResponse {
4945    /// Creates a new default instance.
4946    pub fn new() -> Self {
4947        std::default::Default::default()
4948    }
4949
4950    /// Sets the value of [ticket][crate::model::StartOAuthResponse::ticket].
4951    ///
4952    /// # Example
4953    /// ```ignore,no_run
4954    /// # use google_cloud_developerconnect_v1::model::StartOAuthResponse;
4955    /// let x = StartOAuthResponse::new().set_ticket("example");
4956    /// ```
4957    pub fn set_ticket<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4958        self.ticket = v.into();
4959        self
4960    }
4961
4962    /// Sets the value of [code_challenge][crate::model::StartOAuthResponse::code_challenge].
4963    ///
4964    /// # Example
4965    /// ```ignore,no_run
4966    /// # use google_cloud_developerconnect_v1::model::StartOAuthResponse;
4967    /// let x = StartOAuthResponse::new().set_code_challenge("example");
4968    /// ```
4969    pub fn set_code_challenge<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4970        self.code_challenge = v.into();
4971        self
4972    }
4973
4974    /// Sets the value of [code_challenge_method][crate::model::StartOAuthResponse::code_challenge_method].
4975    ///
4976    /// # Example
4977    /// ```ignore,no_run
4978    /// # use google_cloud_developerconnect_v1::model::StartOAuthResponse;
4979    /// let x = StartOAuthResponse::new().set_code_challenge_method("example");
4980    /// ```
4981    pub fn set_code_challenge_method<T: std::convert::Into<std::string::String>>(
4982        mut self,
4983        v: T,
4984    ) -> Self {
4985        self.code_challenge_method = v.into();
4986        self
4987    }
4988
4989    /// Sets the value of [client_id][crate::model::StartOAuthResponse::client_id].
4990    ///
4991    /// # Example
4992    /// ```ignore,no_run
4993    /// # use google_cloud_developerconnect_v1::model::StartOAuthResponse;
4994    /// let x = StartOAuthResponse::new().set_client_id("example");
4995    /// ```
4996    pub fn set_client_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4997        self.client_id = v.into();
4998        self
4999    }
5000
5001    /// Sets the value of [scopes][crate::model::StartOAuthResponse::scopes].
5002    ///
5003    /// # Example
5004    /// ```ignore,no_run
5005    /// # use google_cloud_developerconnect_v1::model::StartOAuthResponse;
5006    /// let x = StartOAuthResponse::new().set_scopes(["a", "b", "c"]);
5007    /// ```
5008    pub fn set_scopes<T, V>(mut self, v: T) -> Self
5009    where
5010        T: std::iter::IntoIterator<Item = V>,
5011        V: std::convert::Into<std::string::String>,
5012    {
5013        use std::iter::Iterator;
5014        self.scopes = v.into_iter().map(|i| i.into()).collect();
5015        self
5016    }
5017
5018    /// Sets the value of [auth_uri][crate::model::StartOAuthResponse::auth_uri].
5019    ///
5020    /// # Example
5021    /// ```ignore,no_run
5022    /// # use google_cloud_developerconnect_v1::model::StartOAuthResponse;
5023    /// let x = StartOAuthResponse::new().set_auth_uri("example");
5024    /// ```
5025    pub fn set_auth_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5026        self.auth_uri = v.into();
5027        self
5028    }
5029
5030    /// Sets the value of [id][crate::model::StartOAuthResponse::id].
5031    ///
5032    /// Note that all the setters affecting `id` are mutually
5033    /// exclusive.
5034    ///
5035    /// # Example
5036    /// ```ignore,no_run
5037    /// # use google_cloud_developerconnect_v1::model::StartOAuthResponse;
5038    /// use google_cloud_developerconnect_v1::model::SystemProvider;
5039    /// let x0 = StartOAuthResponse::new().set_id(Some(
5040    ///     google_cloud_developerconnect_v1::model::start_o_auth_response::Id::SystemProviderId(SystemProvider::Github)));
5041    /// let x1 = StartOAuthResponse::new().set_id(Some(
5042    ///     google_cloud_developerconnect_v1::model::start_o_auth_response::Id::SystemProviderId(SystemProvider::Gitlab)));
5043    /// let x2 = StartOAuthResponse::new().set_id(Some(
5044    ///     google_cloud_developerconnect_v1::model::start_o_auth_response::Id::SystemProviderId(SystemProvider::Google)));
5045    /// ```
5046    pub fn set_id<
5047        T: std::convert::Into<std::option::Option<crate::model::start_o_auth_response::Id>>,
5048    >(
5049        mut self,
5050        v: T,
5051    ) -> Self {
5052        self.id = v.into();
5053        self
5054    }
5055
5056    /// The value of [id][crate::model::StartOAuthResponse::id]
5057    /// if it holds a `SystemProviderId`, `None` if the field is not set or
5058    /// holds a different branch.
5059    pub fn system_provider_id(&self) -> std::option::Option<&crate::model::SystemProvider> {
5060        #[allow(unreachable_patterns)]
5061        self.id.as_ref().and_then(|v| match v {
5062            crate::model::start_o_auth_response::Id::SystemProviderId(v) => {
5063                std::option::Option::Some(v)
5064            }
5065            _ => std::option::Option::None,
5066        })
5067    }
5068
5069    /// Sets the value of [id][crate::model::StartOAuthResponse::id]
5070    /// to hold a `SystemProviderId`.
5071    ///
5072    /// Note that all the setters affecting `id` are
5073    /// mutually exclusive.
5074    ///
5075    /// # Example
5076    /// ```ignore,no_run
5077    /// # use google_cloud_developerconnect_v1::model::StartOAuthResponse;
5078    /// use google_cloud_developerconnect_v1::model::SystemProvider;
5079    /// let x0 = StartOAuthResponse::new().set_system_provider_id(SystemProvider::Github);
5080    /// let x1 = StartOAuthResponse::new().set_system_provider_id(SystemProvider::Gitlab);
5081    /// let x2 = StartOAuthResponse::new().set_system_provider_id(SystemProvider::Google);
5082    /// assert!(x0.system_provider_id().is_some());
5083    /// assert!(x1.system_provider_id().is_some());
5084    /// assert!(x2.system_provider_id().is_some());
5085    /// ```
5086    pub fn set_system_provider_id<T: std::convert::Into<crate::model::SystemProvider>>(
5087        mut self,
5088        v: T,
5089    ) -> Self {
5090        self.id = std::option::Option::Some(
5091            crate::model::start_o_auth_response::Id::SystemProviderId(v.into()),
5092        );
5093        self
5094    }
5095}
5096
5097impl wkt::message::Message for StartOAuthResponse {
5098    fn typename() -> &'static str {
5099        "type.googleapis.com/google.cloud.developerconnect.v1.StartOAuthResponse"
5100    }
5101}
5102
5103/// Defines additional types related to [StartOAuthResponse].
5104pub mod start_o_auth_response {
5105    #[allow(unused_imports)]
5106    use super::*;
5107
5108    /// The ID of the service provider.
5109    #[derive(Clone, Debug, PartialEq)]
5110    #[non_exhaustive]
5111    pub enum Id {
5112        /// The ID of the system provider.
5113        SystemProviderId(crate::model::SystemProvider),
5114    }
5115}
5116
5117/// Message for finishing an OAuth flow.
5118#[derive(Clone, Default, PartialEq)]
5119#[non_exhaustive]
5120pub struct FinishOAuthRequest {
5121    /// Required. The resource name of the AccountConnector in the format
5122    /// `projects/*/locations/*/accountConnectors/*`.
5123    pub account_connector: std::string::String,
5124
5125    /// The params returned by OAuth flow redirect.
5126    pub params: std::option::Option<crate::model::finish_o_auth_request::Params>,
5127
5128    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5129}
5130
5131impl FinishOAuthRequest {
5132    /// Creates a new default instance.
5133    pub fn new() -> Self {
5134        std::default::Default::default()
5135    }
5136
5137    /// Sets the value of [account_connector][crate::model::FinishOAuthRequest::account_connector].
5138    ///
5139    /// # Example
5140    /// ```ignore,no_run
5141    /// # use google_cloud_developerconnect_v1::model::FinishOAuthRequest;
5142    /// let x = FinishOAuthRequest::new().set_account_connector("example");
5143    /// ```
5144    pub fn set_account_connector<T: std::convert::Into<std::string::String>>(
5145        mut self,
5146        v: T,
5147    ) -> Self {
5148        self.account_connector = v.into();
5149        self
5150    }
5151
5152    /// Sets the value of [params][crate::model::FinishOAuthRequest::params].
5153    ///
5154    /// Note that all the setters affecting `params` are mutually
5155    /// exclusive.
5156    ///
5157    /// # Example
5158    /// ```ignore,no_run
5159    /// # use google_cloud_developerconnect_v1::model::FinishOAuthRequest;
5160    /// use google_cloud_developerconnect_v1::model::finish_o_auth_request::OAuthParams;
5161    /// let x = FinishOAuthRequest::new().set_params(Some(
5162    ///     google_cloud_developerconnect_v1::model::finish_o_auth_request::Params::OauthParams(OAuthParams::default().into())));
5163    /// ```
5164    pub fn set_params<
5165        T: std::convert::Into<std::option::Option<crate::model::finish_o_auth_request::Params>>,
5166    >(
5167        mut self,
5168        v: T,
5169    ) -> Self {
5170        self.params = v.into();
5171        self
5172    }
5173
5174    /// The value of [params][crate::model::FinishOAuthRequest::params]
5175    /// if it holds a `OauthParams`, `None` if the field is not set or
5176    /// holds a different branch.
5177    pub fn oauth_params(
5178        &self,
5179    ) -> std::option::Option<&std::boxed::Box<crate::model::finish_o_auth_request::OAuthParams>>
5180    {
5181        #[allow(unreachable_patterns)]
5182        self.params.as_ref().and_then(|v| match v {
5183            crate::model::finish_o_auth_request::Params::OauthParams(v) => {
5184                std::option::Option::Some(v)
5185            }
5186            _ => std::option::Option::None,
5187        })
5188    }
5189
5190    /// Sets the value of [params][crate::model::FinishOAuthRequest::params]
5191    /// to hold a `OauthParams`.
5192    ///
5193    /// Note that all the setters affecting `params` are
5194    /// mutually exclusive.
5195    ///
5196    /// # Example
5197    /// ```ignore,no_run
5198    /// # use google_cloud_developerconnect_v1::model::FinishOAuthRequest;
5199    /// use google_cloud_developerconnect_v1::model::finish_o_auth_request::OAuthParams;
5200    /// let x = FinishOAuthRequest::new().set_oauth_params(OAuthParams::default()/* use setters */);
5201    /// assert!(x.oauth_params().is_some());
5202    /// assert!(x.google_oauth_params().is_none());
5203    /// ```
5204    pub fn set_oauth_params<
5205        T: std::convert::Into<std::boxed::Box<crate::model::finish_o_auth_request::OAuthParams>>,
5206    >(
5207        mut self,
5208        v: T,
5209    ) -> Self {
5210        self.params = std::option::Option::Some(
5211            crate::model::finish_o_auth_request::Params::OauthParams(v.into()),
5212        );
5213        self
5214    }
5215
5216    /// The value of [params][crate::model::FinishOAuthRequest::params]
5217    /// if it holds a `GoogleOauthParams`, `None` if the field is not set or
5218    /// holds a different branch.
5219    pub fn google_oauth_params(
5220        &self,
5221    ) -> std::option::Option<&std::boxed::Box<crate::model::finish_o_auth_request::GoogleOAuthParams>>
5222    {
5223        #[allow(unreachable_patterns)]
5224        self.params.as_ref().and_then(|v| match v {
5225            crate::model::finish_o_auth_request::Params::GoogleOauthParams(v) => {
5226                std::option::Option::Some(v)
5227            }
5228            _ => std::option::Option::None,
5229        })
5230    }
5231
5232    /// Sets the value of [params][crate::model::FinishOAuthRequest::params]
5233    /// to hold a `GoogleOauthParams`.
5234    ///
5235    /// Note that all the setters affecting `params` are
5236    /// mutually exclusive.
5237    ///
5238    /// # Example
5239    /// ```ignore,no_run
5240    /// # use google_cloud_developerconnect_v1::model::FinishOAuthRequest;
5241    /// use google_cloud_developerconnect_v1::model::finish_o_auth_request::GoogleOAuthParams;
5242    /// let x = FinishOAuthRequest::new().set_google_oauth_params(GoogleOAuthParams::default()/* use setters */);
5243    /// assert!(x.google_oauth_params().is_some());
5244    /// assert!(x.oauth_params().is_none());
5245    /// ```
5246    pub fn set_google_oauth_params<
5247        T: std::convert::Into<std::boxed::Box<crate::model::finish_o_auth_request::GoogleOAuthParams>>,
5248    >(
5249        mut self,
5250        v: T,
5251    ) -> Self {
5252        self.params = std::option::Option::Some(
5253            crate::model::finish_o_auth_request::Params::GoogleOauthParams(v.into()),
5254        );
5255        self
5256    }
5257}
5258
5259impl wkt::message::Message for FinishOAuthRequest {
5260    fn typename() -> &'static str {
5261        "type.googleapis.com/google.cloud.developerconnect.v1.FinishOAuthRequest"
5262    }
5263}
5264
5265/// Defines additional types related to [FinishOAuthRequest].
5266pub mod finish_o_auth_request {
5267    #[allow(unused_imports)]
5268    use super::*;
5269
5270    /// The params returned by non-Google OAuth 2.0 flow redirect.
5271    #[derive(Clone, Default, PartialEq)]
5272    #[non_exhaustive]
5273    pub struct OAuthParams {
5274        /// Required. The code to be used for getting the token from SCM provider.
5275        pub code: std::string::String,
5276
5277        /// Required. The ticket to be used for post processing the callback from SCM
5278        /// provider.
5279        pub ticket: std::string::String,
5280
5281        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5282    }
5283
5284    impl OAuthParams {
5285        /// Creates a new default instance.
5286        pub fn new() -> Self {
5287            std::default::Default::default()
5288        }
5289
5290        /// Sets the value of [code][crate::model::finish_o_auth_request::OAuthParams::code].
5291        ///
5292        /// # Example
5293        /// ```ignore,no_run
5294        /// # use google_cloud_developerconnect_v1::model::finish_o_auth_request::OAuthParams;
5295        /// let x = OAuthParams::new().set_code("example");
5296        /// ```
5297        pub fn set_code<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5298            self.code = v.into();
5299            self
5300        }
5301
5302        /// Sets the value of [ticket][crate::model::finish_o_auth_request::OAuthParams::ticket].
5303        ///
5304        /// # Example
5305        /// ```ignore,no_run
5306        /// # use google_cloud_developerconnect_v1::model::finish_o_auth_request::OAuthParams;
5307        /// let x = OAuthParams::new().set_ticket("example");
5308        /// ```
5309        pub fn set_ticket<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5310            self.ticket = v.into();
5311            self
5312        }
5313    }
5314
5315    impl wkt::message::Message for OAuthParams {
5316        fn typename() -> &'static str {
5317            "type.googleapis.com/google.cloud.developerconnect.v1.FinishOAuthRequest.OAuthParams"
5318        }
5319    }
5320
5321    /// The params returned by Google OAuth flow redirects.
5322    #[derive(Clone, Default, PartialEq)]
5323    #[non_exhaustive]
5324    pub struct GoogleOAuthParams {
5325        /// Required. The scopes returned by Google OAuth flow.
5326        pub scopes: std::vec::Vec<std::string::String>,
5327
5328        /// Optional. The version info returned by Google OAuth flow.
5329        pub version_info: std::string::String,
5330
5331        /// Required. The ticket to be used for post processing the callback from
5332        /// Google OAuth flow.
5333        pub ticket: std::string::String,
5334
5335        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5336    }
5337
5338    impl GoogleOAuthParams {
5339        /// Creates a new default instance.
5340        pub fn new() -> Self {
5341            std::default::Default::default()
5342        }
5343
5344        /// Sets the value of [scopes][crate::model::finish_o_auth_request::GoogleOAuthParams::scopes].
5345        ///
5346        /// # Example
5347        /// ```ignore,no_run
5348        /// # use google_cloud_developerconnect_v1::model::finish_o_auth_request::GoogleOAuthParams;
5349        /// let x = GoogleOAuthParams::new().set_scopes(["a", "b", "c"]);
5350        /// ```
5351        pub fn set_scopes<T, V>(mut self, v: T) -> Self
5352        where
5353            T: std::iter::IntoIterator<Item = V>,
5354            V: std::convert::Into<std::string::String>,
5355        {
5356            use std::iter::Iterator;
5357            self.scopes = v.into_iter().map(|i| i.into()).collect();
5358            self
5359        }
5360
5361        /// Sets the value of [version_info][crate::model::finish_o_auth_request::GoogleOAuthParams::version_info].
5362        ///
5363        /// # Example
5364        /// ```ignore,no_run
5365        /// # use google_cloud_developerconnect_v1::model::finish_o_auth_request::GoogleOAuthParams;
5366        /// let x = GoogleOAuthParams::new().set_version_info("example");
5367        /// ```
5368        pub fn set_version_info<T: std::convert::Into<std::string::String>>(
5369            mut self,
5370            v: T,
5371        ) -> Self {
5372            self.version_info = v.into();
5373            self
5374        }
5375
5376        /// Sets the value of [ticket][crate::model::finish_o_auth_request::GoogleOAuthParams::ticket].
5377        ///
5378        /// # Example
5379        /// ```ignore,no_run
5380        /// # use google_cloud_developerconnect_v1::model::finish_o_auth_request::GoogleOAuthParams;
5381        /// let x = GoogleOAuthParams::new().set_ticket("example");
5382        /// ```
5383        pub fn set_ticket<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5384            self.ticket = v.into();
5385            self
5386        }
5387    }
5388
5389    impl wkt::message::Message for GoogleOAuthParams {
5390        fn typename() -> &'static str {
5391            "type.googleapis.com/google.cloud.developerconnect.v1.FinishOAuthRequest.GoogleOAuthParams"
5392        }
5393    }
5394
5395    /// The params returned by OAuth flow redirect.
5396    #[derive(Clone, Debug, PartialEq)]
5397    #[non_exhaustive]
5398    pub enum Params {
5399        /// The params returned by non-Google OAuth 2.0 flow redirect.
5400        OauthParams(std::boxed::Box<crate::model::finish_o_auth_request::OAuthParams>),
5401        /// The params returned by Google OAuth flow redirects.
5402        GoogleOauthParams(std::boxed::Box<crate::model::finish_o_auth_request::GoogleOAuthParams>),
5403    }
5404}
5405
5406/// Message for responding to finishing an OAuth flow.
5407#[derive(Clone, Default, PartialEq)]
5408#[non_exhaustive]
5409pub struct FinishOAuthResponse {
5410    /// The error resulted from exchanging OAuth tokens from the service provider.
5411    pub exchange_error: std::option::Option<crate::model::ExchangeError>,
5412
5413    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5414}
5415
5416impl FinishOAuthResponse {
5417    /// Creates a new default instance.
5418    pub fn new() -> Self {
5419        std::default::Default::default()
5420    }
5421
5422    /// Sets the value of [exchange_error][crate::model::FinishOAuthResponse::exchange_error].
5423    ///
5424    /// # Example
5425    /// ```ignore,no_run
5426    /// # use google_cloud_developerconnect_v1::model::FinishOAuthResponse;
5427    /// use google_cloud_developerconnect_v1::model::ExchangeError;
5428    /// let x = FinishOAuthResponse::new().set_exchange_error(ExchangeError::default()/* use setters */);
5429    /// ```
5430    pub fn set_exchange_error<T>(mut self, v: T) -> Self
5431    where
5432        T: std::convert::Into<crate::model::ExchangeError>,
5433    {
5434        self.exchange_error = std::option::Option::Some(v.into());
5435        self
5436    }
5437
5438    /// Sets or clears the value of [exchange_error][crate::model::FinishOAuthResponse::exchange_error].
5439    ///
5440    /// # Example
5441    /// ```ignore,no_run
5442    /// # use google_cloud_developerconnect_v1::model::FinishOAuthResponse;
5443    /// use google_cloud_developerconnect_v1::model::ExchangeError;
5444    /// let x = FinishOAuthResponse::new().set_or_clear_exchange_error(Some(ExchangeError::default()/* use setters */));
5445    /// let x = FinishOAuthResponse::new().set_or_clear_exchange_error(None::<ExchangeError>);
5446    /// ```
5447    pub fn set_or_clear_exchange_error<T>(mut self, v: std::option::Option<T>) -> Self
5448    where
5449        T: std::convert::Into<crate::model::ExchangeError>,
5450    {
5451        self.exchange_error = v.map(|x| x.into());
5452        self
5453    }
5454}
5455
5456impl wkt::message::Message for FinishOAuthResponse {
5457    fn typename() -> &'static str {
5458        "type.googleapis.com/google.cloud.developerconnect.v1.FinishOAuthResponse"
5459    }
5460}
5461
5462/// Message for representing an error from exchanging OAuth tokens.
5463#[derive(Clone, Default, PartialEq)]
5464#[non_exhaustive]
5465pub struct ExchangeError {
5466    /// <https://datatracker.ietf.org/doc/html/rfc6749#section-5.2> - error
5467    pub code: std::string::String,
5468
5469    /// <https://datatracker.ietf.org/doc/html/rfc6749#section-5.2> -
5470    /// error_description
5471    pub description: std::string::String,
5472
5473    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5474}
5475
5476impl ExchangeError {
5477    /// Creates a new default instance.
5478    pub fn new() -> Self {
5479        std::default::Default::default()
5480    }
5481
5482    /// Sets the value of [code][crate::model::ExchangeError::code].
5483    ///
5484    /// # Example
5485    /// ```ignore,no_run
5486    /// # use google_cloud_developerconnect_v1::model::ExchangeError;
5487    /// let x = ExchangeError::new().set_code("example");
5488    /// ```
5489    pub fn set_code<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5490        self.code = v.into();
5491        self
5492    }
5493
5494    /// Sets the value of [description][crate::model::ExchangeError::description].
5495    ///
5496    /// # Example
5497    /// ```ignore,no_run
5498    /// # use google_cloud_developerconnect_v1::model::ExchangeError;
5499    /// let x = ExchangeError::new().set_description("example");
5500    /// ```
5501    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5502        self.description = v.into();
5503        self
5504    }
5505}
5506
5507impl wkt::message::Message for ExchangeError {
5508    fn typename() -> &'static str {
5509        "type.googleapis.com/google.cloud.developerconnect.v1.ExchangeError"
5510    }
5511}
5512
5513/// Message describing the GitRepositoryLink object
5514#[derive(Clone, Default, PartialEq)]
5515#[non_exhaustive]
5516pub struct GitRepositoryLink {
5517    /// Identifier. Resource name of the repository, in the format
5518    /// `projects/*/locations/*/connections/*/gitRepositoryLinks/*`.
5519    pub name: std::string::String,
5520
5521    /// Required. Git Clone URI.
5522    pub clone_uri: std::string::String,
5523
5524    /// Output only. [Output only] Create timestamp
5525    pub create_time: std::option::Option<wkt::Timestamp>,
5526
5527    /// Output only. [Output only] Update timestamp
5528    pub update_time: std::option::Option<wkt::Timestamp>,
5529
5530    /// Output only. [Output only] Delete timestamp
5531    pub delete_time: std::option::Option<wkt::Timestamp>,
5532
5533    /// Optional. Labels as key value pairs
5534    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
5535
5536    /// Optional. This checksum is computed by the server based on the value of
5537    /// other fields, and may be sent on update and delete requests to ensure the
5538    /// client has an up-to-date value before proceeding.
5539    pub etag: std::string::String,
5540
5541    /// Output only. Set to true when the connection is being set up or updated in
5542    /// the background.
5543    pub reconciling: bool,
5544
5545    /// Optional. Allows clients to store small amounts of arbitrary data.
5546    pub annotations: std::collections::HashMap<std::string::String, std::string::String>,
5547
5548    /// Output only. A system-assigned unique identifier for the GitRepositoryLink.
5549    pub uid: std::string::String,
5550
5551    /// Output only. External ID of the webhook created for the repository.
5552    pub webhook_id: std::string::String,
5553
5554    /// Output only. URI to access the linked repository through the Git Proxy.
5555    /// This field is only populated if the git proxy is enabled for the
5556    /// connection.
5557    pub git_proxy_uri: std::string::String,
5558
5559    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5560}
5561
5562impl GitRepositoryLink {
5563    /// Creates a new default instance.
5564    pub fn new() -> Self {
5565        std::default::Default::default()
5566    }
5567
5568    /// Sets the value of [name][crate::model::GitRepositoryLink::name].
5569    ///
5570    /// # Example
5571    /// ```ignore,no_run
5572    /// # use google_cloud_developerconnect_v1::model::GitRepositoryLink;
5573    /// let x = GitRepositoryLink::new().set_name("example");
5574    /// ```
5575    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5576        self.name = v.into();
5577        self
5578    }
5579
5580    /// Sets the value of [clone_uri][crate::model::GitRepositoryLink::clone_uri].
5581    ///
5582    /// # Example
5583    /// ```ignore,no_run
5584    /// # use google_cloud_developerconnect_v1::model::GitRepositoryLink;
5585    /// let x = GitRepositoryLink::new().set_clone_uri("example");
5586    /// ```
5587    pub fn set_clone_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5588        self.clone_uri = v.into();
5589        self
5590    }
5591
5592    /// Sets the value of [create_time][crate::model::GitRepositoryLink::create_time].
5593    ///
5594    /// # Example
5595    /// ```ignore,no_run
5596    /// # use google_cloud_developerconnect_v1::model::GitRepositoryLink;
5597    /// use wkt::Timestamp;
5598    /// let x = GitRepositoryLink::new().set_create_time(Timestamp::default()/* use setters */);
5599    /// ```
5600    pub fn set_create_time<T>(mut self, v: T) -> Self
5601    where
5602        T: std::convert::Into<wkt::Timestamp>,
5603    {
5604        self.create_time = std::option::Option::Some(v.into());
5605        self
5606    }
5607
5608    /// Sets or clears the value of [create_time][crate::model::GitRepositoryLink::create_time].
5609    ///
5610    /// # Example
5611    /// ```ignore,no_run
5612    /// # use google_cloud_developerconnect_v1::model::GitRepositoryLink;
5613    /// use wkt::Timestamp;
5614    /// let x = GitRepositoryLink::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
5615    /// let x = GitRepositoryLink::new().set_or_clear_create_time(None::<Timestamp>);
5616    /// ```
5617    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
5618    where
5619        T: std::convert::Into<wkt::Timestamp>,
5620    {
5621        self.create_time = v.map(|x| x.into());
5622        self
5623    }
5624
5625    /// Sets the value of [update_time][crate::model::GitRepositoryLink::update_time].
5626    ///
5627    /// # Example
5628    /// ```ignore,no_run
5629    /// # use google_cloud_developerconnect_v1::model::GitRepositoryLink;
5630    /// use wkt::Timestamp;
5631    /// let x = GitRepositoryLink::new().set_update_time(Timestamp::default()/* use setters */);
5632    /// ```
5633    pub fn set_update_time<T>(mut self, v: T) -> Self
5634    where
5635        T: std::convert::Into<wkt::Timestamp>,
5636    {
5637        self.update_time = std::option::Option::Some(v.into());
5638        self
5639    }
5640
5641    /// Sets or clears the value of [update_time][crate::model::GitRepositoryLink::update_time].
5642    ///
5643    /// # Example
5644    /// ```ignore,no_run
5645    /// # use google_cloud_developerconnect_v1::model::GitRepositoryLink;
5646    /// use wkt::Timestamp;
5647    /// let x = GitRepositoryLink::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
5648    /// let x = GitRepositoryLink::new().set_or_clear_update_time(None::<Timestamp>);
5649    /// ```
5650    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
5651    where
5652        T: std::convert::Into<wkt::Timestamp>,
5653    {
5654        self.update_time = v.map(|x| x.into());
5655        self
5656    }
5657
5658    /// Sets the value of [delete_time][crate::model::GitRepositoryLink::delete_time].
5659    ///
5660    /// # Example
5661    /// ```ignore,no_run
5662    /// # use google_cloud_developerconnect_v1::model::GitRepositoryLink;
5663    /// use wkt::Timestamp;
5664    /// let x = GitRepositoryLink::new().set_delete_time(Timestamp::default()/* use setters */);
5665    /// ```
5666    pub fn set_delete_time<T>(mut self, v: T) -> Self
5667    where
5668        T: std::convert::Into<wkt::Timestamp>,
5669    {
5670        self.delete_time = std::option::Option::Some(v.into());
5671        self
5672    }
5673
5674    /// Sets or clears the value of [delete_time][crate::model::GitRepositoryLink::delete_time].
5675    ///
5676    /// # Example
5677    /// ```ignore,no_run
5678    /// # use google_cloud_developerconnect_v1::model::GitRepositoryLink;
5679    /// use wkt::Timestamp;
5680    /// let x = GitRepositoryLink::new().set_or_clear_delete_time(Some(Timestamp::default()/* use setters */));
5681    /// let x = GitRepositoryLink::new().set_or_clear_delete_time(None::<Timestamp>);
5682    /// ```
5683    pub fn set_or_clear_delete_time<T>(mut self, v: std::option::Option<T>) -> Self
5684    where
5685        T: std::convert::Into<wkt::Timestamp>,
5686    {
5687        self.delete_time = v.map(|x| x.into());
5688        self
5689    }
5690
5691    /// Sets the value of [labels][crate::model::GitRepositoryLink::labels].
5692    ///
5693    /// # Example
5694    /// ```ignore,no_run
5695    /// # use google_cloud_developerconnect_v1::model::GitRepositoryLink;
5696    /// let x = GitRepositoryLink::new().set_labels([
5697    ///     ("key0", "abc"),
5698    ///     ("key1", "xyz"),
5699    /// ]);
5700    /// ```
5701    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
5702    where
5703        T: std::iter::IntoIterator<Item = (K, V)>,
5704        K: std::convert::Into<std::string::String>,
5705        V: std::convert::Into<std::string::String>,
5706    {
5707        use std::iter::Iterator;
5708        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
5709        self
5710    }
5711
5712    /// Sets the value of [etag][crate::model::GitRepositoryLink::etag].
5713    ///
5714    /// # Example
5715    /// ```ignore,no_run
5716    /// # use google_cloud_developerconnect_v1::model::GitRepositoryLink;
5717    /// let x = GitRepositoryLink::new().set_etag("example");
5718    /// ```
5719    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5720        self.etag = v.into();
5721        self
5722    }
5723
5724    /// Sets the value of [reconciling][crate::model::GitRepositoryLink::reconciling].
5725    ///
5726    /// # Example
5727    /// ```ignore,no_run
5728    /// # use google_cloud_developerconnect_v1::model::GitRepositoryLink;
5729    /// let x = GitRepositoryLink::new().set_reconciling(true);
5730    /// ```
5731    pub fn set_reconciling<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5732        self.reconciling = v.into();
5733        self
5734    }
5735
5736    /// Sets the value of [annotations][crate::model::GitRepositoryLink::annotations].
5737    ///
5738    /// # Example
5739    /// ```ignore,no_run
5740    /// # use google_cloud_developerconnect_v1::model::GitRepositoryLink;
5741    /// let x = GitRepositoryLink::new().set_annotations([
5742    ///     ("key0", "abc"),
5743    ///     ("key1", "xyz"),
5744    /// ]);
5745    /// ```
5746    pub fn set_annotations<T, K, V>(mut self, v: T) -> Self
5747    where
5748        T: std::iter::IntoIterator<Item = (K, V)>,
5749        K: std::convert::Into<std::string::String>,
5750        V: std::convert::Into<std::string::String>,
5751    {
5752        use std::iter::Iterator;
5753        self.annotations = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
5754        self
5755    }
5756
5757    /// Sets the value of [uid][crate::model::GitRepositoryLink::uid].
5758    ///
5759    /// # Example
5760    /// ```ignore,no_run
5761    /// # use google_cloud_developerconnect_v1::model::GitRepositoryLink;
5762    /// let x = GitRepositoryLink::new().set_uid("example");
5763    /// ```
5764    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5765        self.uid = v.into();
5766        self
5767    }
5768
5769    /// Sets the value of [webhook_id][crate::model::GitRepositoryLink::webhook_id].
5770    ///
5771    /// # Example
5772    /// ```ignore,no_run
5773    /// # use google_cloud_developerconnect_v1::model::GitRepositoryLink;
5774    /// let x = GitRepositoryLink::new().set_webhook_id("example");
5775    /// ```
5776    pub fn set_webhook_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5777        self.webhook_id = v.into();
5778        self
5779    }
5780
5781    /// Sets the value of [git_proxy_uri][crate::model::GitRepositoryLink::git_proxy_uri].
5782    ///
5783    /// # Example
5784    /// ```ignore,no_run
5785    /// # use google_cloud_developerconnect_v1::model::GitRepositoryLink;
5786    /// let x = GitRepositoryLink::new().set_git_proxy_uri("example");
5787    /// ```
5788    pub fn set_git_proxy_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5789        self.git_proxy_uri = v.into();
5790        self
5791    }
5792}
5793
5794impl wkt::message::Message for GitRepositoryLink {
5795    fn typename() -> &'static str {
5796        "type.googleapis.com/google.cloud.developerconnect.v1.GitRepositoryLink"
5797    }
5798}
5799
5800/// Message for creating a GitRepositoryLink
5801#[derive(Clone, Default, PartialEq)]
5802#[non_exhaustive]
5803pub struct CreateGitRepositoryLinkRequest {
5804    /// Required. Value for parent.
5805    pub parent: std::string::String,
5806
5807    /// Required. The resource being created
5808    pub git_repository_link: std::option::Option<crate::model::GitRepositoryLink>,
5809
5810    /// Required. The ID to use for the repository, which will become the final
5811    /// component of the repository's resource name. This ID should be unique in
5812    /// the connection. Allows alphanumeric characters and any of
5813    /// -._~%!$&'()*+,;=@.
5814    pub git_repository_link_id: std::string::String,
5815
5816    /// Optional. An optional request ID to identify requests. Specify a unique
5817    /// request ID so that if you must retry your request, the server will know to
5818    /// ignore the request if it has already been completed. The server will
5819    /// guarantee that for at least 60 minutes since the first request.
5820    ///
5821    /// For example, consider a situation where you make an initial request and the
5822    /// request times out. If you make the request again with the same request
5823    /// ID, the server can check if original operation with the same request ID
5824    /// was received, and if so, will ignore the second request. This prevents
5825    /// clients from accidentally creating duplicate commitments.
5826    ///
5827    /// The request ID must be a valid UUID with the exception that zero UUID is
5828    /// not supported (00000000-0000-0000-0000-000000000000).
5829    pub request_id: std::string::String,
5830
5831    /// Optional. If set, validate the request, but do not actually post it.
5832    pub validate_only: bool,
5833
5834    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5835}
5836
5837impl CreateGitRepositoryLinkRequest {
5838    /// Creates a new default instance.
5839    pub fn new() -> Self {
5840        std::default::Default::default()
5841    }
5842
5843    /// Sets the value of [parent][crate::model::CreateGitRepositoryLinkRequest::parent].
5844    ///
5845    /// # Example
5846    /// ```ignore,no_run
5847    /// # use google_cloud_developerconnect_v1::model::CreateGitRepositoryLinkRequest;
5848    /// let x = CreateGitRepositoryLinkRequest::new().set_parent("example");
5849    /// ```
5850    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5851        self.parent = v.into();
5852        self
5853    }
5854
5855    /// Sets the value of [git_repository_link][crate::model::CreateGitRepositoryLinkRequest::git_repository_link].
5856    ///
5857    /// # Example
5858    /// ```ignore,no_run
5859    /// # use google_cloud_developerconnect_v1::model::CreateGitRepositoryLinkRequest;
5860    /// use google_cloud_developerconnect_v1::model::GitRepositoryLink;
5861    /// let x = CreateGitRepositoryLinkRequest::new().set_git_repository_link(GitRepositoryLink::default()/* use setters */);
5862    /// ```
5863    pub fn set_git_repository_link<T>(mut self, v: T) -> Self
5864    where
5865        T: std::convert::Into<crate::model::GitRepositoryLink>,
5866    {
5867        self.git_repository_link = std::option::Option::Some(v.into());
5868        self
5869    }
5870
5871    /// Sets or clears the value of [git_repository_link][crate::model::CreateGitRepositoryLinkRequest::git_repository_link].
5872    ///
5873    /// # Example
5874    /// ```ignore,no_run
5875    /// # use google_cloud_developerconnect_v1::model::CreateGitRepositoryLinkRequest;
5876    /// use google_cloud_developerconnect_v1::model::GitRepositoryLink;
5877    /// let x = CreateGitRepositoryLinkRequest::new().set_or_clear_git_repository_link(Some(GitRepositoryLink::default()/* use setters */));
5878    /// let x = CreateGitRepositoryLinkRequest::new().set_or_clear_git_repository_link(None::<GitRepositoryLink>);
5879    /// ```
5880    pub fn set_or_clear_git_repository_link<T>(mut self, v: std::option::Option<T>) -> Self
5881    where
5882        T: std::convert::Into<crate::model::GitRepositoryLink>,
5883    {
5884        self.git_repository_link = v.map(|x| x.into());
5885        self
5886    }
5887
5888    /// Sets the value of [git_repository_link_id][crate::model::CreateGitRepositoryLinkRequest::git_repository_link_id].
5889    ///
5890    /// # Example
5891    /// ```ignore,no_run
5892    /// # use google_cloud_developerconnect_v1::model::CreateGitRepositoryLinkRequest;
5893    /// let x = CreateGitRepositoryLinkRequest::new().set_git_repository_link_id("example");
5894    /// ```
5895    pub fn set_git_repository_link_id<T: std::convert::Into<std::string::String>>(
5896        mut self,
5897        v: T,
5898    ) -> Self {
5899        self.git_repository_link_id = v.into();
5900        self
5901    }
5902
5903    /// Sets the value of [request_id][crate::model::CreateGitRepositoryLinkRequest::request_id].
5904    ///
5905    /// # Example
5906    /// ```ignore,no_run
5907    /// # use google_cloud_developerconnect_v1::model::CreateGitRepositoryLinkRequest;
5908    /// let x = CreateGitRepositoryLinkRequest::new().set_request_id("example");
5909    /// ```
5910    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5911        self.request_id = v.into();
5912        self
5913    }
5914
5915    /// Sets the value of [validate_only][crate::model::CreateGitRepositoryLinkRequest::validate_only].
5916    ///
5917    /// # Example
5918    /// ```ignore,no_run
5919    /// # use google_cloud_developerconnect_v1::model::CreateGitRepositoryLinkRequest;
5920    /// let x = CreateGitRepositoryLinkRequest::new().set_validate_only(true);
5921    /// ```
5922    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5923        self.validate_only = v.into();
5924        self
5925    }
5926}
5927
5928impl wkt::message::Message for CreateGitRepositoryLinkRequest {
5929    fn typename() -> &'static str {
5930        "type.googleapis.com/google.cloud.developerconnect.v1.CreateGitRepositoryLinkRequest"
5931    }
5932}
5933
5934/// Message for deleting a GitRepositoryLink
5935#[derive(Clone, Default, PartialEq)]
5936#[non_exhaustive]
5937pub struct DeleteGitRepositoryLinkRequest {
5938    /// Required. Name of the resource
5939    pub name: std::string::String,
5940
5941    /// Optional. An optional request ID to identify requests. Specify a unique
5942    /// request ID so that if you must retry your request, the server will know to
5943    /// ignore the request if it has already been completed. The server will
5944    /// guarantee that for at least 60 minutes after the first request.
5945    ///
5946    /// For example, consider a situation where you make an initial request and the
5947    /// request times out. If you make the request again with the same request
5948    /// ID, the server can check if original operation with the same request ID
5949    /// was received, and if so, will ignore the second request. This prevents
5950    /// clients from accidentally creating duplicate commitments.
5951    ///
5952    /// The request ID must be a valid UUID with the exception that zero UUID is
5953    /// not supported (00000000-0000-0000-0000-000000000000).
5954    pub request_id: std::string::String,
5955
5956    /// Optional. If set, validate the request, but do not actually post it.
5957    pub validate_only: bool,
5958
5959    /// Optional. This checksum is computed by the server based on the value of
5960    /// other fields, and may be sent on update and delete requests to ensure the
5961    /// client has an up-to-date value before proceeding.
5962    pub etag: std::string::String,
5963
5964    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5965}
5966
5967impl DeleteGitRepositoryLinkRequest {
5968    /// Creates a new default instance.
5969    pub fn new() -> Self {
5970        std::default::Default::default()
5971    }
5972
5973    /// Sets the value of [name][crate::model::DeleteGitRepositoryLinkRequest::name].
5974    ///
5975    /// # Example
5976    /// ```ignore,no_run
5977    /// # use google_cloud_developerconnect_v1::model::DeleteGitRepositoryLinkRequest;
5978    /// let x = DeleteGitRepositoryLinkRequest::new().set_name("example");
5979    /// ```
5980    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5981        self.name = v.into();
5982        self
5983    }
5984
5985    /// Sets the value of [request_id][crate::model::DeleteGitRepositoryLinkRequest::request_id].
5986    ///
5987    /// # Example
5988    /// ```ignore,no_run
5989    /// # use google_cloud_developerconnect_v1::model::DeleteGitRepositoryLinkRequest;
5990    /// let x = DeleteGitRepositoryLinkRequest::new().set_request_id("example");
5991    /// ```
5992    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5993        self.request_id = v.into();
5994        self
5995    }
5996
5997    /// Sets the value of [validate_only][crate::model::DeleteGitRepositoryLinkRequest::validate_only].
5998    ///
5999    /// # Example
6000    /// ```ignore,no_run
6001    /// # use google_cloud_developerconnect_v1::model::DeleteGitRepositoryLinkRequest;
6002    /// let x = DeleteGitRepositoryLinkRequest::new().set_validate_only(true);
6003    /// ```
6004    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6005        self.validate_only = v.into();
6006        self
6007    }
6008
6009    /// Sets the value of [etag][crate::model::DeleteGitRepositoryLinkRequest::etag].
6010    ///
6011    /// # Example
6012    /// ```ignore,no_run
6013    /// # use google_cloud_developerconnect_v1::model::DeleteGitRepositoryLinkRequest;
6014    /// let x = DeleteGitRepositoryLinkRequest::new().set_etag("example");
6015    /// ```
6016    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6017        self.etag = v.into();
6018        self
6019    }
6020}
6021
6022impl wkt::message::Message for DeleteGitRepositoryLinkRequest {
6023    fn typename() -> &'static str {
6024        "type.googleapis.com/google.cloud.developerconnect.v1.DeleteGitRepositoryLinkRequest"
6025    }
6026}
6027
6028/// Message for requesting a list of GitRepositoryLinks
6029#[derive(Clone, Default, PartialEq)]
6030#[non_exhaustive]
6031pub struct ListGitRepositoryLinksRequest {
6032    /// Required. Parent value for ListGitRepositoryLinksRequest
6033    pub parent: std::string::String,
6034
6035    /// Optional. Requested page size. Server may return fewer items than
6036    /// requested. If unspecified, server will pick an appropriate default.
6037    pub page_size: i32,
6038
6039    /// Optional. A token identifying a page of results the server should return.
6040    pub page_token: std::string::String,
6041
6042    /// Optional. Filtering results
6043    pub filter: std::string::String,
6044
6045    /// Optional. Hint for how to order the results
6046    pub order_by: std::string::String,
6047
6048    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6049}
6050
6051impl ListGitRepositoryLinksRequest {
6052    /// Creates a new default instance.
6053    pub fn new() -> Self {
6054        std::default::Default::default()
6055    }
6056
6057    /// Sets the value of [parent][crate::model::ListGitRepositoryLinksRequest::parent].
6058    ///
6059    /// # Example
6060    /// ```ignore,no_run
6061    /// # use google_cloud_developerconnect_v1::model::ListGitRepositoryLinksRequest;
6062    /// let x = ListGitRepositoryLinksRequest::new().set_parent("example");
6063    /// ```
6064    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6065        self.parent = v.into();
6066        self
6067    }
6068
6069    /// Sets the value of [page_size][crate::model::ListGitRepositoryLinksRequest::page_size].
6070    ///
6071    /// # Example
6072    /// ```ignore,no_run
6073    /// # use google_cloud_developerconnect_v1::model::ListGitRepositoryLinksRequest;
6074    /// let x = ListGitRepositoryLinksRequest::new().set_page_size(42);
6075    /// ```
6076    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6077        self.page_size = v.into();
6078        self
6079    }
6080
6081    /// Sets the value of [page_token][crate::model::ListGitRepositoryLinksRequest::page_token].
6082    ///
6083    /// # Example
6084    /// ```ignore,no_run
6085    /// # use google_cloud_developerconnect_v1::model::ListGitRepositoryLinksRequest;
6086    /// let x = ListGitRepositoryLinksRequest::new().set_page_token("example");
6087    /// ```
6088    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6089        self.page_token = v.into();
6090        self
6091    }
6092
6093    /// Sets the value of [filter][crate::model::ListGitRepositoryLinksRequest::filter].
6094    ///
6095    /// # Example
6096    /// ```ignore,no_run
6097    /// # use google_cloud_developerconnect_v1::model::ListGitRepositoryLinksRequest;
6098    /// let x = ListGitRepositoryLinksRequest::new().set_filter("example");
6099    /// ```
6100    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6101        self.filter = v.into();
6102        self
6103    }
6104
6105    /// Sets the value of [order_by][crate::model::ListGitRepositoryLinksRequest::order_by].
6106    ///
6107    /// # Example
6108    /// ```ignore,no_run
6109    /// # use google_cloud_developerconnect_v1::model::ListGitRepositoryLinksRequest;
6110    /// let x = ListGitRepositoryLinksRequest::new().set_order_by("example");
6111    /// ```
6112    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6113        self.order_by = v.into();
6114        self
6115    }
6116}
6117
6118impl wkt::message::Message for ListGitRepositoryLinksRequest {
6119    fn typename() -> &'static str {
6120        "type.googleapis.com/google.cloud.developerconnect.v1.ListGitRepositoryLinksRequest"
6121    }
6122}
6123
6124/// Message for response to listing GitRepositoryLinks
6125#[derive(Clone, Default, PartialEq)]
6126#[non_exhaustive]
6127pub struct ListGitRepositoryLinksResponse {
6128    /// The list of GitRepositoryLinks
6129    pub git_repository_links: std::vec::Vec<crate::model::GitRepositoryLink>,
6130
6131    /// A token identifying a page of results the server should return.
6132    pub next_page_token: std::string::String,
6133
6134    /// Locations that could not be reached.
6135    pub unreachable: std::vec::Vec<std::string::String>,
6136
6137    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6138}
6139
6140impl ListGitRepositoryLinksResponse {
6141    /// Creates a new default instance.
6142    pub fn new() -> Self {
6143        std::default::Default::default()
6144    }
6145
6146    /// Sets the value of [git_repository_links][crate::model::ListGitRepositoryLinksResponse::git_repository_links].
6147    ///
6148    /// # Example
6149    /// ```ignore,no_run
6150    /// # use google_cloud_developerconnect_v1::model::ListGitRepositoryLinksResponse;
6151    /// use google_cloud_developerconnect_v1::model::GitRepositoryLink;
6152    /// let x = ListGitRepositoryLinksResponse::new()
6153    ///     .set_git_repository_links([
6154    ///         GitRepositoryLink::default()/* use setters */,
6155    ///         GitRepositoryLink::default()/* use (different) setters */,
6156    ///     ]);
6157    /// ```
6158    pub fn set_git_repository_links<T, V>(mut self, v: T) -> Self
6159    where
6160        T: std::iter::IntoIterator<Item = V>,
6161        V: std::convert::Into<crate::model::GitRepositoryLink>,
6162    {
6163        use std::iter::Iterator;
6164        self.git_repository_links = v.into_iter().map(|i| i.into()).collect();
6165        self
6166    }
6167
6168    /// Sets the value of [next_page_token][crate::model::ListGitRepositoryLinksResponse::next_page_token].
6169    ///
6170    /// # Example
6171    /// ```ignore,no_run
6172    /// # use google_cloud_developerconnect_v1::model::ListGitRepositoryLinksResponse;
6173    /// let x = ListGitRepositoryLinksResponse::new().set_next_page_token("example");
6174    /// ```
6175    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6176        self.next_page_token = v.into();
6177        self
6178    }
6179
6180    /// Sets the value of [unreachable][crate::model::ListGitRepositoryLinksResponse::unreachable].
6181    ///
6182    /// # Example
6183    /// ```ignore,no_run
6184    /// # use google_cloud_developerconnect_v1::model::ListGitRepositoryLinksResponse;
6185    /// let x = ListGitRepositoryLinksResponse::new().set_unreachable(["a", "b", "c"]);
6186    /// ```
6187    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
6188    where
6189        T: std::iter::IntoIterator<Item = V>,
6190        V: std::convert::Into<std::string::String>,
6191    {
6192        use std::iter::Iterator;
6193        self.unreachable = v.into_iter().map(|i| i.into()).collect();
6194        self
6195    }
6196}
6197
6198impl wkt::message::Message for ListGitRepositoryLinksResponse {
6199    fn typename() -> &'static str {
6200        "type.googleapis.com/google.cloud.developerconnect.v1.ListGitRepositoryLinksResponse"
6201    }
6202}
6203
6204#[doc(hidden)]
6205impl google_cloud_gax::paginator::internal::PageableResponse for ListGitRepositoryLinksResponse {
6206    type PageItem = crate::model::GitRepositoryLink;
6207
6208    fn items(self) -> std::vec::Vec<Self::PageItem> {
6209        self.git_repository_links
6210    }
6211
6212    fn next_page_token(&self) -> std::string::String {
6213        use std::clone::Clone;
6214        self.next_page_token.clone()
6215    }
6216}
6217
6218/// Message for getting a GitRepositoryLink
6219#[derive(Clone, Default, PartialEq)]
6220#[non_exhaustive]
6221pub struct GetGitRepositoryLinkRequest {
6222    /// Required. Name of the resource
6223    pub name: std::string::String,
6224
6225    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6226}
6227
6228impl GetGitRepositoryLinkRequest {
6229    /// Creates a new default instance.
6230    pub fn new() -> Self {
6231        std::default::Default::default()
6232    }
6233
6234    /// Sets the value of [name][crate::model::GetGitRepositoryLinkRequest::name].
6235    ///
6236    /// # Example
6237    /// ```ignore,no_run
6238    /// # use google_cloud_developerconnect_v1::model::GetGitRepositoryLinkRequest;
6239    /// let x = GetGitRepositoryLinkRequest::new().set_name("example");
6240    /// ```
6241    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6242        self.name = v.into();
6243        self
6244    }
6245}
6246
6247impl wkt::message::Message for GetGitRepositoryLinkRequest {
6248    fn typename() -> &'static str {
6249        "type.googleapis.com/google.cloud.developerconnect.v1.GetGitRepositoryLinkRequest"
6250    }
6251}
6252
6253/// Message for fetching SCM read/write token.
6254#[derive(Clone, Default, PartialEq)]
6255#[non_exhaustive]
6256pub struct FetchReadWriteTokenRequest {
6257    /// Required. The resource name of the gitRepositoryLink in the format
6258    /// `projects/*/locations/*/connections/*/gitRepositoryLinks/*`.
6259    pub git_repository_link: std::string::String,
6260
6261    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6262}
6263
6264impl FetchReadWriteTokenRequest {
6265    /// Creates a new default instance.
6266    pub fn new() -> Self {
6267        std::default::Default::default()
6268    }
6269
6270    /// Sets the value of [git_repository_link][crate::model::FetchReadWriteTokenRequest::git_repository_link].
6271    ///
6272    /// # Example
6273    /// ```ignore,no_run
6274    /// # use google_cloud_developerconnect_v1::model::FetchReadWriteTokenRequest;
6275    /// let x = FetchReadWriteTokenRequest::new().set_git_repository_link("example");
6276    /// ```
6277    pub fn set_git_repository_link<T: std::convert::Into<std::string::String>>(
6278        mut self,
6279        v: T,
6280    ) -> Self {
6281        self.git_repository_link = v.into();
6282        self
6283    }
6284}
6285
6286impl wkt::message::Message for FetchReadWriteTokenRequest {
6287    fn typename() -> &'static str {
6288        "type.googleapis.com/google.cloud.developerconnect.v1.FetchReadWriteTokenRequest"
6289    }
6290}
6291
6292/// Message for fetching SCM read token.
6293#[derive(Clone, Default, PartialEq)]
6294#[non_exhaustive]
6295pub struct FetchReadTokenRequest {
6296    /// Required. The resource name of the gitRepositoryLink in the format
6297    /// `projects/*/locations/*/connections/*/gitRepositoryLinks/*`.
6298    pub git_repository_link: std::string::String,
6299
6300    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6301}
6302
6303impl FetchReadTokenRequest {
6304    /// Creates a new default instance.
6305    pub fn new() -> Self {
6306        std::default::Default::default()
6307    }
6308
6309    /// Sets the value of [git_repository_link][crate::model::FetchReadTokenRequest::git_repository_link].
6310    ///
6311    /// # Example
6312    /// ```ignore,no_run
6313    /// # use google_cloud_developerconnect_v1::model::FetchReadTokenRequest;
6314    /// let x = FetchReadTokenRequest::new().set_git_repository_link("example");
6315    /// ```
6316    pub fn set_git_repository_link<T: std::convert::Into<std::string::String>>(
6317        mut self,
6318        v: T,
6319    ) -> Self {
6320        self.git_repository_link = v.into();
6321        self
6322    }
6323}
6324
6325impl wkt::message::Message for FetchReadTokenRequest {
6326    fn typename() -> &'static str {
6327        "type.googleapis.com/google.cloud.developerconnect.v1.FetchReadTokenRequest"
6328    }
6329}
6330
6331/// Message for responding to get read token.
6332#[derive(Clone, Default, PartialEq)]
6333#[non_exhaustive]
6334pub struct FetchReadTokenResponse {
6335    /// The token content.
6336    pub token: std::string::String,
6337
6338    /// Expiration timestamp. Can be empty if unknown or non-expiring.
6339    pub expiration_time: std::option::Option<wkt::Timestamp>,
6340
6341    /// The git_username to specify when making a git clone with the
6342    /// token. For example, for GitHub GitRepositoryLinks, this would be
6343    /// "x-access-token"
6344    pub git_username: std::string::String,
6345
6346    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6347}
6348
6349impl FetchReadTokenResponse {
6350    /// Creates a new default instance.
6351    pub fn new() -> Self {
6352        std::default::Default::default()
6353    }
6354
6355    /// Sets the value of [token][crate::model::FetchReadTokenResponse::token].
6356    ///
6357    /// # Example
6358    /// ```ignore,no_run
6359    /// # use google_cloud_developerconnect_v1::model::FetchReadTokenResponse;
6360    /// let x = FetchReadTokenResponse::new().set_token("example");
6361    /// ```
6362    pub fn set_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6363        self.token = v.into();
6364        self
6365    }
6366
6367    /// Sets the value of [expiration_time][crate::model::FetchReadTokenResponse::expiration_time].
6368    ///
6369    /// # Example
6370    /// ```ignore,no_run
6371    /// # use google_cloud_developerconnect_v1::model::FetchReadTokenResponse;
6372    /// use wkt::Timestamp;
6373    /// let x = FetchReadTokenResponse::new().set_expiration_time(Timestamp::default()/* use setters */);
6374    /// ```
6375    pub fn set_expiration_time<T>(mut self, v: T) -> Self
6376    where
6377        T: std::convert::Into<wkt::Timestamp>,
6378    {
6379        self.expiration_time = std::option::Option::Some(v.into());
6380        self
6381    }
6382
6383    /// Sets or clears the value of [expiration_time][crate::model::FetchReadTokenResponse::expiration_time].
6384    ///
6385    /// # Example
6386    /// ```ignore,no_run
6387    /// # use google_cloud_developerconnect_v1::model::FetchReadTokenResponse;
6388    /// use wkt::Timestamp;
6389    /// let x = FetchReadTokenResponse::new().set_or_clear_expiration_time(Some(Timestamp::default()/* use setters */));
6390    /// let x = FetchReadTokenResponse::new().set_or_clear_expiration_time(None::<Timestamp>);
6391    /// ```
6392    pub fn set_or_clear_expiration_time<T>(mut self, v: std::option::Option<T>) -> Self
6393    where
6394        T: std::convert::Into<wkt::Timestamp>,
6395    {
6396        self.expiration_time = v.map(|x| x.into());
6397        self
6398    }
6399
6400    /// Sets the value of [git_username][crate::model::FetchReadTokenResponse::git_username].
6401    ///
6402    /// # Example
6403    /// ```ignore,no_run
6404    /// # use google_cloud_developerconnect_v1::model::FetchReadTokenResponse;
6405    /// let x = FetchReadTokenResponse::new().set_git_username("example");
6406    /// ```
6407    pub fn set_git_username<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6408        self.git_username = v.into();
6409        self
6410    }
6411}
6412
6413impl wkt::message::Message for FetchReadTokenResponse {
6414    fn typename() -> &'static str {
6415        "type.googleapis.com/google.cloud.developerconnect.v1.FetchReadTokenResponse"
6416    }
6417}
6418
6419/// Message for responding to get read/write token.
6420#[derive(Clone, Default, PartialEq)]
6421#[non_exhaustive]
6422pub struct FetchReadWriteTokenResponse {
6423    /// The token content.
6424    pub token: std::string::String,
6425
6426    /// Expiration timestamp. Can be empty if unknown or non-expiring.
6427    pub expiration_time: std::option::Option<wkt::Timestamp>,
6428
6429    /// The git_username to specify when making a git clone with the
6430    /// token. For example, for GitHub GitRepositoryLinks, this would be
6431    /// "x-access-token"
6432    pub git_username: std::string::String,
6433
6434    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6435}
6436
6437impl FetchReadWriteTokenResponse {
6438    /// Creates a new default instance.
6439    pub fn new() -> Self {
6440        std::default::Default::default()
6441    }
6442
6443    /// Sets the value of [token][crate::model::FetchReadWriteTokenResponse::token].
6444    ///
6445    /// # Example
6446    /// ```ignore,no_run
6447    /// # use google_cloud_developerconnect_v1::model::FetchReadWriteTokenResponse;
6448    /// let x = FetchReadWriteTokenResponse::new().set_token("example");
6449    /// ```
6450    pub fn set_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6451        self.token = v.into();
6452        self
6453    }
6454
6455    /// Sets the value of [expiration_time][crate::model::FetchReadWriteTokenResponse::expiration_time].
6456    ///
6457    /// # Example
6458    /// ```ignore,no_run
6459    /// # use google_cloud_developerconnect_v1::model::FetchReadWriteTokenResponse;
6460    /// use wkt::Timestamp;
6461    /// let x = FetchReadWriteTokenResponse::new().set_expiration_time(Timestamp::default()/* use setters */);
6462    /// ```
6463    pub fn set_expiration_time<T>(mut self, v: T) -> Self
6464    where
6465        T: std::convert::Into<wkt::Timestamp>,
6466    {
6467        self.expiration_time = std::option::Option::Some(v.into());
6468        self
6469    }
6470
6471    /// Sets or clears the value of [expiration_time][crate::model::FetchReadWriteTokenResponse::expiration_time].
6472    ///
6473    /// # Example
6474    /// ```ignore,no_run
6475    /// # use google_cloud_developerconnect_v1::model::FetchReadWriteTokenResponse;
6476    /// use wkt::Timestamp;
6477    /// let x = FetchReadWriteTokenResponse::new().set_or_clear_expiration_time(Some(Timestamp::default()/* use setters */));
6478    /// let x = FetchReadWriteTokenResponse::new().set_or_clear_expiration_time(None::<Timestamp>);
6479    /// ```
6480    pub fn set_or_clear_expiration_time<T>(mut self, v: std::option::Option<T>) -> Self
6481    where
6482        T: std::convert::Into<wkt::Timestamp>,
6483    {
6484        self.expiration_time = v.map(|x| x.into());
6485        self
6486    }
6487
6488    /// Sets the value of [git_username][crate::model::FetchReadWriteTokenResponse::git_username].
6489    ///
6490    /// # Example
6491    /// ```ignore,no_run
6492    /// # use google_cloud_developerconnect_v1::model::FetchReadWriteTokenResponse;
6493    /// let x = FetchReadWriteTokenResponse::new().set_git_username("example");
6494    /// ```
6495    pub fn set_git_username<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6496        self.git_username = v.into();
6497        self
6498    }
6499}
6500
6501impl wkt::message::Message for FetchReadWriteTokenResponse {
6502    fn typename() -> &'static str {
6503        "type.googleapis.com/google.cloud.developerconnect.v1.FetchReadWriteTokenResponse"
6504    }
6505}
6506
6507/// Request message for FetchLinkableGitRepositoriesRequest.
6508#[derive(Clone, Default, PartialEq)]
6509#[non_exhaustive]
6510pub struct FetchLinkableGitRepositoriesRequest {
6511    /// Required. The name of the Connection.
6512    /// Format: `projects/*/locations/*/connections/*`.
6513    pub connection: std::string::String,
6514
6515    /// Optional. Number of results to return in the list. Defaults to 20.
6516    pub page_size: i32,
6517
6518    /// Optional. Page start.
6519    pub page_token: std::string::String,
6520
6521    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6522}
6523
6524impl FetchLinkableGitRepositoriesRequest {
6525    /// Creates a new default instance.
6526    pub fn new() -> Self {
6527        std::default::Default::default()
6528    }
6529
6530    /// Sets the value of [connection][crate::model::FetchLinkableGitRepositoriesRequest::connection].
6531    ///
6532    /// # Example
6533    /// ```ignore,no_run
6534    /// # use google_cloud_developerconnect_v1::model::FetchLinkableGitRepositoriesRequest;
6535    /// let x = FetchLinkableGitRepositoriesRequest::new().set_connection("example");
6536    /// ```
6537    pub fn set_connection<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6538        self.connection = v.into();
6539        self
6540    }
6541
6542    /// Sets the value of [page_size][crate::model::FetchLinkableGitRepositoriesRequest::page_size].
6543    ///
6544    /// # Example
6545    /// ```ignore,no_run
6546    /// # use google_cloud_developerconnect_v1::model::FetchLinkableGitRepositoriesRequest;
6547    /// let x = FetchLinkableGitRepositoriesRequest::new().set_page_size(42);
6548    /// ```
6549    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6550        self.page_size = v.into();
6551        self
6552    }
6553
6554    /// Sets the value of [page_token][crate::model::FetchLinkableGitRepositoriesRequest::page_token].
6555    ///
6556    /// # Example
6557    /// ```ignore,no_run
6558    /// # use google_cloud_developerconnect_v1::model::FetchLinkableGitRepositoriesRequest;
6559    /// let x = FetchLinkableGitRepositoriesRequest::new().set_page_token("example");
6560    /// ```
6561    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6562        self.page_token = v.into();
6563        self
6564    }
6565}
6566
6567impl wkt::message::Message for FetchLinkableGitRepositoriesRequest {
6568    fn typename() -> &'static str {
6569        "type.googleapis.com/google.cloud.developerconnect.v1.FetchLinkableGitRepositoriesRequest"
6570    }
6571}
6572
6573/// Response message for FetchLinkableGitRepositories.
6574#[derive(Clone, Default, PartialEq)]
6575#[non_exhaustive]
6576pub struct FetchLinkableGitRepositoriesResponse {
6577    /// The git repositories that can be linked to the connection.
6578    pub linkable_git_repositories: std::vec::Vec<crate::model::LinkableGitRepository>,
6579
6580    /// A token identifying a page of results the server should return.
6581    pub next_page_token: std::string::String,
6582
6583    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6584}
6585
6586impl FetchLinkableGitRepositoriesResponse {
6587    /// Creates a new default instance.
6588    pub fn new() -> Self {
6589        std::default::Default::default()
6590    }
6591
6592    /// Sets the value of [linkable_git_repositories][crate::model::FetchLinkableGitRepositoriesResponse::linkable_git_repositories].
6593    ///
6594    /// # Example
6595    /// ```ignore,no_run
6596    /// # use google_cloud_developerconnect_v1::model::FetchLinkableGitRepositoriesResponse;
6597    /// use google_cloud_developerconnect_v1::model::LinkableGitRepository;
6598    /// let x = FetchLinkableGitRepositoriesResponse::new()
6599    ///     .set_linkable_git_repositories([
6600    ///         LinkableGitRepository::default()/* use setters */,
6601    ///         LinkableGitRepository::default()/* use (different) setters */,
6602    ///     ]);
6603    /// ```
6604    pub fn set_linkable_git_repositories<T, V>(mut self, v: T) -> Self
6605    where
6606        T: std::iter::IntoIterator<Item = V>,
6607        V: std::convert::Into<crate::model::LinkableGitRepository>,
6608    {
6609        use std::iter::Iterator;
6610        self.linkable_git_repositories = v.into_iter().map(|i| i.into()).collect();
6611        self
6612    }
6613
6614    /// Sets the value of [next_page_token][crate::model::FetchLinkableGitRepositoriesResponse::next_page_token].
6615    ///
6616    /// # Example
6617    /// ```ignore,no_run
6618    /// # use google_cloud_developerconnect_v1::model::FetchLinkableGitRepositoriesResponse;
6619    /// let x = FetchLinkableGitRepositoriesResponse::new().set_next_page_token("example");
6620    /// ```
6621    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6622        self.next_page_token = v.into();
6623        self
6624    }
6625}
6626
6627impl wkt::message::Message for FetchLinkableGitRepositoriesResponse {
6628    fn typename() -> &'static str {
6629        "type.googleapis.com/google.cloud.developerconnect.v1.FetchLinkableGitRepositoriesResponse"
6630    }
6631}
6632
6633#[doc(hidden)]
6634impl google_cloud_gax::paginator::internal::PageableResponse
6635    for FetchLinkableGitRepositoriesResponse
6636{
6637    type PageItem = crate::model::LinkableGitRepository;
6638
6639    fn items(self) -> std::vec::Vec<Self::PageItem> {
6640        self.linkable_git_repositories
6641    }
6642
6643    fn next_page_token(&self) -> std::string::String {
6644        use std::clone::Clone;
6645        self.next_page_token.clone()
6646    }
6647}
6648
6649/// LinkableGitRepository represents a git repository that can be linked to a
6650/// connection.
6651#[derive(Clone, Default, PartialEq)]
6652#[non_exhaustive]
6653pub struct LinkableGitRepository {
6654    /// The clone uri of the repository.
6655    pub clone_uri: std::string::String,
6656
6657    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6658}
6659
6660impl LinkableGitRepository {
6661    /// Creates a new default instance.
6662    pub fn new() -> Self {
6663        std::default::Default::default()
6664    }
6665
6666    /// Sets the value of [clone_uri][crate::model::LinkableGitRepository::clone_uri].
6667    ///
6668    /// # Example
6669    /// ```ignore,no_run
6670    /// # use google_cloud_developerconnect_v1::model::LinkableGitRepository;
6671    /// let x = LinkableGitRepository::new().set_clone_uri("example");
6672    /// ```
6673    pub fn set_clone_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6674        self.clone_uri = v.into();
6675        self
6676    }
6677}
6678
6679impl wkt::message::Message for LinkableGitRepository {
6680    fn typename() -> &'static str {
6681        "type.googleapis.com/google.cloud.developerconnect.v1.LinkableGitRepository"
6682    }
6683}
6684
6685/// Request for fetching github installations.
6686#[derive(Clone, Default, PartialEq)]
6687#[non_exhaustive]
6688pub struct FetchGitHubInstallationsRequest {
6689    /// Required. The resource name of the connection in the format
6690    /// `projects/*/locations/*/connections/*`.
6691    pub connection: std::string::String,
6692
6693    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6694}
6695
6696impl FetchGitHubInstallationsRequest {
6697    /// Creates a new default instance.
6698    pub fn new() -> Self {
6699        std::default::Default::default()
6700    }
6701
6702    /// Sets the value of [connection][crate::model::FetchGitHubInstallationsRequest::connection].
6703    ///
6704    /// # Example
6705    /// ```ignore,no_run
6706    /// # use google_cloud_developerconnect_v1::model::FetchGitHubInstallationsRequest;
6707    /// let x = FetchGitHubInstallationsRequest::new().set_connection("example");
6708    /// ```
6709    pub fn set_connection<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6710        self.connection = v.into();
6711        self
6712    }
6713}
6714
6715impl wkt::message::Message for FetchGitHubInstallationsRequest {
6716    fn typename() -> &'static str {
6717        "type.googleapis.com/google.cloud.developerconnect.v1.FetchGitHubInstallationsRequest"
6718    }
6719}
6720
6721/// Response of fetching github installations.
6722#[derive(Clone, Default, PartialEq)]
6723#[non_exhaustive]
6724pub struct FetchGitHubInstallationsResponse {
6725    /// List of installations available to the OAuth user (for github.com)
6726    /// or all the installations (for GitHub enterprise).
6727    pub installations:
6728        std::vec::Vec<crate::model::fetch_git_hub_installations_response::Installation>,
6729
6730    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6731}
6732
6733impl FetchGitHubInstallationsResponse {
6734    /// Creates a new default instance.
6735    pub fn new() -> Self {
6736        std::default::Default::default()
6737    }
6738
6739    /// Sets the value of [installations][crate::model::FetchGitHubInstallationsResponse::installations].
6740    ///
6741    /// # Example
6742    /// ```ignore,no_run
6743    /// # use google_cloud_developerconnect_v1::model::FetchGitHubInstallationsResponse;
6744    /// use google_cloud_developerconnect_v1::model::fetch_git_hub_installations_response::Installation;
6745    /// let x = FetchGitHubInstallationsResponse::new()
6746    ///     .set_installations([
6747    ///         Installation::default()/* use setters */,
6748    ///         Installation::default()/* use (different) setters */,
6749    ///     ]);
6750    /// ```
6751    pub fn set_installations<T, V>(mut self, v: T) -> Self
6752    where
6753        T: std::iter::IntoIterator<Item = V>,
6754        V: std::convert::Into<crate::model::fetch_git_hub_installations_response::Installation>,
6755    {
6756        use std::iter::Iterator;
6757        self.installations = v.into_iter().map(|i| i.into()).collect();
6758        self
6759    }
6760}
6761
6762impl wkt::message::Message for FetchGitHubInstallationsResponse {
6763    fn typename() -> &'static str {
6764        "type.googleapis.com/google.cloud.developerconnect.v1.FetchGitHubInstallationsResponse"
6765    }
6766}
6767
6768/// Defines additional types related to [FetchGitHubInstallationsResponse].
6769pub mod fetch_git_hub_installations_response {
6770    #[allow(unused_imports)]
6771    use super::*;
6772
6773    /// Represents an installation of the GitHub App.
6774    #[derive(Clone, Default, PartialEq)]
6775    #[non_exhaustive]
6776    pub struct Installation {
6777        /// ID of the installation in GitHub.
6778        pub id: i64,
6779
6780        /// Name of the GitHub user or organization that owns this installation.
6781        pub name: std::string::String,
6782
6783        /// Either "user" or "organization".
6784        pub r#type: std::string::String,
6785
6786        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6787    }
6788
6789    impl Installation {
6790        /// Creates a new default instance.
6791        pub fn new() -> Self {
6792            std::default::Default::default()
6793        }
6794
6795        /// Sets the value of [id][crate::model::fetch_git_hub_installations_response::Installation::id].
6796        ///
6797        /// # Example
6798        /// ```ignore,no_run
6799        /// # use google_cloud_developerconnect_v1::model::fetch_git_hub_installations_response::Installation;
6800        /// let x = Installation::new().set_id(42);
6801        /// ```
6802        pub fn set_id<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
6803            self.id = v.into();
6804            self
6805        }
6806
6807        /// Sets the value of [name][crate::model::fetch_git_hub_installations_response::Installation::name].
6808        ///
6809        /// # Example
6810        /// ```ignore,no_run
6811        /// # use google_cloud_developerconnect_v1::model::fetch_git_hub_installations_response::Installation;
6812        /// let x = Installation::new().set_name("example");
6813        /// ```
6814        pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6815            self.name = v.into();
6816            self
6817        }
6818
6819        /// Sets the value of [r#type][crate::model::fetch_git_hub_installations_response::Installation::type].
6820        ///
6821        /// # Example
6822        /// ```ignore,no_run
6823        /// # use google_cloud_developerconnect_v1::model::fetch_git_hub_installations_response::Installation;
6824        /// let x = Installation::new().set_type("example");
6825        /// ```
6826        pub fn set_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6827            self.r#type = v.into();
6828            self
6829        }
6830    }
6831
6832    impl wkt::message::Message for Installation {
6833        fn typename() -> &'static str {
6834            "type.googleapis.com/google.cloud.developerconnect.v1.FetchGitHubInstallationsResponse.Installation"
6835        }
6836    }
6837}
6838
6839/// Request for fetching git refs.
6840#[derive(Clone, Default, PartialEq)]
6841#[non_exhaustive]
6842pub struct FetchGitRefsRequest {
6843    /// Required. The resource name of GitRepositoryLink in the format
6844    /// `projects/*/locations/*/connections/*/gitRepositoryLinks/*`.
6845    pub git_repository_link: std::string::String,
6846
6847    /// Required. Type of refs to fetch.
6848    pub ref_type: crate::model::fetch_git_refs_request::RefType,
6849
6850    /// Optional. Number of results to return in the list. Default to 20.
6851    pub page_size: i32,
6852
6853    /// Optional. Page start.
6854    pub page_token: std::string::String,
6855
6856    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6857}
6858
6859impl FetchGitRefsRequest {
6860    /// Creates a new default instance.
6861    pub fn new() -> Self {
6862        std::default::Default::default()
6863    }
6864
6865    /// Sets the value of [git_repository_link][crate::model::FetchGitRefsRequest::git_repository_link].
6866    ///
6867    /// # Example
6868    /// ```ignore,no_run
6869    /// # use google_cloud_developerconnect_v1::model::FetchGitRefsRequest;
6870    /// let x = FetchGitRefsRequest::new().set_git_repository_link("example");
6871    /// ```
6872    pub fn set_git_repository_link<T: std::convert::Into<std::string::String>>(
6873        mut self,
6874        v: T,
6875    ) -> Self {
6876        self.git_repository_link = v.into();
6877        self
6878    }
6879
6880    /// Sets the value of [ref_type][crate::model::FetchGitRefsRequest::ref_type].
6881    ///
6882    /// # Example
6883    /// ```ignore,no_run
6884    /// # use google_cloud_developerconnect_v1::model::FetchGitRefsRequest;
6885    /// use google_cloud_developerconnect_v1::model::fetch_git_refs_request::RefType;
6886    /// let x0 = FetchGitRefsRequest::new().set_ref_type(RefType::Tag);
6887    /// let x1 = FetchGitRefsRequest::new().set_ref_type(RefType::Branch);
6888    /// ```
6889    pub fn set_ref_type<T: std::convert::Into<crate::model::fetch_git_refs_request::RefType>>(
6890        mut self,
6891        v: T,
6892    ) -> Self {
6893        self.ref_type = v.into();
6894        self
6895    }
6896
6897    /// Sets the value of [page_size][crate::model::FetchGitRefsRequest::page_size].
6898    ///
6899    /// # Example
6900    /// ```ignore,no_run
6901    /// # use google_cloud_developerconnect_v1::model::FetchGitRefsRequest;
6902    /// let x = FetchGitRefsRequest::new().set_page_size(42);
6903    /// ```
6904    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6905        self.page_size = v.into();
6906        self
6907    }
6908
6909    /// Sets the value of [page_token][crate::model::FetchGitRefsRequest::page_token].
6910    ///
6911    /// # Example
6912    /// ```ignore,no_run
6913    /// # use google_cloud_developerconnect_v1::model::FetchGitRefsRequest;
6914    /// let x = FetchGitRefsRequest::new().set_page_token("example");
6915    /// ```
6916    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6917        self.page_token = v.into();
6918        self
6919    }
6920}
6921
6922impl wkt::message::Message for FetchGitRefsRequest {
6923    fn typename() -> &'static str {
6924        "type.googleapis.com/google.cloud.developerconnect.v1.FetchGitRefsRequest"
6925    }
6926}
6927
6928/// Defines additional types related to [FetchGitRefsRequest].
6929pub mod fetch_git_refs_request {
6930    #[allow(unused_imports)]
6931    use super::*;
6932
6933    /// Type of refs.
6934    ///
6935    /// # Working with unknown values
6936    ///
6937    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
6938    /// additional enum variants at any time. Adding new variants is not considered
6939    /// a breaking change. Applications should write their code in anticipation of:
6940    ///
6941    /// - New values appearing in future releases of the client library, **and**
6942    /// - New values received dynamically, without application changes.
6943    ///
6944    /// Please consult the [Working with enums] section in the user guide for some
6945    /// guidelines.
6946    ///
6947    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
6948    #[derive(Clone, Debug, PartialEq)]
6949    #[non_exhaustive]
6950    pub enum RefType {
6951        /// No type specified.
6952        Unspecified,
6953        /// To fetch tags.
6954        Tag,
6955        /// To fetch branches.
6956        Branch,
6957        /// If set, the enum was initialized with an unknown value.
6958        ///
6959        /// Applications can examine the value using [RefType::value] or
6960        /// [RefType::name].
6961        UnknownValue(ref_type::UnknownValue),
6962    }
6963
6964    #[doc(hidden)]
6965    pub mod ref_type {
6966        #[allow(unused_imports)]
6967        use super::*;
6968        #[derive(Clone, Debug, PartialEq)]
6969        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
6970    }
6971
6972    impl RefType {
6973        /// Gets the enum value.
6974        ///
6975        /// Returns `None` if the enum contains an unknown value deserialized from
6976        /// the string representation of enums.
6977        pub fn value(&self) -> std::option::Option<i32> {
6978            match self {
6979                Self::Unspecified => std::option::Option::Some(0),
6980                Self::Tag => std::option::Option::Some(1),
6981                Self::Branch => std::option::Option::Some(2),
6982                Self::UnknownValue(u) => u.0.value(),
6983            }
6984        }
6985
6986        /// Gets the enum value as a string.
6987        ///
6988        /// Returns `None` if the enum contains an unknown value deserialized from
6989        /// the integer representation of enums.
6990        pub fn name(&self) -> std::option::Option<&str> {
6991            match self {
6992                Self::Unspecified => std::option::Option::Some("REF_TYPE_UNSPECIFIED"),
6993                Self::Tag => std::option::Option::Some("TAG"),
6994                Self::Branch => std::option::Option::Some("BRANCH"),
6995                Self::UnknownValue(u) => u.0.name(),
6996            }
6997        }
6998    }
6999
7000    impl std::default::Default for RefType {
7001        fn default() -> Self {
7002            use std::convert::From;
7003            Self::from(0)
7004        }
7005    }
7006
7007    impl std::fmt::Display for RefType {
7008        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
7009            wkt::internal::display_enum(f, self.name(), self.value())
7010        }
7011    }
7012
7013    impl std::convert::From<i32> for RefType {
7014        fn from(value: i32) -> Self {
7015            match value {
7016                0 => Self::Unspecified,
7017                1 => Self::Tag,
7018                2 => Self::Branch,
7019                _ => Self::UnknownValue(ref_type::UnknownValue(
7020                    wkt::internal::UnknownEnumValue::Integer(value),
7021                )),
7022            }
7023        }
7024    }
7025
7026    impl std::convert::From<&str> for RefType {
7027        fn from(value: &str) -> Self {
7028            use std::string::ToString;
7029            match value {
7030                "REF_TYPE_UNSPECIFIED" => Self::Unspecified,
7031                "TAG" => Self::Tag,
7032                "BRANCH" => Self::Branch,
7033                _ => Self::UnknownValue(ref_type::UnknownValue(
7034                    wkt::internal::UnknownEnumValue::String(value.to_string()),
7035                )),
7036            }
7037        }
7038    }
7039
7040    impl serde::ser::Serialize for RefType {
7041        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
7042        where
7043            S: serde::Serializer,
7044        {
7045            match self {
7046                Self::Unspecified => serializer.serialize_i32(0),
7047                Self::Tag => serializer.serialize_i32(1),
7048                Self::Branch => serializer.serialize_i32(2),
7049                Self::UnknownValue(u) => u.0.serialize(serializer),
7050            }
7051        }
7052    }
7053
7054    impl<'de> serde::de::Deserialize<'de> for RefType {
7055        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7056        where
7057            D: serde::Deserializer<'de>,
7058        {
7059            deserializer.deserialize_any(wkt::internal::EnumVisitor::<RefType>::new(
7060                ".google.cloud.developerconnect.v1.FetchGitRefsRequest.RefType",
7061            ))
7062        }
7063    }
7064}
7065
7066/// Response for fetching git refs.
7067#[derive(Clone, Default, PartialEq)]
7068#[non_exhaustive]
7069pub struct FetchGitRefsResponse {
7070    /// Name of the refs fetched.
7071    pub ref_names: std::vec::Vec<std::string::String>,
7072
7073    /// A token identifying a page of results the server should return.
7074    pub next_page_token: std::string::String,
7075
7076    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7077}
7078
7079impl FetchGitRefsResponse {
7080    /// Creates a new default instance.
7081    pub fn new() -> Self {
7082        std::default::Default::default()
7083    }
7084
7085    /// Sets the value of [ref_names][crate::model::FetchGitRefsResponse::ref_names].
7086    ///
7087    /// # Example
7088    /// ```ignore,no_run
7089    /// # use google_cloud_developerconnect_v1::model::FetchGitRefsResponse;
7090    /// let x = FetchGitRefsResponse::new().set_ref_names(["a", "b", "c"]);
7091    /// ```
7092    pub fn set_ref_names<T, V>(mut self, v: T) -> Self
7093    where
7094        T: std::iter::IntoIterator<Item = V>,
7095        V: std::convert::Into<std::string::String>,
7096    {
7097        use std::iter::Iterator;
7098        self.ref_names = v.into_iter().map(|i| i.into()).collect();
7099        self
7100    }
7101
7102    /// Sets the value of [next_page_token][crate::model::FetchGitRefsResponse::next_page_token].
7103    ///
7104    /// # Example
7105    /// ```ignore,no_run
7106    /// # use google_cloud_developerconnect_v1::model::FetchGitRefsResponse;
7107    /// let x = FetchGitRefsResponse::new().set_next_page_token("example");
7108    /// ```
7109    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7110        self.next_page_token = v.into();
7111        self
7112    }
7113}
7114
7115impl wkt::message::Message for FetchGitRefsResponse {
7116    fn typename() -> &'static str {
7117        "type.googleapis.com/google.cloud.developerconnect.v1.FetchGitRefsResponse"
7118    }
7119}
7120
7121/// AccountConnector encapsulates what a platform administrator needs to
7122/// configure for users to connect to the service providers, which includes,
7123/// among other fields, the OAuth client ID, client secret, and authorization and
7124/// token endpoints.
7125#[derive(Clone, Default, PartialEq)]
7126#[non_exhaustive]
7127pub struct AccountConnector {
7128    /// Identifier. The resource name of the accountConnector, in the format
7129    /// `projects/{project}/locations/{location}/accountConnectors/{account_connector_id}`.
7130    pub name: std::string::String,
7131
7132    /// Output only. The timestamp when the accountConnector was created.
7133    pub create_time: std::option::Option<wkt::Timestamp>,
7134
7135    /// Output only. The timestamp when the accountConnector was updated.
7136    pub update_time: std::option::Option<wkt::Timestamp>,
7137
7138    /// Optional. Allows users to store small amounts of arbitrary data.
7139    pub annotations: std::collections::HashMap<std::string::String, std::string::String>,
7140
7141    /// Optional. This checksum is computed by the server based on the value of
7142    /// other fields, and may be sent on update and delete requests to ensure the
7143    /// client has an up-to-date value before proceeding.
7144    pub etag: std::string::String,
7145
7146    /// Optional. Labels as key value pairs
7147    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
7148
7149    /// Output only. Start OAuth flow by clicking on this URL.
7150    pub oauth_start_uri: std::string::String,
7151
7152    /// The AccountConnector config.
7153    pub account_connector_config:
7154        std::option::Option<crate::model::account_connector::AccountConnectorConfig>,
7155
7156    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7157}
7158
7159impl AccountConnector {
7160    /// Creates a new default instance.
7161    pub fn new() -> Self {
7162        std::default::Default::default()
7163    }
7164
7165    /// Sets the value of [name][crate::model::AccountConnector::name].
7166    ///
7167    /// # Example
7168    /// ```ignore,no_run
7169    /// # use google_cloud_developerconnect_v1::model::AccountConnector;
7170    /// let x = AccountConnector::new().set_name("example");
7171    /// ```
7172    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7173        self.name = v.into();
7174        self
7175    }
7176
7177    /// Sets the value of [create_time][crate::model::AccountConnector::create_time].
7178    ///
7179    /// # Example
7180    /// ```ignore,no_run
7181    /// # use google_cloud_developerconnect_v1::model::AccountConnector;
7182    /// use wkt::Timestamp;
7183    /// let x = AccountConnector::new().set_create_time(Timestamp::default()/* use setters */);
7184    /// ```
7185    pub fn set_create_time<T>(mut self, v: T) -> Self
7186    where
7187        T: std::convert::Into<wkt::Timestamp>,
7188    {
7189        self.create_time = std::option::Option::Some(v.into());
7190        self
7191    }
7192
7193    /// Sets or clears the value of [create_time][crate::model::AccountConnector::create_time].
7194    ///
7195    /// # Example
7196    /// ```ignore,no_run
7197    /// # use google_cloud_developerconnect_v1::model::AccountConnector;
7198    /// use wkt::Timestamp;
7199    /// let x = AccountConnector::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
7200    /// let x = AccountConnector::new().set_or_clear_create_time(None::<Timestamp>);
7201    /// ```
7202    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
7203    where
7204        T: std::convert::Into<wkt::Timestamp>,
7205    {
7206        self.create_time = v.map(|x| x.into());
7207        self
7208    }
7209
7210    /// Sets the value of [update_time][crate::model::AccountConnector::update_time].
7211    ///
7212    /// # Example
7213    /// ```ignore,no_run
7214    /// # use google_cloud_developerconnect_v1::model::AccountConnector;
7215    /// use wkt::Timestamp;
7216    /// let x = AccountConnector::new().set_update_time(Timestamp::default()/* use setters */);
7217    /// ```
7218    pub fn set_update_time<T>(mut self, v: T) -> Self
7219    where
7220        T: std::convert::Into<wkt::Timestamp>,
7221    {
7222        self.update_time = std::option::Option::Some(v.into());
7223        self
7224    }
7225
7226    /// Sets or clears the value of [update_time][crate::model::AccountConnector::update_time].
7227    ///
7228    /// # Example
7229    /// ```ignore,no_run
7230    /// # use google_cloud_developerconnect_v1::model::AccountConnector;
7231    /// use wkt::Timestamp;
7232    /// let x = AccountConnector::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
7233    /// let x = AccountConnector::new().set_or_clear_update_time(None::<Timestamp>);
7234    /// ```
7235    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
7236    where
7237        T: std::convert::Into<wkt::Timestamp>,
7238    {
7239        self.update_time = v.map(|x| x.into());
7240        self
7241    }
7242
7243    /// Sets the value of [annotations][crate::model::AccountConnector::annotations].
7244    ///
7245    /// # Example
7246    /// ```ignore,no_run
7247    /// # use google_cloud_developerconnect_v1::model::AccountConnector;
7248    /// let x = AccountConnector::new().set_annotations([
7249    ///     ("key0", "abc"),
7250    ///     ("key1", "xyz"),
7251    /// ]);
7252    /// ```
7253    pub fn set_annotations<T, K, V>(mut self, v: T) -> Self
7254    where
7255        T: std::iter::IntoIterator<Item = (K, V)>,
7256        K: std::convert::Into<std::string::String>,
7257        V: std::convert::Into<std::string::String>,
7258    {
7259        use std::iter::Iterator;
7260        self.annotations = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
7261        self
7262    }
7263
7264    /// Sets the value of [etag][crate::model::AccountConnector::etag].
7265    ///
7266    /// # Example
7267    /// ```ignore,no_run
7268    /// # use google_cloud_developerconnect_v1::model::AccountConnector;
7269    /// let x = AccountConnector::new().set_etag("example");
7270    /// ```
7271    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7272        self.etag = v.into();
7273        self
7274    }
7275
7276    /// Sets the value of [labels][crate::model::AccountConnector::labels].
7277    ///
7278    /// # Example
7279    /// ```ignore,no_run
7280    /// # use google_cloud_developerconnect_v1::model::AccountConnector;
7281    /// let x = AccountConnector::new().set_labels([
7282    ///     ("key0", "abc"),
7283    ///     ("key1", "xyz"),
7284    /// ]);
7285    /// ```
7286    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
7287    where
7288        T: std::iter::IntoIterator<Item = (K, V)>,
7289        K: std::convert::Into<std::string::String>,
7290        V: std::convert::Into<std::string::String>,
7291    {
7292        use std::iter::Iterator;
7293        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
7294        self
7295    }
7296
7297    /// Sets the value of [oauth_start_uri][crate::model::AccountConnector::oauth_start_uri].
7298    ///
7299    /// # Example
7300    /// ```ignore,no_run
7301    /// # use google_cloud_developerconnect_v1::model::AccountConnector;
7302    /// let x = AccountConnector::new().set_oauth_start_uri("example");
7303    /// ```
7304    pub fn set_oauth_start_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7305        self.oauth_start_uri = v.into();
7306        self
7307    }
7308
7309    /// Sets the value of [account_connector_config][crate::model::AccountConnector::account_connector_config].
7310    ///
7311    /// Note that all the setters affecting `account_connector_config` are mutually
7312    /// exclusive.
7313    ///
7314    /// # Example
7315    /// ```ignore,no_run
7316    /// # use google_cloud_developerconnect_v1::model::AccountConnector;
7317    /// use google_cloud_developerconnect_v1::model::ProviderOAuthConfig;
7318    /// let x = AccountConnector::new().set_account_connector_config(Some(
7319    ///     google_cloud_developerconnect_v1::model::account_connector::AccountConnectorConfig::ProviderOauthConfig(ProviderOAuthConfig::default().into())));
7320    /// ```
7321    pub fn set_account_connector_config<
7322        T: std::convert::Into<
7323                std::option::Option<crate::model::account_connector::AccountConnectorConfig>,
7324            >,
7325    >(
7326        mut self,
7327        v: T,
7328    ) -> Self {
7329        self.account_connector_config = v.into();
7330        self
7331    }
7332
7333    /// The value of [account_connector_config][crate::model::AccountConnector::account_connector_config]
7334    /// if it holds a `ProviderOauthConfig`, `None` if the field is not set or
7335    /// holds a different branch.
7336    pub fn provider_oauth_config(
7337        &self,
7338    ) -> std::option::Option<&std::boxed::Box<crate::model::ProviderOAuthConfig>> {
7339        #[allow(unreachable_patterns)]
7340        self.account_connector_config
7341            .as_ref()
7342            .and_then(|v| match v {
7343                crate::model::account_connector::AccountConnectorConfig::ProviderOauthConfig(v) => {
7344                    std::option::Option::Some(v)
7345                }
7346                _ => std::option::Option::None,
7347            })
7348    }
7349
7350    /// Sets the value of [account_connector_config][crate::model::AccountConnector::account_connector_config]
7351    /// to hold a `ProviderOauthConfig`.
7352    ///
7353    /// Note that all the setters affecting `account_connector_config` are
7354    /// mutually exclusive.
7355    ///
7356    /// # Example
7357    /// ```ignore,no_run
7358    /// # use google_cloud_developerconnect_v1::model::AccountConnector;
7359    /// use google_cloud_developerconnect_v1::model::ProviderOAuthConfig;
7360    /// let x = AccountConnector::new().set_provider_oauth_config(ProviderOAuthConfig::default()/* use setters */);
7361    /// assert!(x.provider_oauth_config().is_some());
7362    /// ```
7363    pub fn set_provider_oauth_config<
7364        T: std::convert::Into<std::boxed::Box<crate::model::ProviderOAuthConfig>>,
7365    >(
7366        mut self,
7367        v: T,
7368    ) -> Self {
7369        self.account_connector_config = std::option::Option::Some(
7370            crate::model::account_connector::AccountConnectorConfig::ProviderOauthConfig(v.into()),
7371        );
7372        self
7373    }
7374}
7375
7376impl wkt::message::Message for AccountConnector {
7377    fn typename() -> &'static str {
7378        "type.googleapis.com/google.cloud.developerconnect.v1.AccountConnector"
7379    }
7380}
7381
7382/// Defines additional types related to [AccountConnector].
7383pub mod account_connector {
7384    #[allow(unused_imports)]
7385    use super::*;
7386
7387    /// The AccountConnector config.
7388    #[derive(Clone, Debug, PartialEq)]
7389    #[non_exhaustive]
7390    pub enum AccountConnectorConfig {
7391        /// Optional. Provider OAuth config.
7392        ProviderOauthConfig(std::boxed::Box<crate::model::ProviderOAuthConfig>),
7393    }
7394}
7395
7396/// User represents a user connected to the service providers through
7397/// a AccountConnector.
7398#[derive(Clone, Default, PartialEq)]
7399#[non_exhaustive]
7400pub struct User {
7401    /// Identifier. Resource name of the user, in the format
7402    /// `projects/*/locations/*/accountConnectors/*/users/*`.
7403    pub name: std::string::String,
7404
7405    /// Output only. Developer Connect automatically converts user identity
7406    /// to some human readable description, e.g., email address.
7407    pub display_name: std::string::String,
7408
7409    /// Output only. The timestamp when the user was created.
7410    pub create_time: std::option::Option<wkt::Timestamp>,
7411
7412    /// Output only. The timestamp when the token was last requested.
7413    pub last_token_request_time: std::option::Option<wkt::Timestamp>,
7414
7415    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7416}
7417
7418impl User {
7419    /// Creates a new default instance.
7420    pub fn new() -> Self {
7421        std::default::Default::default()
7422    }
7423
7424    /// Sets the value of [name][crate::model::User::name].
7425    ///
7426    /// # Example
7427    /// ```ignore,no_run
7428    /// # use google_cloud_developerconnect_v1::model::User;
7429    /// let x = User::new().set_name("example");
7430    /// ```
7431    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7432        self.name = v.into();
7433        self
7434    }
7435
7436    /// Sets the value of [display_name][crate::model::User::display_name].
7437    ///
7438    /// # Example
7439    /// ```ignore,no_run
7440    /// # use google_cloud_developerconnect_v1::model::User;
7441    /// let x = User::new().set_display_name("example");
7442    /// ```
7443    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7444        self.display_name = v.into();
7445        self
7446    }
7447
7448    /// Sets the value of [create_time][crate::model::User::create_time].
7449    ///
7450    /// # Example
7451    /// ```ignore,no_run
7452    /// # use google_cloud_developerconnect_v1::model::User;
7453    /// use wkt::Timestamp;
7454    /// let x = User::new().set_create_time(Timestamp::default()/* use setters */);
7455    /// ```
7456    pub fn set_create_time<T>(mut self, v: T) -> Self
7457    where
7458        T: std::convert::Into<wkt::Timestamp>,
7459    {
7460        self.create_time = std::option::Option::Some(v.into());
7461        self
7462    }
7463
7464    /// Sets or clears the value of [create_time][crate::model::User::create_time].
7465    ///
7466    /// # Example
7467    /// ```ignore,no_run
7468    /// # use google_cloud_developerconnect_v1::model::User;
7469    /// use wkt::Timestamp;
7470    /// let x = User::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
7471    /// let x = User::new().set_or_clear_create_time(None::<Timestamp>);
7472    /// ```
7473    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
7474    where
7475        T: std::convert::Into<wkt::Timestamp>,
7476    {
7477        self.create_time = v.map(|x| x.into());
7478        self
7479    }
7480
7481    /// Sets the value of [last_token_request_time][crate::model::User::last_token_request_time].
7482    ///
7483    /// # Example
7484    /// ```ignore,no_run
7485    /// # use google_cloud_developerconnect_v1::model::User;
7486    /// use wkt::Timestamp;
7487    /// let x = User::new().set_last_token_request_time(Timestamp::default()/* use setters */);
7488    /// ```
7489    pub fn set_last_token_request_time<T>(mut self, v: T) -> Self
7490    where
7491        T: std::convert::Into<wkt::Timestamp>,
7492    {
7493        self.last_token_request_time = std::option::Option::Some(v.into());
7494        self
7495    }
7496
7497    /// Sets or clears the value of [last_token_request_time][crate::model::User::last_token_request_time].
7498    ///
7499    /// # Example
7500    /// ```ignore,no_run
7501    /// # use google_cloud_developerconnect_v1::model::User;
7502    /// use wkt::Timestamp;
7503    /// let x = User::new().set_or_clear_last_token_request_time(Some(Timestamp::default()/* use setters */));
7504    /// let x = User::new().set_or_clear_last_token_request_time(None::<Timestamp>);
7505    /// ```
7506    pub fn set_or_clear_last_token_request_time<T>(mut self, v: std::option::Option<T>) -> Self
7507    where
7508        T: std::convert::Into<wkt::Timestamp>,
7509    {
7510        self.last_token_request_time = v.map(|x| x.into());
7511        self
7512    }
7513}
7514
7515impl wkt::message::Message for User {
7516    fn typename() -> &'static str {
7517        "type.googleapis.com/google.cloud.developerconnect.v1.User"
7518    }
7519}
7520
7521/// ProviderOAuthConfig is the OAuth config for a provider.
7522#[derive(Clone, Default, PartialEq)]
7523#[non_exhaustive]
7524pub struct ProviderOAuthConfig {
7525    /// Required. User selected scopes to apply to the Oauth config
7526    /// In the event of changing scopes, user records under AccountConnector will
7527    /// be deleted and users will re-auth again.
7528    pub scopes: std::vec::Vec<std::string::String>,
7529
7530    /// OAuth Provider ID. It could be Developer Connect owned or providers
7531    /// provided.
7532    pub oauth_provider_id:
7533        std::option::Option<crate::model::provider_o_auth_config::OauthProviderId>,
7534
7535    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7536}
7537
7538impl ProviderOAuthConfig {
7539    /// Creates a new default instance.
7540    pub fn new() -> Self {
7541        std::default::Default::default()
7542    }
7543
7544    /// Sets the value of [scopes][crate::model::ProviderOAuthConfig::scopes].
7545    ///
7546    /// # Example
7547    /// ```ignore,no_run
7548    /// # use google_cloud_developerconnect_v1::model::ProviderOAuthConfig;
7549    /// let x = ProviderOAuthConfig::new().set_scopes(["a", "b", "c"]);
7550    /// ```
7551    pub fn set_scopes<T, V>(mut self, v: T) -> Self
7552    where
7553        T: std::iter::IntoIterator<Item = V>,
7554        V: std::convert::Into<std::string::String>,
7555    {
7556        use std::iter::Iterator;
7557        self.scopes = v.into_iter().map(|i| i.into()).collect();
7558        self
7559    }
7560
7561    /// Sets the value of [oauth_provider_id][crate::model::ProviderOAuthConfig::oauth_provider_id].
7562    ///
7563    /// Note that all the setters affecting `oauth_provider_id` are mutually
7564    /// exclusive.
7565    ///
7566    /// # Example
7567    /// ```ignore,no_run
7568    /// # use google_cloud_developerconnect_v1::model::ProviderOAuthConfig;
7569    /// use google_cloud_developerconnect_v1::model::SystemProvider;
7570    /// let x0 = ProviderOAuthConfig::new().set_oauth_provider_id(Some(
7571    ///     google_cloud_developerconnect_v1::model::provider_o_auth_config::OauthProviderId::SystemProviderId(SystemProvider::Github)));
7572    /// let x1 = ProviderOAuthConfig::new().set_oauth_provider_id(Some(
7573    ///     google_cloud_developerconnect_v1::model::provider_o_auth_config::OauthProviderId::SystemProviderId(SystemProvider::Gitlab)));
7574    /// let x2 = ProviderOAuthConfig::new().set_oauth_provider_id(Some(
7575    ///     google_cloud_developerconnect_v1::model::provider_o_auth_config::OauthProviderId::SystemProviderId(SystemProvider::Google)));
7576    /// ```
7577    pub fn set_oauth_provider_id<
7578        T: std::convert::Into<
7579                std::option::Option<crate::model::provider_o_auth_config::OauthProviderId>,
7580            >,
7581    >(
7582        mut self,
7583        v: T,
7584    ) -> Self {
7585        self.oauth_provider_id = v.into();
7586        self
7587    }
7588
7589    /// The value of [oauth_provider_id][crate::model::ProviderOAuthConfig::oauth_provider_id]
7590    /// if it holds a `SystemProviderId`, `None` if the field is not set or
7591    /// holds a different branch.
7592    pub fn system_provider_id(&self) -> std::option::Option<&crate::model::SystemProvider> {
7593        #[allow(unreachable_patterns)]
7594        self.oauth_provider_id.as_ref().and_then(|v| match v {
7595            crate::model::provider_o_auth_config::OauthProviderId::SystemProviderId(v) => {
7596                std::option::Option::Some(v)
7597            }
7598            _ => std::option::Option::None,
7599        })
7600    }
7601
7602    /// Sets the value of [oauth_provider_id][crate::model::ProviderOAuthConfig::oauth_provider_id]
7603    /// to hold a `SystemProviderId`.
7604    ///
7605    /// Note that all the setters affecting `oauth_provider_id` are
7606    /// mutually exclusive.
7607    ///
7608    /// # Example
7609    /// ```ignore,no_run
7610    /// # use google_cloud_developerconnect_v1::model::ProviderOAuthConfig;
7611    /// use google_cloud_developerconnect_v1::model::SystemProvider;
7612    /// let x0 = ProviderOAuthConfig::new().set_system_provider_id(SystemProvider::Github);
7613    /// let x1 = ProviderOAuthConfig::new().set_system_provider_id(SystemProvider::Gitlab);
7614    /// let x2 = ProviderOAuthConfig::new().set_system_provider_id(SystemProvider::Google);
7615    /// assert!(x0.system_provider_id().is_some());
7616    /// assert!(x1.system_provider_id().is_some());
7617    /// assert!(x2.system_provider_id().is_some());
7618    /// ```
7619    pub fn set_system_provider_id<T: std::convert::Into<crate::model::SystemProvider>>(
7620        mut self,
7621        v: T,
7622    ) -> Self {
7623        self.oauth_provider_id = std::option::Option::Some(
7624            crate::model::provider_o_auth_config::OauthProviderId::SystemProviderId(v.into()),
7625        );
7626        self
7627    }
7628}
7629
7630impl wkt::message::Message for ProviderOAuthConfig {
7631    fn typename() -> &'static str {
7632        "type.googleapis.com/google.cloud.developerconnect.v1.ProviderOAuthConfig"
7633    }
7634}
7635
7636/// Defines additional types related to [ProviderOAuthConfig].
7637pub mod provider_o_auth_config {
7638    #[allow(unused_imports)]
7639    use super::*;
7640
7641    /// OAuth Provider ID. It could be Developer Connect owned or providers
7642    /// provided.
7643    #[derive(Clone, Debug, PartialEq)]
7644    #[non_exhaustive]
7645    pub enum OauthProviderId {
7646        /// Optional. Immutable. Developer Connect provided OAuth.
7647        SystemProviderId(crate::model::SystemProvider),
7648    }
7649}
7650
7651/// The InsightsConfig resource is the core configuration object to capture
7652/// events from your Software Development Lifecycle. It acts as the central hub
7653/// for managing how Developer Connect understands your application, its runtime
7654/// environments, and the artifacts deployed within them.
7655#[derive(Clone, Default, PartialEq)]
7656#[non_exhaustive]
7657pub struct InsightsConfig {
7658    /// Identifier. The name of the InsightsConfig.
7659    /// Format:
7660    /// projects/{project}/locations/{location}/insightsConfigs/{insightsConfig}
7661    pub name: std::string::String,
7662
7663    /// Output only. Create timestamp.
7664    pub create_time: std::option::Option<wkt::Timestamp>,
7665
7666    /// Output only. Update timestamp.
7667    pub update_time: std::option::Option<wkt::Timestamp>,
7668
7669    /// Output only. The runtime configurations where the application is deployed.
7670    pub runtime_configs: std::vec::Vec<crate::model::RuntimeConfig>,
7671
7672    /// Optional. The artifact configurations of the artifacts that are deployed.
7673    pub artifact_configs: std::vec::Vec<crate::model::ArtifactConfig>,
7674
7675    /// Optional. Output only. The state of the InsightsConfig.
7676    pub state: crate::model::insights_config::State,
7677
7678    /// Optional. User specified annotations. See
7679    /// <https://google.aip.dev/148#annotations> for more details such as format and
7680    /// size limitations.
7681    pub annotations: std::collections::HashMap<std::string::String, std::string::String>,
7682
7683    /// Optional. Set of labels associated with an InsightsConfig.
7684    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
7685
7686    /// Output only. Reconciling (<https://google.aip.dev/128#reconciliation>).
7687    /// Set to true if the current state of InsightsConfig does not match the
7688    /// user's intended state, and the service is actively updating the resource to
7689    /// reconcile them. This can happen due to user-triggered updates or
7690    /// system actions like failover or maintenance.
7691    pub reconciling: bool,
7692
7693    /// Output only. Any errors that occurred while setting up the InsightsConfig.
7694    /// Each error will be in the format: `field_name: error_message`, e.g.
7695    /// GetAppHubApplication: Permission denied while getting App Hub
7696    /// application. Please grant permissions to the P4SA.
7697    pub errors: std::vec::Vec<google_cloud_rpc::model::Status>,
7698
7699    /// The context of the InsightsConfig.
7700    pub insights_config_context:
7701        std::option::Option<crate::model::insights_config::InsightsConfigContext>,
7702
7703    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7704}
7705
7706impl InsightsConfig {
7707    /// Creates a new default instance.
7708    pub fn new() -> Self {
7709        std::default::Default::default()
7710    }
7711
7712    /// Sets the value of [name][crate::model::InsightsConfig::name].
7713    ///
7714    /// # Example
7715    /// ```ignore,no_run
7716    /// # use google_cloud_developerconnect_v1::model::InsightsConfig;
7717    /// let x = InsightsConfig::new().set_name("example");
7718    /// ```
7719    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7720        self.name = v.into();
7721        self
7722    }
7723
7724    /// Sets the value of [create_time][crate::model::InsightsConfig::create_time].
7725    ///
7726    /// # Example
7727    /// ```ignore,no_run
7728    /// # use google_cloud_developerconnect_v1::model::InsightsConfig;
7729    /// use wkt::Timestamp;
7730    /// let x = InsightsConfig::new().set_create_time(Timestamp::default()/* use setters */);
7731    /// ```
7732    pub fn set_create_time<T>(mut self, v: T) -> Self
7733    where
7734        T: std::convert::Into<wkt::Timestamp>,
7735    {
7736        self.create_time = std::option::Option::Some(v.into());
7737        self
7738    }
7739
7740    /// Sets or clears the value of [create_time][crate::model::InsightsConfig::create_time].
7741    ///
7742    /// # Example
7743    /// ```ignore,no_run
7744    /// # use google_cloud_developerconnect_v1::model::InsightsConfig;
7745    /// use wkt::Timestamp;
7746    /// let x = InsightsConfig::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
7747    /// let x = InsightsConfig::new().set_or_clear_create_time(None::<Timestamp>);
7748    /// ```
7749    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
7750    where
7751        T: std::convert::Into<wkt::Timestamp>,
7752    {
7753        self.create_time = v.map(|x| x.into());
7754        self
7755    }
7756
7757    /// Sets the value of [update_time][crate::model::InsightsConfig::update_time].
7758    ///
7759    /// # Example
7760    /// ```ignore,no_run
7761    /// # use google_cloud_developerconnect_v1::model::InsightsConfig;
7762    /// use wkt::Timestamp;
7763    /// let x = InsightsConfig::new().set_update_time(Timestamp::default()/* use setters */);
7764    /// ```
7765    pub fn set_update_time<T>(mut self, v: T) -> Self
7766    where
7767        T: std::convert::Into<wkt::Timestamp>,
7768    {
7769        self.update_time = std::option::Option::Some(v.into());
7770        self
7771    }
7772
7773    /// Sets or clears the value of [update_time][crate::model::InsightsConfig::update_time].
7774    ///
7775    /// # Example
7776    /// ```ignore,no_run
7777    /// # use google_cloud_developerconnect_v1::model::InsightsConfig;
7778    /// use wkt::Timestamp;
7779    /// let x = InsightsConfig::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
7780    /// let x = InsightsConfig::new().set_or_clear_update_time(None::<Timestamp>);
7781    /// ```
7782    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
7783    where
7784        T: std::convert::Into<wkt::Timestamp>,
7785    {
7786        self.update_time = v.map(|x| x.into());
7787        self
7788    }
7789
7790    /// Sets the value of [runtime_configs][crate::model::InsightsConfig::runtime_configs].
7791    ///
7792    /// # Example
7793    /// ```ignore,no_run
7794    /// # use google_cloud_developerconnect_v1::model::InsightsConfig;
7795    /// use google_cloud_developerconnect_v1::model::RuntimeConfig;
7796    /// let x = InsightsConfig::new()
7797    ///     .set_runtime_configs([
7798    ///         RuntimeConfig::default()/* use setters */,
7799    ///         RuntimeConfig::default()/* use (different) setters */,
7800    ///     ]);
7801    /// ```
7802    pub fn set_runtime_configs<T, V>(mut self, v: T) -> Self
7803    where
7804        T: std::iter::IntoIterator<Item = V>,
7805        V: std::convert::Into<crate::model::RuntimeConfig>,
7806    {
7807        use std::iter::Iterator;
7808        self.runtime_configs = v.into_iter().map(|i| i.into()).collect();
7809        self
7810    }
7811
7812    /// Sets the value of [artifact_configs][crate::model::InsightsConfig::artifact_configs].
7813    ///
7814    /// # Example
7815    /// ```ignore,no_run
7816    /// # use google_cloud_developerconnect_v1::model::InsightsConfig;
7817    /// use google_cloud_developerconnect_v1::model::ArtifactConfig;
7818    /// let x = InsightsConfig::new()
7819    ///     .set_artifact_configs([
7820    ///         ArtifactConfig::default()/* use setters */,
7821    ///         ArtifactConfig::default()/* use (different) setters */,
7822    ///     ]);
7823    /// ```
7824    pub fn set_artifact_configs<T, V>(mut self, v: T) -> Self
7825    where
7826        T: std::iter::IntoIterator<Item = V>,
7827        V: std::convert::Into<crate::model::ArtifactConfig>,
7828    {
7829        use std::iter::Iterator;
7830        self.artifact_configs = v.into_iter().map(|i| i.into()).collect();
7831        self
7832    }
7833
7834    /// Sets the value of [state][crate::model::InsightsConfig::state].
7835    ///
7836    /// # Example
7837    /// ```ignore,no_run
7838    /// # use google_cloud_developerconnect_v1::model::InsightsConfig;
7839    /// use google_cloud_developerconnect_v1::model::insights_config::State;
7840    /// let x0 = InsightsConfig::new().set_state(State::Pending);
7841    /// let x1 = InsightsConfig::new().set_state(State::Complete);
7842    /// let x2 = InsightsConfig::new().set_state(State::Error);
7843    /// ```
7844    pub fn set_state<T: std::convert::Into<crate::model::insights_config::State>>(
7845        mut self,
7846        v: T,
7847    ) -> Self {
7848        self.state = v.into();
7849        self
7850    }
7851
7852    /// Sets the value of [annotations][crate::model::InsightsConfig::annotations].
7853    ///
7854    /// # Example
7855    /// ```ignore,no_run
7856    /// # use google_cloud_developerconnect_v1::model::InsightsConfig;
7857    /// let x = InsightsConfig::new().set_annotations([
7858    ///     ("key0", "abc"),
7859    ///     ("key1", "xyz"),
7860    /// ]);
7861    /// ```
7862    pub fn set_annotations<T, K, V>(mut self, v: T) -> Self
7863    where
7864        T: std::iter::IntoIterator<Item = (K, V)>,
7865        K: std::convert::Into<std::string::String>,
7866        V: std::convert::Into<std::string::String>,
7867    {
7868        use std::iter::Iterator;
7869        self.annotations = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
7870        self
7871    }
7872
7873    /// Sets the value of [labels][crate::model::InsightsConfig::labels].
7874    ///
7875    /// # Example
7876    /// ```ignore,no_run
7877    /// # use google_cloud_developerconnect_v1::model::InsightsConfig;
7878    /// let x = InsightsConfig::new().set_labels([
7879    ///     ("key0", "abc"),
7880    ///     ("key1", "xyz"),
7881    /// ]);
7882    /// ```
7883    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
7884    where
7885        T: std::iter::IntoIterator<Item = (K, V)>,
7886        K: std::convert::Into<std::string::String>,
7887        V: std::convert::Into<std::string::String>,
7888    {
7889        use std::iter::Iterator;
7890        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
7891        self
7892    }
7893
7894    /// Sets the value of [reconciling][crate::model::InsightsConfig::reconciling].
7895    ///
7896    /// # Example
7897    /// ```ignore,no_run
7898    /// # use google_cloud_developerconnect_v1::model::InsightsConfig;
7899    /// let x = InsightsConfig::new().set_reconciling(true);
7900    /// ```
7901    pub fn set_reconciling<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
7902        self.reconciling = v.into();
7903        self
7904    }
7905
7906    /// Sets the value of [errors][crate::model::InsightsConfig::errors].
7907    ///
7908    /// # Example
7909    /// ```ignore,no_run
7910    /// # use google_cloud_developerconnect_v1::model::InsightsConfig;
7911    /// use google_cloud_rpc::model::Status;
7912    /// let x = InsightsConfig::new()
7913    ///     .set_errors([
7914    ///         Status::default()/* use setters */,
7915    ///         Status::default()/* use (different) setters */,
7916    ///     ]);
7917    /// ```
7918    pub fn set_errors<T, V>(mut self, v: T) -> Self
7919    where
7920        T: std::iter::IntoIterator<Item = V>,
7921        V: std::convert::Into<google_cloud_rpc::model::Status>,
7922    {
7923        use std::iter::Iterator;
7924        self.errors = v.into_iter().map(|i| i.into()).collect();
7925        self
7926    }
7927
7928    /// Sets the value of [insights_config_context][crate::model::InsightsConfig::insights_config_context].
7929    ///
7930    /// Note that all the setters affecting `insights_config_context` are mutually
7931    /// exclusive.
7932    ///
7933    /// # Example
7934    /// ```ignore,no_run
7935    /// # use google_cloud_developerconnect_v1::model::InsightsConfig;
7936    /// use google_cloud_developerconnect_v1::model::insights_config::InsightsConfigContext;
7937    /// let x = InsightsConfig::new().set_insights_config_context(Some(InsightsConfigContext::AppHubApplication("example".to_string())));
7938    /// ```
7939    pub fn set_insights_config_context<
7940        T: std::convert::Into<
7941                std::option::Option<crate::model::insights_config::InsightsConfigContext>,
7942            >,
7943    >(
7944        mut self,
7945        v: T,
7946    ) -> Self {
7947        self.insights_config_context = v.into();
7948        self
7949    }
7950
7951    /// The value of [insights_config_context][crate::model::InsightsConfig::insights_config_context]
7952    /// if it holds a `AppHubApplication`, `None` if the field is not set or
7953    /// holds a different branch.
7954    pub fn app_hub_application(&self) -> std::option::Option<&std::string::String> {
7955        #[allow(unreachable_patterns)]
7956        self.insights_config_context.as_ref().and_then(|v| match v {
7957            crate::model::insights_config::InsightsConfigContext::AppHubApplication(v) => {
7958                std::option::Option::Some(v)
7959            }
7960            _ => std::option::Option::None,
7961        })
7962    }
7963
7964    /// Sets the value of [insights_config_context][crate::model::InsightsConfig::insights_config_context]
7965    /// to hold a `AppHubApplication`.
7966    ///
7967    /// Note that all the setters affecting `insights_config_context` are
7968    /// mutually exclusive.
7969    ///
7970    /// # Example
7971    /// ```ignore,no_run
7972    /// # use google_cloud_developerconnect_v1::model::InsightsConfig;
7973    /// let x = InsightsConfig::new().set_app_hub_application("example");
7974    /// assert!(x.app_hub_application().is_some());
7975    /// assert!(x.projects().is_none());
7976    /// ```
7977    pub fn set_app_hub_application<T: std::convert::Into<std::string::String>>(
7978        mut self,
7979        v: T,
7980    ) -> Self {
7981        self.insights_config_context = std::option::Option::Some(
7982            crate::model::insights_config::InsightsConfigContext::AppHubApplication(v.into()),
7983        );
7984        self
7985    }
7986
7987    /// The value of [insights_config_context][crate::model::InsightsConfig::insights_config_context]
7988    /// if it holds a `Projects`, `None` if the field is not set or
7989    /// holds a different branch.
7990    pub fn projects(&self) -> std::option::Option<&std::boxed::Box<crate::model::Projects>> {
7991        #[allow(unreachable_patterns)]
7992        self.insights_config_context.as_ref().and_then(|v| match v {
7993            crate::model::insights_config::InsightsConfigContext::Projects(v) => {
7994                std::option::Option::Some(v)
7995            }
7996            _ => std::option::Option::None,
7997        })
7998    }
7999
8000    /// Sets the value of [insights_config_context][crate::model::InsightsConfig::insights_config_context]
8001    /// to hold a `Projects`.
8002    ///
8003    /// Note that all the setters affecting `insights_config_context` are
8004    /// mutually exclusive.
8005    ///
8006    /// # Example
8007    /// ```ignore,no_run
8008    /// # use google_cloud_developerconnect_v1::model::InsightsConfig;
8009    /// use google_cloud_developerconnect_v1::model::Projects;
8010    /// let x = InsightsConfig::new().set_projects(Projects::default()/* use setters */);
8011    /// assert!(x.projects().is_some());
8012    /// assert!(x.app_hub_application().is_none());
8013    /// ```
8014    pub fn set_projects<T: std::convert::Into<std::boxed::Box<crate::model::Projects>>>(
8015        mut self,
8016        v: T,
8017    ) -> Self {
8018        self.insights_config_context = std::option::Option::Some(
8019            crate::model::insights_config::InsightsConfigContext::Projects(v.into()),
8020        );
8021        self
8022    }
8023}
8024
8025impl wkt::message::Message for InsightsConfig {
8026    fn typename() -> &'static str {
8027        "type.googleapis.com/google.cloud.developerconnect.v1.InsightsConfig"
8028    }
8029}
8030
8031/// Defines additional types related to [InsightsConfig].
8032pub mod insights_config {
8033    #[allow(unused_imports)]
8034    use super::*;
8035
8036    /// The state of the InsightsConfig.
8037    ///
8038    /// # Working with unknown values
8039    ///
8040    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
8041    /// additional enum variants at any time. Adding new variants is not considered
8042    /// a breaking change. Applications should write their code in anticipation of:
8043    ///
8044    /// - New values appearing in future releases of the client library, **and**
8045    /// - New values received dynamically, without application changes.
8046    ///
8047    /// Please consult the [Working with enums] section in the user guide for some
8048    /// guidelines.
8049    ///
8050    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
8051    #[derive(Clone, Debug, PartialEq)]
8052    #[non_exhaustive]
8053    pub enum State {
8054        /// No state specified.
8055        Unspecified,
8056        /// The InsightsConfig is pending application discovery/runtime discovery.
8057        Pending,
8058        /// The initial discovery process is complete.
8059        Complete,
8060        /// The InsightsConfig is in an error state.
8061        Error,
8062        /// If set, the enum was initialized with an unknown value.
8063        ///
8064        /// Applications can examine the value using [State::value] or
8065        /// [State::name].
8066        UnknownValue(state::UnknownValue),
8067    }
8068
8069    #[doc(hidden)]
8070    pub mod state {
8071        #[allow(unused_imports)]
8072        use super::*;
8073        #[derive(Clone, Debug, PartialEq)]
8074        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
8075    }
8076
8077    impl State {
8078        /// Gets the enum value.
8079        ///
8080        /// Returns `None` if the enum contains an unknown value deserialized from
8081        /// the string representation of enums.
8082        pub fn value(&self) -> std::option::Option<i32> {
8083            match self {
8084                Self::Unspecified => std::option::Option::Some(0),
8085                Self::Pending => std::option::Option::Some(5),
8086                Self::Complete => std::option::Option::Some(3),
8087                Self::Error => std::option::Option::Some(4),
8088                Self::UnknownValue(u) => u.0.value(),
8089            }
8090        }
8091
8092        /// Gets the enum value as a string.
8093        ///
8094        /// Returns `None` if the enum contains an unknown value deserialized from
8095        /// the integer representation of enums.
8096        pub fn name(&self) -> std::option::Option<&str> {
8097            match self {
8098                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
8099                Self::Pending => std::option::Option::Some("PENDING"),
8100                Self::Complete => std::option::Option::Some("COMPLETE"),
8101                Self::Error => std::option::Option::Some("ERROR"),
8102                Self::UnknownValue(u) => u.0.name(),
8103            }
8104        }
8105    }
8106
8107    impl std::default::Default for State {
8108        fn default() -> Self {
8109            use std::convert::From;
8110            Self::from(0)
8111        }
8112    }
8113
8114    impl std::fmt::Display for State {
8115        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
8116            wkt::internal::display_enum(f, self.name(), self.value())
8117        }
8118    }
8119
8120    impl std::convert::From<i32> for State {
8121        fn from(value: i32) -> Self {
8122            match value {
8123                0 => Self::Unspecified,
8124                3 => Self::Complete,
8125                4 => Self::Error,
8126                5 => Self::Pending,
8127                _ => Self::UnknownValue(state::UnknownValue(
8128                    wkt::internal::UnknownEnumValue::Integer(value),
8129                )),
8130            }
8131        }
8132    }
8133
8134    impl std::convert::From<&str> for State {
8135        fn from(value: &str) -> Self {
8136            use std::string::ToString;
8137            match value {
8138                "STATE_UNSPECIFIED" => Self::Unspecified,
8139                "PENDING" => Self::Pending,
8140                "COMPLETE" => Self::Complete,
8141                "ERROR" => Self::Error,
8142                _ => Self::UnknownValue(state::UnknownValue(
8143                    wkt::internal::UnknownEnumValue::String(value.to_string()),
8144                )),
8145            }
8146        }
8147    }
8148
8149    impl serde::ser::Serialize for State {
8150        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
8151        where
8152            S: serde::Serializer,
8153        {
8154            match self {
8155                Self::Unspecified => serializer.serialize_i32(0),
8156                Self::Pending => serializer.serialize_i32(5),
8157                Self::Complete => serializer.serialize_i32(3),
8158                Self::Error => serializer.serialize_i32(4),
8159                Self::UnknownValue(u) => u.0.serialize(serializer),
8160            }
8161        }
8162    }
8163
8164    impl<'de> serde::de::Deserialize<'de> for State {
8165        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8166        where
8167            D: serde::Deserializer<'de>,
8168        {
8169            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
8170                ".google.cloud.developerconnect.v1.InsightsConfig.State",
8171            ))
8172        }
8173    }
8174
8175    /// The context of the InsightsConfig.
8176    #[derive(Clone, Debug, PartialEq)]
8177    #[non_exhaustive]
8178    pub enum InsightsConfigContext {
8179        /// Optional. The name of the App Hub Application.
8180        /// Format:
8181        /// projects/{project}/locations/{location}/applications/{application}
8182        AppHubApplication(std::string::String),
8183        /// Optional. The projects to track with the InsightsConfig.
8184        Projects(std::boxed::Box<crate::model::Projects>),
8185    }
8186}
8187
8188/// Projects represents the projects to track with the InsightsConfig.
8189#[derive(Clone, Default, PartialEq)]
8190#[non_exhaustive]
8191pub struct Projects {
8192    /// Optional. The project IDs.
8193    /// Format: {project}
8194    pub project_ids: std::vec::Vec<std::string::String>,
8195
8196    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8197}
8198
8199impl Projects {
8200    /// Creates a new default instance.
8201    pub fn new() -> Self {
8202        std::default::Default::default()
8203    }
8204
8205    /// Sets the value of [project_ids][crate::model::Projects::project_ids].
8206    ///
8207    /// # Example
8208    /// ```ignore,no_run
8209    /// # use google_cloud_developerconnect_v1::model::Projects;
8210    /// let x = Projects::new().set_project_ids(["a", "b", "c"]);
8211    /// ```
8212    pub fn set_project_ids<T, V>(mut self, v: T) -> Self
8213    where
8214        T: std::iter::IntoIterator<Item = V>,
8215        V: std::convert::Into<std::string::String>,
8216    {
8217        use std::iter::Iterator;
8218        self.project_ids = v.into_iter().map(|i| i.into()).collect();
8219        self
8220    }
8221}
8222
8223impl wkt::message::Message for Projects {
8224    fn typename() -> &'static str {
8225        "type.googleapis.com/google.cloud.developerconnect.v1.Projects"
8226    }
8227}
8228
8229/// RuntimeConfig represents the runtimes where the application is
8230/// deployed.
8231#[derive(Clone, Default, PartialEq)]
8232#[non_exhaustive]
8233pub struct RuntimeConfig {
8234    /// Required. Immutable. The URI of the runtime configuration.
8235    /// For GKE, this is the cluster name.
8236    /// For Cloud Run, this is the service name.
8237    pub uri: std::string::String,
8238
8239    /// Output only. The state of the Runtime.
8240    pub state: crate::model::runtime_config::State,
8241
8242    /// The type of the runtime.
8243    pub runtime: std::option::Option<crate::model::runtime_config::Runtime>,
8244
8245    /// Where the runtime is derived from.
8246    pub derived_from: std::option::Option<crate::model::runtime_config::DerivedFrom>,
8247
8248    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8249}
8250
8251impl RuntimeConfig {
8252    /// Creates a new default instance.
8253    pub fn new() -> Self {
8254        std::default::Default::default()
8255    }
8256
8257    /// Sets the value of [uri][crate::model::RuntimeConfig::uri].
8258    ///
8259    /// # Example
8260    /// ```ignore,no_run
8261    /// # use google_cloud_developerconnect_v1::model::RuntimeConfig;
8262    /// let x = RuntimeConfig::new().set_uri("example");
8263    /// ```
8264    pub fn set_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8265        self.uri = v.into();
8266        self
8267    }
8268
8269    /// Sets the value of [state][crate::model::RuntimeConfig::state].
8270    ///
8271    /// # Example
8272    /// ```ignore,no_run
8273    /// # use google_cloud_developerconnect_v1::model::RuntimeConfig;
8274    /// use google_cloud_developerconnect_v1::model::runtime_config::State;
8275    /// let x0 = RuntimeConfig::new().set_state(State::Linked);
8276    /// let x1 = RuntimeConfig::new().set_state(State::Unlinked);
8277    /// ```
8278    pub fn set_state<T: std::convert::Into<crate::model::runtime_config::State>>(
8279        mut self,
8280        v: T,
8281    ) -> Self {
8282        self.state = v.into();
8283        self
8284    }
8285
8286    /// Sets the value of [runtime][crate::model::RuntimeConfig::runtime].
8287    ///
8288    /// Note that all the setters affecting `runtime` are mutually
8289    /// exclusive.
8290    ///
8291    /// # Example
8292    /// ```ignore,no_run
8293    /// # use google_cloud_developerconnect_v1::model::RuntimeConfig;
8294    /// use google_cloud_developerconnect_v1::model::GKEWorkload;
8295    /// let x = RuntimeConfig::new().set_runtime(Some(
8296    ///     google_cloud_developerconnect_v1::model::runtime_config::Runtime::GkeWorkload(GKEWorkload::default().into())));
8297    /// ```
8298    pub fn set_runtime<
8299        T: std::convert::Into<std::option::Option<crate::model::runtime_config::Runtime>>,
8300    >(
8301        mut self,
8302        v: T,
8303    ) -> Self {
8304        self.runtime = v.into();
8305        self
8306    }
8307
8308    /// The value of [runtime][crate::model::RuntimeConfig::runtime]
8309    /// if it holds a `GkeWorkload`, `None` if the field is not set or
8310    /// holds a different branch.
8311    pub fn gke_workload(&self) -> std::option::Option<&std::boxed::Box<crate::model::GKEWorkload>> {
8312        #[allow(unreachable_patterns)]
8313        self.runtime.as_ref().and_then(|v| match v {
8314            crate::model::runtime_config::Runtime::GkeWorkload(v) => std::option::Option::Some(v),
8315            _ => std::option::Option::None,
8316        })
8317    }
8318
8319    /// Sets the value of [runtime][crate::model::RuntimeConfig::runtime]
8320    /// to hold a `GkeWorkload`.
8321    ///
8322    /// Note that all the setters affecting `runtime` are
8323    /// mutually exclusive.
8324    ///
8325    /// # Example
8326    /// ```ignore,no_run
8327    /// # use google_cloud_developerconnect_v1::model::RuntimeConfig;
8328    /// use google_cloud_developerconnect_v1::model::GKEWorkload;
8329    /// let x = RuntimeConfig::new().set_gke_workload(GKEWorkload::default()/* use setters */);
8330    /// assert!(x.gke_workload().is_some());
8331    /// assert!(x.google_cloud_run().is_none());
8332    /// ```
8333    pub fn set_gke_workload<T: std::convert::Into<std::boxed::Box<crate::model::GKEWorkload>>>(
8334        mut self,
8335        v: T,
8336    ) -> Self {
8337        self.runtime =
8338            std::option::Option::Some(crate::model::runtime_config::Runtime::GkeWorkload(v.into()));
8339        self
8340    }
8341
8342    /// The value of [runtime][crate::model::RuntimeConfig::runtime]
8343    /// if it holds a `GoogleCloudRun`, `None` if the field is not set or
8344    /// holds a different branch.
8345    pub fn google_cloud_run(
8346        &self,
8347    ) -> std::option::Option<&std::boxed::Box<crate::model::GoogleCloudRun>> {
8348        #[allow(unreachable_patterns)]
8349        self.runtime.as_ref().and_then(|v| match v {
8350            crate::model::runtime_config::Runtime::GoogleCloudRun(v) => {
8351                std::option::Option::Some(v)
8352            }
8353            _ => std::option::Option::None,
8354        })
8355    }
8356
8357    /// Sets the value of [runtime][crate::model::RuntimeConfig::runtime]
8358    /// to hold a `GoogleCloudRun`.
8359    ///
8360    /// Note that all the setters affecting `runtime` are
8361    /// mutually exclusive.
8362    ///
8363    /// # Example
8364    /// ```ignore,no_run
8365    /// # use google_cloud_developerconnect_v1::model::RuntimeConfig;
8366    /// use google_cloud_developerconnect_v1::model::GoogleCloudRun;
8367    /// let x = RuntimeConfig::new().set_google_cloud_run(GoogleCloudRun::default()/* use setters */);
8368    /// assert!(x.google_cloud_run().is_some());
8369    /// assert!(x.gke_workload().is_none());
8370    /// ```
8371    pub fn set_google_cloud_run<
8372        T: std::convert::Into<std::boxed::Box<crate::model::GoogleCloudRun>>,
8373    >(
8374        mut self,
8375        v: T,
8376    ) -> Self {
8377        self.runtime = std::option::Option::Some(
8378            crate::model::runtime_config::Runtime::GoogleCloudRun(v.into()),
8379        );
8380        self
8381    }
8382
8383    /// Sets the value of [derived_from][crate::model::RuntimeConfig::derived_from].
8384    ///
8385    /// Note that all the setters affecting `derived_from` are mutually
8386    /// exclusive.
8387    ///
8388    /// # Example
8389    /// ```ignore,no_run
8390    /// # use google_cloud_developerconnect_v1::model::RuntimeConfig;
8391    /// use google_cloud_developerconnect_v1::model::AppHubWorkload;
8392    /// let x = RuntimeConfig::new().set_derived_from(Some(
8393    ///     google_cloud_developerconnect_v1::model::runtime_config::DerivedFrom::AppHubWorkload(AppHubWorkload::default().into())));
8394    /// ```
8395    pub fn set_derived_from<
8396        T: std::convert::Into<std::option::Option<crate::model::runtime_config::DerivedFrom>>,
8397    >(
8398        mut self,
8399        v: T,
8400    ) -> Self {
8401        self.derived_from = v.into();
8402        self
8403    }
8404
8405    /// The value of [derived_from][crate::model::RuntimeConfig::derived_from]
8406    /// if it holds a `AppHubWorkload`, `None` if the field is not set or
8407    /// holds a different branch.
8408    pub fn app_hub_workload(
8409        &self,
8410    ) -> std::option::Option<&std::boxed::Box<crate::model::AppHubWorkload>> {
8411        #[allow(unreachable_patterns)]
8412        self.derived_from.as_ref().and_then(|v| match v {
8413            crate::model::runtime_config::DerivedFrom::AppHubWorkload(v) => {
8414                std::option::Option::Some(v)
8415            }
8416            _ => std::option::Option::None,
8417        })
8418    }
8419
8420    /// Sets the value of [derived_from][crate::model::RuntimeConfig::derived_from]
8421    /// to hold a `AppHubWorkload`.
8422    ///
8423    /// Note that all the setters affecting `derived_from` are
8424    /// mutually exclusive.
8425    ///
8426    /// # Example
8427    /// ```ignore,no_run
8428    /// # use google_cloud_developerconnect_v1::model::RuntimeConfig;
8429    /// use google_cloud_developerconnect_v1::model::AppHubWorkload;
8430    /// let x = RuntimeConfig::new().set_app_hub_workload(AppHubWorkload::default()/* use setters */);
8431    /// assert!(x.app_hub_workload().is_some());
8432    /// assert!(x.app_hub_service().is_none());
8433    /// ```
8434    pub fn set_app_hub_workload<
8435        T: std::convert::Into<std::boxed::Box<crate::model::AppHubWorkload>>,
8436    >(
8437        mut self,
8438        v: T,
8439    ) -> Self {
8440        self.derived_from = std::option::Option::Some(
8441            crate::model::runtime_config::DerivedFrom::AppHubWorkload(v.into()),
8442        );
8443        self
8444    }
8445
8446    /// The value of [derived_from][crate::model::RuntimeConfig::derived_from]
8447    /// if it holds a `AppHubService`, `None` if the field is not set or
8448    /// holds a different branch.
8449    pub fn app_hub_service(
8450        &self,
8451    ) -> std::option::Option<&std::boxed::Box<crate::model::AppHubService>> {
8452        #[allow(unreachable_patterns)]
8453        self.derived_from.as_ref().and_then(|v| match v {
8454            crate::model::runtime_config::DerivedFrom::AppHubService(v) => {
8455                std::option::Option::Some(v)
8456            }
8457            _ => std::option::Option::None,
8458        })
8459    }
8460
8461    /// Sets the value of [derived_from][crate::model::RuntimeConfig::derived_from]
8462    /// to hold a `AppHubService`.
8463    ///
8464    /// Note that all the setters affecting `derived_from` are
8465    /// mutually exclusive.
8466    ///
8467    /// # Example
8468    /// ```ignore,no_run
8469    /// # use google_cloud_developerconnect_v1::model::RuntimeConfig;
8470    /// use google_cloud_developerconnect_v1::model::AppHubService;
8471    /// let x = RuntimeConfig::new().set_app_hub_service(AppHubService::default()/* use setters */);
8472    /// assert!(x.app_hub_service().is_some());
8473    /// assert!(x.app_hub_workload().is_none());
8474    /// ```
8475    pub fn set_app_hub_service<
8476        T: std::convert::Into<std::boxed::Box<crate::model::AppHubService>>,
8477    >(
8478        mut self,
8479        v: T,
8480    ) -> Self {
8481        self.derived_from = std::option::Option::Some(
8482            crate::model::runtime_config::DerivedFrom::AppHubService(v.into()),
8483        );
8484        self
8485    }
8486}
8487
8488impl wkt::message::Message for RuntimeConfig {
8489    fn typename() -> &'static str {
8490        "type.googleapis.com/google.cloud.developerconnect.v1.RuntimeConfig"
8491    }
8492}
8493
8494/// Defines additional types related to [RuntimeConfig].
8495pub mod runtime_config {
8496    #[allow(unused_imports)]
8497    use super::*;
8498
8499    /// The state of the runtime in the InsightsConfig.
8500    /// Whether the runtime is linked to the InsightsConfig.
8501    ///
8502    /// # Working with unknown values
8503    ///
8504    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
8505    /// additional enum variants at any time. Adding new variants is not considered
8506    /// a breaking change. Applications should write their code in anticipation of:
8507    ///
8508    /// - New values appearing in future releases of the client library, **and**
8509    /// - New values received dynamically, without application changes.
8510    ///
8511    /// Please consult the [Working with enums] section in the user guide for some
8512    /// guidelines.
8513    ///
8514    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
8515    #[derive(Clone, Debug, PartialEq)]
8516    #[non_exhaustive]
8517    pub enum State {
8518        /// No state specified.
8519        Unspecified,
8520        /// The runtime configuration has been linked to the InsightsConfig.
8521        Linked,
8522        /// The runtime configuration has been unlinked to the InsightsConfig.
8523        Unlinked,
8524        /// If set, the enum was initialized with an unknown value.
8525        ///
8526        /// Applications can examine the value using [State::value] or
8527        /// [State::name].
8528        UnknownValue(state::UnknownValue),
8529    }
8530
8531    #[doc(hidden)]
8532    pub mod state {
8533        #[allow(unused_imports)]
8534        use super::*;
8535        #[derive(Clone, Debug, PartialEq)]
8536        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
8537    }
8538
8539    impl State {
8540        /// Gets the enum value.
8541        ///
8542        /// Returns `None` if the enum contains an unknown value deserialized from
8543        /// the string representation of enums.
8544        pub fn value(&self) -> std::option::Option<i32> {
8545            match self {
8546                Self::Unspecified => std::option::Option::Some(0),
8547                Self::Linked => std::option::Option::Some(1),
8548                Self::Unlinked => std::option::Option::Some(2),
8549                Self::UnknownValue(u) => u.0.value(),
8550            }
8551        }
8552
8553        /// Gets the enum value as a string.
8554        ///
8555        /// Returns `None` if the enum contains an unknown value deserialized from
8556        /// the integer representation of enums.
8557        pub fn name(&self) -> std::option::Option<&str> {
8558            match self {
8559                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
8560                Self::Linked => std::option::Option::Some("LINKED"),
8561                Self::Unlinked => std::option::Option::Some("UNLINKED"),
8562                Self::UnknownValue(u) => u.0.name(),
8563            }
8564        }
8565    }
8566
8567    impl std::default::Default for State {
8568        fn default() -> Self {
8569            use std::convert::From;
8570            Self::from(0)
8571        }
8572    }
8573
8574    impl std::fmt::Display for State {
8575        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
8576            wkt::internal::display_enum(f, self.name(), self.value())
8577        }
8578    }
8579
8580    impl std::convert::From<i32> for State {
8581        fn from(value: i32) -> Self {
8582            match value {
8583                0 => Self::Unspecified,
8584                1 => Self::Linked,
8585                2 => Self::Unlinked,
8586                _ => Self::UnknownValue(state::UnknownValue(
8587                    wkt::internal::UnknownEnumValue::Integer(value),
8588                )),
8589            }
8590        }
8591    }
8592
8593    impl std::convert::From<&str> for State {
8594        fn from(value: &str) -> Self {
8595            use std::string::ToString;
8596            match value {
8597                "STATE_UNSPECIFIED" => Self::Unspecified,
8598                "LINKED" => Self::Linked,
8599                "UNLINKED" => Self::Unlinked,
8600                _ => Self::UnknownValue(state::UnknownValue(
8601                    wkt::internal::UnknownEnumValue::String(value.to_string()),
8602                )),
8603            }
8604        }
8605    }
8606
8607    impl serde::ser::Serialize for State {
8608        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
8609        where
8610            S: serde::Serializer,
8611        {
8612            match self {
8613                Self::Unspecified => serializer.serialize_i32(0),
8614                Self::Linked => serializer.serialize_i32(1),
8615                Self::Unlinked => serializer.serialize_i32(2),
8616                Self::UnknownValue(u) => u.0.serialize(serializer),
8617            }
8618        }
8619    }
8620
8621    impl<'de> serde::de::Deserialize<'de> for State {
8622        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8623        where
8624            D: serde::Deserializer<'de>,
8625        {
8626            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
8627                ".google.cloud.developerconnect.v1.RuntimeConfig.State",
8628            ))
8629        }
8630    }
8631
8632    /// The type of the runtime.
8633    #[derive(Clone, Debug, PartialEq)]
8634    #[non_exhaustive]
8635    pub enum Runtime {
8636        /// Output only. Google Kubernetes Engine runtime.
8637        GkeWorkload(std::boxed::Box<crate::model::GKEWorkload>),
8638        /// Output only. Cloud Run runtime.
8639        GoogleCloudRun(std::boxed::Box<crate::model::GoogleCloudRun>),
8640    }
8641
8642    /// Where the runtime is derived from.
8643    #[derive(Clone, Debug, PartialEq)]
8644    #[non_exhaustive]
8645    pub enum DerivedFrom {
8646        /// Output only. App Hub Workload.
8647        AppHubWorkload(std::boxed::Box<crate::model::AppHubWorkload>),
8648        /// Output only. App Hub Service.
8649        AppHubService(std::boxed::Box<crate::model::AppHubService>),
8650    }
8651}
8652
8653/// GKEWorkload represents the Google Kubernetes Engine runtime.
8654#[derive(Clone, Default, PartialEq)]
8655#[non_exhaustive]
8656pub struct GKEWorkload {
8657    /// Required. Immutable. The name of the GKE cluster.
8658    /// Format:
8659    /// `projects/{project}/locations/{location}/clusters/{cluster}`.
8660    pub cluster: std::string::String,
8661
8662    /// Output only. The name of the GKE deployment.
8663    /// Format:
8664    /// `projects/{project}/locations/{location}/clusters/{cluster}/namespaces/{namespace}/deployments/{deployment}`.
8665    pub deployment: std::string::String,
8666
8667    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8668}
8669
8670impl GKEWorkload {
8671    /// Creates a new default instance.
8672    pub fn new() -> Self {
8673        std::default::Default::default()
8674    }
8675
8676    /// Sets the value of [cluster][crate::model::GKEWorkload::cluster].
8677    ///
8678    /// # Example
8679    /// ```ignore,no_run
8680    /// # use google_cloud_developerconnect_v1::model::GKEWorkload;
8681    /// let x = GKEWorkload::new().set_cluster("example");
8682    /// ```
8683    pub fn set_cluster<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8684        self.cluster = v.into();
8685        self
8686    }
8687
8688    /// Sets the value of [deployment][crate::model::GKEWorkload::deployment].
8689    ///
8690    /// # Example
8691    /// ```ignore,no_run
8692    /// # use google_cloud_developerconnect_v1::model::GKEWorkload;
8693    /// let x = GKEWorkload::new().set_deployment("example");
8694    /// ```
8695    pub fn set_deployment<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8696        self.deployment = v.into();
8697        self
8698    }
8699}
8700
8701impl wkt::message::Message for GKEWorkload {
8702    fn typename() -> &'static str {
8703        "type.googleapis.com/google.cloud.developerconnect.v1.GKEWorkload"
8704    }
8705}
8706
8707/// GoogleCloudRun represents the Cloud Run runtime.
8708#[derive(Clone, Default, PartialEq)]
8709#[non_exhaustive]
8710pub struct GoogleCloudRun {
8711    /// Required. Immutable. The name of the Cloud Run service.
8712    /// Format:
8713    /// `projects/{project}/locations/{location}/services/{service}`.
8714    pub service_uri: std::string::String,
8715
8716    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8717}
8718
8719impl GoogleCloudRun {
8720    /// Creates a new default instance.
8721    pub fn new() -> Self {
8722        std::default::Default::default()
8723    }
8724
8725    /// Sets the value of [service_uri][crate::model::GoogleCloudRun::service_uri].
8726    ///
8727    /// # Example
8728    /// ```ignore,no_run
8729    /// # use google_cloud_developerconnect_v1::model::GoogleCloudRun;
8730    /// let x = GoogleCloudRun::new().set_service_uri("example");
8731    /// ```
8732    pub fn set_service_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8733        self.service_uri = v.into();
8734        self
8735    }
8736}
8737
8738impl wkt::message::Message for GoogleCloudRun {
8739    fn typename() -> &'static str {
8740        "type.googleapis.com/google.cloud.developerconnect.v1.GoogleCloudRun"
8741    }
8742}
8743
8744/// AppHubWorkload represents the App Hub Workload.
8745#[derive(Clone, Default, PartialEq)]
8746#[non_exhaustive]
8747pub struct AppHubWorkload {
8748    /// Required. Output only. Immutable. The name of the App Hub Workload.
8749    /// Format:
8750    /// `projects/{project}/locations/{location}/applications/{application}/workloads/{workload}`.
8751    pub workload: std::string::String,
8752
8753    /// Output only. The criticality of the App Hub Workload.
8754    pub criticality: std::string::String,
8755
8756    /// Output only. The environment of the App Hub Workload.
8757    pub environment: std::string::String,
8758
8759    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8760}
8761
8762impl AppHubWorkload {
8763    /// Creates a new default instance.
8764    pub fn new() -> Self {
8765        std::default::Default::default()
8766    }
8767
8768    /// Sets the value of [workload][crate::model::AppHubWorkload::workload].
8769    ///
8770    /// # Example
8771    /// ```ignore,no_run
8772    /// # use google_cloud_developerconnect_v1::model::AppHubWorkload;
8773    /// let x = AppHubWorkload::new().set_workload("example");
8774    /// ```
8775    pub fn set_workload<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8776        self.workload = v.into();
8777        self
8778    }
8779
8780    /// Sets the value of [criticality][crate::model::AppHubWorkload::criticality].
8781    ///
8782    /// # Example
8783    /// ```ignore,no_run
8784    /// # use google_cloud_developerconnect_v1::model::AppHubWorkload;
8785    /// let x = AppHubWorkload::new().set_criticality("example");
8786    /// ```
8787    pub fn set_criticality<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8788        self.criticality = v.into();
8789        self
8790    }
8791
8792    /// Sets the value of [environment][crate::model::AppHubWorkload::environment].
8793    ///
8794    /// # Example
8795    /// ```ignore,no_run
8796    /// # use google_cloud_developerconnect_v1::model::AppHubWorkload;
8797    /// let x = AppHubWorkload::new().set_environment("example");
8798    /// ```
8799    pub fn set_environment<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8800        self.environment = v.into();
8801        self
8802    }
8803}
8804
8805impl wkt::message::Message for AppHubWorkload {
8806    fn typename() -> &'static str {
8807        "type.googleapis.com/google.cloud.developerconnect.v1.AppHubWorkload"
8808    }
8809}
8810
8811/// AppHubService represents the App Hub Service.
8812#[derive(Clone, Default, PartialEq)]
8813#[non_exhaustive]
8814pub struct AppHubService {
8815    /// Required. Output only. Immutable. The name of the App Hub Service.
8816    /// Format:
8817    /// `projects/{project}/locations/{location}/applications/{application}/services/{service}`.
8818    pub apphub_service: std::string::String,
8819
8820    /// Output only. The criticality of the App Hub Service.
8821    pub criticality: std::string::String,
8822
8823    /// Output only. The environment of the App Hub Service.
8824    pub environment: std::string::String,
8825
8826    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8827}
8828
8829impl AppHubService {
8830    /// Creates a new default instance.
8831    pub fn new() -> Self {
8832        std::default::Default::default()
8833    }
8834
8835    /// Sets the value of [apphub_service][crate::model::AppHubService::apphub_service].
8836    ///
8837    /// # Example
8838    /// ```ignore,no_run
8839    /// # use google_cloud_developerconnect_v1::model::AppHubService;
8840    /// let x = AppHubService::new().set_apphub_service("example");
8841    /// ```
8842    pub fn set_apphub_service<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8843        self.apphub_service = v.into();
8844        self
8845    }
8846
8847    /// Sets the value of [criticality][crate::model::AppHubService::criticality].
8848    ///
8849    /// # Example
8850    /// ```ignore,no_run
8851    /// # use google_cloud_developerconnect_v1::model::AppHubService;
8852    /// let x = AppHubService::new().set_criticality("example");
8853    /// ```
8854    pub fn set_criticality<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8855        self.criticality = v.into();
8856        self
8857    }
8858
8859    /// Sets the value of [environment][crate::model::AppHubService::environment].
8860    ///
8861    /// # Example
8862    /// ```ignore,no_run
8863    /// # use google_cloud_developerconnect_v1::model::AppHubService;
8864    /// let x = AppHubService::new().set_environment("example");
8865    /// ```
8866    pub fn set_environment<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8867        self.environment = v.into();
8868        self
8869    }
8870}
8871
8872impl wkt::message::Message for AppHubService {
8873    fn typename() -> &'static str {
8874        "type.googleapis.com/google.cloud.developerconnect.v1.AppHubService"
8875    }
8876}
8877
8878/// The artifact config of the artifact that is deployed.
8879#[derive(Clone, Default, PartialEq)]
8880#[non_exhaustive]
8881pub struct ArtifactConfig {
8882    /// Required. Immutable. The URI of the artifact that is deployed.
8883    /// e.g. `us-docker.pkg.dev/my-project/my-repo/image`.
8884    /// The URI does not include the tag / digest because it captures a lineage of
8885    /// artifacts.
8886    pub uri: std::string::String,
8887
8888    /// The storage location of the artifact.
8889    pub artifact_storage: std::option::Option<crate::model::artifact_config::ArtifactStorage>,
8890
8891    /// The storage location of the artifact metadata.
8892    pub artifact_metadata_storage:
8893        std::option::Option<crate::model::artifact_config::ArtifactMetadataStorage>,
8894
8895    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8896}
8897
8898impl ArtifactConfig {
8899    /// Creates a new default instance.
8900    pub fn new() -> Self {
8901        std::default::Default::default()
8902    }
8903
8904    /// Sets the value of [uri][crate::model::ArtifactConfig::uri].
8905    ///
8906    /// # Example
8907    /// ```ignore,no_run
8908    /// # use google_cloud_developerconnect_v1::model::ArtifactConfig;
8909    /// let x = ArtifactConfig::new().set_uri("example");
8910    /// ```
8911    pub fn set_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8912        self.uri = v.into();
8913        self
8914    }
8915
8916    /// Sets the value of [artifact_storage][crate::model::ArtifactConfig::artifact_storage].
8917    ///
8918    /// Note that all the setters affecting `artifact_storage` are mutually
8919    /// exclusive.
8920    ///
8921    /// # Example
8922    /// ```ignore,no_run
8923    /// # use google_cloud_developerconnect_v1::model::ArtifactConfig;
8924    /// use google_cloud_developerconnect_v1::model::GoogleArtifactRegistry;
8925    /// let x = ArtifactConfig::new().set_artifact_storage(Some(
8926    ///     google_cloud_developerconnect_v1::model::artifact_config::ArtifactStorage::GoogleArtifactRegistry(GoogleArtifactRegistry::default().into())));
8927    /// ```
8928    pub fn set_artifact_storage<
8929        T: std::convert::Into<std::option::Option<crate::model::artifact_config::ArtifactStorage>>,
8930    >(
8931        mut self,
8932        v: T,
8933    ) -> Self {
8934        self.artifact_storage = v.into();
8935        self
8936    }
8937
8938    /// The value of [artifact_storage][crate::model::ArtifactConfig::artifact_storage]
8939    /// if it holds a `GoogleArtifactRegistry`, `None` if the field is not set or
8940    /// holds a different branch.
8941    pub fn google_artifact_registry(
8942        &self,
8943    ) -> std::option::Option<&std::boxed::Box<crate::model::GoogleArtifactRegistry>> {
8944        #[allow(unreachable_patterns)]
8945        self.artifact_storage.as_ref().and_then(|v| match v {
8946            crate::model::artifact_config::ArtifactStorage::GoogleArtifactRegistry(v) => {
8947                std::option::Option::Some(v)
8948            }
8949            _ => std::option::Option::None,
8950        })
8951    }
8952
8953    /// Sets the value of [artifact_storage][crate::model::ArtifactConfig::artifact_storage]
8954    /// to hold a `GoogleArtifactRegistry`.
8955    ///
8956    /// Note that all the setters affecting `artifact_storage` are
8957    /// mutually exclusive.
8958    ///
8959    /// # Example
8960    /// ```ignore,no_run
8961    /// # use google_cloud_developerconnect_v1::model::ArtifactConfig;
8962    /// use google_cloud_developerconnect_v1::model::GoogleArtifactRegistry;
8963    /// let x = ArtifactConfig::new().set_google_artifact_registry(GoogleArtifactRegistry::default()/* use setters */);
8964    /// assert!(x.google_artifact_registry().is_some());
8965    /// ```
8966    pub fn set_google_artifact_registry<
8967        T: std::convert::Into<std::boxed::Box<crate::model::GoogleArtifactRegistry>>,
8968    >(
8969        mut self,
8970        v: T,
8971    ) -> Self {
8972        self.artifact_storage = std::option::Option::Some(
8973            crate::model::artifact_config::ArtifactStorage::GoogleArtifactRegistry(v.into()),
8974        );
8975        self
8976    }
8977
8978    /// Sets the value of [artifact_metadata_storage][crate::model::ArtifactConfig::artifact_metadata_storage].
8979    ///
8980    /// Note that all the setters affecting `artifact_metadata_storage` are mutually
8981    /// exclusive.
8982    ///
8983    /// # Example
8984    /// ```ignore,no_run
8985    /// # use google_cloud_developerconnect_v1::model::ArtifactConfig;
8986    /// use google_cloud_developerconnect_v1::model::GoogleArtifactAnalysis;
8987    /// let x = ArtifactConfig::new().set_artifact_metadata_storage(Some(
8988    ///     google_cloud_developerconnect_v1::model::artifact_config::ArtifactMetadataStorage::GoogleArtifactAnalysis(GoogleArtifactAnalysis::default().into())));
8989    /// ```
8990    pub fn set_artifact_metadata_storage<
8991        T: std::convert::Into<
8992                std::option::Option<crate::model::artifact_config::ArtifactMetadataStorage>,
8993            >,
8994    >(
8995        mut self,
8996        v: T,
8997    ) -> Self {
8998        self.artifact_metadata_storage = v.into();
8999        self
9000    }
9001
9002    /// The value of [artifact_metadata_storage][crate::model::ArtifactConfig::artifact_metadata_storage]
9003    /// if it holds a `GoogleArtifactAnalysis`, `None` if the field is not set or
9004    /// holds a different branch.
9005    pub fn google_artifact_analysis(
9006        &self,
9007    ) -> std::option::Option<&std::boxed::Box<crate::model::GoogleArtifactAnalysis>> {
9008        #[allow(unreachable_patterns)]
9009        self.artifact_metadata_storage
9010            .as_ref()
9011            .and_then(|v| match v {
9012                crate::model::artifact_config::ArtifactMetadataStorage::GoogleArtifactAnalysis(
9013                    v,
9014                ) => std::option::Option::Some(v),
9015                _ => std::option::Option::None,
9016            })
9017    }
9018
9019    /// Sets the value of [artifact_metadata_storage][crate::model::ArtifactConfig::artifact_metadata_storage]
9020    /// to hold a `GoogleArtifactAnalysis`.
9021    ///
9022    /// Note that all the setters affecting `artifact_metadata_storage` are
9023    /// mutually exclusive.
9024    ///
9025    /// # Example
9026    /// ```ignore,no_run
9027    /// # use google_cloud_developerconnect_v1::model::ArtifactConfig;
9028    /// use google_cloud_developerconnect_v1::model::GoogleArtifactAnalysis;
9029    /// let x = ArtifactConfig::new().set_google_artifact_analysis(GoogleArtifactAnalysis::default()/* use setters */);
9030    /// assert!(x.google_artifact_analysis().is_some());
9031    /// ```
9032    pub fn set_google_artifact_analysis<
9033        T: std::convert::Into<std::boxed::Box<crate::model::GoogleArtifactAnalysis>>,
9034    >(
9035        mut self,
9036        v: T,
9037    ) -> Self {
9038        self.artifact_metadata_storage = std::option::Option::Some(
9039            crate::model::artifact_config::ArtifactMetadataStorage::GoogleArtifactAnalysis(
9040                v.into(),
9041            ),
9042        );
9043        self
9044    }
9045}
9046
9047impl wkt::message::Message for ArtifactConfig {
9048    fn typename() -> &'static str {
9049        "type.googleapis.com/google.cloud.developerconnect.v1.ArtifactConfig"
9050    }
9051}
9052
9053/// Defines additional types related to [ArtifactConfig].
9054pub mod artifact_config {
9055    #[allow(unused_imports)]
9056    use super::*;
9057
9058    /// The storage location of the artifact.
9059    #[derive(Clone, Debug, PartialEq)]
9060    #[non_exhaustive]
9061    pub enum ArtifactStorage {
9062        /// Optional. Set if the artifact is stored in Artifact registry.
9063        GoogleArtifactRegistry(std::boxed::Box<crate::model::GoogleArtifactRegistry>),
9064    }
9065
9066    /// The storage location of the artifact metadata.
9067    #[derive(Clone, Debug, PartialEq)]
9068    #[non_exhaustive]
9069    pub enum ArtifactMetadataStorage {
9070        /// Optional. Set if the artifact metadata is stored in Artifact analysis.
9071        GoogleArtifactAnalysis(std::boxed::Box<crate::model::GoogleArtifactAnalysis>),
9072    }
9073}
9074
9075/// Google Artifact Analysis configurations.
9076#[derive(Clone, Default, PartialEq)]
9077#[non_exhaustive]
9078pub struct GoogleArtifactAnalysis {
9079    /// Required. The project id of the project where the provenance is stored.
9080    pub project_id: std::string::String,
9081
9082    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9083}
9084
9085impl GoogleArtifactAnalysis {
9086    /// Creates a new default instance.
9087    pub fn new() -> Self {
9088        std::default::Default::default()
9089    }
9090
9091    /// Sets the value of [project_id][crate::model::GoogleArtifactAnalysis::project_id].
9092    ///
9093    /// # Example
9094    /// ```ignore,no_run
9095    /// # use google_cloud_developerconnect_v1::model::GoogleArtifactAnalysis;
9096    /// let x = GoogleArtifactAnalysis::new().set_project_id("example");
9097    /// ```
9098    pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9099        self.project_id = v.into();
9100        self
9101    }
9102}
9103
9104impl wkt::message::Message for GoogleArtifactAnalysis {
9105    fn typename() -> &'static str {
9106        "type.googleapis.com/google.cloud.developerconnect.v1.GoogleArtifactAnalysis"
9107    }
9108}
9109
9110/// Google Artifact Registry configurations.
9111#[derive(Clone, Default, PartialEq)]
9112#[non_exhaustive]
9113pub struct GoogleArtifactRegistry {
9114    /// Required. The host project of Artifact Registry.
9115    pub project_id: std::string::String,
9116
9117    /// Required. Immutable. The name of the artifact registry package.
9118    pub artifact_registry_package: std::string::String,
9119
9120    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9121}
9122
9123impl GoogleArtifactRegistry {
9124    /// Creates a new default instance.
9125    pub fn new() -> Self {
9126        std::default::Default::default()
9127    }
9128
9129    /// Sets the value of [project_id][crate::model::GoogleArtifactRegistry::project_id].
9130    ///
9131    /// # Example
9132    /// ```ignore,no_run
9133    /// # use google_cloud_developerconnect_v1::model::GoogleArtifactRegistry;
9134    /// let x = GoogleArtifactRegistry::new().set_project_id("example");
9135    /// ```
9136    pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9137        self.project_id = v.into();
9138        self
9139    }
9140
9141    /// Sets the value of [artifact_registry_package][crate::model::GoogleArtifactRegistry::artifact_registry_package].
9142    ///
9143    /// # Example
9144    /// ```ignore,no_run
9145    /// # use google_cloud_developerconnect_v1::model::GoogleArtifactRegistry;
9146    /// let x = GoogleArtifactRegistry::new().set_artifact_registry_package("example");
9147    /// ```
9148    pub fn set_artifact_registry_package<T: std::convert::Into<std::string::String>>(
9149        mut self,
9150        v: T,
9151    ) -> Self {
9152        self.artifact_registry_package = v.into();
9153        self
9154    }
9155}
9156
9157impl wkt::message::Message for GoogleArtifactRegistry {
9158    fn typename() -> &'static str {
9159        "type.googleapis.com/google.cloud.developerconnect.v1.GoogleArtifactRegistry"
9160    }
9161}
9162
9163/// The DeploymentEvent resource represents the deployment of the artifact within
9164/// the InsightsConfig resource.
9165#[derive(Clone, Default, PartialEq)]
9166#[non_exhaustive]
9167pub struct DeploymentEvent {
9168    /// Identifier. The name of the DeploymentEvent. This name is provided by
9169    /// Developer Connect insights. Format:
9170    /// projects/{project}/locations/{location}/insightsConfigs/{insights_config}/deploymentEvents/{uuid}
9171    pub name: std::string::String,
9172
9173    /// Output only. The create time of the DeploymentEvent.
9174    pub create_time: std::option::Option<wkt::Timestamp>,
9175
9176    /// Output only. The update time of the DeploymentEvent.
9177    pub update_time: std::option::Option<wkt::Timestamp>,
9178
9179    /// Output only. The runtime configurations where the DeploymentEvent happened.
9180    pub runtime_config: std::option::Option<crate::model::RuntimeConfig>,
9181
9182    /// Output only. The runtime assigned URI of the DeploymentEvent.
9183    /// For GKE, this is the fully qualified replica set uri.
9184    /// e.g.
9185    /// container.googleapis.com/projects/{project}/locations/{location}/clusters/{cluster}/k8s/namespaces/{namespace}/apps/replicasets/{replica-set-id}
9186    /// For Cloud Run, this is the revision name.
9187    pub runtime_deployment_uri: std::string::String,
9188
9189    /// Output only. The state of the DeploymentEvent.
9190    pub state: crate::model::deployment_event::State,
9191
9192    /// Output only. The artifact deployments of the DeploymentEvent. Each artifact
9193    /// deployment contains the artifact uri and the runtime configuration uri. For
9194    /// GKE, this would be all the containers images that are deployed in the pod.
9195    pub artifact_deployments: std::vec::Vec<crate::model::ArtifactDeployment>,
9196
9197    /// Output only. The time at which the DeploymentEvent was deployed.
9198    /// This would be the min of all ArtifactDeployment deploy_times.
9199    pub deploy_time: std::option::Option<wkt::Timestamp>,
9200
9201    /// Output only. The time at which the DeploymentEvent was undeployed, all
9202    /// artifacts are considered undeployed once this time is set. This would be
9203    /// the max of all ArtifactDeployment undeploy_times. If any ArtifactDeployment
9204    /// is still active (i.e. does not have an undeploy_time), this field will be
9205    /// empty.
9206    pub undeploy_time: std::option::Option<wkt::Timestamp>,
9207
9208    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9209}
9210
9211impl DeploymentEvent {
9212    /// Creates a new default instance.
9213    pub fn new() -> Self {
9214        std::default::Default::default()
9215    }
9216
9217    /// Sets the value of [name][crate::model::DeploymentEvent::name].
9218    ///
9219    /// # Example
9220    /// ```ignore,no_run
9221    /// # use google_cloud_developerconnect_v1::model::DeploymentEvent;
9222    /// let x = DeploymentEvent::new().set_name("example");
9223    /// ```
9224    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9225        self.name = v.into();
9226        self
9227    }
9228
9229    /// Sets the value of [create_time][crate::model::DeploymentEvent::create_time].
9230    ///
9231    /// # Example
9232    /// ```ignore,no_run
9233    /// # use google_cloud_developerconnect_v1::model::DeploymentEvent;
9234    /// use wkt::Timestamp;
9235    /// let x = DeploymentEvent::new().set_create_time(Timestamp::default()/* use setters */);
9236    /// ```
9237    pub fn set_create_time<T>(mut self, v: T) -> Self
9238    where
9239        T: std::convert::Into<wkt::Timestamp>,
9240    {
9241        self.create_time = std::option::Option::Some(v.into());
9242        self
9243    }
9244
9245    /// Sets or clears the value of [create_time][crate::model::DeploymentEvent::create_time].
9246    ///
9247    /// # Example
9248    /// ```ignore,no_run
9249    /// # use google_cloud_developerconnect_v1::model::DeploymentEvent;
9250    /// use wkt::Timestamp;
9251    /// let x = DeploymentEvent::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
9252    /// let x = DeploymentEvent::new().set_or_clear_create_time(None::<Timestamp>);
9253    /// ```
9254    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
9255    where
9256        T: std::convert::Into<wkt::Timestamp>,
9257    {
9258        self.create_time = v.map(|x| x.into());
9259        self
9260    }
9261
9262    /// Sets the value of [update_time][crate::model::DeploymentEvent::update_time].
9263    ///
9264    /// # Example
9265    /// ```ignore,no_run
9266    /// # use google_cloud_developerconnect_v1::model::DeploymentEvent;
9267    /// use wkt::Timestamp;
9268    /// let x = DeploymentEvent::new().set_update_time(Timestamp::default()/* use setters */);
9269    /// ```
9270    pub fn set_update_time<T>(mut self, v: T) -> Self
9271    where
9272        T: std::convert::Into<wkt::Timestamp>,
9273    {
9274        self.update_time = std::option::Option::Some(v.into());
9275        self
9276    }
9277
9278    /// Sets or clears the value of [update_time][crate::model::DeploymentEvent::update_time].
9279    ///
9280    /// # Example
9281    /// ```ignore,no_run
9282    /// # use google_cloud_developerconnect_v1::model::DeploymentEvent;
9283    /// use wkt::Timestamp;
9284    /// let x = DeploymentEvent::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
9285    /// let x = DeploymentEvent::new().set_or_clear_update_time(None::<Timestamp>);
9286    /// ```
9287    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
9288    where
9289        T: std::convert::Into<wkt::Timestamp>,
9290    {
9291        self.update_time = v.map(|x| x.into());
9292        self
9293    }
9294
9295    /// Sets the value of [runtime_config][crate::model::DeploymentEvent::runtime_config].
9296    ///
9297    /// # Example
9298    /// ```ignore,no_run
9299    /// # use google_cloud_developerconnect_v1::model::DeploymentEvent;
9300    /// use google_cloud_developerconnect_v1::model::RuntimeConfig;
9301    /// let x = DeploymentEvent::new().set_runtime_config(RuntimeConfig::default()/* use setters */);
9302    /// ```
9303    pub fn set_runtime_config<T>(mut self, v: T) -> Self
9304    where
9305        T: std::convert::Into<crate::model::RuntimeConfig>,
9306    {
9307        self.runtime_config = std::option::Option::Some(v.into());
9308        self
9309    }
9310
9311    /// Sets or clears the value of [runtime_config][crate::model::DeploymentEvent::runtime_config].
9312    ///
9313    /// # Example
9314    /// ```ignore,no_run
9315    /// # use google_cloud_developerconnect_v1::model::DeploymentEvent;
9316    /// use google_cloud_developerconnect_v1::model::RuntimeConfig;
9317    /// let x = DeploymentEvent::new().set_or_clear_runtime_config(Some(RuntimeConfig::default()/* use setters */));
9318    /// let x = DeploymentEvent::new().set_or_clear_runtime_config(None::<RuntimeConfig>);
9319    /// ```
9320    pub fn set_or_clear_runtime_config<T>(mut self, v: std::option::Option<T>) -> Self
9321    where
9322        T: std::convert::Into<crate::model::RuntimeConfig>,
9323    {
9324        self.runtime_config = v.map(|x| x.into());
9325        self
9326    }
9327
9328    /// Sets the value of [runtime_deployment_uri][crate::model::DeploymentEvent::runtime_deployment_uri].
9329    ///
9330    /// # Example
9331    /// ```ignore,no_run
9332    /// # use google_cloud_developerconnect_v1::model::DeploymentEvent;
9333    /// let x = DeploymentEvent::new().set_runtime_deployment_uri("example");
9334    /// ```
9335    pub fn set_runtime_deployment_uri<T: std::convert::Into<std::string::String>>(
9336        mut self,
9337        v: T,
9338    ) -> Self {
9339        self.runtime_deployment_uri = v.into();
9340        self
9341    }
9342
9343    /// Sets the value of [state][crate::model::DeploymentEvent::state].
9344    ///
9345    /// # Example
9346    /// ```ignore,no_run
9347    /// # use google_cloud_developerconnect_v1::model::DeploymentEvent;
9348    /// use google_cloud_developerconnect_v1::model::deployment_event::State;
9349    /// let x0 = DeploymentEvent::new().set_state(State::Active);
9350    /// let x1 = DeploymentEvent::new().set_state(State::Inactive);
9351    /// ```
9352    pub fn set_state<T: std::convert::Into<crate::model::deployment_event::State>>(
9353        mut self,
9354        v: T,
9355    ) -> Self {
9356        self.state = v.into();
9357        self
9358    }
9359
9360    /// Sets the value of [artifact_deployments][crate::model::DeploymentEvent::artifact_deployments].
9361    ///
9362    /// # Example
9363    /// ```ignore,no_run
9364    /// # use google_cloud_developerconnect_v1::model::DeploymentEvent;
9365    /// use google_cloud_developerconnect_v1::model::ArtifactDeployment;
9366    /// let x = DeploymentEvent::new()
9367    ///     .set_artifact_deployments([
9368    ///         ArtifactDeployment::default()/* use setters */,
9369    ///         ArtifactDeployment::default()/* use (different) setters */,
9370    ///     ]);
9371    /// ```
9372    pub fn set_artifact_deployments<T, V>(mut self, v: T) -> Self
9373    where
9374        T: std::iter::IntoIterator<Item = V>,
9375        V: std::convert::Into<crate::model::ArtifactDeployment>,
9376    {
9377        use std::iter::Iterator;
9378        self.artifact_deployments = v.into_iter().map(|i| i.into()).collect();
9379        self
9380    }
9381
9382    /// Sets the value of [deploy_time][crate::model::DeploymentEvent::deploy_time].
9383    ///
9384    /// # Example
9385    /// ```ignore,no_run
9386    /// # use google_cloud_developerconnect_v1::model::DeploymentEvent;
9387    /// use wkt::Timestamp;
9388    /// let x = DeploymentEvent::new().set_deploy_time(Timestamp::default()/* use setters */);
9389    /// ```
9390    pub fn set_deploy_time<T>(mut self, v: T) -> Self
9391    where
9392        T: std::convert::Into<wkt::Timestamp>,
9393    {
9394        self.deploy_time = std::option::Option::Some(v.into());
9395        self
9396    }
9397
9398    /// Sets or clears the value of [deploy_time][crate::model::DeploymentEvent::deploy_time].
9399    ///
9400    /// # Example
9401    /// ```ignore,no_run
9402    /// # use google_cloud_developerconnect_v1::model::DeploymentEvent;
9403    /// use wkt::Timestamp;
9404    /// let x = DeploymentEvent::new().set_or_clear_deploy_time(Some(Timestamp::default()/* use setters */));
9405    /// let x = DeploymentEvent::new().set_or_clear_deploy_time(None::<Timestamp>);
9406    /// ```
9407    pub fn set_or_clear_deploy_time<T>(mut self, v: std::option::Option<T>) -> Self
9408    where
9409        T: std::convert::Into<wkt::Timestamp>,
9410    {
9411        self.deploy_time = v.map(|x| x.into());
9412        self
9413    }
9414
9415    /// Sets the value of [undeploy_time][crate::model::DeploymentEvent::undeploy_time].
9416    ///
9417    /// # Example
9418    /// ```ignore,no_run
9419    /// # use google_cloud_developerconnect_v1::model::DeploymentEvent;
9420    /// use wkt::Timestamp;
9421    /// let x = DeploymentEvent::new().set_undeploy_time(Timestamp::default()/* use setters */);
9422    /// ```
9423    pub fn set_undeploy_time<T>(mut self, v: T) -> Self
9424    where
9425        T: std::convert::Into<wkt::Timestamp>,
9426    {
9427        self.undeploy_time = std::option::Option::Some(v.into());
9428        self
9429    }
9430
9431    /// Sets or clears the value of [undeploy_time][crate::model::DeploymentEvent::undeploy_time].
9432    ///
9433    /// # Example
9434    /// ```ignore,no_run
9435    /// # use google_cloud_developerconnect_v1::model::DeploymentEvent;
9436    /// use wkt::Timestamp;
9437    /// let x = DeploymentEvent::new().set_or_clear_undeploy_time(Some(Timestamp::default()/* use setters */));
9438    /// let x = DeploymentEvent::new().set_or_clear_undeploy_time(None::<Timestamp>);
9439    /// ```
9440    pub fn set_or_clear_undeploy_time<T>(mut self, v: std::option::Option<T>) -> Self
9441    where
9442        T: std::convert::Into<wkt::Timestamp>,
9443    {
9444        self.undeploy_time = v.map(|x| x.into());
9445        self
9446    }
9447}
9448
9449impl wkt::message::Message for DeploymentEvent {
9450    fn typename() -> &'static str {
9451        "type.googleapis.com/google.cloud.developerconnect.v1.DeploymentEvent"
9452    }
9453}
9454
9455/// Defines additional types related to [DeploymentEvent].
9456pub mod deployment_event {
9457    #[allow(unused_imports)]
9458    use super::*;
9459
9460    /// The state of the DeploymentEvent.
9461    ///
9462    /// # Working with unknown values
9463    ///
9464    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
9465    /// additional enum variants at any time. Adding new variants is not considered
9466    /// a breaking change. Applications should write their code in anticipation of:
9467    ///
9468    /// - New values appearing in future releases of the client library, **and**
9469    /// - New values received dynamically, without application changes.
9470    ///
9471    /// Please consult the [Working with enums] section in the user guide for some
9472    /// guidelines.
9473    ///
9474    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
9475    #[derive(Clone, Debug, PartialEq)]
9476    #[non_exhaustive]
9477    pub enum State {
9478        /// No state specified.
9479        Unspecified,
9480        /// The deployment is active in the runtime.
9481        Active,
9482        /// The deployment is not in the runtime.
9483        Inactive,
9484        /// If set, the enum was initialized with an unknown value.
9485        ///
9486        /// Applications can examine the value using [State::value] or
9487        /// [State::name].
9488        UnknownValue(state::UnknownValue),
9489    }
9490
9491    #[doc(hidden)]
9492    pub mod state {
9493        #[allow(unused_imports)]
9494        use super::*;
9495        #[derive(Clone, Debug, PartialEq)]
9496        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
9497    }
9498
9499    impl State {
9500        /// Gets the enum value.
9501        ///
9502        /// Returns `None` if the enum contains an unknown value deserialized from
9503        /// the string representation of enums.
9504        pub fn value(&self) -> std::option::Option<i32> {
9505            match self {
9506                Self::Unspecified => std::option::Option::Some(0),
9507                Self::Active => std::option::Option::Some(1),
9508                Self::Inactive => std::option::Option::Some(2),
9509                Self::UnknownValue(u) => u.0.value(),
9510            }
9511        }
9512
9513        /// Gets the enum value as a string.
9514        ///
9515        /// Returns `None` if the enum contains an unknown value deserialized from
9516        /// the integer representation of enums.
9517        pub fn name(&self) -> std::option::Option<&str> {
9518            match self {
9519                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
9520                Self::Active => std::option::Option::Some("STATE_ACTIVE"),
9521                Self::Inactive => std::option::Option::Some("STATE_INACTIVE"),
9522                Self::UnknownValue(u) => u.0.name(),
9523            }
9524        }
9525    }
9526
9527    impl std::default::Default for State {
9528        fn default() -> Self {
9529            use std::convert::From;
9530            Self::from(0)
9531        }
9532    }
9533
9534    impl std::fmt::Display for State {
9535        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
9536            wkt::internal::display_enum(f, self.name(), self.value())
9537        }
9538    }
9539
9540    impl std::convert::From<i32> for State {
9541        fn from(value: i32) -> Self {
9542            match value {
9543                0 => Self::Unspecified,
9544                1 => Self::Active,
9545                2 => Self::Inactive,
9546                _ => Self::UnknownValue(state::UnknownValue(
9547                    wkt::internal::UnknownEnumValue::Integer(value),
9548                )),
9549            }
9550        }
9551    }
9552
9553    impl std::convert::From<&str> for State {
9554        fn from(value: &str) -> Self {
9555            use std::string::ToString;
9556            match value {
9557                "STATE_UNSPECIFIED" => Self::Unspecified,
9558                "STATE_ACTIVE" => Self::Active,
9559                "STATE_INACTIVE" => Self::Inactive,
9560                _ => Self::UnknownValue(state::UnknownValue(
9561                    wkt::internal::UnknownEnumValue::String(value.to_string()),
9562                )),
9563            }
9564        }
9565    }
9566
9567    impl serde::ser::Serialize for State {
9568        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9569        where
9570            S: serde::Serializer,
9571        {
9572            match self {
9573                Self::Unspecified => serializer.serialize_i32(0),
9574                Self::Active => serializer.serialize_i32(1),
9575                Self::Inactive => serializer.serialize_i32(2),
9576                Self::UnknownValue(u) => u.0.serialize(serializer),
9577            }
9578        }
9579    }
9580
9581    impl<'de> serde::de::Deserialize<'de> for State {
9582        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9583        where
9584            D: serde::Deserializer<'de>,
9585        {
9586            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
9587                ".google.cloud.developerconnect.v1.DeploymentEvent.State",
9588            ))
9589        }
9590    }
9591}
9592
9593/// Request for getting a DeploymentEvent.
9594#[derive(Clone, Default, PartialEq)]
9595#[non_exhaustive]
9596pub struct GetDeploymentEventRequest {
9597    /// Required. The name of the deployment event to retrieve.
9598    /// Format:
9599    /// projects/{project}/locations/{location}/insightsConfigs/{insights_config}/deploymentEvents/{uuid}
9600    pub name: std::string::String,
9601
9602    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9603}
9604
9605impl GetDeploymentEventRequest {
9606    /// Creates a new default instance.
9607    pub fn new() -> Self {
9608        std::default::Default::default()
9609    }
9610
9611    /// Sets the value of [name][crate::model::GetDeploymentEventRequest::name].
9612    ///
9613    /// # Example
9614    /// ```ignore,no_run
9615    /// # use google_cloud_developerconnect_v1::model::GetDeploymentEventRequest;
9616    /// let x = GetDeploymentEventRequest::new().set_name("example");
9617    /// ```
9618    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9619        self.name = v.into();
9620        self
9621    }
9622}
9623
9624impl wkt::message::Message for GetDeploymentEventRequest {
9625    fn typename() -> &'static str {
9626        "type.googleapis.com/google.cloud.developerconnect.v1.GetDeploymentEventRequest"
9627    }
9628}
9629
9630/// Request for requesting list of DeploymentEvents.
9631#[derive(Clone, Default, PartialEq)]
9632#[non_exhaustive]
9633pub struct ListDeploymentEventsRequest {
9634    /// Required. The parent insights config that owns this collection of
9635    /// deployment events. Format:
9636    /// projects/{project}/locations/{location}/insightsConfigs/{insights_config}
9637    pub parent: std::string::String,
9638
9639    /// Optional. The maximum number of deployment events to return. The service
9640    /// may return fewer than this value. If unspecified, at most 50 deployment
9641    /// events will be returned. The maximum value is 1000; values above 1000 will
9642    /// be coerced to 1000.
9643    pub page_size: i32,
9644
9645    /// Optional. A page token, received from a previous `ListDeploymentEvents`
9646    /// call. Provide this to retrieve the subsequent page.
9647    ///
9648    /// When paginating, all other parameters provided to `ListDeploymentEvents`
9649    /// must match the call that provided the page token.
9650    pub page_token: std::string::String,
9651
9652    /// Optional. Filter expression that matches a subset of the DeploymentEvents.
9653    /// <https://google.aip.dev/160>.
9654    pub filter: std::string::String,
9655
9656    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9657}
9658
9659impl ListDeploymentEventsRequest {
9660    /// Creates a new default instance.
9661    pub fn new() -> Self {
9662        std::default::Default::default()
9663    }
9664
9665    /// Sets the value of [parent][crate::model::ListDeploymentEventsRequest::parent].
9666    ///
9667    /// # Example
9668    /// ```ignore,no_run
9669    /// # use google_cloud_developerconnect_v1::model::ListDeploymentEventsRequest;
9670    /// let x = ListDeploymentEventsRequest::new().set_parent("example");
9671    /// ```
9672    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9673        self.parent = v.into();
9674        self
9675    }
9676
9677    /// Sets the value of [page_size][crate::model::ListDeploymentEventsRequest::page_size].
9678    ///
9679    /// # Example
9680    /// ```ignore,no_run
9681    /// # use google_cloud_developerconnect_v1::model::ListDeploymentEventsRequest;
9682    /// let x = ListDeploymentEventsRequest::new().set_page_size(42);
9683    /// ```
9684    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
9685        self.page_size = v.into();
9686        self
9687    }
9688
9689    /// Sets the value of [page_token][crate::model::ListDeploymentEventsRequest::page_token].
9690    ///
9691    /// # Example
9692    /// ```ignore,no_run
9693    /// # use google_cloud_developerconnect_v1::model::ListDeploymentEventsRequest;
9694    /// let x = ListDeploymentEventsRequest::new().set_page_token("example");
9695    /// ```
9696    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9697        self.page_token = v.into();
9698        self
9699    }
9700
9701    /// Sets the value of [filter][crate::model::ListDeploymentEventsRequest::filter].
9702    ///
9703    /// # Example
9704    /// ```ignore,no_run
9705    /// # use google_cloud_developerconnect_v1::model::ListDeploymentEventsRequest;
9706    /// let x = ListDeploymentEventsRequest::new().set_filter("example");
9707    /// ```
9708    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9709        self.filter = v.into();
9710        self
9711    }
9712}
9713
9714impl wkt::message::Message for ListDeploymentEventsRequest {
9715    fn typename() -> &'static str {
9716        "type.googleapis.com/google.cloud.developerconnect.v1.ListDeploymentEventsRequest"
9717    }
9718}
9719
9720/// Response to listing DeploymentEvents.
9721#[derive(Clone, Default, PartialEq)]
9722#[non_exhaustive]
9723pub struct ListDeploymentEventsResponse {
9724    /// The list of DeploymentEvents.
9725    pub deployment_events: std::vec::Vec<crate::model::DeploymentEvent>,
9726
9727    /// A token, which can be sent as `page_token` to retrieve the next page.
9728    /// If this field is omitted, there are no subsequent pages.
9729    pub next_page_token: std::string::String,
9730
9731    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9732}
9733
9734impl ListDeploymentEventsResponse {
9735    /// Creates a new default instance.
9736    pub fn new() -> Self {
9737        std::default::Default::default()
9738    }
9739
9740    /// Sets the value of [deployment_events][crate::model::ListDeploymentEventsResponse::deployment_events].
9741    ///
9742    /// # Example
9743    /// ```ignore,no_run
9744    /// # use google_cloud_developerconnect_v1::model::ListDeploymentEventsResponse;
9745    /// use google_cloud_developerconnect_v1::model::DeploymentEvent;
9746    /// let x = ListDeploymentEventsResponse::new()
9747    ///     .set_deployment_events([
9748    ///         DeploymentEvent::default()/* use setters */,
9749    ///         DeploymentEvent::default()/* use (different) setters */,
9750    ///     ]);
9751    /// ```
9752    pub fn set_deployment_events<T, V>(mut self, v: T) -> Self
9753    where
9754        T: std::iter::IntoIterator<Item = V>,
9755        V: std::convert::Into<crate::model::DeploymentEvent>,
9756    {
9757        use std::iter::Iterator;
9758        self.deployment_events = v.into_iter().map(|i| i.into()).collect();
9759        self
9760    }
9761
9762    /// Sets the value of [next_page_token][crate::model::ListDeploymentEventsResponse::next_page_token].
9763    ///
9764    /// # Example
9765    /// ```ignore,no_run
9766    /// # use google_cloud_developerconnect_v1::model::ListDeploymentEventsResponse;
9767    /// let x = ListDeploymentEventsResponse::new().set_next_page_token("example");
9768    /// ```
9769    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9770        self.next_page_token = v.into();
9771        self
9772    }
9773}
9774
9775impl wkt::message::Message for ListDeploymentEventsResponse {
9776    fn typename() -> &'static str {
9777        "type.googleapis.com/google.cloud.developerconnect.v1.ListDeploymentEventsResponse"
9778    }
9779}
9780
9781#[doc(hidden)]
9782impl google_cloud_gax::paginator::internal::PageableResponse for ListDeploymentEventsResponse {
9783    type PageItem = crate::model::DeploymentEvent;
9784
9785    fn items(self) -> std::vec::Vec<Self::PageItem> {
9786        self.deployment_events
9787    }
9788
9789    fn next_page_token(&self) -> std::string::String {
9790        use std::clone::Clone;
9791        self.next_page_token.clone()
9792    }
9793}
9794
9795/// The ArtifactDeployment resource represents the deployment of the artifact
9796/// within the InsightsConfig resource.
9797#[derive(Clone, Default, PartialEq)]
9798#[non_exhaustive]
9799pub struct ArtifactDeployment {
9800    /// Output only. Unique identifier of `ArtifactDeployment`.
9801    pub id: std::string::String,
9802
9803    /// Output only. The artifact that is deployed.
9804    pub artifact_reference: std::string::String,
9805
9806    /// Output only. The artifact alias in the deployment spec, with Tag/SHA.
9807    /// e.g. us-docker.pkg.dev/my-project/my-repo/image:1.0.0
9808    pub artifact_alias: std::string::String,
9809
9810    /// Output only. The source commits at which this artifact was built. Extracted
9811    /// from provenance.
9812    pub source_commit_uris: std::vec::Vec<std::string::String>,
9813
9814    /// Output only. The time at which the deployment was deployed.
9815    pub deploy_time: std::option::Option<wkt::Timestamp>,
9816
9817    /// Output only. The time at which the deployment was undeployed, all artifacts
9818    /// are considered undeployed once this time is set.
9819    pub undeploy_time: std::option::Option<wkt::Timestamp>,
9820
9821    /// Output only. The summary of container status of the artifact deployment.
9822    /// Format as `ContainerStatusState-Reason : restartCount`
9823    /// e.g. "Waiting-ImagePullBackOff : 3"
9824    pub container_status_summary: std::string::String,
9825
9826    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9827}
9828
9829impl ArtifactDeployment {
9830    /// Creates a new default instance.
9831    pub fn new() -> Self {
9832        std::default::Default::default()
9833    }
9834
9835    /// Sets the value of [id][crate::model::ArtifactDeployment::id].
9836    ///
9837    /// # Example
9838    /// ```ignore,no_run
9839    /// # use google_cloud_developerconnect_v1::model::ArtifactDeployment;
9840    /// let x = ArtifactDeployment::new().set_id("example");
9841    /// ```
9842    pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9843        self.id = v.into();
9844        self
9845    }
9846
9847    /// Sets the value of [artifact_reference][crate::model::ArtifactDeployment::artifact_reference].
9848    ///
9849    /// # Example
9850    /// ```ignore,no_run
9851    /// # use google_cloud_developerconnect_v1::model::ArtifactDeployment;
9852    /// let x = ArtifactDeployment::new().set_artifact_reference("example");
9853    /// ```
9854    pub fn set_artifact_reference<T: std::convert::Into<std::string::String>>(
9855        mut self,
9856        v: T,
9857    ) -> Self {
9858        self.artifact_reference = v.into();
9859        self
9860    }
9861
9862    /// Sets the value of [artifact_alias][crate::model::ArtifactDeployment::artifact_alias].
9863    ///
9864    /// # Example
9865    /// ```ignore,no_run
9866    /// # use google_cloud_developerconnect_v1::model::ArtifactDeployment;
9867    /// let x = ArtifactDeployment::new().set_artifact_alias("example");
9868    /// ```
9869    pub fn set_artifact_alias<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9870        self.artifact_alias = v.into();
9871        self
9872    }
9873
9874    /// Sets the value of [source_commit_uris][crate::model::ArtifactDeployment::source_commit_uris].
9875    ///
9876    /// # Example
9877    /// ```ignore,no_run
9878    /// # use google_cloud_developerconnect_v1::model::ArtifactDeployment;
9879    /// let x = ArtifactDeployment::new().set_source_commit_uris(["a", "b", "c"]);
9880    /// ```
9881    pub fn set_source_commit_uris<T, V>(mut self, v: T) -> Self
9882    where
9883        T: std::iter::IntoIterator<Item = V>,
9884        V: std::convert::Into<std::string::String>,
9885    {
9886        use std::iter::Iterator;
9887        self.source_commit_uris = v.into_iter().map(|i| i.into()).collect();
9888        self
9889    }
9890
9891    /// Sets the value of [deploy_time][crate::model::ArtifactDeployment::deploy_time].
9892    ///
9893    /// # Example
9894    /// ```ignore,no_run
9895    /// # use google_cloud_developerconnect_v1::model::ArtifactDeployment;
9896    /// use wkt::Timestamp;
9897    /// let x = ArtifactDeployment::new().set_deploy_time(Timestamp::default()/* use setters */);
9898    /// ```
9899    pub fn set_deploy_time<T>(mut self, v: T) -> Self
9900    where
9901        T: std::convert::Into<wkt::Timestamp>,
9902    {
9903        self.deploy_time = std::option::Option::Some(v.into());
9904        self
9905    }
9906
9907    /// Sets or clears the value of [deploy_time][crate::model::ArtifactDeployment::deploy_time].
9908    ///
9909    /// # Example
9910    /// ```ignore,no_run
9911    /// # use google_cloud_developerconnect_v1::model::ArtifactDeployment;
9912    /// use wkt::Timestamp;
9913    /// let x = ArtifactDeployment::new().set_or_clear_deploy_time(Some(Timestamp::default()/* use setters */));
9914    /// let x = ArtifactDeployment::new().set_or_clear_deploy_time(None::<Timestamp>);
9915    /// ```
9916    pub fn set_or_clear_deploy_time<T>(mut self, v: std::option::Option<T>) -> Self
9917    where
9918        T: std::convert::Into<wkt::Timestamp>,
9919    {
9920        self.deploy_time = v.map(|x| x.into());
9921        self
9922    }
9923
9924    /// Sets the value of [undeploy_time][crate::model::ArtifactDeployment::undeploy_time].
9925    ///
9926    /// # Example
9927    /// ```ignore,no_run
9928    /// # use google_cloud_developerconnect_v1::model::ArtifactDeployment;
9929    /// use wkt::Timestamp;
9930    /// let x = ArtifactDeployment::new().set_undeploy_time(Timestamp::default()/* use setters */);
9931    /// ```
9932    pub fn set_undeploy_time<T>(mut self, v: T) -> Self
9933    where
9934        T: std::convert::Into<wkt::Timestamp>,
9935    {
9936        self.undeploy_time = std::option::Option::Some(v.into());
9937        self
9938    }
9939
9940    /// Sets or clears the value of [undeploy_time][crate::model::ArtifactDeployment::undeploy_time].
9941    ///
9942    /// # Example
9943    /// ```ignore,no_run
9944    /// # use google_cloud_developerconnect_v1::model::ArtifactDeployment;
9945    /// use wkt::Timestamp;
9946    /// let x = ArtifactDeployment::new().set_or_clear_undeploy_time(Some(Timestamp::default()/* use setters */));
9947    /// let x = ArtifactDeployment::new().set_or_clear_undeploy_time(None::<Timestamp>);
9948    /// ```
9949    pub fn set_or_clear_undeploy_time<T>(mut self, v: std::option::Option<T>) -> Self
9950    where
9951        T: std::convert::Into<wkt::Timestamp>,
9952    {
9953        self.undeploy_time = v.map(|x| x.into());
9954        self
9955    }
9956
9957    /// Sets the value of [container_status_summary][crate::model::ArtifactDeployment::container_status_summary].
9958    ///
9959    /// # Example
9960    /// ```ignore,no_run
9961    /// # use google_cloud_developerconnect_v1::model::ArtifactDeployment;
9962    /// let x = ArtifactDeployment::new().set_container_status_summary("example");
9963    /// ```
9964    pub fn set_container_status_summary<T: std::convert::Into<std::string::String>>(
9965        mut self,
9966        v: T,
9967    ) -> Self {
9968        self.container_status_summary = v.into();
9969        self
9970    }
9971}
9972
9973impl wkt::message::Message for ArtifactDeployment {
9974    fn typename() -> &'static str {
9975        "type.googleapis.com/google.cloud.developerconnect.v1.ArtifactDeployment"
9976    }
9977}
9978
9979/// Request for creating an InsightsConfig.
9980#[derive(Clone, Default, PartialEq)]
9981#[non_exhaustive]
9982pub struct CreateInsightsConfigRequest {
9983    /// Required. Value for parent.
9984    pub parent: std::string::String,
9985
9986    /// Required. ID of the requesting InsightsConfig.
9987    pub insights_config_id: std::string::String,
9988
9989    /// Required. The resource being created.
9990    pub insights_config: std::option::Option<crate::model::InsightsConfig>,
9991
9992    /// Optional. If set, validate the request, but do not actually post it.
9993    pub validate_only: bool,
9994
9995    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9996}
9997
9998impl CreateInsightsConfigRequest {
9999    /// Creates a new default instance.
10000    pub fn new() -> Self {
10001        std::default::Default::default()
10002    }
10003
10004    /// Sets the value of [parent][crate::model::CreateInsightsConfigRequest::parent].
10005    ///
10006    /// # Example
10007    /// ```ignore,no_run
10008    /// # use google_cloud_developerconnect_v1::model::CreateInsightsConfigRequest;
10009    /// let x = CreateInsightsConfigRequest::new().set_parent("example");
10010    /// ```
10011    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10012        self.parent = v.into();
10013        self
10014    }
10015
10016    /// Sets the value of [insights_config_id][crate::model::CreateInsightsConfigRequest::insights_config_id].
10017    ///
10018    /// # Example
10019    /// ```ignore,no_run
10020    /// # use google_cloud_developerconnect_v1::model::CreateInsightsConfigRequest;
10021    /// let x = CreateInsightsConfigRequest::new().set_insights_config_id("example");
10022    /// ```
10023    pub fn set_insights_config_id<T: std::convert::Into<std::string::String>>(
10024        mut self,
10025        v: T,
10026    ) -> Self {
10027        self.insights_config_id = v.into();
10028        self
10029    }
10030
10031    /// Sets the value of [insights_config][crate::model::CreateInsightsConfigRequest::insights_config].
10032    ///
10033    /// # Example
10034    /// ```ignore,no_run
10035    /// # use google_cloud_developerconnect_v1::model::CreateInsightsConfigRequest;
10036    /// use google_cloud_developerconnect_v1::model::InsightsConfig;
10037    /// let x = CreateInsightsConfigRequest::new().set_insights_config(InsightsConfig::default()/* use setters */);
10038    /// ```
10039    pub fn set_insights_config<T>(mut self, v: T) -> Self
10040    where
10041        T: std::convert::Into<crate::model::InsightsConfig>,
10042    {
10043        self.insights_config = std::option::Option::Some(v.into());
10044        self
10045    }
10046
10047    /// Sets or clears the value of [insights_config][crate::model::CreateInsightsConfigRequest::insights_config].
10048    ///
10049    /// # Example
10050    /// ```ignore,no_run
10051    /// # use google_cloud_developerconnect_v1::model::CreateInsightsConfigRequest;
10052    /// use google_cloud_developerconnect_v1::model::InsightsConfig;
10053    /// let x = CreateInsightsConfigRequest::new().set_or_clear_insights_config(Some(InsightsConfig::default()/* use setters */));
10054    /// let x = CreateInsightsConfigRequest::new().set_or_clear_insights_config(None::<InsightsConfig>);
10055    /// ```
10056    pub fn set_or_clear_insights_config<T>(mut self, v: std::option::Option<T>) -> Self
10057    where
10058        T: std::convert::Into<crate::model::InsightsConfig>,
10059    {
10060        self.insights_config = v.map(|x| x.into());
10061        self
10062    }
10063
10064    /// Sets the value of [validate_only][crate::model::CreateInsightsConfigRequest::validate_only].
10065    ///
10066    /// # Example
10067    /// ```ignore,no_run
10068    /// # use google_cloud_developerconnect_v1::model::CreateInsightsConfigRequest;
10069    /// let x = CreateInsightsConfigRequest::new().set_validate_only(true);
10070    /// ```
10071    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
10072        self.validate_only = v.into();
10073        self
10074    }
10075}
10076
10077impl wkt::message::Message for CreateInsightsConfigRequest {
10078    fn typename() -> &'static str {
10079        "type.googleapis.com/google.cloud.developerconnect.v1.CreateInsightsConfigRequest"
10080    }
10081}
10082
10083/// Request for getting an InsightsConfig.
10084#[derive(Clone, Default, PartialEq)]
10085#[non_exhaustive]
10086pub struct GetInsightsConfigRequest {
10087    /// Required. Name of the resource.
10088    pub name: std::string::String,
10089
10090    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10091}
10092
10093impl GetInsightsConfigRequest {
10094    /// Creates a new default instance.
10095    pub fn new() -> Self {
10096        std::default::Default::default()
10097    }
10098
10099    /// Sets the value of [name][crate::model::GetInsightsConfigRequest::name].
10100    ///
10101    /// # Example
10102    /// ```ignore,no_run
10103    /// # use google_cloud_developerconnect_v1::model::GetInsightsConfigRequest;
10104    /// let x = GetInsightsConfigRequest::new().set_name("example");
10105    /// ```
10106    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10107        self.name = v.into();
10108        self
10109    }
10110}
10111
10112impl wkt::message::Message for GetInsightsConfigRequest {
10113    fn typename() -> &'static str {
10114        "type.googleapis.com/google.cloud.developerconnect.v1.GetInsightsConfigRequest"
10115    }
10116}
10117
10118/// Request for requesting list of InsightsConfigs.
10119#[derive(Clone, Default, PartialEq)]
10120#[non_exhaustive]
10121pub struct ListInsightsConfigsRequest {
10122    /// Required. Parent value for ListInsightsConfigsRequest.
10123    pub parent: std::string::String,
10124
10125    /// Optional. Requested page size. Server may return fewer items than
10126    /// requested. If unspecified, server will pick an appropriate default.
10127    pub page_size: i32,
10128
10129    /// Optional. A token identifying a page of results the server should return.
10130    pub page_token: std::string::String,
10131
10132    /// Optional. Filtering results. See <https://google.aip.dev/160> for more
10133    /// details. Filter string, adhering to the rules in
10134    /// <https://google.aip.dev/160>. List only InsightsConfigs matching the filter.
10135    /// If filter is empty, all InsightsConfigs are listed.
10136    pub filter: std::string::String,
10137
10138    /// Optional. Hint for how to order the results.
10139    pub order_by: std::string::String,
10140
10141    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10142}
10143
10144impl ListInsightsConfigsRequest {
10145    /// Creates a new default instance.
10146    pub fn new() -> Self {
10147        std::default::Default::default()
10148    }
10149
10150    /// Sets the value of [parent][crate::model::ListInsightsConfigsRequest::parent].
10151    ///
10152    /// # Example
10153    /// ```ignore,no_run
10154    /// # use google_cloud_developerconnect_v1::model::ListInsightsConfigsRequest;
10155    /// let x = ListInsightsConfigsRequest::new().set_parent("example");
10156    /// ```
10157    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10158        self.parent = v.into();
10159        self
10160    }
10161
10162    /// Sets the value of [page_size][crate::model::ListInsightsConfigsRequest::page_size].
10163    ///
10164    /// # Example
10165    /// ```ignore,no_run
10166    /// # use google_cloud_developerconnect_v1::model::ListInsightsConfigsRequest;
10167    /// let x = ListInsightsConfigsRequest::new().set_page_size(42);
10168    /// ```
10169    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10170        self.page_size = v.into();
10171        self
10172    }
10173
10174    /// Sets the value of [page_token][crate::model::ListInsightsConfigsRequest::page_token].
10175    ///
10176    /// # Example
10177    /// ```ignore,no_run
10178    /// # use google_cloud_developerconnect_v1::model::ListInsightsConfigsRequest;
10179    /// let x = ListInsightsConfigsRequest::new().set_page_token("example");
10180    /// ```
10181    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10182        self.page_token = v.into();
10183        self
10184    }
10185
10186    /// Sets the value of [filter][crate::model::ListInsightsConfigsRequest::filter].
10187    ///
10188    /// # Example
10189    /// ```ignore,no_run
10190    /// # use google_cloud_developerconnect_v1::model::ListInsightsConfigsRequest;
10191    /// let x = ListInsightsConfigsRequest::new().set_filter("example");
10192    /// ```
10193    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10194        self.filter = v.into();
10195        self
10196    }
10197
10198    /// Sets the value of [order_by][crate::model::ListInsightsConfigsRequest::order_by].
10199    ///
10200    /// # Example
10201    /// ```ignore,no_run
10202    /// # use google_cloud_developerconnect_v1::model::ListInsightsConfigsRequest;
10203    /// let x = ListInsightsConfigsRequest::new().set_order_by("example");
10204    /// ```
10205    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10206        self.order_by = v.into();
10207        self
10208    }
10209}
10210
10211impl wkt::message::Message for ListInsightsConfigsRequest {
10212    fn typename() -> &'static str {
10213        "type.googleapis.com/google.cloud.developerconnect.v1.ListInsightsConfigsRequest"
10214    }
10215}
10216
10217/// Request for response to listing InsightsConfigs.
10218#[derive(Clone, Default, PartialEq)]
10219#[non_exhaustive]
10220pub struct ListInsightsConfigsResponse {
10221    /// The list of InsightsConfigs.
10222    pub insights_configs: std::vec::Vec<crate::model::InsightsConfig>,
10223
10224    /// A token identifying a page of results the server should return.
10225    pub next_page_token: std::string::String,
10226
10227    /// Locations that could not be reached.
10228    pub unreachable: std::vec::Vec<std::string::String>,
10229
10230    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10231}
10232
10233impl ListInsightsConfigsResponse {
10234    /// Creates a new default instance.
10235    pub fn new() -> Self {
10236        std::default::Default::default()
10237    }
10238
10239    /// Sets the value of [insights_configs][crate::model::ListInsightsConfigsResponse::insights_configs].
10240    ///
10241    /// # Example
10242    /// ```ignore,no_run
10243    /// # use google_cloud_developerconnect_v1::model::ListInsightsConfigsResponse;
10244    /// use google_cloud_developerconnect_v1::model::InsightsConfig;
10245    /// let x = ListInsightsConfigsResponse::new()
10246    ///     .set_insights_configs([
10247    ///         InsightsConfig::default()/* use setters */,
10248    ///         InsightsConfig::default()/* use (different) setters */,
10249    ///     ]);
10250    /// ```
10251    pub fn set_insights_configs<T, V>(mut self, v: T) -> Self
10252    where
10253        T: std::iter::IntoIterator<Item = V>,
10254        V: std::convert::Into<crate::model::InsightsConfig>,
10255    {
10256        use std::iter::Iterator;
10257        self.insights_configs = v.into_iter().map(|i| i.into()).collect();
10258        self
10259    }
10260
10261    /// Sets the value of [next_page_token][crate::model::ListInsightsConfigsResponse::next_page_token].
10262    ///
10263    /// # Example
10264    /// ```ignore,no_run
10265    /// # use google_cloud_developerconnect_v1::model::ListInsightsConfigsResponse;
10266    /// let x = ListInsightsConfigsResponse::new().set_next_page_token("example");
10267    /// ```
10268    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10269        self.next_page_token = v.into();
10270        self
10271    }
10272
10273    /// Sets the value of [unreachable][crate::model::ListInsightsConfigsResponse::unreachable].
10274    ///
10275    /// # Example
10276    /// ```ignore,no_run
10277    /// # use google_cloud_developerconnect_v1::model::ListInsightsConfigsResponse;
10278    /// let x = ListInsightsConfigsResponse::new().set_unreachable(["a", "b", "c"]);
10279    /// ```
10280    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
10281    where
10282        T: std::iter::IntoIterator<Item = V>,
10283        V: std::convert::Into<std::string::String>,
10284    {
10285        use std::iter::Iterator;
10286        self.unreachable = v.into_iter().map(|i| i.into()).collect();
10287        self
10288    }
10289}
10290
10291impl wkt::message::Message for ListInsightsConfigsResponse {
10292    fn typename() -> &'static str {
10293        "type.googleapis.com/google.cloud.developerconnect.v1.ListInsightsConfigsResponse"
10294    }
10295}
10296
10297#[doc(hidden)]
10298impl google_cloud_gax::paginator::internal::PageableResponse for ListInsightsConfigsResponse {
10299    type PageItem = crate::model::InsightsConfig;
10300
10301    fn items(self) -> std::vec::Vec<Self::PageItem> {
10302        self.insights_configs
10303    }
10304
10305    fn next_page_token(&self) -> std::string::String {
10306        use std::clone::Clone;
10307        self.next_page_token.clone()
10308    }
10309}
10310
10311/// Request for deleting an InsightsConfig.
10312#[derive(Clone, Default, PartialEq)]
10313#[non_exhaustive]
10314pub struct DeleteInsightsConfigRequest {
10315    /// Required. Value for parent.
10316    pub name: std::string::String,
10317
10318    /// Optional. An optional request ID to identify requests. Specify a unique
10319    /// request ID so that if you must retry your request, the server will know to
10320    /// ignore the request if it has already been completed. The server will
10321    /// guarantee that for at least 60 minutes after the first request.
10322    ///
10323    /// For example, consider a situation where you make an initial request and the
10324    /// request times out. If you make the request again with the same request
10325    /// ID, the server can check if original operation with the same request ID
10326    /// was received, and if so, will ignore the second request. This prevents
10327    /// clients from accidentally creating duplicate commitments.
10328    ///
10329    /// The request ID must be a valid UUID with the exception that zero UUID is
10330    /// not supported (00000000-0000-0000-0000-000000000000).
10331    pub request_id: std::string::String,
10332
10333    /// Optional. If set, validate the request, but do not actually post it.
10334    pub validate_only: bool,
10335
10336    /// Optional. This checksum is computed by the server based on the value of
10337    /// other fields, and may be sent on update and delete requests to ensure the
10338    /// client has an up-to-date value before proceeding.
10339    pub etag: std::string::String,
10340
10341    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10342}
10343
10344impl DeleteInsightsConfigRequest {
10345    /// Creates a new default instance.
10346    pub fn new() -> Self {
10347        std::default::Default::default()
10348    }
10349
10350    /// Sets the value of [name][crate::model::DeleteInsightsConfigRequest::name].
10351    ///
10352    /// # Example
10353    /// ```ignore,no_run
10354    /// # use google_cloud_developerconnect_v1::model::DeleteInsightsConfigRequest;
10355    /// let x = DeleteInsightsConfigRequest::new().set_name("example");
10356    /// ```
10357    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10358        self.name = v.into();
10359        self
10360    }
10361
10362    /// Sets the value of [request_id][crate::model::DeleteInsightsConfigRequest::request_id].
10363    ///
10364    /// # Example
10365    /// ```ignore,no_run
10366    /// # use google_cloud_developerconnect_v1::model::DeleteInsightsConfigRequest;
10367    /// let x = DeleteInsightsConfigRequest::new().set_request_id("example");
10368    /// ```
10369    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10370        self.request_id = v.into();
10371        self
10372    }
10373
10374    /// Sets the value of [validate_only][crate::model::DeleteInsightsConfigRequest::validate_only].
10375    ///
10376    /// # Example
10377    /// ```ignore,no_run
10378    /// # use google_cloud_developerconnect_v1::model::DeleteInsightsConfigRequest;
10379    /// let x = DeleteInsightsConfigRequest::new().set_validate_only(true);
10380    /// ```
10381    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
10382        self.validate_only = v.into();
10383        self
10384    }
10385
10386    /// Sets the value of [etag][crate::model::DeleteInsightsConfigRequest::etag].
10387    ///
10388    /// # Example
10389    /// ```ignore,no_run
10390    /// # use google_cloud_developerconnect_v1::model::DeleteInsightsConfigRequest;
10391    /// let x = DeleteInsightsConfigRequest::new().set_etag("example");
10392    /// ```
10393    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10394        self.etag = v.into();
10395        self
10396    }
10397}
10398
10399impl wkt::message::Message for DeleteInsightsConfigRequest {
10400    fn typename() -> &'static str {
10401        "type.googleapis.com/google.cloud.developerconnect.v1.DeleteInsightsConfigRequest"
10402    }
10403}
10404
10405/// Request for updating an InsightsConfig.
10406#[derive(Clone, Default, PartialEq)]
10407#[non_exhaustive]
10408pub struct UpdateInsightsConfigRequest {
10409    /// Required. The resource being updated.
10410    pub insights_config: std::option::Option<crate::model::InsightsConfig>,
10411
10412    /// Optional. An optional request ID to identify requests. Specify a unique
10413    /// request ID so that if you must retry your request, the server will know to
10414    /// ignore the request if it has already been completed. The server will
10415    /// guarantee that for at least 60 minutes after the first request.
10416    ///
10417    /// For example, consider a situation where you make an initial request and the
10418    /// request times out. If you make the request again with the same request
10419    /// ID, the server can check if original operation with the same request ID
10420    /// was received, and if so, will ignore the second request. This prevents
10421    /// clients from accidentally creating duplicate commitments.
10422    ///
10423    /// The request ID must be a valid UUID with the exception that zero UUID is
10424    /// not supported (00000000-0000-0000-0000-000000000000).
10425    pub request_id: std::string::String,
10426
10427    /// Optional. If set to true, and the insightsConfig is not found a new
10428    /// insightsConfig will be created. In this situation `update_mask` is ignored.
10429    /// The creation will succeed only if the input insightsConfig has all the
10430    /// necessary information (e.g a github_config with both  user_oauth_token and
10431    /// installation_id properties).
10432    pub allow_missing: bool,
10433
10434    /// Optional. If set, validate the request, but do not actually post it.
10435    pub validate_only: bool,
10436
10437    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10438}
10439
10440impl UpdateInsightsConfigRequest {
10441    /// Creates a new default instance.
10442    pub fn new() -> Self {
10443        std::default::Default::default()
10444    }
10445
10446    /// Sets the value of [insights_config][crate::model::UpdateInsightsConfigRequest::insights_config].
10447    ///
10448    /// # Example
10449    /// ```ignore,no_run
10450    /// # use google_cloud_developerconnect_v1::model::UpdateInsightsConfigRequest;
10451    /// use google_cloud_developerconnect_v1::model::InsightsConfig;
10452    /// let x = UpdateInsightsConfigRequest::new().set_insights_config(InsightsConfig::default()/* use setters */);
10453    /// ```
10454    pub fn set_insights_config<T>(mut self, v: T) -> Self
10455    where
10456        T: std::convert::Into<crate::model::InsightsConfig>,
10457    {
10458        self.insights_config = std::option::Option::Some(v.into());
10459        self
10460    }
10461
10462    /// Sets or clears the value of [insights_config][crate::model::UpdateInsightsConfigRequest::insights_config].
10463    ///
10464    /// # Example
10465    /// ```ignore,no_run
10466    /// # use google_cloud_developerconnect_v1::model::UpdateInsightsConfigRequest;
10467    /// use google_cloud_developerconnect_v1::model::InsightsConfig;
10468    /// let x = UpdateInsightsConfigRequest::new().set_or_clear_insights_config(Some(InsightsConfig::default()/* use setters */));
10469    /// let x = UpdateInsightsConfigRequest::new().set_or_clear_insights_config(None::<InsightsConfig>);
10470    /// ```
10471    pub fn set_or_clear_insights_config<T>(mut self, v: std::option::Option<T>) -> Self
10472    where
10473        T: std::convert::Into<crate::model::InsightsConfig>,
10474    {
10475        self.insights_config = v.map(|x| x.into());
10476        self
10477    }
10478
10479    /// Sets the value of [request_id][crate::model::UpdateInsightsConfigRequest::request_id].
10480    ///
10481    /// # Example
10482    /// ```ignore,no_run
10483    /// # use google_cloud_developerconnect_v1::model::UpdateInsightsConfigRequest;
10484    /// let x = UpdateInsightsConfigRequest::new().set_request_id("example");
10485    /// ```
10486    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10487        self.request_id = v.into();
10488        self
10489    }
10490
10491    /// Sets the value of [allow_missing][crate::model::UpdateInsightsConfigRequest::allow_missing].
10492    ///
10493    /// # Example
10494    /// ```ignore,no_run
10495    /// # use google_cloud_developerconnect_v1::model::UpdateInsightsConfigRequest;
10496    /// let x = UpdateInsightsConfigRequest::new().set_allow_missing(true);
10497    /// ```
10498    pub fn set_allow_missing<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
10499        self.allow_missing = v.into();
10500        self
10501    }
10502
10503    /// Sets the value of [validate_only][crate::model::UpdateInsightsConfigRequest::validate_only].
10504    ///
10505    /// # Example
10506    /// ```ignore,no_run
10507    /// # use google_cloud_developerconnect_v1::model::UpdateInsightsConfigRequest;
10508    /// let x = UpdateInsightsConfigRequest::new().set_validate_only(true);
10509    /// ```
10510    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
10511        self.validate_only = v.into();
10512        self
10513    }
10514}
10515
10516impl wkt::message::Message for UpdateInsightsConfigRequest {
10517    fn typename() -> &'static str {
10518        "type.googleapis.com/google.cloud.developerconnect.v1.UpdateInsightsConfigRequest"
10519    }
10520}
10521
10522/// SystemProvider is a list of providers that are owned by Developer Connect.
10523///
10524/// # Working with unknown values
10525///
10526/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
10527/// additional enum variants at any time. Adding new variants is not considered
10528/// a breaking change. Applications should write their code in anticipation of:
10529///
10530/// - New values appearing in future releases of the client library, **and**
10531/// - New values received dynamically, without application changes.
10532///
10533/// Please consult the [Working with enums] section in the user guide for some
10534/// guidelines.
10535///
10536/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
10537#[derive(Clone, Debug, PartialEq)]
10538#[non_exhaustive]
10539pub enum SystemProvider {
10540    /// No system provider specified.
10541    Unspecified,
10542    /// GitHub provider.
10543    /// Scopes can be found at
10544    /// <https://docs.github.com/en/apps/oauth-apps/building-oauth-apps/scopes-for-oauth-apps#available-scopes>
10545    Github,
10546    /// GitLab provider.
10547    /// Scopes can be found at
10548    /// <https://docs.gitlab.com/user/profile/personal_access_tokens/#personal-access-token-scopes>
10549    Gitlab,
10550    /// Google provider.
10551    /// Recommended scopes:
10552    /// `https://www.googleapis.com/auth/drive.readonly`,
10553    /// `https://www.googleapis.com/auth/documents.readonly`
10554    Google,
10555    /// Sentry provider.
10556    /// Scopes can be found at
10557    /// <https://docs.sentry.io/api/permissions/>
10558    Sentry,
10559    /// Rovo provider.
10560    /// Must select the "rovo" scope.
10561    Rovo,
10562    /// New Relic provider.
10563    /// No scopes are allowed.
10564    NewRelic,
10565    /// Datastax provider.
10566    /// No scopes are allowed.
10567    Datastax,
10568    /// Dynatrace provider.
10569    Dynatrace,
10570    /// If set, the enum was initialized with an unknown value.
10571    ///
10572    /// Applications can examine the value using [SystemProvider::value] or
10573    /// [SystemProvider::name].
10574    UnknownValue(system_provider::UnknownValue),
10575}
10576
10577#[doc(hidden)]
10578pub mod system_provider {
10579    #[allow(unused_imports)]
10580    use super::*;
10581    #[derive(Clone, Debug, PartialEq)]
10582    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
10583}
10584
10585impl SystemProvider {
10586    /// Gets the enum value.
10587    ///
10588    /// Returns `None` if the enum contains an unknown value deserialized from
10589    /// the string representation of enums.
10590    pub fn value(&self) -> std::option::Option<i32> {
10591        match self {
10592            Self::Unspecified => std::option::Option::Some(0),
10593            Self::Github => std::option::Option::Some(1),
10594            Self::Gitlab => std::option::Option::Some(2),
10595            Self::Google => std::option::Option::Some(3),
10596            Self::Sentry => std::option::Option::Some(4),
10597            Self::Rovo => std::option::Option::Some(5),
10598            Self::NewRelic => std::option::Option::Some(6),
10599            Self::Datastax => std::option::Option::Some(7),
10600            Self::Dynatrace => std::option::Option::Some(8),
10601            Self::UnknownValue(u) => u.0.value(),
10602        }
10603    }
10604
10605    /// Gets the enum value as a string.
10606    ///
10607    /// Returns `None` if the enum contains an unknown value deserialized from
10608    /// the integer representation of enums.
10609    pub fn name(&self) -> std::option::Option<&str> {
10610        match self {
10611            Self::Unspecified => std::option::Option::Some("SYSTEM_PROVIDER_UNSPECIFIED"),
10612            Self::Github => std::option::Option::Some("GITHUB"),
10613            Self::Gitlab => std::option::Option::Some("GITLAB"),
10614            Self::Google => std::option::Option::Some("GOOGLE"),
10615            Self::Sentry => std::option::Option::Some("SENTRY"),
10616            Self::Rovo => std::option::Option::Some("ROVO"),
10617            Self::NewRelic => std::option::Option::Some("NEW_RELIC"),
10618            Self::Datastax => std::option::Option::Some("DATASTAX"),
10619            Self::Dynatrace => std::option::Option::Some("DYNATRACE"),
10620            Self::UnknownValue(u) => u.0.name(),
10621        }
10622    }
10623}
10624
10625impl std::default::Default for SystemProvider {
10626    fn default() -> Self {
10627        use std::convert::From;
10628        Self::from(0)
10629    }
10630}
10631
10632impl std::fmt::Display for SystemProvider {
10633    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
10634        wkt::internal::display_enum(f, self.name(), self.value())
10635    }
10636}
10637
10638impl std::convert::From<i32> for SystemProvider {
10639    fn from(value: i32) -> Self {
10640        match value {
10641            0 => Self::Unspecified,
10642            1 => Self::Github,
10643            2 => Self::Gitlab,
10644            3 => Self::Google,
10645            4 => Self::Sentry,
10646            5 => Self::Rovo,
10647            6 => Self::NewRelic,
10648            7 => Self::Datastax,
10649            8 => Self::Dynatrace,
10650            _ => Self::UnknownValue(system_provider::UnknownValue(
10651                wkt::internal::UnknownEnumValue::Integer(value),
10652            )),
10653        }
10654    }
10655}
10656
10657impl std::convert::From<&str> for SystemProvider {
10658    fn from(value: &str) -> Self {
10659        use std::string::ToString;
10660        match value {
10661            "SYSTEM_PROVIDER_UNSPECIFIED" => Self::Unspecified,
10662            "GITHUB" => Self::Github,
10663            "GITLAB" => Self::Gitlab,
10664            "GOOGLE" => Self::Google,
10665            "SENTRY" => Self::Sentry,
10666            "ROVO" => Self::Rovo,
10667            "NEW_RELIC" => Self::NewRelic,
10668            "DATASTAX" => Self::Datastax,
10669            "DYNATRACE" => Self::Dynatrace,
10670            _ => Self::UnknownValue(system_provider::UnknownValue(
10671                wkt::internal::UnknownEnumValue::String(value.to_string()),
10672            )),
10673        }
10674    }
10675}
10676
10677impl serde::ser::Serialize for SystemProvider {
10678    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10679    where
10680        S: serde::Serializer,
10681    {
10682        match self {
10683            Self::Unspecified => serializer.serialize_i32(0),
10684            Self::Github => serializer.serialize_i32(1),
10685            Self::Gitlab => serializer.serialize_i32(2),
10686            Self::Google => serializer.serialize_i32(3),
10687            Self::Sentry => serializer.serialize_i32(4),
10688            Self::Rovo => serializer.serialize_i32(5),
10689            Self::NewRelic => serializer.serialize_i32(6),
10690            Self::Datastax => serializer.serialize_i32(7),
10691            Self::Dynatrace => serializer.serialize_i32(8),
10692            Self::UnknownValue(u) => u.0.serialize(serializer),
10693        }
10694    }
10695}
10696
10697impl<'de> serde::de::Deserialize<'de> for SystemProvider {
10698    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10699    where
10700        D: serde::Deserializer<'de>,
10701    {
10702        deserializer.deserialize_any(wkt::internal::EnumVisitor::<SystemProvider>::new(
10703            ".google.cloud.developerconnect.v1.SystemProvider",
10704        ))
10705    }
10706}