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,713 @@
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/securesourcemanager/v1/secure_source_manager_pb"
20
+
21
+ module Google
22
+ module Cloud
23
+ module SecureSourceManager
24
+ module V1
25
+ module SecureSourceManager
26
+ module Rest
27
+ ##
28
+ # REST service stub for the SecureSourceManager service.
29
+ # Service stub contains baseline method implementations
30
+ # including transcoding, making the REST call, and deserialing the response.
31
+ #
32
+ class ServiceStub
33
+ def initialize endpoint:, endpoint_template:, universe_domain:, credentials:
34
+ # These require statements are intentionally placed here to initialize
35
+ # the REST modules only when it's required.
36
+ require "gapic/rest"
37
+
38
+ @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint,
39
+ endpoint_template: endpoint_template,
40
+ universe_domain: universe_domain,
41
+ credentials: credentials,
42
+ numeric_enums: true,
43
+ raise_faraday_errors: false
44
+ end
45
+
46
+ ##
47
+ # The effective universe domain
48
+ #
49
+ # @return [String]
50
+ #
51
+ def universe_domain
52
+ @client_stub.universe_domain
53
+ end
54
+
55
+ ##
56
+ # Baseline implementation for the list_instances REST call
57
+ #
58
+ # @param request_pb [::Google::Cloud::SecureSourceManager::V1::ListInstancesRequest]
59
+ # A request object representing the call parameters. Required.
60
+ # @param options [::Gapic::CallOptions]
61
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
62
+ #
63
+ # @yield [result, operation] Access the result along with the TransportOperation object
64
+ # @yieldparam result [::Google::Cloud::SecureSourceManager::V1::ListInstancesResponse]
65
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
66
+ #
67
+ # @return [::Google::Cloud::SecureSourceManager::V1::ListInstancesResponse]
68
+ # A result object deserialized from the server's reply
69
+ def list_instances request_pb, options = nil
70
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
71
+
72
+ verb, uri, query_string_params, body = ServiceStub.transcode_list_instances_request request_pb
73
+ query_string_params = if query_string_params.any?
74
+ query_string_params.to_h { |p| p.split "=", 2 }
75
+ else
76
+ {}
77
+ end
78
+
79
+ response = @client_stub.make_http_request(
80
+ verb,
81
+ uri: uri,
82
+ body: body || "",
83
+ params: query_string_params,
84
+ options: options
85
+ )
86
+ operation = ::Gapic::Rest::TransportOperation.new response
87
+ result = ::Google::Cloud::SecureSourceManager::V1::ListInstancesResponse.decode_json response.body, ignore_unknown_fields: true
88
+
89
+ yield result, operation if block_given?
90
+ result
91
+ end
92
+
93
+ ##
94
+ # Baseline implementation for the get_instance REST call
95
+ #
96
+ # @param request_pb [::Google::Cloud::SecureSourceManager::V1::GetInstanceRequest]
97
+ # A request object representing the call parameters. Required.
98
+ # @param options [::Gapic::CallOptions]
99
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
100
+ #
101
+ # @yield [result, operation] Access the result along with the TransportOperation object
102
+ # @yieldparam result [::Google::Cloud::SecureSourceManager::V1::Instance]
103
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
104
+ #
105
+ # @return [::Google::Cloud::SecureSourceManager::V1::Instance]
106
+ # A result object deserialized from the server's reply
107
+ def get_instance request_pb, options = nil
108
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
109
+
110
+ verb, uri, query_string_params, body = ServiceStub.transcode_get_instance_request request_pb
111
+ query_string_params = if query_string_params.any?
112
+ query_string_params.to_h { |p| p.split "=", 2 }
113
+ else
114
+ {}
115
+ end
116
+
117
+ response = @client_stub.make_http_request(
118
+ verb,
119
+ uri: uri,
120
+ body: body || "",
121
+ params: query_string_params,
122
+ options: options
123
+ )
124
+ operation = ::Gapic::Rest::TransportOperation.new response
125
+ result = ::Google::Cloud::SecureSourceManager::V1::Instance.decode_json response.body, ignore_unknown_fields: true
126
+
127
+ yield result, operation if block_given?
128
+ result
129
+ end
130
+
131
+ ##
132
+ # Baseline implementation for the create_instance REST call
133
+ #
134
+ # @param request_pb [::Google::Cloud::SecureSourceManager::V1::CreateInstanceRequest]
135
+ # A request object representing the call parameters. Required.
136
+ # @param options [::Gapic::CallOptions]
137
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
138
+ #
139
+ # @yield [result, operation] Access the result along with the TransportOperation object
140
+ # @yieldparam result [::Google::Longrunning::Operation]
141
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
142
+ #
143
+ # @return [::Google::Longrunning::Operation]
144
+ # A result object deserialized from the server's reply
145
+ def create_instance request_pb, options = nil
146
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
147
+
148
+ verb, uri, query_string_params, body = ServiceStub.transcode_create_instance_request request_pb
149
+ query_string_params = if query_string_params.any?
150
+ query_string_params.to_h { |p| p.split "=", 2 }
151
+ else
152
+ {}
153
+ end
154
+
155
+ response = @client_stub.make_http_request(
156
+ verb,
157
+ uri: uri,
158
+ body: body || "",
159
+ params: query_string_params,
160
+ options: options
161
+ )
162
+ operation = ::Gapic::Rest::TransportOperation.new response
163
+ result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
164
+
165
+ yield result, operation if block_given?
166
+ result
167
+ end
168
+
169
+ ##
170
+ # Baseline implementation for the delete_instance REST call
171
+ #
172
+ # @param request_pb [::Google::Cloud::SecureSourceManager::V1::DeleteInstanceRequest]
173
+ # A request object representing the call parameters. Required.
174
+ # @param options [::Gapic::CallOptions]
175
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
176
+ #
177
+ # @yield [result, operation] Access the result along with the TransportOperation object
178
+ # @yieldparam result [::Google::Longrunning::Operation]
179
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
180
+ #
181
+ # @return [::Google::Longrunning::Operation]
182
+ # A result object deserialized from the server's reply
183
+ def delete_instance request_pb, options = nil
184
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
185
+
186
+ verb, uri, query_string_params, body = ServiceStub.transcode_delete_instance_request request_pb
187
+ query_string_params = if query_string_params.any?
188
+ query_string_params.to_h { |p| p.split "=", 2 }
189
+ else
190
+ {}
191
+ end
192
+
193
+ response = @client_stub.make_http_request(
194
+ verb,
195
+ uri: uri,
196
+ body: body || "",
197
+ params: query_string_params,
198
+ options: options
199
+ )
200
+ operation = ::Gapic::Rest::TransportOperation.new response
201
+ result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
202
+
203
+ yield result, operation if block_given?
204
+ result
205
+ end
206
+
207
+ ##
208
+ # Baseline implementation for the list_repositories REST call
209
+ #
210
+ # @param request_pb [::Google::Cloud::SecureSourceManager::V1::ListRepositoriesRequest]
211
+ # A request object representing the call parameters. Required.
212
+ # @param options [::Gapic::CallOptions]
213
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
214
+ #
215
+ # @yield [result, operation] Access the result along with the TransportOperation object
216
+ # @yieldparam result [::Google::Cloud::SecureSourceManager::V1::ListRepositoriesResponse]
217
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
218
+ #
219
+ # @return [::Google::Cloud::SecureSourceManager::V1::ListRepositoriesResponse]
220
+ # A result object deserialized from the server's reply
221
+ def list_repositories request_pb, options = nil
222
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
223
+
224
+ verb, uri, query_string_params, body = ServiceStub.transcode_list_repositories_request request_pb
225
+ query_string_params = if query_string_params.any?
226
+ query_string_params.to_h { |p| p.split "=", 2 }
227
+ else
228
+ {}
229
+ end
230
+
231
+ response = @client_stub.make_http_request(
232
+ verb,
233
+ uri: uri,
234
+ body: body || "",
235
+ params: query_string_params,
236
+ options: options
237
+ )
238
+ operation = ::Gapic::Rest::TransportOperation.new response
239
+ result = ::Google::Cloud::SecureSourceManager::V1::ListRepositoriesResponse.decode_json response.body, ignore_unknown_fields: true
240
+
241
+ yield result, operation if block_given?
242
+ result
243
+ end
244
+
245
+ ##
246
+ # Baseline implementation for the get_repository REST call
247
+ #
248
+ # @param request_pb [::Google::Cloud::SecureSourceManager::V1::GetRepositoryRequest]
249
+ # A request object representing the call parameters. Required.
250
+ # @param options [::Gapic::CallOptions]
251
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
252
+ #
253
+ # @yield [result, operation] Access the result along with the TransportOperation object
254
+ # @yieldparam result [::Google::Cloud::SecureSourceManager::V1::Repository]
255
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
256
+ #
257
+ # @return [::Google::Cloud::SecureSourceManager::V1::Repository]
258
+ # A result object deserialized from the server's reply
259
+ def get_repository request_pb, options = nil
260
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
261
+
262
+ verb, uri, query_string_params, body = ServiceStub.transcode_get_repository_request request_pb
263
+ query_string_params = if query_string_params.any?
264
+ query_string_params.to_h { |p| p.split "=", 2 }
265
+ else
266
+ {}
267
+ end
268
+
269
+ response = @client_stub.make_http_request(
270
+ verb,
271
+ uri: uri,
272
+ body: body || "",
273
+ params: query_string_params,
274
+ options: options
275
+ )
276
+ operation = ::Gapic::Rest::TransportOperation.new response
277
+ result = ::Google::Cloud::SecureSourceManager::V1::Repository.decode_json response.body, ignore_unknown_fields: true
278
+
279
+ yield result, operation if block_given?
280
+ result
281
+ end
282
+
283
+ ##
284
+ # Baseline implementation for the create_repository REST call
285
+ #
286
+ # @param request_pb [::Google::Cloud::SecureSourceManager::V1::CreateRepositoryRequest]
287
+ # A request object representing the call parameters. Required.
288
+ # @param options [::Gapic::CallOptions]
289
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
290
+ #
291
+ # @yield [result, operation] Access the result along with the TransportOperation object
292
+ # @yieldparam result [::Google::Longrunning::Operation]
293
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
294
+ #
295
+ # @return [::Google::Longrunning::Operation]
296
+ # A result object deserialized from the server's reply
297
+ def create_repository request_pb, options = nil
298
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
299
+
300
+ verb, uri, query_string_params, body = ServiceStub.transcode_create_repository_request request_pb
301
+ query_string_params = if query_string_params.any?
302
+ query_string_params.to_h { |p| p.split "=", 2 }
303
+ else
304
+ {}
305
+ end
306
+
307
+ response = @client_stub.make_http_request(
308
+ verb,
309
+ uri: uri,
310
+ body: body || "",
311
+ params: query_string_params,
312
+ options: options
313
+ )
314
+ operation = ::Gapic::Rest::TransportOperation.new response
315
+ result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
316
+
317
+ yield result, operation if block_given?
318
+ result
319
+ end
320
+
321
+ ##
322
+ # Baseline implementation for the delete_repository REST call
323
+ #
324
+ # @param request_pb [::Google::Cloud::SecureSourceManager::V1::DeleteRepositoryRequest]
325
+ # A request object representing the call parameters. Required.
326
+ # @param options [::Gapic::CallOptions]
327
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
328
+ #
329
+ # @yield [result, operation] Access the result along with the TransportOperation object
330
+ # @yieldparam result [::Google::Longrunning::Operation]
331
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
332
+ #
333
+ # @return [::Google::Longrunning::Operation]
334
+ # A result object deserialized from the server's reply
335
+ def delete_repository request_pb, options = nil
336
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
337
+
338
+ verb, uri, query_string_params, body = ServiceStub.transcode_delete_repository_request request_pb
339
+ query_string_params = if query_string_params.any?
340
+ query_string_params.to_h { |p| p.split "=", 2 }
341
+ else
342
+ {}
343
+ end
344
+
345
+ response = @client_stub.make_http_request(
346
+ verb,
347
+ uri: uri,
348
+ body: body || "",
349
+ params: query_string_params,
350
+ options: options
351
+ )
352
+ operation = ::Gapic::Rest::TransportOperation.new response
353
+ result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
354
+
355
+ yield result, operation if block_given?
356
+ result
357
+ end
358
+
359
+ ##
360
+ # Baseline implementation for the get_iam_policy_repo REST call
361
+ #
362
+ # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest]
363
+ # A request object representing the call parameters. Required.
364
+ # @param options [::Gapic::CallOptions]
365
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
366
+ #
367
+ # @yield [result, operation] Access the result along with the TransportOperation object
368
+ # @yieldparam result [::Google::Iam::V1::Policy]
369
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
370
+ #
371
+ # @return [::Google::Iam::V1::Policy]
372
+ # A result object deserialized from the server's reply
373
+ def get_iam_policy_repo request_pb, options = nil
374
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
375
+
376
+ verb, uri, query_string_params, body = ServiceStub.transcode_get_iam_policy_repo_request request_pb
377
+ query_string_params = if query_string_params.any?
378
+ query_string_params.to_h { |p| p.split "=", 2 }
379
+ else
380
+ {}
381
+ end
382
+
383
+ response = @client_stub.make_http_request(
384
+ verb,
385
+ uri: uri,
386
+ body: body || "",
387
+ params: query_string_params,
388
+ options: options
389
+ )
390
+ operation = ::Gapic::Rest::TransportOperation.new response
391
+ result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true
392
+
393
+ yield result, operation if block_given?
394
+ result
395
+ end
396
+
397
+ ##
398
+ # Baseline implementation for the set_iam_policy_repo REST call
399
+ #
400
+ # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest]
401
+ # A request object representing the call parameters. Required.
402
+ # @param options [::Gapic::CallOptions]
403
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
404
+ #
405
+ # @yield [result, operation] Access the result along with the TransportOperation object
406
+ # @yieldparam result [::Google::Iam::V1::Policy]
407
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
408
+ #
409
+ # @return [::Google::Iam::V1::Policy]
410
+ # A result object deserialized from the server's reply
411
+ def set_iam_policy_repo request_pb, options = nil
412
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
413
+
414
+ verb, uri, query_string_params, body = ServiceStub.transcode_set_iam_policy_repo_request request_pb
415
+ query_string_params = if query_string_params.any?
416
+ query_string_params.to_h { |p| p.split "=", 2 }
417
+ else
418
+ {}
419
+ end
420
+
421
+ response = @client_stub.make_http_request(
422
+ verb,
423
+ uri: uri,
424
+ body: body || "",
425
+ params: query_string_params,
426
+ options: options
427
+ )
428
+ operation = ::Gapic::Rest::TransportOperation.new response
429
+ result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true
430
+
431
+ yield result, operation if block_given?
432
+ result
433
+ end
434
+
435
+ ##
436
+ # Baseline implementation for the test_iam_permissions_repo REST call
437
+ #
438
+ # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest]
439
+ # A request object representing the call parameters. Required.
440
+ # @param options [::Gapic::CallOptions]
441
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
442
+ #
443
+ # @yield [result, operation] Access the result along with the TransportOperation object
444
+ # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse]
445
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
446
+ #
447
+ # @return [::Google::Iam::V1::TestIamPermissionsResponse]
448
+ # A result object deserialized from the server's reply
449
+ def test_iam_permissions_repo request_pb, options = nil
450
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
451
+
452
+ verb, uri, query_string_params, body = ServiceStub.transcode_test_iam_permissions_repo_request request_pb
453
+ query_string_params = if query_string_params.any?
454
+ query_string_params.to_h { |p| p.split "=", 2 }
455
+ else
456
+ {}
457
+ end
458
+
459
+ response = @client_stub.make_http_request(
460
+ verb,
461
+ uri: uri,
462
+ body: body || "",
463
+ params: query_string_params,
464
+ options: options
465
+ )
466
+ operation = ::Gapic::Rest::TransportOperation.new response
467
+ result = ::Google::Iam::V1::TestIamPermissionsResponse.decode_json response.body, ignore_unknown_fields: true
468
+
469
+ yield result, operation if block_given?
470
+ result
471
+ end
472
+
473
+ ##
474
+ # @private
475
+ #
476
+ # GRPC transcoding helper method for the list_instances REST call
477
+ #
478
+ # @param request_pb [::Google::Cloud::SecureSourceManager::V1::ListInstancesRequest]
479
+ # A request object representing the call parameters. Required.
480
+ # @return [Array(String, [String, nil], Hash{String => String})]
481
+ # Uri, Body, Query string parameters
482
+ def self.transcode_list_instances_request request_pb
483
+ transcoder = Gapic::Rest::GrpcTranscoder.new
484
+ .with_bindings(
485
+ uri_method: :get,
486
+ uri_template: "/v1/{parent}/instances",
487
+ matches: [
488
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
489
+ ]
490
+ )
491
+ transcoder.transcode request_pb
492
+ end
493
+
494
+ ##
495
+ # @private
496
+ #
497
+ # GRPC transcoding helper method for the get_instance REST call
498
+ #
499
+ # @param request_pb [::Google::Cloud::SecureSourceManager::V1::GetInstanceRequest]
500
+ # A request object representing the call parameters. Required.
501
+ # @return [Array(String, [String, nil], Hash{String => String})]
502
+ # Uri, Body, Query string parameters
503
+ def self.transcode_get_instance_request request_pb
504
+ transcoder = Gapic::Rest::GrpcTranscoder.new
505
+ .with_bindings(
506
+ uri_method: :get,
507
+ uri_template: "/v1/{name}",
508
+ matches: [
509
+ ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false]
510
+ ]
511
+ )
512
+ transcoder.transcode request_pb
513
+ end
514
+
515
+ ##
516
+ # @private
517
+ #
518
+ # GRPC transcoding helper method for the create_instance REST call
519
+ #
520
+ # @param request_pb [::Google::Cloud::SecureSourceManager::V1::CreateInstanceRequest]
521
+ # A request object representing the call parameters. Required.
522
+ # @return [Array(String, [String, nil], Hash{String => String})]
523
+ # Uri, Body, Query string parameters
524
+ def self.transcode_create_instance_request request_pb
525
+ transcoder = Gapic::Rest::GrpcTranscoder.new
526
+ .with_bindings(
527
+ uri_method: :post,
528
+ uri_template: "/v1/{parent}/instances",
529
+ body: "instance",
530
+ matches: [
531
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
532
+ ]
533
+ )
534
+ transcoder.transcode request_pb
535
+ end
536
+
537
+ ##
538
+ # @private
539
+ #
540
+ # GRPC transcoding helper method for the delete_instance REST call
541
+ #
542
+ # @param request_pb [::Google::Cloud::SecureSourceManager::V1::DeleteInstanceRequest]
543
+ # A request object representing the call parameters. Required.
544
+ # @return [Array(String, [String, nil], Hash{String => String})]
545
+ # Uri, Body, Query string parameters
546
+ def self.transcode_delete_instance_request request_pb
547
+ transcoder = Gapic::Rest::GrpcTranscoder.new
548
+ .with_bindings(
549
+ uri_method: :delete,
550
+ uri_template: "/v1/{name}",
551
+ matches: [
552
+ ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false]
553
+ ]
554
+ )
555
+ transcoder.transcode request_pb
556
+ end
557
+
558
+ ##
559
+ # @private
560
+ #
561
+ # GRPC transcoding helper method for the list_repositories REST call
562
+ #
563
+ # @param request_pb [::Google::Cloud::SecureSourceManager::V1::ListRepositoriesRequest]
564
+ # A request object representing the call parameters. Required.
565
+ # @return [Array(String, [String, nil], Hash{String => String})]
566
+ # Uri, Body, Query string parameters
567
+ def self.transcode_list_repositories_request request_pb
568
+ transcoder = Gapic::Rest::GrpcTranscoder.new
569
+ .with_bindings(
570
+ uri_method: :get,
571
+ uri_template: "/v1/{parent}/repositories",
572
+ matches: [
573
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
574
+ ]
575
+ )
576
+ transcoder.transcode request_pb
577
+ end
578
+
579
+ ##
580
+ # @private
581
+ #
582
+ # GRPC transcoding helper method for the get_repository REST call
583
+ #
584
+ # @param request_pb [::Google::Cloud::SecureSourceManager::V1::GetRepositoryRequest]
585
+ # A request object representing the call parameters. Required.
586
+ # @return [Array(String, [String, nil], Hash{String => String})]
587
+ # Uri, Body, Query string parameters
588
+ def self.transcode_get_repository_request request_pb
589
+ transcoder = Gapic::Rest::GrpcTranscoder.new
590
+ .with_bindings(
591
+ uri_method: :get,
592
+ uri_template: "/v1/{name}",
593
+ matches: [
594
+ ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false]
595
+ ]
596
+ )
597
+ transcoder.transcode request_pb
598
+ end
599
+
600
+ ##
601
+ # @private
602
+ #
603
+ # GRPC transcoding helper method for the create_repository REST call
604
+ #
605
+ # @param request_pb [::Google::Cloud::SecureSourceManager::V1::CreateRepositoryRequest]
606
+ # A request object representing the call parameters. Required.
607
+ # @return [Array(String, [String, nil], Hash{String => String})]
608
+ # Uri, Body, Query string parameters
609
+ def self.transcode_create_repository_request request_pb
610
+ transcoder = Gapic::Rest::GrpcTranscoder.new
611
+ .with_bindings(
612
+ uri_method: :post,
613
+ uri_template: "/v1/{parent}/repositories",
614
+ body: "repository",
615
+ matches: [
616
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
617
+ ]
618
+ )
619
+ transcoder.transcode request_pb
620
+ end
621
+
622
+ ##
623
+ # @private
624
+ #
625
+ # GRPC transcoding helper method for the delete_repository REST call
626
+ #
627
+ # @param request_pb [::Google::Cloud::SecureSourceManager::V1::DeleteRepositoryRequest]
628
+ # A request object representing the call parameters. Required.
629
+ # @return [Array(String, [String, nil], Hash{String => String})]
630
+ # Uri, Body, Query string parameters
631
+ def self.transcode_delete_repository_request request_pb
632
+ transcoder = Gapic::Rest::GrpcTranscoder.new
633
+ .with_bindings(
634
+ uri_method: :delete,
635
+ uri_template: "/v1/{name}",
636
+ matches: [
637
+ ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false]
638
+ ]
639
+ )
640
+ transcoder.transcode request_pb
641
+ end
642
+
643
+ ##
644
+ # @private
645
+ #
646
+ # GRPC transcoding helper method for the get_iam_policy_repo REST call
647
+ #
648
+ # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest]
649
+ # A request object representing the call parameters. Required.
650
+ # @return [Array(String, [String, nil], Hash{String => String})]
651
+ # Uri, Body, Query string parameters
652
+ def self.transcode_get_iam_policy_repo_request request_pb
653
+ transcoder = Gapic::Rest::GrpcTranscoder.new
654
+ .with_bindings(
655
+ uri_method: :get,
656
+ uri_template: "/v1/{resource}:getIamPolicy",
657
+ matches: [
658
+ ["resource", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false]
659
+ ]
660
+ )
661
+ transcoder.transcode request_pb
662
+ end
663
+
664
+ ##
665
+ # @private
666
+ #
667
+ # GRPC transcoding helper method for the set_iam_policy_repo REST call
668
+ #
669
+ # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest]
670
+ # A request object representing the call parameters. Required.
671
+ # @return [Array(String, [String, nil], Hash{String => String})]
672
+ # Uri, Body, Query string parameters
673
+ def self.transcode_set_iam_policy_repo_request request_pb
674
+ transcoder = Gapic::Rest::GrpcTranscoder.new
675
+ .with_bindings(
676
+ uri_method: :post,
677
+ uri_template: "/v1/{resource}:setIamPolicy",
678
+ body: "*",
679
+ matches: [
680
+ ["resource", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false]
681
+ ]
682
+ )
683
+ transcoder.transcode request_pb
684
+ end
685
+
686
+ ##
687
+ # @private
688
+ #
689
+ # GRPC transcoding helper method for the test_iam_permissions_repo REST call
690
+ #
691
+ # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest]
692
+ # A request object representing the call parameters. Required.
693
+ # @return [Array(String, [String, nil], Hash{String => String})]
694
+ # Uri, Body, Query string parameters
695
+ def self.transcode_test_iam_permissions_repo_request request_pb
696
+ transcoder = Gapic::Rest::GrpcTranscoder.new
697
+ .with_bindings(
698
+ uri_method: :post,
699
+ uri_template: "/v1/{resource}:testIamPermissions",
700
+ body: "*",
701
+ matches: [
702
+ ["resource", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false]
703
+ ]
704
+ )
705
+ transcoder.transcode request_pb
706
+ end
707
+ end
708
+ end
709
+ end
710
+ end
711
+ end
712
+ end
713
+ end