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