google-cloud-developer_connect-v1 0.a → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +122 -0
  4. data/README.md +144 -8
  5. data/lib/google/cloud/developer_connect/v1/bindings_override.rb +102 -0
  6. data/lib/google/cloud/developer_connect/v1/developer_connect/client.rb +1932 -0
  7. data/lib/google/cloud/developer_connect/v1/developer_connect/credentials.rb +47 -0
  8. data/lib/google/cloud/developer_connect/v1/developer_connect/operations.rb +809 -0
  9. data/lib/google/cloud/developer_connect/v1/developer_connect/paths.rb +109 -0
  10. data/lib/google/cloud/developer_connect/v1/developer_connect/rest/client.rb +1815 -0
  11. data/lib/google/cloud/developer_connect/v1/developer_connect/rest/operations.rb +902 -0
  12. data/lib/google/cloud/developer_connect/v1/developer_connect/rest/service_stub.rb +900 -0
  13. data/lib/google/cloud/developer_connect/v1/developer_connect/rest.rb +54 -0
  14. data/lib/google/cloud/developer_connect/v1/developer_connect.rb +56 -0
  15. data/lib/google/cloud/developer_connect/v1/rest.rb +38 -0
  16. data/lib/google/cloud/developer_connect/v1/version.rb +7 -2
  17. data/lib/google/cloud/developer_connect/v1.rb +45 -0
  18. data/lib/google/cloud/developerconnect/v1/developer_connect_pb.rb +85 -0
  19. data/lib/google/cloud/developerconnect/v1/developer_connect_services_pb.rb +79 -0
  20. data/lib/google-cloud-developer_connect-v1.rb +21 -0
  21. data/proto_docs/README.md +4 -0
  22. data/proto_docs/google/api/client.rb +420 -0
  23. data/proto_docs/google/api/field_behavior.rb +85 -0
  24. data/proto_docs/google/api/field_info.rb +88 -0
  25. data/proto_docs/google/api/launch_stage.rb +71 -0
  26. data/proto_docs/google/api/resource.rb +227 -0
  27. data/proto_docs/google/cloud/developerconnect/v1/developer_connect.rb +708 -0
  28. data/proto_docs/google/longrunning/operations.rb +164 -0
  29. data/proto_docs/google/protobuf/any.rb +145 -0
  30. data/proto_docs/google/protobuf/duration.rb +98 -0
  31. data/proto_docs/google/protobuf/empty.rb +34 -0
  32. data/proto_docs/google/protobuf/field_mask.rb +229 -0
  33. data/proto_docs/google/protobuf/timestamp.rb +127 -0
  34. data/proto_docs/google/rpc/status.rb +48 -0
  35. metadata +95 -10
