googleapis_tonic_google_devtools_cloudbuild_v2/vec_u8_hash_map/
google.devtools.cloudbuild.v2.rs

1// This file is @generated by prost-build.
2/// Represents the metadata of the long-running operation.
3#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4pub struct OperationMetadata {
5    /// Output only. The time the operation was created.
6    #[prost(message, optional, tag = "1")]
7    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
8    /// Output only. The time the operation finished running.
9    #[prost(message, optional, tag = "2")]
10    pub end_time: ::core::option::Option<::prost_types::Timestamp>,
11    /// Output only. Server-defined resource path for the target of the operation.
12    #[prost(string, tag = "3")]
13    pub target: ::prost::alloc::string::String,
14    /// Output only. Name of the verb executed by the operation.
15    #[prost(string, tag = "4")]
16    pub verb: ::prost::alloc::string::String,
17    /// Output only. Human-readable status of the operation, if any.
18    #[prost(string, tag = "5")]
19    pub status_message: ::prost::alloc::string::String,
20    /// Output only. Identifies whether the user has requested cancellation
21    /// of the operation. Operations that have successfully been cancelled
22    /// have \[Operation.error\]\[\] value with a
23    /// \[google.rpc.Status.code\]\[google.rpc.Status.code\] of 1, corresponding to
24    /// `Code.CANCELLED`.
25    #[prost(bool, tag = "6")]
26    pub requested_cancellation: bool,
27    /// Output only. API version used to start the operation.
28    #[prost(string, tag = "7")]
29    pub api_version: ::prost::alloc::string::String,
30}
31/// Represents the custom metadata of the RunWorkflow long-running operation.
32#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
33pub struct RunWorkflowCustomOperationMetadata {
34    /// Output only. The time the operation was created.
35    #[prost(message, optional, tag = "1")]
36    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
37    /// Output only. The time the operation finished running.
38    #[prost(message, optional, tag = "2")]
39    pub end_time: ::core::option::Option<::prost_types::Timestamp>,
40    /// Output only. Name of the verb executed by the operation.
41    #[prost(string, tag = "3")]
42    pub verb: ::prost::alloc::string::String,
43    /// Output only. Identifies whether the user has requested cancellation
44    /// of the operation. Operations that have successfully been cancelled
45    /// have \[Operation.error\]\[\] value with a
46    /// \[google.rpc.Status.code\]\[google.rpc.Status.code\] of 1, corresponding to
47    /// `Code.CANCELLED`.
48    #[prost(bool, tag = "4")]
49    pub requested_cancellation: bool,
50    /// Output only. API version used to start the operation.
51    #[prost(string, tag = "5")]
52    pub api_version: ::prost::alloc::string::String,
53    /// Output only. Server-defined resource path for the target of the operation.
54    #[prost(string, tag = "6")]
55    pub target: ::prost::alloc::string::String,
56    /// Output only. ID of the pipeline run created by RunWorkflow.
57    #[prost(string, tag = "7")]
58    pub pipeline_run_id: ::prost::alloc::string::String,
59}
60/// A connection to a SCM like GitHub, GitHub Enterprise, Bitbucket Data Center,
61/// Bitbucket Cloud or GitLab.
62#[derive(Clone, PartialEq, ::prost::Message)]
63pub struct Connection {
64    /// Immutable. The resource name of the connection, in the format
65    /// `projects/{project}/locations/{location}/connections/{connection_id}`.
66    #[prost(string, tag = "1")]
67    pub name: ::prost::alloc::string::String,
68    /// Output only. Server assigned timestamp for when the connection was created.
69    #[prost(message, optional, tag = "3")]
70    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
71    /// Output only. Server assigned timestamp for when the connection was updated.
72    #[prost(message, optional, tag = "4")]
73    pub update_time: ::core::option::Option<::prost_types::Timestamp>,
74    /// Output only. Installation state of the Connection.
75    #[prost(message, optional, tag = "12")]
76    pub installation_state: ::core::option::Option<InstallationState>,
77    /// If disabled is set to true, functionality is disabled for this connection.
78    /// Repository based API methods and webhooks processing for repositories in
79    /// this connection will be disabled.
80    #[prost(bool, tag = "13")]
81    pub disabled: bool,
82    /// Output only. Set to true when the connection is being set up or updated in
83    /// the background.
84    #[prost(bool, tag = "14")]
85    pub reconciling: bool,
86    /// Allows clients to store small amounts of arbitrary data.
87    #[prost(map = "string, string", tag = "15")]
88    pub annotations: ::std::collections::HashMap<
89        ::prost::alloc::string::String,
90        ::prost::alloc::string::String,
91    >,
92    /// This checksum is computed by the server based on the value of other
93    /// fields, and may be sent on update and delete requests to ensure the
94    /// client has an up-to-date value before proceeding.
95    #[prost(string, tag = "16")]
96    pub etag: ::prost::alloc::string::String,
97    /// Configuration for the connection depending on the type of provider.
98    #[prost(oneof = "connection::ConnectionConfig", tags = "5, 6, 7, 8, 9")]
99    pub connection_config: ::core::option::Option<connection::ConnectionConfig>,
100}
101/// Nested message and enum types in `Connection`.
102pub mod connection {
103    /// Configuration for the connection depending on the type of provider.
104    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
105    pub enum ConnectionConfig {
106        /// Configuration for connections to github.com.
107        #[prost(message, tag = "5")]
108        GithubConfig(super::GitHubConfig),
109        /// Configuration for connections to an instance of GitHub Enterprise.
110        #[prost(message, tag = "6")]
111        GithubEnterpriseConfig(super::GitHubEnterpriseConfig),
112        /// Configuration for connections to gitlab.com or an instance of GitLab
113        /// Enterprise.
114        #[prost(message, tag = "7")]
115        GitlabConfig(super::GitLabConfig),
116        /// Configuration for connections to Bitbucket Data Center.
117        #[prost(message, tag = "8")]
118        BitbucketDataCenterConfig(super::BitbucketDataCenterConfig),
119        /// Configuration for connections to Bitbucket Cloud.
120        #[prost(message, tag = "9")]
121        BitbucketCloudConfig(super::BitbucketCloudConfig),
122    }
123}
124/// Describes stage and necessary actions to be taken by the
125/// user to complete the installation. Used for GitHub and GitHub Enterprise
126/// based connections.
127#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
128pub struct InstallationState {
129    /// Output only. Current step of the installation process.
130    #[prost(enumeration = "installation_state::Stage", tag = "1")]
131    pub stage: i32,
132    /// Output only. Message of what the user should do next to continue the
133    /// installation. Empty string if the installation is already complete.
134    #[prost(string, tag = "2")]
135    pub message: ::prost::alloc::string::String,
136    /// Output only. Link to follow for next action. Empty string if the
137    /// installation is already complete.
138    #[prost(string, tag = "3")]
139    pub action_uri: ::prost::alloc::string::String,
140}
141/// Nested message and enum types in `InstallationState`.
142pub mod installation_state {
143    /// Stage of the installation process.
144    #[derive(
145        Clone,
146        Copy,
147        Debug,
148        PartialEq,
149        Eq,
150        Hash,
151        PartialOrd,
152        Ord,
153        ::prost::Enumeration
154    )]
155    #[repr(i32)]
156    pub enum Stage {
157        /// No stage specified.
158        Unspecified = 0,
159        /// Only for GitHub Enterprise. An App creation has been requested.
160        /// The user needs to confirm the creation in their GitHub enterprise host.
161        PendingCreateApp = 1,
162        /// User needs to authorize the GitHub (or Enterprise) App via OAuth.
163        PendingUserOauth = 2,
164        /// User needs to follow the link to install the GitHub (or Enterprise) App.
165        PendingInstallApp = 3,
166        /// Installation process has been completed.
167        Complete = 10,
168    }
169    impl Stage {
170        /// String value of the enum field names used in the ProtoBuf definition.
171        ///
172        /// The values are not transformed in any way and thus are considered stable
173        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
174        pub fn as_str_name(&self) -> &'static str {
175            match self {
176                Self::Unspecified => "STAGE_UNSPECIFIED",
177                Self::PendingCreateApp => "PENDING_CREATE_APP",
178                Self::PendingUserOauth => "PENDING_USER_OAUTH",
179                Self::PendingInstallApp => "PENDING_INSTALL_APP",
180                Self::Complete => "COMPLETE",
181            }
182        }
183        /// Creates an enum from field names used in the ProtoBuf definition.
184        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
185            match value {
186                "STAGE_UNSPECIFIED" => Some(Self::Unspecified),
187                "PENDING_CREATE_APP" => Some(Self::PendingCreateApp),
188                "PENDING_USER_OAUTH" => Some(Self::PendingUserOauth),
189                "PENDING_INSTALL_APP" => Some(Self::PendingInstallApp),
190                "COMPLETE" => Some(Self::Complete),
191                _ => None,
192            }
193        }
194    }
195}
196/// Request message for FetchLinkableRepositories.
197#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
198pub struct FetchLinkableRepositoriesRequest {
199    /// Required. The name of the Connection.
200    /// Format: `projects/*/locations/*/connections/*`.
201    #[prost(string, tag = "1")]
202    pub connection: ::prost::alloc::string::String,
203    /// Number of results to return in the list. Default to 20.
204    #[prost(int32, tag = "2")]
205    pub page_size: i32,
206    /// Page start.
207    #[prost(string, tag = "3")]
208    pub page_token: ::prost::alloc::string::String,
209}
210/// Response message for FetchLinkableRepositories.
211#[derive(Clone, PartialEq, ::prost::Message)]
212pub struct FetchLinkableRepositoriesResponse {
213    /// repositories ready to be created.
214    #[prost(message, repeated, tag = "1")]
215    pub repositories: ::prost::alloc::vec::Vec<Repository>,
216    /// A token identifying a page of results the server should return.
217    #[prost(string, tag = "2")]
218    pub next_page_token: ::prost::alloc::string::String,
219}
220/// Configuration for connections to github.com.
221#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
222pub struct GitHubConfig {
223    /// OAuth credential of the account that authorized the Cloud Build GitHub App.
224    /// It is recommended to use a robot account instead of a human user account.
225    /// The OAuth token must be tied to the Cloud Build GitHub App.
226    #[prost(message, optional, tag = "1")]
227    pub authorizer_credential: ::core::option::Option<OAuthCredential>,
228    /// GitHub App installation id.
229    #[prost(int64, tag = "2")]
230    pub app_installation_id: i64,
231}
232/// Configuration for connections to an instance of GitHub Enterprise.
233#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
234pub struct GitHubEnterpriseConfig {
235    /// Required. The URI of the GitHub Enterprise host this connection is for.
236    #[prost(string, tag = "1")]
237    pub host_uri: ::prost::alloc::string::String,
238    /// Required. API Key used for authentication of webhook events.
239    #[prost(string, tag = "12")]
240    pub api_key: ::prost::alloc::string::String,
241    /// Id of the GitHub App created from the manifest.
242    #[prost(int64, tag = "2")]
243    pub app_id: i64,
244    /// The URL-friendly name of the GitHub App.
245    #[prost(string, tag = "13")]
246    pub app_slug: ::prost::alloc::string::String,
247    /// SecretManager resource containing the private key of the GitHub App,
248    /// formatted as `projects/*/secrets/*/versions/*`.
249    #[prost(string, tag = "4")]
250    pub private_key_secret_version: ::prost::alloc::string::String,
251    /// SecretManager resource containing the webhook secret of the GitHub App,
252    /// formatted as `projects/*/secrets/*/versions/*`.
253    #[prost(string, tag = "5")]
254    pub webhook_secret_secret_version: ::prost::alloc::string::String,
255    /// ID of the installation of the GitHub App.
256    #[prost(int64, tag = "9")]
257    pub app_installation_id: i64,
258    /// Configuration for using Service Directory to privately connect to a GitHub
259    /// Enterprise server. This should only be set if the GitHub Enterprise server
260    /// is hosted on-premises and not reachable by public internet. If this field
261    /// is left empty, calls to the GitHub Enterprise server will be made over the
262    /// public internet.
263    #[prost(message, optional, tag = "10")]
264    pub service_directory_config: ::core::option::Option<ServiceDirectoryConfig>,
265    /// SSL certificate to use for requests to GitHub Enterprise.
266    #[prost(string, tag = "11")]
267    pub ssl_ca: ::prost::alloc::string::String,
268    /// Output only. GitHub Enterprise version installed at the host_uri.
269    #[prost(string, tag = "14")]
270    pub server_version: ::prost::alloc::string::String,
271}
272/// Configuration for connections to gitlab.com or an instance of GitLab
273/// Enterprise.
274#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
275pub struct GitLabConfig {
276    /// The URI of the GitLab Enterprise host this connection is for.
277    /// If not specified, the default value is <https://gitlab.com.>
278    #[prost(string, tag = "1")]
279    pub host_uri: ::prost::alloc::string::String,
280    /// Required. Immutable. SecretManager resource containing the webhook secret
281    /// of a GitLab Enterprise project, formatted as
282    /// `projects/*/secrets/*/versions/*`.
283    #[prost(string, tag = "2")]
284    pub webhook_secret_secret_version: ::prost::alloc::string::String,
285    /// Required. A GitLab personal access token with the minimum `read_api` scope
286    /// access.
287    #[prost(message, optional, tag = "3")]
288    pub read_authorizer_credential: ::core::option::Option<UserCredential>,
289    /// Required. A GitLab personal access token with the `api` scope access.
290    #[prost(message, optional, tag = "4")]
291    pub authorizer_credential: ::core::option::Option<UserCredential>,
292    /// Configuration for using Service Directory to privately connect to a GitLab
293    /// Enterprise server. This should only be set if the GitLab Enterprise server
294    /// is hosted on-premises and not reachable by public internet. If this field
295    /// is left empty, calls to the GitLab Enterprise server will be made over the
296    /// public internet.
297    #[prost(message, optional, tag = "5")]
298    pub service_directory_config: ::core::option::Option<ServiceDirectoryConfig>,
299    /// SSL certificate to use for requests to GitLab Enterprise.
300    #[prost(string, tag = "6")]
301    pub ssl_ca: ::prost::alloc::string::String,
302    /// Output only. Version of the GitLab Enterprise server running on the
303    /// `host_uri`.
304    #[prost(string, tag = "7")]
305    pub server_version: ::prost::alloc::string::String,
306}
307/// Configuration for connections to Bitbucket Data Center.
308#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
309pub struct BitbucketDataCenterConfig {
310    /// Required. The URI of the Bitbucket Data Center instance or cluster this
311    /// connection is for.
312    #[prost(string, tag = "1")]
313    pub host_uri: ::prost::alloc::string::String,
314    /// Required. Immutable. SecretManager resource containing the webhook secret
315    /// used to verify webhook events, formatted as
316    /// `projects/*/secrets/*/versions/*`.
317    #[prost(string, tag = "2")]
318    pub webhook_secret_secret_version: ::prost::alloc::string::String,
319    /// Required. A http access token with the `REPO_READ` access.
320    #[prost(message, optional, tag = "3")]
321    pub read_authorizer_credential: ::core::option::Option<UserCredential>,
322    /// Required. A http access token with the `REPO_ADMIN` scope access.
323    #[prost(message, optional, tag = "4")]
324    pub authorizer_credential: ::core::option::Option<UserCredential>,
325    /// Optional. Configuration for using Service Directory to privately connect to
326    /// a Bitbucket Data Center. This should only be set if the Bitbucket Data
327    /// Center is hosted on-premises and not reachable by public internet. If this
328    /// field is left empty, calls to the Bitbucket Data Center will be made over
329    /// the public internet.
330    #[prost(message, optional, tag = "5")]
331    pub service_directory_config: ::core::option::Option<ServiceDirectoryConfig>,
332    /// Optional. SSL certificate to use for requests to the Bitbucket Data Center.
333    #[prost(string, tag = "6")]
334    pub ssl_ca: ::prost::alloc::string::String,
335    /// Output only. Version of the Bitbucket Data Center running on the
336    /// `host_uri`.
337    #[prost(string, tag = "7")]
338    pub server_version: ::prost::alloc::string::String,
339}
340/// Configuration for connections to Bitbucket Cloud.
341#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
342pub struct BitbucketCloudConfig {
343    /// Required. The Bitbucket Cloud Workspace ID to be connected to Google Cloud
344    /// Platform.
345    #[prost(string, tag = "1")]
346    pub workspace: ::prost::alloc::string::String,
347    /// Required. SecretManager resource containing the webhook secret used to
348    /// verify webhook events, formatted as `projects/*/secrets/*/versions/*`.
349    #[prost(string, tag = "2")]
350    pub webhook_secret_secret_version: ::prost::alloc::string::String,
351    /// Required. An access token with the `repository` access. It can be either a
352    /// workspace, project or repository access token. It's recommended to use a
353    /// system account to generate the credentials.
354    #[prost(message, optional, tag = "3")]
355    pub read_authorizer_credential: ::core::option::Option<UserCredential>,
356    /// Required. An access token with the `webhook`, `repository`,
357    /// `repository:admin` and `pullrequest` scope access. It can be either a
358    /// workspace, project or repository access token. It's recommended to use a
359    /// system account to generate these credentials.
360    #[prost(message, optional, tag = "4")]
361    pub authorizer_credential: ::core::option::Option<UserCredential>,
362}
363/// ServiceDirectoryConfig represents Service Directory configuration for a
364/// connection.
365#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
366pub struct ServiceDirectoryConfig {
367    /// Required. The Service Directory service name.
368    /// Format:
369    /// projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}.
370    #[prost(string, tag = "1")]
371    pub service: ::prost::alloc::string::String,
372}
373/// A repository associated to a parent connection.
374#[derive(Clone, PartialEq, ::prost::Message)]
375pub struct Repository {
376    /// Immutable. Resource name of the repository, in the format
377    /// `projects/*/locations/*/connections/*/repositories/*`.
378    #[prost(string, tag = "1")]
379    pub name: ::prost::alloc::string::String,
380    /// Required. Git Clone HTTPS URI.
381    #[prost(string, tag = "2")]
382    pub remote_uri: ::prost::alloc::string::String,
383    /// Output only. Server assigned timestamp for when the connection was created.
384    #[prost(message, optional, tag = "4")]
385    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
386    /// Output only. Server assigned timestamp for when the connection was updated.
387    #[prost(message, optional, tag = "5")]
388    pub update_time: ::core::option::Option<::prost_types::Timestamp>,
389    /// Allows clients to store small amounts of arbitrary data.
390    #[prost(map = "string, string", tag = "6")]
391    pub annotations: ::std::collections::HashMap<
392        ::prost::alloc::string::String,
393        ::prost::alloc::string::String,
394    >,
395    /// This checksum is computed by the server based on the value of other
396    /// fields, and may be sent on update and delete requests to ensure the
397    /// client has an up-to-date value before proceeding.
398    #[prost(string, tag = "7")]
399    pub etag: ::prost::alloc::string::String,
400    /// Output only. External ID of the webhook created for the repository.
401    #[prost(string, tag = "8")]
402    pub webhook_id: ::prost::alloc::string::String,
403}
404/// Represents an OAuth token of the account that authorized the Connection,
405/// and associated metadata.
406#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
407pub struct OAuthCredential {
408    /// A SecretManager resource containing the OAuth token that authorizes
409    /// the Cloud Build connection. Format: `projects/*/secrets/*/versions/*`.
410    #[prost(string, tag = "1")]
411    pub oauth_token_secret_version: ::prost::alloc::string::String,
412    /// Output only. The username associated to this token.
413    #[prost(string, tag = "2")]
414    pub username: ::prost::alloc::string::String,
415}
416/// Represents a personal access token that authorized the Connection,
417/// and associated metadata.
418#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
419pub struct UserCredential {
420    /// Required. A SecretManager resource containing the user token that
421    /// authorizes the Cloud Build connection. Format:
422    /// `projects/*/secrets/*/versions/*`.
423    #[prost(string, tag = "1")]
424    pub user_token_secret_version: ::prost::alloc::string::String,
425    /// Output only. The username associated to this token.
426    #[prost(string, tag = "2")]
427    pub username: ::prost::alloc::string::String,
428}
429/// Message for creating a Connection
430#[derive(Clone, PartialEq, ::prost::Message)]
431pub struct CreateConnectionRequest {
432    /// Required. Project and location where the connection will be created.
433    /// Format: `projects/*/locations/*`.
434    #[prost(string, tag = "1")]
435    pub parent: ::prost::alloc::string::String,
436    /// Required. The Connection to create.
437    #[prost(message, optional, tag = "2")]
438    pub connection: ::core::option::Option<Connection>,
439    /// Required. The ID to use for the Connection, which will become the final
440    /// component of the Connection's resource name. Names must be unique
441    /// per-project per-location. Allows alphanumeric characters and any of
442    /// -.\_~%!$&'()\*+,;=@.
443    #[prost(string, tag = "3")]
444    pub connection_id: ::prost::alloc::string::String,
445}
446/// Message for getting the details of a Connection.
447#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
448pub struct GetConnectionRequest {
449    /// Required. The name of the Connection to retrieve.
450    /// Format: `projects/*/locations/*/connections/*`.
451    #[prost(string, tag = "1")]
452    pub name: ::prost::alloc::string::String,
453}
454/// Message for requesting list of Connections.
455#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
456pub struct ListConnectionsRequest {
457    /// Required. The parent, which owns this collection of Connections.
458    /// Format: `projects/*/locations/*`.
459    #[prost(string, tag = "1")]
460    pub parent: ::prost::alloc::string::String,
461    /// Number of results to return in the list.
462    #[prost(int32, tag = "2")]
463    pub page_size: i32,
464    /// Page start.
465    #[prost(string, tag = "3")]
466    pub page_token: ::prost::alloc::string::String,
467}
468/// Message for response to listing Connections.
469#[derive(Clone, PartialEq, ::prost::Message)]
470pub struct ListConnectionsResponse {
471    /// The list of Connections.
472    #[prost(message, repeated, tag = "1")]
473    pub connections: ::prost::alloc::vec::Vec<Connection>,
474    /// A token identifying a page of results the server should return.
475    #[prost(string, tag = "2")]
476    pub next_page_token: ::prost::alloc::string::String,
477}
478/// Message for updating a Connection.
479#[derive(Clone, PartialEq, ::prost::Message)]
480pub struct UpdateConnectionRequest {
481    /// Required. The Connection to update.
482    #[prost(message, optional, tag = "1")]
483    pub connection: ::core::option::Option<Connection>,
484    /// The list of fields to be updated.
485    #[prost(message, optional, tag = "2")]
486    pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
487    /// If set to true, and the connection is not found a new connection
488    /// will be created. In this situation `update_mask` is ignored.
489    /// The creation will succeed only if the input connection has all the
490    /// necessary information (e.g a github_config with both  user_oauth_token and
491    /// installation_id properties).
492    #[prost(bool, tag = "3")]
493    pub allow_missing: bool,
494    /// The current etag of the connection.
495    /// If an etag is provided and does not match the current etag of the
496    /// connection, update will be blocked and an ABORTED error will be returned.
497    #[prost(string, tag = "4")]
498    pub etag: ::prost::alloc::string::String,
499}
500/// Message for deleting a Connection.
501#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
502pub struct DeleteConnectionRequest {
503    /// Required. The name of the Connection to delete.
504    /// Format: `projects/*/locations/*/connections/*`.
505    #[prost(string, tag = "1")]
506    pub name: ::prost::alloc::string::String,
507    /// The current etag of the connection.
508    /// If an etag is provided and does not match the current etag of the
509    /// connection, deletion will be blocked and an ABORTED error will be returned.
510    #[prost(string, tag = "2")]
511    pub etag: ::prost::alloc::string::String,
512    /// If set, validate the request, but do not actually post it.
513    #[prost(bool, tag = "3")]
514    pub validate_only: bool,
515}
516/// Message for creating a Repository.
517#[derive(Clone, PartialEq, ::prost::Message)]
518pub struct CreateRepositoryRequest {
519    /// Required. The connection to contain the repository. If the request is part
520    /// of a BatchCreateRepositoriesRequest, this field should be empty or match
521    /// the parent specified there.
522    #[prost(string, tag = "1")]
523    pub parent: ::prost::alloc::string::String,
524    /// Required. The repository to create.
525    #[prost(message, optional, tag = "2")]
526    pub repository: ::core::option::Option<Repository>,
527    /// Required. The ID to use for the repository, which will become the final
528    /// component of the repository's resource name. This ID should be unique in
529    /// the connection. Allows alphanumeric characters and any of
530    /// -.\_~%!$&'()\*+,;=@.
531    #[prost(string, tag = "3")]
532    pub repository_id: ::prost::alloc::string::String,
533}
534/// Message for creating repositoritories in batch.
535#[derive(Clone, PartialEq, ::prost::Message)]
536pub struct BatchCreateRepositoriesRequest {
537    /// Required. The connection to contain all the repositories being created.
538    /// Format: projects/*/locations/*/connections/\*
539    /// The parent field in the CreateRepositoryRequest messages
540    /// must either be empty or match this field.
541    #[prost(string, tag = "1")]
542    pub parent: ::prost::alloc::string::String,
543    /// Required. The request messages specifying the repositories to create.
544    #[prost(message, repeated, tag = "2")]
545    pub requests: ::prost::alloc::vec::Vec<CreateRepositoryRequest>,
546}
547/// Message for response of creating repositories in batch.
548#[derive(Clone, PartialEq, ::prost::Message)]
549pub struct BatchCreateRepositoriesResponse {
550    /// Repository resources created.
551    #[prost(message, repeated, tag = "1")]
552    pub repositories: ::prost::alloc::vec::Vec<Repository>,
553}
554/// Message for getting the details of a Repository.
555#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
556pub struct GetRepositoryRequest {
557    /// Required. The name of the Repository to retrieve.
558    /// Format: `projects/*/locations/*/connections/*/repositories/*`.
559    #[prost(string, tag = "1")]
560    pub name: ::prost::alloc::string::String,
561}
562/// Message for requesting list of Repositories.
563#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
564pub struct ListRepositoriesRequest {
565    /// Required. The parent, which owns this collection of Repositories.
566    /// Format: `projects/*/locations/*/connections/*`.
567    #[prost(string, tag = "1")]
568    pub parent: ::prost::alloc::string::String,
569    /// Number of results to return in the list.
570    #[prost(int32, tag = "2")]
571    pub page_size: i32,
572    /// Page start.
573    #[prost(string, tag = "3")]
574    pub page_token: ::prost::alloc::string::String,
575    /// A filter expression that filters resources listed in the response.
576    /// Expressions must follow API improvement proposal
577    /// [AIP-160](<https://google.aip.dev/160>). e.g.
578    /// `remote_uri:"<https://github.com*"`.>
579    #[prost(string, tag = "4")]
580    pub filter: ::prost::alloc::string::String,
581}
582/// Message for response to listing Repositories.
583#[derive(Clone, PartialEq, ::prost::Message)]
584pub struct ListRepositoriesResponse {
585    /// The list of Repositories.
586    #[prost(message, repeated, tag = "1")]
587    pub repositories: ::prost::alloc::vec::Vec<Repository>,
588    /// A token identifying a page of results the server should return.
589    #[prost(string, tag = "2")]
590    pub next_page_token: ::prost::alloc::string::String,
591}
592/// Message for deleting a Repository.
593#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
594pub struct DeleteRepositoryRequest {
595    /// Required. The name of the Repository to delete.
596    /// Format: `projects/*/locations/*/connections/*/repositories/*`.
597    #[prost(string, tag = "1")]
598    pub name: ::prost::alloc::string::String,
599    /// The current etag of the repository.
600    /// If an etag is provided and does not match the current etag of the
601    /// repository, deletion will be blocked and an ABORTED error will be returned.
602    #[prost(string, tag = "2")]
603    pub etag: ::prost::alloc::string::String,
604    /// If set, validate the request, but do not actually post it.
605    #[prost(bool, tag = "3")]
606    pub validate_only: bool,
607}
608/// Message for fetching SCM read/write token.
609#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
610pub struct FetchReadWriteTokenRequest {
611    /// Required. The resource name of the repository in the format
612    /// `projects/*/locations/*/connections/*/repositories/*`.
613    #[prost(string, tag = "1")]
614    pub repository: ::prost::alloc::string::String,
615}
616/// Message for fetching SCM read token.
617#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
618pub struct FetchReadTokenRequest {
619    /// Required. The resource name of the repository in the format
620    /// `projects/*/locations/*/connections/*/repositories/*`.
621    #[prost(string, tag = "1")]
622    pub repository: ::prost::alloc::string::String,
623}
624/// Message for responding to get read token.
625#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
626pub struct FetchReadTokenResponse {
627    /// The token content.
628    #[prost(string, tag = "1")]
629    pub token: ::prost::alloc::string::String,
630    /// Expiration timestamp. Can be empty if unknown or non-expiring.
631    #[prost(message, optional, tag = "2")]
632    pub expiration_time: ::core::option::Option<::prost_types::Timestamp>,
633}
634/// Message for responding to get read/write token.
635#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
636pub struct FetchReadWriteTokenResponse {
637    /// The token content.
638    #[prost(string, tag = "1")]
639    pub token: ::prost::alloc::string::String,
640    /// Expiration timestamp. Can be empty if unknown or non-expiring.
641    #[prost(message, optional, tag = "2")]
642    pub expiration_time: ::core::option::Option<::prost_types::Timestamp>,
643}
644/// RPC request object accepted by the ProcessWebhook RPC method.
645#[derive(Clone, PartialEq, ::prost::Message)]
646pub struct ProcessWebhookRequest {
647    /// Required. Project and location where the webhook will be received.
648    /// Format: `projects/*/locations/*`.
649    #[prost(string, tag = "1")]
650    pub parent: ::prost::alloc::string::String,
651    /// HTTP request body.
652    #[prost(message, optional, tag = "2")]
653    pub body: ::core::option::Option<super::super::super::api::HttpBody>,
654    /// Arbitrary additional key to find the maching repository for a webhook event
655    /// if needed.
656    #[prost(string, tag = "3")]
657    pub webhook_key: ::prost::alloc::string::String,
658}
659/// Request for fetching git refs
660#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
661pub struct FetchGitRefsRequest {
662    /// Required. The resource name of the repository in the format
663    /// `projects/*/locations/*/connections/*/repositories/*`.
664    #[prost(string, tag = "1")]
665    pub repository: ::prost::alloc::string::String,
666    /// Type of refs to fetch
667    #[prost(enumeration = "fetch_git_refs_request::RefType", tag = "2")]
668    pub ref_type: i32,
669}
670/// Nested message and enum types in `FetchGitRefsRequest`.
671pub mod fetch_git_refs_request {
672    /// Type of refs
673    #[derive(
674        Clone,
675        Copy,
676        Debug,
677        PartialEq,
678        Eq,
679        Hash,
680        PartialOrd,
681        Ord,
682        ::prost::Enumeration
683    )]
684    #[repr(i32)]
685    pub enum RefType {
686        /// No type specified.
687        Unspecified = 0,
688        /// To fetch tags.
689        Tag = 1,
690        /// To fetch branches.
691        Branch = 2,
692    }
693    impl RefType {
694        /// String value of the enum field names used in the ProtoBuf definition.
695        ///
696        /// The values are not transformed in any way and thus are considered stable
697        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
698        pub fn as_str_name(&self) -> &'static str {
699            match self {
700                Self::Unspecified => "REF_TYPE_UNSPECIFIED",
701                Self::Tag => "TAG",
702                Self::Branch => "BRANCH",
703            }
704        }
705        /// Creates an enum from field names used in the ProtoBuf definition.
706        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
707            match value {
708                "REF_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
709                "TAG" => Some(Self::Tag),
710                "BRANCH" => Some(Self::Branch),
711                _ => None,
712            }
713        }
714    }
715}
716/// Response for fetching git refs
717#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
718pub struct FetchGitRefsResponse {
719    /// Name of the refs fetched.
720    #[prost(string, repeated, tag = "1")]
721    pub ref_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
722}
723/// Generated client implementations.
724pub mod repository_manager_client {
725    #![allow(
726        unused_variables,
727        dead_code,
728        missing_docs,
729        clippy::wildcard_imports,
730        clippy::let_unit_value,
731    )]
732    use tonic::codegen::*;
733    use tonic::codegen::http::Uri;
734    /// Manages connections to source code repositories.
735    #[derive(Debug, Clone)]
736    pub struct RepositoryManagerClient<T> {
737        inner: tonic::client::Grpc<T>,
738    }
739    impl<T> RepositoryManagerClient<T>
740    where
741        T: tonic::client::GrpcService<tonic::body::Body>,
742        T::Error: Into<StdError>,
743        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
744        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
745    {
746        pub fn new(inner: T) -> Self {
747            let inner = tonic::client::Grpc::new(inner);
748            Self { inner }
749        }
750        pub fn with_origin(inner: T, origin: Uri) -> Self {
751            let inner = tonic::client::Grpc::with_origin(inner, origin);
752            Self { inner }
753        }
754        pub fn with_interceptor<F>(
755            inner: T,
756            interceptor: F,
757        ) -> RepositoryManagerClient<InterceptedService<T, F>>
758        where
759            F: tonic::service::Interceptor,
760            T::ResponseBody: Default,
761            T: tonic::codegen::Service<
762                http::Request<tonic::body::Body>,
763                Response = http::Response<
764                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
765                >,
766            >,
767            <T as tonic::codegen::Service<
768                http::Request<tonic::body::Body>,
769            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
770        {
771            RepositoryManagerClient::new(InterceptedService::new(inner, interceptor))
772        }
773        /// Compress requests with the given encoding.
774        ///
775        /// This requires the server to support it otherwise it might respond with an
776        /// error.
777        #[must_use]
778        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
779            self.inner = self.inner.send_compressed(encoding);
780            self
781        }
782        /// Enable decompressing responses.
783        #[must_use]
784        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
785            self.inner = self.inner.accept_compressed(encoding);
786            self
787        }
788        /// Limits the maximum size of a decoded message.
789        ///
790        /// Default: `4MB`
791        #[must_use]
792        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
793            self.inner = self.inner.max_decoding_message_size(limit);
794            self
795        }
796        /// Limits the maximum size of an encoded message.
797        ///
798        /// Default: `usize::MAX`
799        #[must_use]
800        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
801            self.inner = self.inner.max_encoding_message_size(limit);
802            self
803        }
804        /// Creates a Connection.
805        pub async fn create_connection(
806            &mut self,
807            request: impl tonic::IntoRequest<super::CreateConnectionRequest>,
808        ) -> std::result::Result<
809            tonic::Response<super::super::super::super::longrunning::Operation>,
810            tonic::Status,
811        > {
812            self.inner
813                .ready()
814                .await
815                .map_err(|e| {
816                    tonic::Status::unknown(
817                        format!("Service was not ready: {}", e.into()),
818                    )
819                })?;
820            let codec = tonic_prost::ProstCodec::default();
821            let path = http::uri::PathAndQuery::from_static(
822                "/google.devtools.cloudbuild.v2.RepositoryManager/CreateConnection",
823            );
824            let mut req = request.into_request();
825            req.extensions_mut()
826                .insert(
827                    GrpcMethod::new(
828                        "google.devtools.cloudbuild.v2.RepositoryManager",
829                        "CreateConnection",
830                    ),
831                );
832            self.inner.unary(req, path, codec).await
833        }
834        /// Gets details of a single connection.
835        pub async fn get_connection(
836            &mut self,
837            request: impl tonic::IntoRequest<super::GetConnectionRequest>,
838        ) -> std::result::Result<tonic::Response<super::Connection>, tonic::Status> {
839            self.inner
840                .ready()
841                .await
842                .map_err(|e| {
843                    tonic::Status::unknown(
844                        format!("Service was not ready: {}", e.into()),
845                    )
846                })?;
847            let codec = tonic_prost::ProstCodec::default();
848            let path = http::uri::PathAndQuery::from_static(
849                "/google.devtools.cloudbuild.v2.RepositoryManager/GetConnection",
850            );
851            let mut req = request.into_request();
852            req.extensions_mut()
853                .insert(
854                    GrpcMethod::new(
855                        "google.devtools.cloudbuild.v2.RepositoryManager",
856                        "GetConnection",
857                    ),
858                );
859            self.inner.unary(req, path, codec).await
860        }
861        /// Lists Connections in a given project and location.
862        pub async fn list_connections(
863            &mut self,
864            request: impl tonic::IntoRequest<super::ListConnectionsRequest>,
865        ) -> std::result::Result<
866            tonic::Response<super::ListConnectionsResponse>,
867            tonic::Status,
868        > {
869            self.inner
870                .ready()
871                .await
872                .map_err(|e| {
873                    tonic::Status::unknown(
874                        format!("Service was not ready: {}", e.into()),
875                    )
876                })?;
877            let codec = tonic_prost::ProstCodec::default();
878            let path = http::uri::PathAndQuery::from_static(
879                "/google.devtools.cloudbuild.v2.RepositoryManager/ListConnections",
880            );
881            let mut req = request.into_request();
882            req.extensions_mut()
883                .insert(
884                    GrpcMethod::new(
885                        "google.devtools.cloudbuild.v2.RepositoryManager",
886                        "ListConnections",
887                    ),
888                );
889            self.inner.unary(req, path, codec).await
890        }
891        /// Updates a single connection.
892        pub async fn update_connection(
893            &mut self,
894            request: impl tonic::IntoRequest<super::UpdateConnectionRequest>,
895        ) -> std::result::Result<
896            tonic::Response<super::super::super::super::longrunning::Operation>,
897            tonic::Status,
898        > {
899            self.inner
900                .ready()
901                .await
902                .map_err(|e| {
903                    tonic::Status::unknown(
904                        format!("Service was not ready: {}", e.into()),
905                    )
906                })?;
907            let codec = tonic_prost::ProstCodec::default();
908            let path = http::uri::PathAndQuery::from_static(
909                "/google.devtools.cloudbuild.v2.RepositoryManager/UpdateConnection",
910            );
911            let mut req = request.into_request();
912            req.extensions_mut()
913                .insert(
914                    GrpcMethod::new(
915                        "google.devtools.cloudbuild.v2.RepositoryManager",
916                        "UpdateConnection",
917                    ),
918                );
919            self.inner.unary(req, path, codec).await
920        }
921        /// Deletes a single connection.
922        pub async fn delete_connection(
923            &mut self,
924            request: impl tonic::IntoRequest<super::DeleteConnectionRequest>,
925        ) -> std::result::Result<
926            tonic::Response<super::super::super::super::longrunning::Operation>,
927            tonic::Status,
928        > {
929            self.inner
930                .ready()
931                .await
932                .map_err(|e| {
933                    tonic::Status::unknown(
934                        format!("Service was not ready: {}", e.into()),
935                    )
936                })?;
937            let codec = tonic_prost::ProstCodec::default();
938            let path = http::uri::PathAndQuery::from_static(
939                "/google.devtools.cloudbuild.v2.RepositoryManager/DeleteConnection",
940            );
941            let mut req = request.into_request();
942            req.extensions_mut()
943                .insert(
944                    GrpcMethod::new(
945                        "google.devtools.cloudbuild.v2.RepositoryManager",
946                        "DeleteConnection",
947                    ),
948                );
949            self.inner.unary(req, path, codec).await
950        }
951        /// Creates a Repository.
952        pub async fn create_repository(
953            &mut self,
954            request: impl tonic::IntoRequest<super::CreateRepositoryRequest>,
955        ) -> std::result::Result<
956            tonic::Response<super::super::super::super::longrunning::Operation>,
957            tonic::Status,
958        > {
959            self.inner
960                .ready()
961                .await
962                .map_err(|e| {
963                    tonic::Status::unknown(
964                        format!("Service was not ready: {}", e.into()),
965                    )
966                })?;
967            let codec = tonic_prost::ProstCodec::default();
968            let path = http::uri::PathAndQuery::from_static(
969                "/google.devtools.cloudbuild.v2.RepositoryManager/CreateRepository",
970            );
971            let mut req = request.into_request();
972            req.extensions_mut()
973                .insert(
974                    GrpcMethod::new(
975                        "google.devtools.cloudbuild.v2.RepositoryManager",
976                        "CreateRepository",
977                    ),
978                );
979            self.inner.unary(req, path, codec).await
980        }
981        /// Creates multiple repositories inside a connection.
982        pub async fn batch_create_repositories(
983            &mut self,
984            request: impl tonic::IntoRequest<super::BatchCreateRepositoriesRequest>,
985        ) -> std::result::Result<
986            tonic::Response<super::super::super::super::longrunning::Operation>,
987            tonic::Status,
988        > {
989            self.inner
990                .ready()
991                .await
992                .map_err(|e| {
993                    tonic::Status::unknown(
994                        format!("Service was not ready: {}", e.into()),
995                    )
996                })?;
997            let codec = tonic_prost::ProstCodec::default();
998            let path = http::uri::PathAndQuery::from_static(
999                "/google.devtools.cloudbuild.v2.RepositoryManager/BatchCreateRepositories",
1000            );
1001            let mut req = request.into_request();
1002            req.extensions_mut()
1003                .insert(
1004                    GrpcMethod::new(
1005                        "google.devtools.cloudbuild.v2.RepositoryManager",
1006                        "BatchCreateRepositories",
1007                    ),
1008                );
1009            self.inner.unary(req, path, codec).await
1010        }
1011        /// Gets details of a single repository.
1012        pub async fn get_repository(
1013            &mut self,
1014            request: impl tonic::IntoRequest<super::GetRepositoryRequest>,
1015        ) -> std::result::Result<tonic::Response<super::Repository>, tonic::Status> {
1016            self.inner
1017                .ready()
1018                .await
1019                .map_err(|e| {
1020                    tonic::Status::unknown(
1021                        format!("Service was not ready: {}", e.into()),
1022                    )
1023                })?;
1024            let codec = tonic_prost::ProstCodec::default();
1025            let path = http::uri::PathAndQuery::from_static(
1026                "/google.devtools.cloudbuild.v2.RepositoryManager/GetRepository",
1027            );
1028            let mut req = request.into_request();
1029            req.extensions_mut()
1030                .insert(
1031                    GrpcMethod::new(
1032                        "google.devtools.cloudbuild.v2.RepositoryManager",
1033                        "GetRepository",
1034                    ),
1035                );
1036            self.inner.unary(req, path, codec).await
1037        }
1038        /// Lists Repositories in a given connection.
1039        pub async fn list_repositories(
1040            &mut self,
1041            request: impl tonic::IntoRequest<super::ListRepositoriesRequest>,
1042        ) -> std::result::Result<
1043            tonic::Response<super::ListRepositoriesResponse>,
1044            tonic::Status,
1045        > {
1046            self.inner
1047                .ready()
1048                .await
1049                .map_err(|e| {
1050                    tonic::Status::unknown(
1051                        format!("Service was not ready: {}", e.into()),
1052                    )
1053                })?;
1054            let codec = tonic_prost::ProstCodec::default();
1055            let path = http::uri::PathAndQuery::from_static(
1056                "/google.devtools.cloudbuild.v2.RepositoryManager/ListRepositories",
1057            );
1058            let mut req = request.into_request();
1059            req.extensions_mut()
1060                .insert(
1061                    GrpcMethod::new(
1062                        "google.devtools.cloudbuild.v2.RepositoryManager",
1063                        "ListRepositories",
1064                    ),
1065                );
1066            self.inner.unary(req, path, codec).await
1067        }
1068        /// Deletes a single repository.
1069        pub async fn delete_repository(
1070            &mut self,
1071            request: impl tonic::IntoRequest<super::DeleteRepositoryRequest>,
1072        ) -> std::result::Result<
1073            tonic::Response<super::super::super::super::longrunning::Operation>,
1074            tonic::Status,
1075        > {
1076            self.inner
1077                .ready()
1078                .await
1079                .map_err(|e| {
1080                    tonic::Status::unknown(
1081                        format!("Service was not ready: {}", e.into()),
1082                    )
1083                })?;
1084            let codec = tonic_prost::ProstCodec::default();
1085            let path = http::uri::PathAndQuery::from_static(
1086                "/google.devtools.cloudbuild.v2.RepositoryManager/DeleteRepository",
1087            );
1088            let mut req = request.into_request();
1089            req.extensions_mut()
1090                .insert(
1091                    GrpcMethod::new(
1092                        "google.devtools.cloudbuild.v2.RepositoryManager",
1093                        "DeleteRepository",
1094                    ),
1095                );
1096            self.inner.unary(req, path, codec).await
1097        }
1098        /// Fetches read/write token of a given repository.
1099        pub async fn fetch_read_write_token(
1100            &mut self,
1101            request: impl tonic::IntoRequest<super::FetchReadWriteTokenRequest>,
1102        ) -> std::result::Result<
1103            tonic::Response<super::FetchReadWriteTokenResponse>,
1104            tonic::Status,
1105        > {
1106            self.inner
1107                .ready()
1108                .await
1109                .map_err(|e| {
1110                    tonic::Status::unknown(
1111                        format!("Service was not ready: {}", e.into()),
1112                    )
1113                })?;
1114            let codec = tonic_prost::ProstCodec::default();
1115            let path = http::uri::PathAndQuery::from_static(
1116                "/google.devtools.cloudbuild.v2.RepositoryManager/FetchReadWriteToken",
1117            );
1118            let mut req = request.into_request();
1119            req.extensions_mut()
1120                .insert(
1121                    GrpcMethod::new(
1122                        "google.devtools.cloudbuild.v2.RepositoryManager",
1123                        "FetchReadWriteToken",
1124                    ),
1125                );
1126            self.inner.unary(req, path, codec).await
1127        }
1128        /// Fetches read token of a given repository.
1129        pub async fn fetch_read_token(
1130            &mut self,
1131            request: impl tonic::IntoRequest<super::FetchReadTokenRequest>,
1132        ) -> std::result::Result<
1133            tonic::Response<super::FetchReadTokenResponse>,
1134            tonic::Status,
1135        > {
1136            self.inner
1137                .ready()
1138                .await
1139                .map_err(|e| {
1140                    tonic::Status::unknown(
1141                        format!("Service was not ready: {}", e.into()),
1142                    )
1143                })?;
1144            let codec = tonic_prost::ProstCodec::default();
1145            let path = http::uri::PathAndQuery::from_static(
1146                "/google.devtools.cloudbuild.v2.RepositoryManager/FetchReadToken",
1147            );
1148            let mut req = request.into_request();
1149            req.extensions_mut()
1150                .insert(
1151                    GrpcMethod::new(
1152                        "google.devtools.cloudbuild.v2.RepositoryManager",
1153                        "FetchReadToken",
1154                    ),
1155                );
1156            self.inner.unary(req, path, codec).await
1157        }
1158        /// FetchLinkableRepositories get repositories from SCM that are
1159        /// accessible and could be added to the connection.
1160        pub async fn fetch_linkable_repositories(
1161            &mut self,
1162            request: impl tonic::IntoRequest<super::FetchLinkableRepositoriesRequest>,
1163        ) -> std::result::Result<
1164            tonic::Response<super::FetchLinkableRepositoriesResponse>,
1165            tonic::Status,
1166        > {
1167            self.inner
1168                .ready()
1169                .await
1170                .map_err(|e| {
1171                    tonic::Status::unknown(
1172                        format!("Service was not ready: {}", e.into()),
1173                    )
1174                })?;
1175            let codec = tonic_prost::ProstCodec::default();
1176            let path = http::uri::PathAndQuery::from_static(
1177                "/google.devtools.cloudbuild.v2.RepositoryManager/FetchLinkableRepositories",
1178            );
1179            let mut req = request.into_request();
1180            req.extensions_mut()
1181                .insert(
1182                    GrpcMethod::new(
1183                        "google.devtools.cloudbuild.v2.RepositoryManager",
1184                        "FetchLinkableRepositories",
1185                    ),
1186                );
1187            self.inner.unary(req, path, codec).await
1188        }
1189        /// Fetch the list of branches or tags for a given repository.
1190        pub async fn fetch_git_refs(
1191            &mut self,
1192            request: impl tonic::IntoRequest<super::FetchGitRefsRequest>,
1193        ) -> std::result::Result<
1194            tonic::Response<super::FetchGitRefsResponse>,
1195            tonic::Status,
1196        > {
1197            self.inner
1198                .ready()
1199                .await
1200                .map_err(|e| {
1201                    tonic::Status::unknown(
1202                        format!("Service was not ready: {}", e.into()),
1203                    )
1204                })?;
1205            let codec = tonic_prost::ProstCodec::default();
1206            let path = http::uri::PathAndQuery::from_static(
1207                "/google.devtools.cloudbuild.v2.RepositoryManager/FetchGitRefs",
1208            );
1209            let mut req = request.into_request();
1210            req.extensions_mut()
1211                .insert(
1212                    GrpcMethod::new(
1213                        "google.devtools.cloudbuild.v2.RepositoryManager",
1214                        "FetchGitRefs",
1215                    ),
1216                );
1217            self.inner.unary(req, path, codec).await
1218        }
1219    }
1220}