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