@@ -0,0 +1,1932 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2024 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "google/cloud/errors"
20
+ require "google/cloud/developerconnect/v1/developer_connect_pb"
21
+ require "google/cloud/location"
22
+
23
+ module Google
24
+ module Cloud
25
+ module DeveloperConnect
26
+ module V1
27
+ module DeveloperConnect
28
+ ##
29
+ # Client for the DeveloperConnect service.
30
+ #
31
+ # Service describing handlers for resources
32
+ #
33
+ class Client
34
+ # @private
35
+ API_VERSION = ""
36
+
37
+ # @private
38
+ DEFAULT_ENDPOINT_TEMPLATE = "developerconnect.$UNIVERSE_DOMAIN$"
39
+
40
+ include Paths
41
+
42
+ # @private
43
+ attr_reader :developer_connect_stub
44
+
45
+ ##
46
+ # Configure the DeveloperConnect Client class.
47
+ #
48
+ # See {::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client::Configuration}
49
+ # for a description of the configuration fields.
50
+ #
51
+ # @example
52
+ #
53
+ # # Modify the configuration for all DeveloperConnect clients
54
+ # ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.configure do |config|
55
+ # config.timeout = 10.0
56
+ # end
57
+ #
58
+ # @yield [config] Configure the Client client.
59
+ # @yieldparam config [Client::Configuration]
60
+ #
61
+ # @return [Client::Configuration]
62
+ #
63
+ def self.configure
64
+ @configure ||= begin
65
+ namespace = ["Google", "Cloud", "DeveloperConnect", "V1"]
66
+ parent_config = while namespace.any?
67
+ parent_name = namespace.join "::"
68
+ parent_const = const_get parent_name
69
+ break parent_const.configure if parent_const.respond_to? :configure
70
+ namespace.pop
71
+ end
72
+ default_config = Client::Configuration.new parent_config
73
+
74
+ default_config.rpcs.list_connections.timeout = 60.0
75
+ default_config.rpcs.list_connections.retry_policy = {
76
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
77
+ }
78
+
79
+ default_config.rpcs.get_connection.timeout = 60.0
80
+ default_config.rpcs.get_connection.retry_policy = {
81
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
82
+ }
83
+
84
+ default_config.rpcs.create_connection.timeout = 60.0
85
+ default_config.rpcs.create_connection.retry_policy = {
86
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
87
+ }
88
+
89
+ default_config.rpcs.update_connection.timeout = 60.0
90
+ default_config.rpcs.update_connection.retry_policy = {
91
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
92
+ }
93
+
94
+ default_config.rpcs.delete_connection.timeout = 60.0
95
+ default_config.rpcs.delete_connection.retry_policy = {
96
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
97
+ }
98
+
99
+ default_config.rpcs.create_git_repository_link.timeout = 60.0
100
+ default_config.rpcs.create_git_repository_link.retry_policy = {
101
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
102
+ }
103
+
104
+ default_config.rpcs.delete_git_repository_link.timeout = 60.0
105
+ default_config.rpcs.delete_git_repository_link.retry_policy = {
106
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
107
+ }
108
+
109
+ default_config.rpcs.get_git_repository_link.timeout = 60.0
110
+ default_config.rpcs.get_git_repository_link.retry_policy = {
111
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
112
+ }
113
+
114
+ default_config.rpcs.fetch_read_write_token.timeout = 60.0
115
+ default_config.rpcs.fetch_read_write_token.retry_policy = {
116
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
117
+ }
118
+
119
+ default_config.rpcs.fetch_read_token.timeout = 60.0
120
+ default_config.rpcs.fetch_read_token.retry_policy = {
121
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
122
+ }
123
+
124
+ default_config.rpcs.fetch_linkable_git_repositories.timeout = 60.0
125
+ default_config.rpcs.fetch_linkable_git_repositories.retry_policy = {
126
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
127
+ }
128
+
129
+ default_config.rpcs.fetch_git_hub_installations.timeout = 60.0
130
+ default_config.rpcs.fetch_git_hub_installations.retry_policy = {
131
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
132
+ }
133
+
134
+ default_config
135
+ end
136
+ yield @configure if block_given?
137
+ @configure
138
+ end
139
+
140
+ ##
141
+ # Configure the DeveloperConnect Client instance.
142
+ #
143
+ # The configuration is set to the derived mode, meaning that values can be changed,
144
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
145
+ # should be made on {Client.configure}.
146
+ #
147
+ # See {::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client::Configuration}
148
+ # for a description of the configuration fields.
149
+ #
150
+ # @yield [config] Configure the Client client.
151
+ # @yieldparam config [Client::Configuration]
152
+ #
153
+ # @return [Client::Configuration]
154
+ #
155
+ def configure
156
+ yield @config if block_given?
157
+ @config
158
+ end
159
+
160
+ ##
161
+ # The effective universe domain
162
+ #
163
+ # @return [String]
164
+ #
165
+ def universe_domain
166
+ @developer_connect_stub.universe_domain
167
+ end
168
+
169
+ ##
170
+ # Create a new DeveloperConnect client object.
171
+ #
172
+ # @example
173
+ #
174
+ # # Create a client using the default configuration
175
+ # client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new
176
+ #
177
+ # # Create a client using a custom configuration
178
+ # client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config|
179
+ # config.timeout = 10.0
180
+ # end
181
+ #
182
+ # @yield [config] Configure the DeveloperConnect client.
183
+ # @yieldparam config [Client::Configuration]
184
+ #
185
+ def initialize
186
+ # These require statements are intentionally placed here to initialize
187
+ # the gRPC module only when it's required.
188
+ # See https://github.com/googleapis/toolkit/issues/446
189
+ require "gapic/grpc"
190
+ require "google/cloud/developerconnect/v1/developer_connect_services_pb"
191
+
192
+ # Create the configuration object
193
+ @config = Configuration.new Client.configure
194
+
195
+ # Yield the configuration if needed
196
+ yield @config if block_given?
197
+
198
+ # Create credentials
199
+ credentials = @config.credentials
200
+ # Use self-signed JWT if the endpoint is unchanged from default,
201
+ # but only if the default endpoint does not have a region prefix.
202
+ enable_self_signed_jwt = @config.endpoint.nil? ||
203
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
204
+ !@config.endpoint.split(".").first.include?("-"))
205
+ credentials ||= Credentials.default scope: @config.scope,
206
+ enable_self_signed_jwt: enable_self_signed_jwt
207
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
208
+ credentials = Credentials.new credentials, scope: @config.scope
209
+ end
210
+ @quota_project_id = @config.quota_project
211
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
212
+
213
+ @operations_client = Operations.new do |config|
214
+ config.credentials = credentials
215
+ config.quota_project = @quota_project_id
216
+ config.endpoint = @config.endpoint
217
+ config.universe_domain = @config.universe_domain
218
+ end
219
+
220
+ @developer_connect_stub = ::Gapic::ServiceStub.new(
221
+ ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Stub,
222
+ credentials: credentials,
223
+ endpoint: @config.endpoint,
224
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
225
+ universe_domain: @config.universe_domain,
226
+ channel_args: @config.channel_args,
227
+ interceptors: @config.interceptors,
228
+ channel_pool_config: @config.channel_pool
229
+ )
230
+
231
+ @location_client = Google::Cloud::Location::Locations::Client.new do |config|
232
+ config.credentials = credentials
233
+ config.quota_project = @quota_project_id
234
+ config.endpoint = @developer_connect_stub.endpoint
235
+ config.universe_domain = @developer_connect_stub.universe_domain
236
+ end
237
+ end
238
+
239
+ ##
240
+ # Get the associated client for long-running operations.
241
+ #
242
+ # @return [::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Operations]
243
+ #
244
+ attr_reader :operations_client
245
+
246
+ ##
247
+ # Get the associated client for mix-in of the Locations.
248
+ #
249
+ # @return [Google::Cloud::Location::Locations::Client]
250
+ #
251
+ attr_reader :location_client
252
+
253
+ # Service calls
254
+
255
+ ##
256
+ # Lists Connections in a given project and location.
257
+ #
258
+ # @overload list_connections(request, options = nil)
259
+ # Pass arguments to `list_connections` via a request object, either of type
260
+ # {::Google::Cloud::DeveloperConnect::V1::ListConnectionsRequest} or an equivalent Hash.
261
+ #
262
+ # @param request [::Google::Cloud::DeveloperConnect::V1::ListConnectionsRequest, ::Hash]
263
+ # A request object representing the call parameters. Required. To specify no
264
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
265
+ # @param options [::Gapic::CallOptions, ::Hash]
266
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
267
+ #
268
+ # @overload list_connections(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
269
+ # Pass arguments to `list_connections` via keyword arguments. Note that at
270
+ # least one keyword argument is required. To specify no parameters, or to keep all
271
+ # the default parameter values, pass an empty Hash as a request object (see above).
272
+ #
273
+ # @param parent [::String]
274
+ # Required. Parent value for ListConnectionsRequest
275
+ # @param page_size [::Integer]
276
+ # Optional. Requested page size. Server may return fewer items than
277
+ # requested. If unspecified, server will pick an appropriate default.
278
+ # @param page_token [::String]
279
+ # Optional. A token identifying a page of results the server should return.
280
+ # @param filter [::String]
281
+ # Optional. Filtering results
282
+ # @param order_by [::String]
283
+ # Optional. Hint for how to order the results
284
+ #
285
+ # @yield [response, operation] Access the result along with the RPC operation
286
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::Connection>]
287
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
288
+ #
289
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::Connection>]
290
+ #
291
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
292
+ #
293
+ # @example Basic example
294
+ # require "google/cloud/developer_connect/v1"
295
+ #
296
+ # # Create a client object. The client can be reused for multiple calls.
297
+ # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new
298
+ #
299
+ # # Create a request. To set request fields, pass in keyword arguments.
300
+ # request = Google::Cloud::DeveloperConnect::V1::ListConnectionsRequest.new
301
+ #
302
+ # # Call the list_connections method.
303
+ # result = client.list_connections request
304
+ #
305
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
306
+ # # over elements, and API calls will be issued to fetch pages as needed.
307
+ # result.each do |item|
308
+ # # Each element is of type ::Google::Cloud::DeveloperConnect::V1::Connection.
309
+ # p item
310
+ # end
311
+ #
312
+ def list_connections request, options = nil
313
+ raise ::ArgumentError, "request must be provided" if request.nil?
314
+
315
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::ListConnectionsRequest
316
+
317
+ # Converts hash and nil to an options object
318
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
319
+
320
+ # Customize the options with defaults
321
+ metadata = @config.rpcs.list_connections.metadata.to_h
322
+
323
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
324
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
325
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
326
+ gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION
327
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
328
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
329
+
330
+ header_params = {}
331
+ if request.parent
332
+ header_params["parent"] = request.parent
333
+ end
334
+
335
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
336
+ metadata[:"x-goog-request-params"] ||= request_params_header
337
+
338
+ options.apply_defaults timeout: @config.rpcs.list_connections.timeout,
339
+ metadata: metadata,
340
+ retry_policy: @config.rpcs.list_connections.retry_policy
341
+
342
+ options.apply_defaults timeout: @config.timeout,
343
+ metadata: @config.metadata,
344
+ retry_policy: @config.retry_policy
345
+
346
+ @developer_connect_stub.call_rpc :list_connections, request, options: options do |response, operation|
347
+ response = ::Gapic::PagedEnumerable.new @developer_connect_stub, :list_connections, request, response, operation, options
348
+ yield response, operation if block_given?
349
+ return response
350
+ end
351
+ rescue ::GRPC::BadStatus => e
352
+ raise ::Google::Cloud::Error.from_error(e)
353
+ end
354
+
355
+ ##
356
+ # Gets details of a single Connection.
357
+ #
358
+ # @overload get_connection(request, options = nil)
359
+ # Pass arguments to `get_connection` via a request object, either of type
360
+ # {::Google::Cloud::DeveloperConnect::V1::GetConnectionRequest} or an equivalent Hash.
361
+ #
362
+ # @param request [::Google::Cloud::DeveloperConnect::V1::GetConnectionRequest, ::Hash]
363
+ # A request object representing the call parameters. Required. To specify no
364
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
365
+ # @param options [::Gapic::CallOptions, ::Hash]
366
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
367
+ #
368
+ # @overload get_connection(name: nil)
369
+ # Pass arguments to `get_connection` via keyword arguments. Note that at
370
+ # least one keyword argument is required. To specify no parameters, or to keep all
371
+ # the default parameter values, pass an empty Hash as a request object (see above).
372
+ #
373
+ # @param name [::String]
374
+ # Required. Name of the resource
375
+ #
376
+ # @yield [response, operation] Access the result along with the RPC operation
377
+ # @yieldparam response [::Google::Cloud::DeveloperConnect::V1::Connection]
378
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
379
+ #
380
+ # @return [::Google::Cloud::DeveloperConnect::V1::Connection]
381
+ #
382
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
383
+ #
384
+ # @example Basic example
385
+ # require "google/cloud/developer_connect/v1"
386
+ #
387
+ # # Create a client object. The client can be reused for multiple calls.
388
+ # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new
389
+ #
390
+ # # Create a request. To set request fields, pass in keyword arguments.
391
+ # request = Google::Cloud::DeveloperConnect::V1::GetConnectionRequest.new
392
+ #
393
+ # # Call the get_connection method.
394
+ # result = client.get_connection request
395
+ #
396
+ # # The returned object is of type Google::Cloud::DeveloperConnect::V1::Connection.
397
+ # p result
398
+ #
399
+ def get_connection request, options = nil
400
+ raise ::ArgumentError, "request must be provided" if request.nil?
401
+
402
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::GetConnectionRequest
403
+
404
+ # Converts hash and nil to an options object
405
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
406
+
407
+ # Customize the options with defaults
408
+ metadata = @config.rpcs.get_connection.metadata.to_h
409
+
410
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
411
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
412
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
413
+ gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION
414
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
415
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
416
+
417
+ header_params = {}
418
+ if request.name
419
+ header_params["name"] = request.name
420
+ end
421
+
422
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
423
+ metadata[:"x-goog-request-params"] ||= request_params_header
424
+
425
+ options.apply_defaults timeout: @config.rpcs.get_connection.timeout,
426
+ metadata: metadata,
427
+ retry_policy: @config.rpcs.get_connection.retry_policy
428
+
429
+ options.apply_defaults timeout: @config.timeout,
430
+ metadata: @config.metadata,
431
+ retry_policy: @config.retry_policy
432
+
433
+ @developer_connect_stub.call_rpc :get_connection, request, options: options do |response, operation|
434
+ yield response, operation if block_given?
435
+ return response
436
+ end
437
+ rescue ::GRPC::BadStatus => e
438
+ raise ::Google::Cloud::Error.from_error(e)
439
+ end
440
+
441
+ ##
442
+ # Creates a new Connection in a given project and location.
443
+ #
444
+ # @overload create_connection(request, options = nil)
445
+ # Pass arguments to `create_connection` via a request object, either of type
446
+ # {::Google::Cloud::DeveloperConnect::V1::CreateConnectionRequest} or an equivalent Hash.
447
+ #
448
+ # @param request [::Google::Cloud::DeveloperConnect::V1::CreateConnectionRequest, ::Hash]
449
+ # A request object representing the call parameters. Required. To specify no
450
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
451
+ # @param options [::Gapic::CallOptions, ::Hash]
452
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
453
+ #
454
+ # @overload create_connection(parent: nil, connection_id: nil, connection: nil, request_id: nil, validate_only: nil)
455
+ # Pass arguments to `create_connection` via keyword arguments. Note that at
456
+ # least one keyword argument is required. To specify no parameters, or to keep all
457
+ # the default parameter values, pass an empty Hash as a request object (see above).
458
+ #
459
+ # @param parent [::String]
460
+ # Required. Value for parent.
461
+ # @param connection_id [::String]
462
+ # Required. Id of the requesting object
463
+ # If auto-generating Id server-side, remove this field and
464
+ # connection_id from the method_signature of Create RPC
465
+ # @param connection [::Google::Cloud::DeveloperConnect::V1::Connection, ::Hash]
466
+ # Required. The resource being created
467
+ # @param request_id [::String]
468
+ # Optional. An optional request ID to identify requests. Specify a unique
469
+ # request ID so that if you must retry your request, the server will know to
470
+ # ignore the request if it has already been completed. The server will
471
+ # guarantee that for at least 60 minutes since the first request.
472
+ #
473
+ # For example, consider a situation where you make an initial request and the
474
+ # request times out. If you make the request again with the same request
475
+ # ID, the server can check if original operation with the same request ID
476
+ # was received, and if so, will ignore the second request. This prevents
477
+ # clients from accidentally creating duplicate commitments.
478
+ #
479
+ # The request ID must be a valid UUID with the exception that zero UUID is
480
+ # not supported (00000000-0000-0000-0000-000000000000).
481
+ # @param validate_only [::Boolean]
482
+ # Optional. If set, validate the request, but do not actually post it.
483
+ #
484
+ # @yield [response, operation] Access the result along with the RPC operation
485
+ # @yieldparam response [::Gapic::Operation]
486
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
487
+ #
488
+ # @return [::Gapic::Operation]
489
+ #
490
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
491
+ #
492
+ # @example Basic example
493
+ # require "google/cloud/developer_connect/v1"
494
+ #
495
+ # # Create a client object. The client can be reused for multiple calls.
496
+ # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new
497
+ #
498
+ # # Create a request. To set request fields, pass in keyword arguments.
499
+ # request = Google::Cloud::DeveloperConnect::V1::CreateConnectionRequest.new
500
+ #
501
+ # # Call the create_connection method.
502
+ # result = client.create_connection request
503
+ #
504
+ # # The returned object is of type Gapic::Operation. You can use it to
505
+ # # check the status of an operation, cancel it, or wait for results.
506
+ # # Here is how to wait for a response.
507
+ # result.wait_until_done! timeout: 60
508
+ # if result.response?
509
+ # p result.response
510
+ # else
511
+ # puts "No response received."
512
+ # end
513
+ #
514
+ def create_connection request, options = nil
515
+ raise ::ArgumentError, "request must be provided" if request.nil?
516
+
517
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::CreateConnectionRequest
518
+
519
+ # Converts hash and nil to an options object
520
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
521
+
522
+ # Customize the options with defaults
523
+ metadata = @config.rpcs.create_connection.metadata.to_h
524
+
525
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
526
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
527
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
528
+ gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION
529
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
530
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
531
+
532
+ header_params = {}
533
+ if request.parent
534
+ header_params["parent"] = request.parent
535
+ end
536
+
537
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
538
+ metadata[:"x-goog-request-params"] ||= request_params_header
539
+
540
+ options.apply_defaults timeout: @config.rpcs.create_connection.timeout,
541
+ metadata: metadata,
542
+ retry_policy: @config.rpcs.create_connection.retry_policy
543
+
544
+ options.apply_defaults timeout: @config.timeout,
545
+ metadata: @config.metadata,
546
+ retry_policy: @config.retry_policy
547
+
548
+ @developer_connect_stub.call_rpc :create_connection, request, options: options do |response, operation|
549
+ response = ::Gapic::Operation.new response, @operations_client, options: options
550
+ yield response, operation if block_given?
551
+ return response
552
+ end
553
+ rescue ::GRPC::BadStatus => e
554
+ raise ::Google::Cloud::Error.from_error(e)
555
+ end
556
+
557
+ ##
558
+ # Updates the parameters of a single Connection.
559
+ #
560
+ # @overload update_connection(request, options = nil)
561
+ # Pass arguments to `update_connection` via a request object, either of type
562
+ # {::Google::Cloud::DeveloperConnect::V1::UpdateConnectionRequest} or an equivalent Hash.
563
+ #
564
+ # @param request [::Google::Cloud::DeveloperConnect::V1::UpdateConnectionRequest, ::Hash]
565
+ # A request object representing the call parameters. Required. To specify no
566
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
567
+ # @param options [::Gapic::CallOptions, ::Hash]
568
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
569
+ #
570
+ # @overload update_connection(update_mask: nil, connection: nil, request_id: nil, allow_missing: nil, validate_only: nil)
571
+ # Pass arguments to `update_connection` via keyword arguments. Note that at
572
+ # least one keyword argument is required. To specify no parameters, or to keep all
573
+ # the default parameter values, pass an empty Hash as a request object (see above).
574
+ #
575
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
576
+ # Required. Field mask is used to specify the fields to be overwritten in the
577
+ # Connection resource by the update.
578
+ # The fields specified in the update_mask are relative to the resource, not
579
+ # the full request. A field will be overwritten if it is in the mask. If the
580
+ # user does not provide a mask then all fields will be overwritten.
581
+ # @param connection [::Google::Cloud::DeveloperConnect::V1::Connection, ::Hash]
582
+ # Required. The resource being updated
583
+ # @param request_id [::String]
584
+ # Optional. An optional request ID to identify requests. Specify a unique
585
+ # request ID so that if you must retry your request, the server will know to
586
+ # ignore the request if it has already been completed. The server will
587
+ # guarantee that for at least 60 minutes since the first request.
588
+ #
589
+ # For example, consider a situation where you make an initial request and the
590
+ # request times out. If you make the request again with the same request
591
+ # ID, the server can check if original operation with the same request ID
592
+ # was received, and if so, will ignore the second request. This prevents
593
+ # clients from accidentally creating duplicate commitments.
594
+ #
595
+ # The request ID must be a valid UUID with the exception that zero UUID is
596
+ # not supported (00000000-0000-0000-0000-000000000000).
597
+ # @param allow_missing [::Boolean]
598
+ # Optional. If set to true, and the connection is not found a new connection
599
+ # will be created. In this situation `update_mask` is ignored.
600
+ # The creation will succeed only if the input connection has all the
601
+ # necessary information (e.g a github_config with both user_oauth_token and
602
+ # installation_id properties).
603
+ # @param validate_only [::Boolean]
604
+ # Optional. If set, validate the request, but do not actually post it.
605
+ #
606
+ # @yield [response, operation] Access the result along with the RPC operation
607
+ # @yieldparam response [::Gapic::Operation]
608
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
609
+ #
610
+ # @return [::Gapic::Operation]
611
+ #
612
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
613
+ #
614
+ # @example Basic example
615
+ # require "google/cloud/developer_connect/v1"
616
+ #
617
+ # # Create a client object. The client can be reused for multiple calls.
618
+ # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new
619
+ #
620
+ # # Create a request. To set request fields, pass in keyword arguments.
621
+ # request = Google::Cloud::DeveloperConnect::V1::UpdateConnectionRequest.new
622
+ #
623
+ # # Call the update_connection method.
624
+ # result = client.update_connection request
625
+ #
626
+ # # The returned object is of type Gapic::Operation. You can use it to
627
+ # # check the status of an operation, cancel it, or wait for results.
628
+ # # Here is how to wait for a response.
629
+ # result.wait_until_done! timeout: 60
630
+ # if result.response?
631
+ # p result.response
632
+ # else
633
+ # puts "No response received."
634
+ # end
635
+ #
636
+ def update_connection request, options = nil
637
+ raise ::ArgumentError, "request must be provided" if request.nil?
638
+
639
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::UpdateConnectionRequest
640
+
641
+ # Converts hash and nil to an options object
642
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
643
+
644
+ # Customize the options with defaults
645
+ metadata = @config.rpcs.update_connection.metadata.to_h
646
+
647
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
648
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
649
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
650
+ gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION
651
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
652
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
653
+
654
+ header_params = {}
655
+ if request.connection&.name
656
+ header_params["connection.name"] = request.connection.name
657
+ end
658
+
659
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
660
+ metadata[:"x-goog-request-params"] ||= request_params_header
661
+
662
+ options.apply_defaults timeout: @config.rpcs.update_connection.timeout,
663
+ metadata: metadata,
664
+ retry_policy: @config.rpcs.update_connection.retry_policy
665
+
666
+ options.apply_defaults timeout: @config.timeout,
667
+ metadata: @config.metadata,
668
+ retry_policy: @config.retry_policy
669
+
670
+ @developer_connect_stub.call_rpc :update_connection, request, options: options do |response, operation|
671
+ response = ::Gapic::Operation.new response, @operations_client, options: options
672
+ yield response, operation if block_given?
673
+ return response
674
+ end
675
+ rescue ::GRPC::BadStatus => e
676
+ raise ::Google::Cloud::Error.from_error(e)
677
+ end
678
+
679
+ ##
680
+ # Deletes a single Connection.
681
+ #
682
+ # @overload delete_connection(request, options = nil)
683
+ # Pass arguments to `delete_connection` via a request object, either of type
684
+ # {::Google::Cloud::DeveloperConnect::V1::DeleteConnectionRequest} or an equivalent Hash.
685
+ #
686
+ # @param request [::Google::Cloud::DeveloperConnect::V1::DeleteConnectionRequest, ::Hash]
687
+ # A request object representing the call parameters. Required. To specify no
688
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
689
+ # @param options [::Gapic::CallOptions, ::Hash]
690
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
691
+ #
692
+ # @overload delete_connection(name: nil, request_id: nil, validate_only: nil, etag: nil)
693
+ # Pass arguments to `delete_connection` via keyword arguments. Note that at
694
+ # least one keyword argument is required. To specify no parameters, or to keep all
695
+ # the default parameter values, pass an empty Hash as a request object (see above).
696
+ #
697
+ # @param name [::String]
698
+ # Required. Name of the resource
699
+ # @param request_id [::String]
700
+ # Optional. An optional request ID to identify requests. Specify a unique
701
+ # request ID so that if you must retry your request, the server will know to
702
+ # ignore the request if it has already been completed. The server will
703
+ # guarantee that for at least 60 minutes after the first request.
704
+ #
705
+ # For example, consider a situation where you make an initial request and the
706
+ # request times out. If you make the request again with the same request
707
+ # ID, the server can check if original operation with the same request ID
708
+ # was received, and if so, will ignore the second request. This prevents
709
+ # clients from accidentally creating duplicate commitments.
710
+ #
711
+ # The request ID must be a valid UUID with the exception that zero UUID is
712
+ # not supported (00000000-0000-0000-0000-000000000000).
713
+ # @param validate_only [::Boolean]
714
+ # Optional. If set, validate the request, but do not actually post it.
715
+ # @param etag [::String]
716
+ # Optional. The current etag of the Connection.
717
+ # If an etag is provided and does not match the current etag of the
718
+ # Connection, deletion will be blocked and an ABORTED error will be returned.
719
+ #
720
+ # @yield [response, operation] Access the result along with the RPC operation
721
+ # @yieldparam response [::Gapic::Operation]
722
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
723
+ #
724
+ # @return [::Gapic::Operation]
725
+ #
726
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
727
+ #
728
+ # @example Basic example
729
+ # require "google/cloud/developer_connect/v1"
730
+ #
731
+ # # Create a client object. The client can be reused for multiple calls.
732
+ # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new
733
+ #
734
+ # # Create a request. To set request fields, pass in keyword arguments.
735
+ # request = Google::Cloud::DeveloperConnect::V1::DeleteConnectionRequest.new
736
+ #
737
+ # # Call the delete_connection method.
738
+ # result = client.delete_connection request
739
+ #
740
+ # # The returned object is of type Gapic::Operation. You can use it to
741
+ # # check the status of an operation, cancel it, or wait for results.
742
+ # # Here is how to wait for a response.
743
+ # result.wait_until_done! timeout: 60
744
+ # if result.response?
745
+ # p result.response
746
+ # else
747
+ # puts "No response received."
748
+ # end
749
+ #
750
+ def delete_connection request, options = nil
751
+ raise ::ArgumentError, "request must be provided" if request.nil?
752
+
753
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::DeleteConnectionRequest
754
+
755
+ # Converts hash and nil to an options object
756
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
757
+
758
+ # Customize the options with defaults
759
+ metadata = @config.rpcs.delete_connection.metadata.to_h
760
+
761
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
762
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
763
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
764
+ gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION
765
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
766
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
767
+
768
+ header_params = {}
769
+ if request.name
770
+ header_params["name"] = request.name
771
+ end
772
+
773
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
774
+ metadata[:"x-goog-request-params"] ||= request_params_header
775
+
776
+ options.apply_defaults timeout: @config.rpcs.delete_connection.timeout,
777
+ metadata: metadata,
778
+ retry_policy: @config.rpcs.delete_connection.retry_policy
779
+
780
+ options.apply_defaults timeout: @config.timeout,
781
+ metadata: @config.metadata,
782
+ retry_policy: @config.retry_policy
783
+
784
+ @developer_connect_stub.call_rpc :delete_connection, request, options: options do |response, operation|
785
+ response = ::Gapic::Operation.new response, @operations_client, options: options
786
+ yield response, operation if block_given?
787
+ return response
788
+ end
789
+ rescue ::GRPC::BadStatus => e
790
+ raise ::Google::Cloud::Error.from_error(e)
791
+ end
792
+
793
+ ##
794
+ # Creates a GitRepositoryLink. Upon linking a Git Repository, Developer
795
+ # Connect will configure the Git Repository to send webhook events to
796
+ # Developer Connect. Connections that use Firebase GitHub Application will
797
+ # have events forwarded to the Firebase service. All other Connections will
798
+ # have events forwarded to Cloud Build.
799
+ #
800
+ # @overload create_git_repository_link(request, options = nil)
801
+ # Pass arguments to `create_git_repository_link` via a request object, either of type
802
+ # {::Google::Cloud::DeveloperConnect::V1::CreateGitRepositoryLinkRequest} or an equivalent Hash.
803
+ #
804
+ # @param request [::Google::Cloud::DeveloperConnect::V1::CreateGitRepositoryLinkRequest, ::Hash]
805
+ # A request object representing the call parameters. Required. To specify no
806
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
807
+ # @param options [::Gapic::CallOptions, ::Hash]
808
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
809
+ #
810
+ # @overload create_git_repository_link(parent: nil, git_repository_link: nil, git_repository_link_id: nil, request_id: nil, validate_only: nil)
811
+ # Pass arguments to `create_git_repository_link` via keyword arguments. Note that at
812
+ # least one keyword argument is required. To specify no parameters, or to keep all
813
+ # the default parameter values, pass an empty Hash as a request object (see above).
814
+ #
815
+ # @param parent [::String]
816
+ # Required. Value for parent.
817
+ # @param git_repository_link [::Google::Cloud::DeveloperConnect::V1::GitRepositoryLink, ::Hash]
818
+ # Required. The resource being created
819
+ # @param git_repository_link_id [::String]
820
+ # Required. The ID to use for the repository, which will become the final
821
+ # component of the repository's resource name. This ID should be unique in
822
+ # the connection. Allows alphanumeric characters and any of
823
+ # -._~%!$&'()*+,;=@.
824
+ # @param request_id [::String]
825
+ # Optional. An optional request ID to identify requests. Specify a unique
826
+ # request ID so that if you must retry your request, the server will know to
827
+ # ignore the request if it has already been completed. The server will
828
+ # guarantee that for at least 60 minutes since the first request.
829
+ #
830
+ # For example, consider a situation where you make an initial request and the
831
+ # request times out. If you make the request again with the same request
832
+ # ID, the server can check if original operation with the same request ID
833
+ # was received, and if so, will ignore the second request. This prevents
834
+ # clients from accidentally creating duplicate commitments.
835
+ #
836
+ # The request ID must be a valid UUID with the exception that zero UUID is
837
+ # not supported (00000000-0000-0000-0000-000000000000).
838
+ # @param validate_only [::Boolean]
839
+ # Optional. If set, validate the request, but do not actually post it.
840
+ #
841
+ # @yield [response, operation] Access the result along with the RPC operation
842
+ # @yieldparam response [::Gapic::Operation]
843
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
844
+ #
845
+ # @return [::Gapic::Operation]
846
+ #
847
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
848
+ #
849
+ # @example Basic example
850
+ # require "google/cloud/developer_connect/v1"
851
+ #
852
+ # # Create a client object. The client can be reused for multiple calls.
853
+ # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new
854
+ #
855
+ # # Create a request. To set request fields, pass in keyword arguments.
856
+ # request = Google::Cloud::DeveloperConnect::V1::CreateGitRepositoryLinkRequest.new
857
+ #
858
+ # # Call the create_git_repository_link method.
859
+ # result = client.create_git_repository_link request
860
+ #
861
+ # # The returned object is of type Gapic::Operation. You can use it to
862
+ # # check the status of an operation, cancel it, or wait for results.
863
+ # # Here is how to wait for a response.
864
+ # result.wait_until_done! timeout: 60
865
+ # if result.response?
866
+ # p result.response
867
+ # else
868
+ # puts "No response received."
869
+ # end
870
+ #
871
+ def create_git_repository_link request, options = nil
872
+ raise ::ArgumentError, "request must be provided" if request.nil?
873
+
874
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::CreateGitRepositoryLinkRequest
875
+
876
+ # Converts hash and nil to an options object
877
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
878
+
879
+ # Customize the options with defaults
880
+ metadata = @config.rpcs.create_git_repository_link.metadata.to_h
881
+
882
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
883
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
884
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
885
+ gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION
886
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
887
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
888
+
889
+ header_params = {}
890
+ if request.parent
891
+ header_params["parent"] = request.parent
892
+ end
893
+
894
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
895
+ metadata[:"x-goog-request-params"] ||= request_params_header
896
+
897
+ options.apply_defaults timeout: @config.rpcs.create_git_repository_link.timeout,
898
+ metadata: metadata,
899
+ retry_policy: @config.rpcs.create_git_repository_link.retry_policy
900
+
901
+ options.apply_defaults timeout: @config.timeout,
902
+ metadata: @config.metadata,
903
+ retry_policy: @config.retry_policy
904
+
905
+ @developer_connect_stub.call_rpc :create_git_repository_link, request, options: options do |response, operation|
906
+ response = ::Gapic::Operation.new response, @operations_client, options: options
907
+ yield response, operation if block_given?
908
+ return response
909
+ end
910
+ rescue ::GRPC::BadStatus => e
911
+ raise ::Google::Cloud::Error.from_error(e)
912
+ end
913
+
914
+ ##
915
+ # Deletes a single GitRepositoryLink.
916
+ #
917
+ # @overload delete_git_repository_link(request, options = nil)
918
+ # Pass arguments to `delete_git_repository_link` via a request object, either of type
919
+ # {::Google::Cloud::DeveloperConnect::V1::DeleteGitRepositoryLinkRequest} or an equivalent Hash.
920
+ #
921
+ # @param request [::Google::Cloud::DeveloperConnect::V1::DeleteGitRepositoryLinkRequest, ::Hash]
922
+ # A request object representing the call parameters. Required. To specify no
923
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
924
+ # @param options [::Gapic::CallOptions, ::Hash]
925
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
926
+ #
927
+ # @overload delete_git_repository_link(name: nil, request_id: nil, validate_only: nil, etag: nil)
928
+ # Pass arguments to `delete_git_repository_link` via keyword arguments. Note that at
929
+ # least one keyword argument is required. To specify no parameters, or to keep all
930
+ # the default parameter values, pass an empty Hash as a request object (see above).
931
+ #
932
+ # @param name [::String]
933
+ # Required. Name of the resource
934
+ # @param request_id [::String]
935
+ # Optional. An optional request ID to identify requests. Specify a unique
936
+ # request ID so that if you must retry your request, the server will know to
937
+ # ignore the request if it has already been completed. The server will
938
+ # guarantee that for at least 60 minutes after the first request.
939
+ #
940
+ # For example, consider a situation where you make an initial request and the
941
+ # request times out. If you make the request again with the same request
942
+ # ID, the server can check if original operation with the same request ID
943
+ # was received, and if so, will ignore the second request. This prevents
944
+ # clients from accidentally creating duplicate commitments.
945
+ #
946
+ # The request ID must be a valid UUID with the exception that zero UUID is
947
+ # not supported (00000000-0000-0000-0000-000000000000).
948
+ # @param validate_only [::Boolean]
949
+ # Optional. If set, validate the request, but do not actually post it.
950
+ # @param etag [::String]
951
+ # Optional. This checksum is computed by the server based on the value of
952
+ # other fields, and may be sent on update and delete requests to ensure the
953
+ # client has an up-to-date value before proceeding.
954
+ #
955
+ # @yield [response, operation] Access the result along with the RPC operation
956
+ # @yieldparam response [::Gapic::Operation]
957
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
958
+ #
959
+ # @return [::Gapic::Operation]
960
+ #
961
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
962
+ #
963
+ # @example Basic example
964
+ # require "google/cloud/developer_connect/v1"
965
+ #
966
+ # # Create a client object. The client can be reused for multiple calls.
967
+ # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new
968
+ #
969
+ # # Create a request. To set request fields, pass in keyword arguments.
970
+ # request = Google::Cloud::DeveloperConnect::V1::DeleteGitRepositoryLinkRequest.new
971
+ #
972
+ # # Call the delete_git_repository_link method.
973
+ # result = client.delete_git_repository_link request
974
+ #
975
+ # # The returned object is of type Gapic::Operation. You can use it to
976
+ # # check the status of an operation, cancel it, or wait for results.
977
+ # # Here is how to wait for a response.
978
+ # result.wait_until_done! timeout: 60
979
+ # if result.response?
980
+ # p result.response
981
+ # else
982
+ # puts "No response received."
983
+ # end
984
+ #
985
+ def delete_git_repository_link request, options = nil
986
+ raise ::ArgumentError, "request must be provided" if request.nil?
987
+
988
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::DeleteGitRepositoryLinkRequest
989
+
990
+ # Converts hash and nil to an options object
991
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
992
+
993
+ # Customize the options with defaults
994
+ metadata = @config.rpcs.delete_git_repository_link.metadata.to_h
995
+
996
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
997
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
998
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
999
+ gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION
1000
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1001
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1002
+
1003
+ header_params = {}
1004
+ if request.name
1005
+ header_params["name"] = request.name
1006
+ end
1007
+
1008
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1009
+ metadata[:"x-goog-request-params"] ||= request_params_header
1010
+
1011
+ options.apply_defaults timeout: @config.rpcs.delete_git_repository_link.timeout,
1012
+ metadata: metadata,
1013
+ retry_policy: @config.rpcs.delete_git_repository_link.retry_policy
1014
+
1015
+ options.apply_defaults timeout: @config.timeout,
1016
+ metadata: @config.metadata,
1017
+ retry_policy: @config.retry_policy
1018
+
1019
+ @developer_connect_stub.call_rpc :delete_git_repository_link, request, options: options do |response, operation|
1020
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1021
+ yield response, operation if block_given?
1022
+ return response
1023
+ end
1024
+ rescue ::GRPC::BadStatus => e
1025
+ raise ::Google::Cloud::Error.from_error(e)
1026
+ end
1027
+
1028
+ ##
1029
+ # Lists GitRepositoryLinks in a given project, location, and connection.
1030
+ #
1031
+ # @overload list_git_repository_links(request, options = nil)
1032
+ # Pass arguments to `list_git_repository_links` via a request object, either of type
1033
+ # {::Google::Cloud::DeveloperConnect::V1::ListGitRepositoryLinksRequest} or an equivalent Hash.
1034
+ #
1035
+ # @param request [::Google::Cloud::DeveloperConnect::V1::ListGitRepositoryLinksRequest, ::Hash]
1036
+ # A request object representing the call parameters. Required. To specify no
1037
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1038
+ # @param options [::Gapic::CallOptions, ::Hash]
1039
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1040
+ #
1041
+ # @overload list_git_repository_links(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
1042
+ # Pass arguments to `list_git_repository_links` via keyword arguments. Note that at
1043
+ # least one keyword argument is required. To specify no parameters, or to keep all
1044
+ # the default parameter values, pass an empty Hash as a request object (see above).
1045
+ #
1046
+ # @param parent [::String]
1047
+ # Required. Parent value for ListGitRepositoryLinksRequest
1048
+ # @param page_size [::Integer]
1049
+ # Optional. Requested page size. Server may return fewer items than
1050
+ # requested. If unspecified, server will pick an appropriate default.
1051
+ # @param page_token [::String]
1052
+ # Optional. A token identifying a page of results the server should return.
1053
+ # @param filter [::String]
1054
+ # Optional. Filtering results
1055
+ # @param order_by [::String]
1056
+ # Optional. Hint for how to order the results
1057
+ #
1058
+ # @yield [response, operation] Access the result along with the RPC operation
1059
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::GitRepositoryLink>]
1060
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1061
+ #
1062
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::GitRepositoryLink>]
1063
+ #
1064
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1065
+ #
1066
+ # @example Basic example
1067
+ # require "google/cloud/developer_connect/v1"
1068
+ #
1069
+ # # Create a client object. The client can be reused for multiple calls.
1070
+ # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new
1071
+ #
1072
+ # # Create a request. To set request fields, pass in keyword arguments.
1073
+ # request = Google::Cloud::DeveloperConnect::V1::ListGitRepositoryLinksRequest.new
1074
+ #
1075
+ # # Call the list_git_repository_links method.
1076
+ # result = client.list_git_repository_links request
1077
+ #
1078
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1079
+ # # over elements, and API calls will be issued to fetch pages as needed.
1080
+ # result.each do |item|
1081
+ # # Each element is of type ::Google::Cloud::DeveloperConnect::V1::GitRepositoryLink.
1082
+ # p item
1083
+ # end
1084
+ #
1085
+ def list_git_repository_links request, options = nil
1086
+ raise ::ArgumentError, "request must be provided" if request.nil?
1087
+
1088
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::ListGitRepositoryLinksRequest
1089
+
1090
+ # Converts hash and nil to an options object
1091
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1092
+
1093
+ # Customize the options with defaults
1094
+ metadata = @config.rpcs.list_git_repository_links.metadata.to_h
1095
+
1096
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1097
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1098
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1099
+ gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION
1100
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1101
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1102
+
1103
+ header_params = {}
1104
+ if request.parent
1105
+ header_params["parent"] = request.parent
1106
+ end
1107
+
1108
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1109
+ metadata[:"x-goog-request-params"] ||= request_params_header
1110
+
1111
+ options.apply_defaults timeout: @config.rpcs.list_git_repository_links.timeout,
1112
+ metadata: metadata,
1113
+ retry_policy: @config.rpcs.list_git_repository_links.retry_policy
1114
+
1115
+ options.apply_defaults timeout: @config.timeout,
1116
+ metadata: @config.metadata,
1117
+ retry_policy: @config.retry_policy
1118
+
1119
+ @developer_connect_stub.call_rpc :list_git_repository_links, request, options: options do |response, operation|
1120
+ response = ::Gapic::PagedEnumerable.new @developer_connect_stub, :list_git_repository_links, request, response, operation, options
1121
+ yield response, operation if block_given?
1122
+ return response
1123
+ end
1124
+ rescue ::GRPC::BadStatus => e
1125
+ raise ::Google::Cloud::Error.from_error(e)
1126
+ end
1127
+
1128
+ ##
1129
+ # Gets details of a single GitRepositoryLink.
1130
+ #
1131
+ # @overload get_git_repository_link(request, options = nil)
1132
+ # Pass arguments to `get_git_repository_link` via a request object, either of type
1133
+ # {::Google::Cloud::DeveloperConnect::V1::GetGitRepositoryLinkRequest} or an equivalent Hash.
1134
+ #
1135
+ # @param request [::Google::Cloud::DeveloperConnect::V1::GetGitRepositoryLinkRequest, ::Hash]
1136
+ # A request object representing the call parameters. Required. To specify no
1137
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1138
+ # @param options [::Gapic::CallOptions, ::Hash]
1139
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1140
+ #
1141
+ # @overload get_git_repository_link(name: nil)
1142
+ # Pass arguments to `get_git_repository_link` via keyword arguments. Note that at
1143
+ # least one keyword argument is required. To specify no parameters, or to keep all
1144
+ # the default parameter values, pass an empty Hash as a request object (see above).
1145
+ #
1146
+ # @param name [::String]
1147
+ # Required. Name of the resource
1148
+ #
1149
+ # @yield [response, operation] Access the result along with the RPC operation
1150
+ # @yieldparam response [::Google::Cloud::DeveloperConnect::V1::GitRepositoryLink]
1151
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1152
+ #
1153
+ # @return [::Google::Cloud::DeveloperConnect::V1::GitRepositoryLink]
1154
+ #
1155
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1156
+ #
1157
+ # @example Basic example
1158
+ # require "google/cloud/developer_connect/v1"
1159
+ #
1160
+ # # Create a client object. The client can be reused for multiple calls.
1161
+ # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new
1162
+ #
1163
+ # # Create a request. To set request fields, pass in keyword arguments.
1164
+ # request = Google::Cloud::DeveloperConnect::V1::GetGitRepositoryLinkRequest.new
1165
+ #
1166
+ # # Call the get_git_repository_link method.
1167
+ # result = client.get_git_repository_link request
1168
+ #
1169
+ # # The returned object is of type Google::Cloud::DeveloperConnect::V1::GitRepositoryLink.
1170
+ # p result
1171
+ #
1172
+ def get_git_repository_link request, options = nil
1173
+ raise ::ArgumentError, "request must be provided" if request.nil?
1174
+
1175
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::GetGitRepositoryLinkRequest
1176
+
1177
+ # Converts hash and nil to an options object
1178
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1179
+
1180
+ # Customize the options with defaults
1181
+ metadata = @config.rpcs.get_git_repository_link.metadata.to_h
1182
+
1183
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1184
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1185
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1186
+ gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION
1187
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1188
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1189
+
1190
+ header_params = {}
1191
+ if request.name
1192
+ header_params["name"] = request.name
1193
+ end
1194
+
1195
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1196
+ metadata[:"x-goog-request-params"] ||= request_params_header
1197
+
1198
+ options.apply_defaults timeout: @config.rpcs.get_git_repository_link.timeout,
1199
+ metadata: metadata,
1200
+ retry_policy: @config.rpcs.get_git_repository_link.retry_policy
1201
+
1202
+ options.apply_defaults timeout: @config.timeout,
1203
+ metadata: @config.metadata,
1204
+ retry_policy: @config.retry_policy
1205
+
1206
+ @developer_connect_stub.call_rpc :get_git_repository_link, request, options: options do |response, operation|
1207
+ yield response, operation if block_given?
1208
+ return response
1209
+ end
1210
+ rescue ::GRPC::BadStatus => e
1211
+ raise ::Google::Cloud::Error.from_error(e)
1212
+ end
1213
+
1214
+ ##
1215
+ # Fetches read/write token of a given gitRepositoryLink.
1216
+ #
1217
+ # @overload fetch_read_write_token(request, options = nil)
1218
+ # Pass arguments to `fetch_read_write_token` via a request object, either of type
1219
+ # {::Google::Cloud::DeveloperConnect::V1::FetchReadWriteTokenRequest} or an equivalent Hash.
1220
+ #
1221
+ # @param request [::Google::Cloud::DeveloperConnect::V1::FetchReadWriteTokenRequest, ::Hash]
1222
+ # A request object representing the call parameters. Required. To specify no
1223
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1224
+ # @param options [::Gapic::CallOptions, ::Hash]
1225
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1226
+ #
1227
+ # @overload fetch_read_write_token(git_repository_link: nil)
1228
+ # Pass arguments to `fetch_read_write_token` via keyword arguments. Note that at
1229
+ # least one keyword argument is required. To specify no parameters, or to keep all
1230
+ # the default parameter values, pass an empty Hash as a request object (see above).
1231
+ #
1232
+ # @param git_repository_link [::String]
1233
+ # Required. The resource name of the gitRepositoryLink in the format
1234
+ # `projects/*/locations/*/connections/*/gitRepositoryLinks/*`.
1235
+ #
1236
+ # @yield [response, operation] Access the result along with the RPC operation
1237
+ # @yieldparam response [::Google::Cloud::DeveloperConnect::V1::FetchReadWriteTokenResponse]
1238
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1239
+ #
1240
+ # @return [::Google::Cloud::DeveloperConnect::V1::FetchReadWriteTokenResponse]
1241
+ #
1242
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1243
+ #
1244
+ # @example Basic example
1245
+ # require "google/cloud/developer_connect/v1"
1246
+ #
1247
+ # # Create a client object. The client can be reused for multiple calls.
1248
+ # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new
1249
+ #
1250
+ # # Create a request. To set request fields, pass in keyword arguments.
1251
+ # request = Google::Cloud::DeveloperConnect::V1::FetchReadWriteTokenRequest.new
1252
+ #
1253
+ # # Call the fetch_read_write_token method.
1254
+ # result = client.fetch_read_write_token request
1255
+ #
1256
+ # # The returned object is of type Google::Cloud::DeveloperConnect::V1::FetchReadWriteTokenResponse.
1257
+ # p result
1258
+ #
1259
+ def fetch_read_write_token request, options = nil
1260
+ raise ::ArgumentError, "request must be provided" if request.nil?
1261
+
1262
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::FetchReadWriteTokenRequest
1263
+
1264
+ # Converts hash and nil to an options object
1265
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1266
+
1267
+ # Customize the options with defaults
1268
+ metadata = @config.rpcs.fetch_read_write_token.metadata.to_h
1269
+
1270
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1271
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1272
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1273
+ gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION
1274
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1275
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1276
+
1277
+ header_params = {}
1278
+ if request.git_repository_link
1279
+ header_params["git_repository_link"] = request.git_repository_link
1280
+ end
1281
+
1282
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1283
+ metadata[:"x-goog-request-params"] ||= request_params_header
1284
+
1285
+ options.apply_defaults timeout: @config.rpcs.fetch_read_write_token.timeout,
1286
+ metadata: metadata,
1287
+ retry_policy: @config.rpcs.fetch_read_write_token.retry_policy
1288
+
1289
+ options.apply_defaults timeout: @config.timeout,
1290
+ metadata: @config.metadata,
1291
+ retry_policy: @config.retry_policy
1292
+
1293
+ @developer_connect_stub.call_rpc :fetch_read_write_token, request, options: options do |response, operation|
1294
+ yield response, operation if block_given?
1295
+ return response
1296
+ end
1297
+ rescue ::GRPC::BadStatus => e
1298
+ raise ::Google::Cloud::Error.from_error(e)
1299
+ end
1300
+
1301
+ ##
1302
+ # Fetches read token of a given gitRepositoryLink.
1303
+ #
1304
+ # @overload fetch_read_token(request, options = nil)
1305
+ # Pass arguments to `fetch_read_token` via a request object, either of type
1306
+ # {::Google::Cloud::DeveloperConnect::V1::FetchReadTokenRequest} or an equivalent Hash.
1307
+ #
1308
+ # @param request [::Google::Cloud::DeveloperConnect::V1::FetchReadTokenRequest, ::Hash]
1309
+ # A request object representing the call parameters. Required. To specify no
1310
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1311
+ # @param options [::Gapic::CallOptions, ::Hash]
1312
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1313
+ #
1314
+ # @overload fetch_read_token(git_repository_link: nil)
1315
+ # Pass arguments to `fetch_read_token` via keyword arguments. Note that at
1316
+ # least one keyword argument is required. To specify no parameters, or to keep all
1317
+ # the default parameter values, pass an empty Hash as a request object (see above).
1318
+ #
1319
+ # @param git_repository_link [::String]
1320
+ # Required. The resource name of the gitRepositoryLink in the format
1321
+ # `projects/*/locations/*/connections/*/gitRepositoryLinks/*`.
1322
+ #
1323
+ # @yield [response, operation] Access the result along with the RPC operation
1324
+ # @yieldparam response [::Google::Cloud::DeveloperConnect::V1::FetchReadTokenResponse]
1325
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1326
+ #
1327
+ # @return [::Google::Cloud::DeveloperConnect::V1::FetchReadTokenResponse]
1328
+ #
1329
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1330
+ #
1331
+ # @example Basic example
1332
+ # require "google/cloud/developer_connect/v1"
1333
+ #
1334
+ # # Create a client object. The client can be reused for multiple calls.
1335
+ # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new
1336
+ #
1337
+ # # Create a request. To set request fields, pass in keyword arguments.
1338
+ # request = Google::Cloud::DeveloperConnect::V1::FetchReadTokenRequest.new
1339
+ #
1340
+ # # Call the fetch_read_token method.
1341
+ # result = client.fetch_read_token request
1342
+ #
1343
+ # # The returned object is of type Google::Cloud::DeveloperConnect::V1::FetchReadTokenResponse.
1344
+ # p result
1345
+ #
1346
+ def fetch_read_token request, options = nil
1347
+ raise ::ArgumentError, "request must be provided" if request.nil?
1348
+
1349
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::FetchReadTokenRequest
1350
+
1351
+ # Converts hash and nil to an options object
1352
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1353
+
1354
+ # Customize the options with defaults
1355
+ metadata = @config.rpcs.fetch_read_token.metadata.to_h
1356
+
1357
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1358
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1359
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1360
+ gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION
1361
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1362
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1363
+
1364
+ header_params = {}
1365
+ if request.git_repository_link
1366
+ header_params["git_repository_link"] = request.git_repository_link
1367
+ end
1368
+
1369
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1370
+ metadata[:"x-goog-request-params"] ||= request_params_header
1371
+
1372
+ options.apply_defaults timeout: @config.rpcs.fetch_read_token.timeout,
1373
+ metadata: metadata,
1374
+ retry_policy: @config.rpcs.fetch_read_token.retry_policy
1375
+
1376
+ options.apply_defaults timeout: @config.timeout,
1377
+ metadata: @config.metadata,
1378
+ retry_policy: @config.retry_policy
1379
+
1380
+ @developer_connect_stub.call_rpc :fetch_read_token, request, options: options do |response, operation|
1381
+ yield response, operation if block_given?
1382
+ return response
1383
+ end
1384
+ rescue ::GRPC::BadStatus => e
1385
+ raise ::Google::Cloud::Error.from_error(e)
1386
+ end
1387
+
1388
+ ##
1389
+ # FetchLinkableGitRepositories returns a list of git repositories from an SCM
1390
+ # that are available to be added to a Connection.
1391
+ #
1392
+ # @overload fetch_linkable_git_repositories(request, options = nil)
1393
+ # Pass arguments to `fetch_linkable_git_repositories` via a request object, either of type
1394
+ # {::Google::Cloud::DeveloperConnect::V1::FetchLinkableGitRepositoriesRequest} or an equivalent Hash.
1395
+ #
1396
+ # @param request [::Google::Cloud::DeveloperConnect::V1::FetchLinkableGitRepositoriesRequest, ::Hash]
1397
+ # A request object representing the call parameters. Required. To specify no
1398
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1399
+ # @param options [::Gapic::CallOptions, ::Hash]
1400
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1401
+ #
1402
+ # @overload fetch_linkable_git_repositories(connection: nil, page_size: nil, page_token: nil)
1403
+ # Pass arguments to `fetch_linkable_git_repositories` via keyword arguments. Note that at
1404
+ # least one keyword argument is required. To specify no parameters, or to keep all
1405
+ # the default parameter values, pass an empty Hash as a request object (see above).
1406
+ #
1407
+ # @param connection [::String]
1408
+ # Required. The name of the Connection.
1409
+ # Format: `projects/*/locations/*/connections/*`.
1410
+ # @param page_size [::Integer]
1411
+ # Optional. Number of results to return in the list. Defaults to 20.
1412
+ # @param page_token [::String]
1413
+ # Optional. Page start.
1414
+ #
1415
+ # @yield [response, operation] Access the result along with the RPC operation
1416
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::LinkableGitRepository>]
1417
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1418
+ #
1419
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::LinkableGitRepository>]
1420
+ #
1421
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1422
+ #
1423
+ # @example Basic example
1424
+ # require "google/cloud/developer_connect/v1"
1425
+ #
1426
+ # # Create a client object. The client can be reused for multiple calls.
1427
+ # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new
1428
+ #
1429
+ # # Create a request. To set request fields, pass in keyword arguments.
1430
+ # request = Google::Cloud::DeveloperConnect::V1::FetchLinkableGitRepositoriesRequest.new
1431
+ #
1432
+ # # Call the fetch_linkable_git_repositories method.
1433
+ # result = client.fetch_linkable_git_repositories request
1434
+ #
1435
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1436
+ # # over elements, and API calls will be issued to fetch pages as needed.
1437
+ # result.each do |item|
1438
+ # # Each element is of type ::Google::Cloud::DeveloperConnect::V1::LinkableGitRepository.
1439
+ # p item
1440
+ # end
1441
+ #
1442
+ def fetch_linkable_git_repositories request, options = nil
1443
+ raise ::ArgumentError, "request must be provided" if request.nil?
1444
+
1445
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::FetchLinkableGitRepositoriesRequest
1446
+
1447
+ # Converts hash and nil to an options object
1448
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1449
+
1450
+ # Customize the options with defaults
1451
+ metadata = @config.rpcs.fetch_linkable_git_repositories.metadata.to_h
1452
+
1453
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1454
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1455
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1456
+ gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION
1457
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1458
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1459
+
1460
+ header_params = {}
1461
+ if request.connection
1462
+ header_params["connection"] = request.connection
1463
+ end
1464
+
1465
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1466
+ metadata[:"x-goog-request-params"] ||= request_params_header
1467
+
1468
+ options.apply_defaults timeout: @config.rpcs.fetch_linkable_git_repositories.timeout,
1469
+ metadata: metadata,
1470
+ retry_policy: @config.rpcs.fetch_linkable_git_repositories.retry_policy
1471
+
1472
+ options.apply_defaults timeout: @config.timeout,
1473
+ metadata: @config.metadata,
1474
+ retry_policy: @config.retry_policy
1475
+
1476
+ @developer_connect_stub.call_rpc :fetch_linkable_git_repositories, request, options: options do |response, operation|
1477
+ response = ::Gapic::PagedEnumerable.new @developer_connect_stub, :fetch_linkable_git_repositories, request, response, operation, options
1478
+ yield response, operation if block_given?
1479
+ return response
1480
+ end
1481
+ rescue ::GRPC::BadStatus => e
1482
+ raise ::Google::Cloud::Error.from_error(e)
1483
+ end
1484
+
1485
+ ##
1486
+ # FetchGitHubInstallations returns the list of GitHub Installations that
1487
+ # are available to be added to a Connection.
1488
+ # For github.com, only installations accessible to the authorizer token
1489
+ # are returned. For GitHub Enterprise, all installations are returned.
1490
+ #
1491
+ # @overload fetch_git_hub_installations(request, options = nil)
1492
+ # Pass arguments to `fetch_git_hub_installations` via a request object, either of type
1493
+ # {::Google::Cloud::DeveloperConnect::V1::FetchGitHubInstallationsRequest} or an equivalent Hash.
1494
+ #
1495
+ # @param request [::Google::Cloud::DeveloperConnect::V1::FetchGitHubInstallationsRequest, ::Hash]
1496
+ # A request object representing the call parameters. Required. To specify no
1497
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1498
+ # @param options [::Gapic::CallOptions, ::Hash]
1499
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1500
+ #
1501
+ # @overload fetch_git_hub_installations(connection: nil)
1502
+ # Pass arguments to `fetch_git_hub_installations` via keyword arguments. Note that at
1503
+ # least one keyword argument is required. To specify no parameters, or to keep all
1504
+ # the default parameter values, pass an empty Hash as a request object (see above).
1505
+ #
1506
+ # @param connection [::String]
1507
+ # Required. The resource name of the connection in the format
1508
+ # `projects/*/locations/*/connections/*`.
1509
+ #
1510
+ # @yield [response, operation] Access the result along with the RPC operation
1511
+ # @yieldparam response [::Google::Cloud::DeveloperConnect::V1::FetchGitHubInstallationsResponse]
1512
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1513
+ #
1514
+ # @return [::Google::Cloud::DeveloperConnect::V1::FetchGitHubInstallationsResponse]
1515
+ #
1516
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1517
+ #
1518
+ # @example Basic example
1519
+ # require "google/cloud/developer_connect/v1"
1520
+ #
1521
+ # # Create a client object. The client can be reused for multiple calls.
1522
+ # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new
1523
+ #
1524
+ # # Create a request. To set request fields, pass in keyword arguments.
1525
+ # request = Google::Cloud::DeveloperConnect::V1::FetchGitHubInstallationsRequest.new
1526
+ #
1527
+ # # Call the fetch_git_hub_installations method.
1528
+ # result = client.fetch_git_hub_installations request
1529
+ #
1530
+ # # The returned object is of type Google::Cloud::DeveloperConnect::V1::FetchGitHubInstallationsResponse.
1531
+ # p result
1532
+ #
1533
+ def fetch_git_hub_installations request, options = nil
1534
+ raise ::ArgumentError, "request must be provided" if request.nil?
1535
+
1536
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::FetchGitHubInstallationsRequest
1537
+
1538
+ # Converts hash and nil to an options object
1539
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1540
+
1541
+ # Customize the options with defaults
1542
+ metadata = @config.rpcs.fetch_git_hub_installations.metadata.to_h
1543
+
1544
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1545
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1546
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1547
+ gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION
1548
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1549
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1550
+
1551
+ header_params = {}
1552
+ if request.connection
1553
+ header_params["connection"] = request.connection
1554
+ end
1555
+
1556
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1557
+ metadata[:"x-goog-request-params"] ||= request_params_header
1558
+
1559
+ options.apply_defaults timeout: @config.rpcs.fetch_git_hub_installations.timeout,
1560
+ metadata: metadata,
1561
+ retry_policy: @config.rpcs.fetch_git_hub_installations.retry_policy
1562
+
1563
+ options.apply_defaults timeout: @config.timeout,
1564
+ metadata: @config.metadata,
1565
+ retry_policy: @config.retry_policy
1566
+
1567
+ @developer_connect_stub.call_rpc :fetch_git_hub_installations, request, options: options do |response, operation|
1568
+ yield response, operation if block_given?
1569
+ return response
1570
+ end
1571
+ rescue ::GRPC::BadStatus => e
1572
+ raise ::Google::Cloud::Error.from_error(e)
1573
+ end
1574
+
1575
+ ##
1576
+ # Fetch the list of branches or tags for a given repository.
1577
+ #
1578
+ # @overload fetch_git_refs(request, options = nil)
1579
+ # Pass arguments to `fetch_git_refs` via a request object, either of type
1580
+ # {::Google::Cloud::DeveloperConnect::V1::FetchGitRefsRequest} or an equivalent Hash.
1581
+ #
1582
+ # @param request [::Google::Cloud::DeveloperConnect::V1::FetchGitRefsRequest, ::Hash]
1583
+ # A request object representing the call parameters. Required. To specify no
1584
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1585
+ # @param options [::Gapic::CallOptions, ::Hash]
1586
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1587
+ #
1588
+ # @overload fetch_git_refs(git_repository_link: nil, ref_type: nil, page_size: nil, page_token: nil)
1589
+ # Pass arguments to `fetch_git_refs` via keyword arguments. Note that at
1590
+ # least one keyword argument is required. To specify no parameters, or to keep all
1591
+ # the default parameter values, pass an empty Hash as a request object (see above).
1592
+ #
1593
+ # @param git_repository_link [::String]
1594
+ # Required. The resource name of GitRepositoryLink in the format
1595
+ # `projects/*/locations/*/connections/*/gitRepositoryLinks/*`.
1596
+ # @param ref_type [::Google::Cloud::DeveloperConnect::V1::FetchGitRefsRequest::RefType]
1597
+ # Required. Type of refs to fetch.
1598
+ # @param page_size [::Integer]
1599
+ # Optional. Number of results to return in the list. Default to 20.
1600
+ # @param page_token [::String]
1601
+ # Optional. Page start.
1602
+ #
1603
+ # @yield [response, operation] Access the result along with the RPC operation
1604
+ # @yieldparam response [::Google::Cloud::DeveloperConnect::V1::FetchGitRefsResponse]
1605
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1606
+ #
1607
+ # @return [::Google::Cloud::DeveloperConnect::V1::FetchGitRefsResponse]
1608
+ #
1609
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1610
+ #
1611
+ # @example Basic example
1612
+ # require "google/cloud/developer_connect/v1"
1613
+ #
1614
+ # # Create a client object. The client can be reused for multiple calls.
1615
+ # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new
1616
+ #
1617
+ # # Create a request. To set request fields, pass in keyword arguments.
1618
+ # request = Google::Cloud::DeveloperConnect::V1::FetchGitRefsRequest.new
1619
+ #
1620
+ # # Call the fetch_git_refs method.
1621
+ # result = client.fetch_git_refs request
1622
+ #
1623
+ # # The returned object is of type Google::Cloud::DeveloperConnect::V1::FetchGitRefsResponse.
1624
+ # p result
1625
+ #
1626
+ def fetch_git_refs request, options = nil
1627
+ raise ::ArgumentError, "request must be provided" if request.nil?
1628
+
1629
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::FetchGitRefsRequest
1630
+
1631
+ # Converts hash and nil to an options object
1632
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1633
+
1634
+ # Customize the options with defaults
1635
+ metadata = @config.rpcs.fetch_git_refs.metadata.to_h
1636
+
1637
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1638
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1639
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1640
+ gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION
1641
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1642
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1643
+
1644
+ header_params = {}
1645
+ if request.git_repository_link
1646
+ header_params["git_repository_link"] = request.git_repository_link
1647
+ end
1648
+
1649
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1650
+ metadata[:"x-goog-request-params"] ||= request_params_header
1651
+
1652
+ options.apply_defaults timeout: @config.rpcs.fetch_git_refs.timeout,
1653
+ metadata: metadata,
1654
+ retry_policy: @config.rpcs.fetch_git_refs.retry_policy
1655
+
1656
+ options.apply_defaults timeout: @config.timeout,
1657
+ metadata: @config.metadata,
1658
+ retry_policy: @config.retry_policy
1659
+
1660
+ @developer_connect_stub.call_rpc :fetch_git_refs, request, options: options do |response, operation|
1661
+ yield response, operation if block_given?
1662
+ return response
1663
+ end
1664
+ rescue ::GRPC::BadStatus => e
1665
+ raise ::Google::Cloud::Error.from_error(e)
1666
+ end
1667
+
1668
+ ##
1669
+ # Configuration class for the DeveloperConnect API.
1670
+ #
1671
+ # This class represents the configuration for DeveloperConnect,
1672
+ # providing control over timeouts, retry behavior, logging, transport
1673
+ # parameters, and other low-level controls. Certain parameters can also be
1674
+ # applied individually to specific RPCs. See
1675
+ # {::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client::Configuration::Rpcs}
1676
+ # for a list of RPCs that can be configured independently.
1677
+ #
1678
+ # Configuration can be applied globally to all clients, or to a single client
1679
+ # on construction.
1680
+ #
1681
+ # @example
1682
+ #
1683
+ # # Modify the global config, setting the timeout for
1684
+ # # list_connections to 20 seconds,
1685
+ # # and all remaining timeouts to 10 seconds.
1686
+ # ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.configure do |config|
1687
+ # config.timeout = 10.0
1688
+ # config.rpcs.list_connections.timeout = 20.0
1689
+ # end
1690
+ #
1691
+ # # Apply the above configuration only to a new client.
1692
+ # client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config|
1693
+ # config.timeout = 10.0
1694
+ # config.rpcs.list_connections.timeout = 20.0
1695
+ # end
1696
+ #
1697
+ # @!attribute [rw] endpoint
1698
+ # A custom service endpoint, as a hostname or hostname:port. The default is
1699
+ # nil, indicating to use the default endpoint in the current universe domain.
1700
+ # @return [::String,nil]
1701
+ # @!attribute [rw] credentials
1702
+ # Credentials to send with calls. You may provide any of the following types:
1703
+ # * (`String`) The path to a service account key file in JSON format
1704
+ # * (`Hash`) A service account key as a Hash
1705
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
1706
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
1707
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
1708
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
1709
+ # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
1710
+ # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
1711
+ # * (`nil`) indicating no credentials
1712
+ # @return [::Object]
1713
+ # @!attribute [rw] scope
1714
+ # The OAuth scopes
1715
+ # @return [::Array<::String>]
1716
+ # @!attribute [rw] lib_name
1717
+ # The library name as recorded in instrumentation and logging
1718
+ # @return [::String]
1719
+ # @!attribute [rw] lib_version
1720
+ # The library version as recorded in instrumentation and logging
1721
+ # @return [::String]
1722
+ # @!attribute [rw] channel_args
1723
+ # Extra parameters passed to the gRPC channel. Note: this is ignored if a
1724
+ # `GRPC::Core::Channel` object is provided as the credential.
1725
+ # @return [::Hash]
1726
+ # @!attribute [rw] interceptors
1727
+ # An array of interceptors that are run before calls are executed.
1728
+ # @return [::Array<::GRPC::ClientInterceptor>]
1729
+ # @!attribute [rw] timeout
1730
+ # The call timeout in seconds.
1731
+ # @return [::Numeric]
1732
+ # @!attribute [rw] metadata
1733
+ # Additional gRPC headers to be sent with the call.
1734
+ # @return [::Hash{::Symbol=>::String}]
1735
+ # @!attribute [rw] retry_policy
1736
+ # The retry policy. The value is a hash with the following keys:
1737
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
1738
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
1739
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
1740
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
1741
+ # trigger a retry.
1742
+ # @return [::Hash]
1743
+ # @!attribute [rw] quota_project
1744
+ # A separate project against which to charge quota.
1745
+ # @return [::String]
1746
+ # @!attribute [rw] universe_domain
1747
+ # The universe domain within which to make requests. This determines the
1748
+ # default endpoint URL. The default value of nil uses the environment
1749
+ # universe (usually the default "googleapis.com" universe).
1750
+ # @return [::String,nil]
1751
+ #
1752
+ class Configuration
1753
+ extend ::Gapic::Config
1754
+
1755
+ # @private
1756
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
1757
+ DEFAULT_ENDPOINT = "developerconnect.googleapis.com"
1758
+
1759
+ config_attr :endpoint, nil, ::String, nil
1760
+ config_attr :credentials, nil do |value|
1761
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
1762
+ allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
1763
+ allowed.any? { |klass| klass === value }
1764
+ end
1765
+ config_attr :scope, nil, ::String, ::Array, nil
1766
+ config_attr :lib_name, nil, ::String, nil
1767
+ config_attr :lib_version, nil, ::String, nil
1768
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
1769
+ config_attr :interceptors, nil, ::Array, nil
1770
+ config_attr :timeout, nil, ::Numeric, nil
1771
+ config_attr :metadata, nil, ::Hash, nil
1772
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
1773
+ config_attr :quota_project, nil, ::String, nil
1774
+ config_attr :universe_domain, nil, ::String, nil
1775
+
1776
+ # @private
1777
+ def initialize parent_config = nil
1778
+ @parent_config = parent_config unless parent_config.nil?
1779
+
1780
+ yield self if block_given?
1781
+ end
1782
+
1783
+ ##
1784
+ # Configurations for individual RPCs
1785
+ # @return [Rpcs]
1786
+ #
1787
+ def rpcs
1788
+ @rpcs ||= begin
1789
+ parent_rpcs = nil
1790
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
1791
+ Rpcs.new parent_rpcs
1792
+ end
1793
+ end
1794
+
1795
+ ##
1796
+ # Configuration for the channel pool
1797
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
1798
+ #
1799
+ def channel_pool
1800
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
1801
+ end
1802
+
1803
+ ##
1804
+ # Configuration RPC class for the DeveloperConnect API.
1805
+ #
1806
+ # Includes fields providing the configuration for each RPC in this service.
1807
+ # Each configuration object is of type `Gapic::Config::Method` and includes
1808
+ # the following configuration fields:
1809
+ #
1810
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
1811
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
1812
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
1813
+ # include the following keys:
1814
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
1815
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
1816
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
1817
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
1818
+ # trigger a retry.
1819
+ #
1820
+ class Rpcs
1821
+ ##
1822
+ # RPC-specific configuration for `list_connections`
1823
+ # @return [::Gapic::Config::Method]
1824
+ #
1825
+ attr_reader :list_connections
1826
+ ##
1827
+ # RPC-specific configuration for `get_connection`
1828
+ # @return [::Gapic::Config::Method]
1829
+ #
1830
+ attr_reader :get_connection
1831
+ ##
1832
+ # RPC-specific configuration for `create_connection`
1833
+ # @return [::Gapic::Config::Method]
1834
+ #
1835
+ attr_reader :create_connection
1836
+ ##
1837
+ # RPC-specific configuration for `update_connection`
1838
+ # @return [::Gapic::Config::Method]
1839
+ #
1840
+ attr_reader :update_connection
1841
+ ##
1842
+ # RPC-specific configuration for `delete_connection`
1843
+ # @return [::Gapic::Config::Method]
1844
+ #
1845
+ attr_reader :delete_connection
1846
+ ##
1847
+ # RPC-specific configuration for `create_git_repository_link`
1848
+ # @return [::Gapic::Config::Method]
1849
+ #
1850
+ attr_reader :create_git_repository_link
1851
+ ##
1852
+ # RPC-specific configuration for `delete_git_repository_link`
1853
+ # @return [::Gapic::Config::Method]
1854
+ #
1855
+ attr_reader :delete_git_repository_link
1856
+ ##
1857
+ # RPC-specific configuration for `list_git_repository_links`
1858
+ # @return [::Gapic::Config::Method]
1859
+ #
1860
+ attr_reader :list_git_repository_links
1861
+ ##
1862
+ # RPC-specific configuration for `get_git_repository_link`
1863
+ # @return [::Gapic::Config::Method]
1864
+ #
1865
+ attr_reader :get_git_repository_link
1866
+ ##
1867
+ # RPC-specific configuration for `fetch_read_write_token`
1868
+ # @return [::Gapic::Config::Method]
1869
+ #
1870
+ attr_reader :fetch_read_write_token
1871
+ ##
1872
+ # RPC-specific configuration for `fetch_read_token`
1873
+ # @return [::Gapic::Config::Method]
1874
+ #
1875
+ attr_reader :fetch_read_token
1876
+ ##
1877
+ # RPC-specific configuration for `fetch_linkable_git_repositories`
1878
+ # @return [::Gapic::Config::Method]
1879
+ #
1880
+ attr_reader :fetch_linkable_git_repositories
1881
+ ##
1882
+ # RPC-specific configuration for `fetch_git_hub_installations`
1883
+ # @return [::Gapic::Config::Method]
1884
+ #
1885
+ attr_reader :fetch_git_hub_installations
1886
+ ##
1887
+ # RPC-specific configuration for `fetch_git_refs`
1888
+ # @return [::Gapic::Config::Method]
1889
+ #
1890
+ attr_reader :fetch_git_refs
1891
+
1892
+ # @private
1893
+ def initialize parent_rpcs = nil
1894
+ list_connections_config = parent_rpcs.list_connections if parent_rpcs.respond_to? :list_connections
1895
+ @list_connections = ::Gapic::Config::Method.new list_connections_config
1896
+ get_connection_config = parent_rpcs.get_connection if parent_rpcs.respond_to? :get_connection
1897
+ @get_connection = ::Gapic::Config::Method.new get_connection_config
1898
+ create_connection_config = parent_rpcs.create_connection if parent_rpcs.respond_to? :create_connection
1899
+ @create_connection = ::Gapic::Config::Method.new create_connection_config
1900
+ update_connection_config = parent_rpcs.update_connection if parent_rpcs.respond_to? :update_connection
1901
+ @update_connection = ::Gapic::Config::Method.new update_connection_config
1902
+ delete_connection_config = parent_rpcs.delete_connection if parent_rpcs.respond_to? :delete_connection
1903
+ @delete_connection = ::Gapic::Config::Method.new delete_connection_config
1904
+ create_git_repository_link_config = parent_rpcs.create_git_repository_link if parent_rpcs.respond_to? :create_git_repository_link
1905
+ @create_git_repository_link = ::Gapic::Config::Method.new create_git_repository_link_config
1906
+ delete_git_repository_link_config = parent_rpcs.delete_git_repository_link if parent_rpcs.respond_to? :delete_git_repository_link
1907
+ @delete_git_repository_link = ::Gapic::Config::Method.new delete_git_repository_link_config
1908
+ list_git_repository_links_config = parent_rpcs.list_git_repository_links if parent_rpcs.respond_to? :list_git_repository_links
1909
+ @list_git_repository_links = ::Gapic::Config::Method.new list_git_repository_links_config
1910
+ get_git_repository_link_config = parent_rpcs.get_git_repository_link if parent_rpcs.respond_to? :get_git_repository_link
1911
+ @get_git_repository_link = ::Gapic::Config::Method.new get_git_repository_link_config
1912
+ fetch_read_write_token_config = parent_rpcs.fetch_read_write_token if parent_rpcs.respond_to? :fetch_read_write_token
1913
+ @fetch_read_write_token = ::Gapic::Config::Method.new fetch_read_write_token_config
1914
+ fetch_read_token_config = parent_rpcs.fetch_read_token if parent_rpcs.respond_to? :fetch_read_token
1915
+ @fetch_read_token = ::Gapic::Config::Method.new fetch_read_token_config
1916
+ fetch_linkable_git_repositories_config = parent_rpcs.fetch_linkable_git_repositories if parent_rpcs.respond_to? :fetch_linkable_git_repositories
1917
+ @fetch_linkable_git_repositories = ::Gapic::Config::Method.new fetch_linkable_git_repositories_config
1918
+ fetch_git_hub_installations_config = parent_rpcs.fetch_git_hub_installations if parent_rpcs.respond_to? :fetch_git_hub_installations
1919
+ @fetch_git_hub_installations = ::Gapic::Config::Method.new fetch_git_hub_installations_config
1920
+ fetch_git_refs_config = parent_rpcs.fetch_git_refs if parent_rpcs.respond_to? :fetch_git_refs
1921
+ @fetch_git_refs = ::Gapic::Config::Method.new fetch_git_refs_config
1922
+
1923
+ yield self if block_given?
1924
+ end
1925
+ end
1926
+ end
1927
+ end
1928
+ end
1929
+ end
1930
+ end
1931
+ end
1932
+ end