google-cloud-secure_source_manager-v1 1.0.1 → 1.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.
- checksums.yaml +4 -4
- data/README.md +30 -20
- data/lib/google/cloud/secure_source_manager/v1/secure_source_manager/client.rb +551 -13
- data/lib/google/cloud/secure_source_manager/v1/secure_source_manager/operations.rb +12 -15
- data/lib/google/cloud/secure_source_manager/v1/secure_source_manager/paths.rb +21 -0
- data/lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/client.rb +515 -13
- data/lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/operations.rb +43 -38
- data/lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/service_stub.rb +408 -67
- data/lib/google/cloud/secure_source_manager/v1/version.rb +1 -1
- data/lib/google/cloud/securesourcemanager/v1/secure_source_manager_pb.rb +11 -1
- data/lib/google/cloud/securesourcemanager/v1/secure_source_manager_services_pb.rb +10 -0
- data/proto_docs/google/api/client.rb +39 -0
- data/proto_docs/google/cloud/securesourcemanager/v1/secure_source_manager.rb +180 -2
- data/proto_docs/google/longrunning/operations.rb +19 -14
- metadata +5 -5
@@ -30,7 +30,8 @@ module Google
|
|
30
30
|
# including transcoding, making the REST call, and deserialing the response.
|
31
31
|
#
|
32
32
|
class ServiceStub
|
33
|
-
|
33
|
+
# @private
|
34
|
+
def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger:
|
34
35
|
# These require statements are intentionally placed here to initialize
|
35
36
|
# the REST modules only when it's required.
|
36
37
|
require "gapic/rest"
|
@@ -40,7 +41,9 @@ module Google
|
|
40
41
|
universe_domain: universe_domain,
|
41
42
|
credentials: credentials,
|
42
43
|
numeric_enums: true,
|
43
|
-
|
44
|
+
service_name: self.class,
|
45
|
+
raise_faraday_errors: false,
|
46
|
+
logger: logger
|
44
47
|
end
|
45
48
|
|
46
49
|
##
|
@@ -61,6 +64,15 @@ module Google
|
|
61
64
|
@client_stub.endpoint
|
62
65
|
end
|
63
66
|
|
67
|
+
##
|
68
|
+
# The logger used for request/response debug logging.
|
69
|
+
#
|
70
|
+
# @return [Logger]
|
71
|
+
#
|
72
|
+
def logger stub: false
|
73
|
+
stub ? @client_stub.stub_logger : @client_stub.logger
|
74
|
+
end
|
75
|
+
|
64
76
|
##
|
65
77
|
# Baseline implementation for the list_instances REST call
|
66
78
|
#
|
@@ -87,16 +99,18 @@ module Google
|
|
87
99
|
|
88
100
|
response = @client_stub.make_http_request(
|
89
101
|
verb,
|
90
|
-
uri:
|
91
|
-
body:
|
92
|
-
params:
|
102
|
+
uri: uri,
|
103
|
+
body: body || "",
|
104
|
+
params: query_string_params,
|
105
|
+
method_name: "list_instances",
|
93
106
|
options: options
|
94
107
|
)
|
95
108
|
operation = ::Gapic::Rest::TransportOperation.new response
|
96
109
|
result = ::Google::Cloud::SecureSourceManager::V1::ListInstancesResponse.decode_json response.body, ignore_unknown_fields: true
|
97
|
-
|
98
|
-
|
99
|
-
|
110
|
+
catch :response do
|
111
|
+
yield result, operation if block_given?
|
112
|
+
result
|
113
|
+
end
|
100
114
|
end
|
101
115
|
|
102
116
|
##
|
@@ -125,16 +139,18 @@ module Google
|
|
125
139
|
|
126
140
|
response = @client_stub.make_http_request(
|
127
141
|
verb,
|
128
|
-
uri:
|
129
|
-
body:
|
130
|
-
params:
|
142
|
+
uri: uri,
|
143
|
+
body: body || "",
|
144
|
+
params: query_string_params,
|
145
|
+
method_name: "get_instance",
|
131
146
|
options: options
|
132
147
|
)
|
133
148
|
operation = ::Gapic::Rest::TransportOperation.new response
|
134
149
|
result = ::Google::Cloud::SecureSourceManager::V1::Instance.decode_json response.body, ignore_unknown_fields: true
|
135
|
-
|
136
|
-
|
137
|
-
|
150
|
+
catch :response do
|
151
|
+
yield result, operation if block_given?
|
152
|
+
result
|
153
|
+
end
|
138
154
|
end
|
139
155
|
|
140
156
|
##
|
@@ -163,16 +179,18 @@ module Google
|
|
163
179
|
|
164
180
|
response = @client_stub.make_http_request(
|
165
181
|
verb,
|
166
|
-
uri:
|
167
|
-
body:
|
168
|
-
params:
|
182
|
+
uri: uri,
|
183
|
+
body: body || "",
|
184
|
+
params: query_string_params,
|
185
|
+
method_name: "create_instance",
|
169
186
|
options: options
|
170
187
|
)
|
171
188
|
operation = ::Gapic::Rest::TransportOperation.new response
|
172
189
|
result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
|
173
|
-
|
174
|
-
|
175
|
-
|
190
|
+
catch :response do
|
191
|
+
yield result, operation if block_given?
|
192
|
+
result
|
193
|
+
end
|
176
194
|
end
|
177
195
|
|
178
196
|
##
|
@@ -201,16 +219,18 @@ module Google
|
|
201
219
|
|
202
220
|
response = @client_stub.make_http_request(
|
203
221
|
verb,
|
204
|
-
uri:
|
205
|
-
body:
|
206
|
-
params:
|
222
|
+
uri: uri,
|
223
|
+
body: body || "",
|
224
|
+
params: query_string_params,
|
225
|
+
method_name: "delete_instance",
|
207
226
|
options: options
|
208
227
|
)
|
209
228
|
operation = ::Gapic::Rest::TransportOperation.new response
|
210
229
|
result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
|
211
|
-
|
212
|
-
|
213
|
-
|
230
|
+
catch :response do
|
231
|
+
yield result, operation if block_given?
|
232
|
+
result
|
233
|
+
end
|
214
234
|
end
|
215
235
|
|
216
236
|
##
|
@@ -239,16 +259,18 @@ module Google
|
|
239
259
|
|
240
260
|
response = @client_stub.make_http_request(
|
241
261
|
verb,
|
242
|
-
uri:
|
243
|
-
body:
|
244
|
-
params:
|
262
|
+
uri: uri,
|
263
|
+
body: body || "",
|
264
|
+
params: query_string_params,
|
265
|
+
method_name: "list_repositories",
|
245
266
|
options: options
|
246
267
|
)
|
247
268
|
operation = ::Gapic::Rest::TransportOperation.new response
|
248
269
|
result = ::Google::Cloud::SecureSourceManager::V1::ListRepositoriesResponse.decode_json response.body, ignore_unknown_fields: true
|
249
|
-
|
250
|
-
|
251
|
-
|
270
|
+
catch :response do
|
271
|
+
yield result, operation if block_given?
|
272
|
+
result
|
273
|
+
end
|
252
274
|
end
|
253
275
|
|
254
276
|
##
|
@@ -277,16 +299,18 @@ module Google
|
|
277
299
|
|
278
300
|
response = @client_stub.make_http_request(
|
279
301
|
verb,
|
280
|
-
uri:
|
281
|
-
body:
|
282
|
-
params:
|
302
|
+
uri: uri,
|
303
|
+
body: body || "",
|
304
|
+
params: query_string_params,
|
305
|
+
method_name: "get_repository",
|
283
306
|
options: options
|
284
307
|
)
|
285
308
|
operation = ::Gapic::Rest::TransportOperation.new response
|
286
309
|
result = ::Google::Cloud::SecureSourceManager::V1::Repository.decode_json response.body, ignore_unknown_fields: true
|
287
|
-
|
288
|
-
|
289
|
-
|
310
|
+
catch :response do
|
311
|
+
yield result, operation if block_given?
|
312
|
+
result
|
313
|
+
end
|
290
314
|
end
|
291
315
|
|
292
316
|
##
|
@@ -315,16 +339,18 @@ module Google
|
|
315
339
|
|
316
340
|
response = @client_stub.make_http_request(
|
317
341
|
verb,
|
318
|
-
uri:
|
319
|
-
body:
|
320
|
-
params:
|
342
|
+
uri: uri,
|
343
|
+
body: body || "",
|
344
|
+
params: query_string_params,
|
345
|
+
method_name: "create_repository",
|
321
346
|
options: options
|
322
347
|
)
|
323
348
|
operation = ::Gapic::Rest::TransportOperation.new response
|
324
349
|
result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
|
325
|
-
|
326
|
-
|
327
|
-
|
350
|
+
catch :response do
|
351
|
+
yield result, operation if block_given?
|
352
|
+
result
|
353
|
+
end
|
328
354
|
end
|
329
355
|
|
330
356
|
##
|
@@ -353,16 +379,18 @@ module Google
|
|
353
379
|
|
354
380
|
response = @client_stub.make_http_request(
|
355
381
|
verb,
|
356
|
-
uri:
|
357
|
-
body:
|
358
|
-
params:
|
382
|
+
uri: uri,
|
383
|
+
body: body || "",
|
384
|
+
params: query_string_params,
|
385
|
+
method_name: "delete_repository",
|
359
386
|
options: options
|
360
387
|
)
|
361
388
|
operation = ::Gapic::Rest::TransportOperation.new response
|
362
389
|
result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
|
363
|
-
|
364
|
-
|
365
|
-
|
390
|
+
catch :response do
|
391
|
+
yield result, operation if block_given?
|
392
|
+
result
|
393
|
+
end
|
366
394
|
end
|
367
395
|
|
368
396
|
##
|
@@ -391,16 +419,18 @@ module Google
|
|
391
419
|
|
392
420
|
response = @client_stub.make_http_request(
|
393
421
|
verb,
|
394
|
-
uri:
|
395
|
-
body:
|
396
|
-
params:
|
422
|
+
uri: uri,
|
423
|
+
body: body || "",
|
424
|
+
params: query_string_params,
|
425
|
+
method_name: "get_iam_policy_repo",
|
397
426
|
options: options
|
398
427
|
)
|
399
428
|
operation = ::Gapic::Rest::TransportOperation.new response
|
400
429
|
result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true
|
401
|
-
|
402
|
-
|
403
|
-
|
430
|
+
catch :response do
|
431
|
+
yield result, operation if block_given?
|
432
|
+
result
|
433
|
+
end
|
404
434
|
end
|
405
435
|
|
406
436
|
##
|
@@ -429,16 +459,18 @@ module Google
|
|
429
459
|
|
430
460
|
response = @client_stub.make_http_request(
|
431
461
|
verb,
|
432
|
-
uri:
|
433
|
-
body:
|
434
|
-
params:
|
462
|
+
uri: uri,
|
463
|
+
body: body || "",
|
464
|
+
params: query_string_params,
|
465
|
+
method_name: "set_iam_policy_repo",
|
435
466
|
options: options
|
436
467
|
)
|
437
468
|
operation = ::Gapic::Rest::TransportOperation.new response
|
438
469
|
result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true
|
439
|
-
|
440
|
-
|
441
|
-
|
470
|
+
catch :response do
|
471
|
+
yield result, operation if block_given?
|
472
|
+
result
|
473
|
+
end
|
442
474
|
end
|
443
475
|
|
444
476
|
##
|
@@ -467,16 +499,218 @@ module Google
|
|
467
499
|
|
468
500
|
response = @client_stub.make_http_request(
|
469
501
|
verb,
|
470
|
-
uri:
|
471
|
-
body:
|
472
|
-
params:
|
502
|
+
uri: uri,
|
503
|
+
body: body || "",
|
504
|
+
params: query_string_params,
|
505
|
+
method_name: "test_iam_permissions_repo",
|
473
506
|
options: options
|
474
507
|
)
|
475
508
|
operation = ::Gapic::Rest::TransportOperation.new response
|
476
509
|
result = ::Google::Iam::V1::TestIamPermissionsResponse.decode_json response.body, ignore_unknown_fields: true
|
510
|
+
catch :response do
|
511
|
+
yield result, operation if block_given?
|
512
|
+
result
|
513
|
+
end
|
514
|
+
end
|
515
|
+
|
516
|
+
##
|
517
|
+
# Baseline implementation for the create_branch_rule REST call
|
518
|
+
#
|
519
|
+
# @param request_pb [::Google::Cloud::SecureSourceManager::V1::CreateBranchRuleRequest]
|
520
|
+
# A request object representing the call parameters. Required.
|
521
|
+
# @param options [::Gapic::CallOptions]
|
522
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
523
|
+
#
|
524
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
525
|
+
# @yieldparam result [::Google::Longrunning::Operation]
|
526
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
527
|
+
#
|
528
|
+
# @return [::Google::Longrunning::Operation]
|
529
|
+
# A result object deserialized from the server's reply
|
530
|
+
def create_branch_rule request_pb, options = nil
|
531
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
532
|
+
|
533
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_create_branch_rule_request request_pb
|
534
|
+
query_string_params = if query_string_params.any?
|
535
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
536
|
+
else
|
537
|
+
{}
|
538
|
+
end
|
539
|
+
|
540
|
+
response = @client_stub.make_http_request(
|
541
|
+
verb,
|
542
|
+
uri: uri,
|
543
|
+
body: body || "",
|
544
|
+
params: query_string_params,
|
545
|
+
method_name: "create_branch_rule",
|
546
|
+
options: options
|
547
|
+
)
|
548
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
549
|
+
result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
|
550
|
+
catch :response do
|
551
|
+
yield result, operation if block_given?
|
552
|
+
result
|
553
|
+
end
|
554
|
+
end
|
555
|
+
|
556
|
+
##
|
557
|
+
# Baseline implementation for the list_branch_rules REST call
|
558
|
+
#
|
559
|
+
# @param request_pb [::Google::Cloud::SecureSourceManager::V1::ListBranchRulesRequest]
|
560
|
+
# A request object representing the call parameters. Required.
|
561
|
+
# @param options [::Gapic::CallOptions]
|
562
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
563
|
+
#
|
564
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
565
|
+
# @yieldparam result [::Google::Cloud::SecureSourceManager::V1::ListBranchRulesResponse]
|
566
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
567
|
+
#
|
568
|
+
# @return [::Google::Cloud::SecureSourceManager::V1::ListBranchRulesResponse]
|
569
|
+
# A result object deserialized from the server's reply
|
570
|
+
def list_branch_rules request_pb, options = nil
|
571
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
572
|
+
|
573
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_list_branch_rules_request request_pb
|
574
|
+
query_string_params = if query_string_params.any?
|
575
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
576
|
+
else
|
577
|
+
{}
|
578
|
+
end
|
579
|
+
|
580
|
+
response = @client_stub.make_http_request(
|
581
|
+
verb,
|
582
|
+
uri: uri,
|
583
|
+
body: body || "",
|
584
|
+
params: query_string_params,
|
585
|
+
method_name: "list_branch_rules",
|
586
|
+
options: options
|
587
|
+
)
|
588
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
589
|
+
result = ::Google::Cloud::SecureSourceManager::V1::ListBranchRulesResponse.decode_json response.body, ignore_unknown_fields: true
|
590
|
+
catch :response do
|
591
|
+
yield result, operation if block_given?
|
592
|
+
result
|
593
|
+
end
|
594
|
+
end
|
595
|
+
|
596
|
+
##
|
597
|
+
# Baseline implementation for the get_branch_rule REST call
|
598
|
+
#
|
599
|
+
# @param request_pb [::Google::Cloud::SecureSourceManager::V1::GetBranchRuleRequest]
|
600
|
+
# A request object representing the call parameters. Required.
|
601
|
+
# @param options [::Gapic::CallOptions]
|
602
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
603
|
+
#
|
604
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
605
|
+
# @yieldparam result [::Google::Cloud::SecureSourceManager::V1::BranchRule]
|
606
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
607
|
+
#
|
608
|
+
# @return [::Google::Cloud::SecureSourceManager::V1::BranchRule]
|
609
|
+
# A result object deserialized from the server's reply
|
610
|
+
def get_branch_rule request_pb, options = nil
|
611
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
612
|
+
|
613
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_get_branch_rule_request request_pb
|
614
|
+
query_string_params = if query_string_params.any?
|
615
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
616
|
+
else
|
617
|
+
{}
|
618
|
+
end
|
619
|
+
|
620
|
+
response = @client_stub.make_http_request(
|
621
|
+
verb,
|
622
|
+
uri: uri,
|
623
|
+
body: body || "",
|
624
|
+
params: query_string_params,
|
625
|
+
method_name: "get_branch_rule",
|
626
|
+
options: options
|
627
|
+
)
|
628
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
629
|
+
result = ::Google::Cloud::SecureSourceManager::V1::BranchRule.decode_json response.body, ignore_unknown_fields: true
|
630
|
+
catch :response do
|
631
|
+
yield result, operation if block_given?
|
632
|
+
result
|
633
|
+
end
|
634
|
+
end
|
635
|
+
|
636
|
+
##
|
637
|
+
# Baseline implementation for the update_branch_rule REST call
|
638
|
+
#
|
639
|
+
# @param request_pb [::Google::Cloud::SecureSourceManager::V1::UpdateBranchRuleRequest]
|
640
|
+
# A request object representing the call parameters. Required.
|
641
|
+
# @param options [::Gapic::CallOptions]
|
642
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
643
|
+
#
|
644
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
645
|
+
# @yieldparam result [::Google::Longrunning::Operation]
|
646
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
647
|
+
#
|
648
|
+
# @return [::Google::Longrunning::Operation]
|
649
|
+
# A result object deserialized from the server's reply
|
650
|
+
def update_branch_rule request_pb, options = nil
|
651
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
652
|
+
|
653
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_update_branch_rule_request request_pb
|
654
|
+
query_string_params = if query_string_params.any?
|
655
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
656
|
+
else
|
657
|
+
{}
|
658
|
+
end
|
477
659
|
|
478
|
-
|
479
|
-
|
660
|
+
response = @client_stub.make_http_request(
|
661
|
+
verb,
|
662
|
+
uri: uri,
|
663
|
+
body: body || "",
|
664
|
+
params: query_string_params,
|
665
|
+
method_name: "update_branch_rule",
|
666
|
+
options: options
|
667
|
+
)
|
668
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
669
|
+
result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
|
670
|
+
catch :response do
|
671
|
+
yield result, operation if block_given?
|
672
|
+
result
|
673
|
+
end
|
674
|
+
end
|
675
|
+
|
676
|
+
##
|
677
|
+
# Baseline implementation for the delete_branch_rule REST call
|
678
|
+
#
|
679
|
+
# @param request_pb [::Google::Cloud::SecureSourceManager::V1::DeleteBranchRuleRequest]
|
680
|
+
# A request object representing the call parameters. Required.
|
681
|
+
# @param options [::Gapic::CallOptions]
|
682
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
683
|
+
#
|
684
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
685
|
+
# @yieldparam result [::Google::Longrunning::Operation]
|
686
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
687
|
+
#
|
688
|
+
# @return [::Google::Longrunning::Operation]
|
689
|
+
# A result object deserialized from the server's reply
|
690
|
+
def delete_branch_rule request_pb, options = nil
|
691
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
692
|
+
|
693
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_delete_branch_rule_request request_pb
|
694
|
+
query_string_params = if query_string_params.any?
|
695
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
696
|
+
else
|
697
|
+
{}
|
698
|
+
end
|
699
|
+
|
700
|
+
response = @client_stub.make_http_request(
|
701
|
+
verb,
|
702
|
+
uri: uri,
|
703
|
+
body: body || "",
|
704
|
+
params: query_string_params,
|
705
|
+
method_name: "delete_branch_rule",
|
706
|
+
options: options
|
707
|
+
)
|
708
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
709
|
+
result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
|
710
|
+
catch :response do
|
711
|
+
yield result, operation if block_given?
|
712
|
+
result
|
713
|
+
end
|
480
714
|
end
|
481
715
|
|
482
716
|
##
|
@@ -713,6 +947,113 @@ module Google
|
|
713
947
|
)
|
714
948
|
transcoder.transcode request_pb
|
715
949
|
end
|
950
|
+
|
951
|
+
##
|
952
|
+
# @private
|
953
|
+
#
|
954
|
+
# GRPC transcoding helper method for the create_branch_rule REST call
|
955
|
+
#
|
956
|
+
# @param request_pb [::Google::Cloud::SecureSourceManager::V1::CreateBranchRuleRequest]
|
957
|
+
# A request object representing the call parameters. Required.
|
958
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
959
|
+
# Uri, Body, Query string parameters
|
960
|
+
def self.transcode_create_branch_rule_request request_pb
|
961
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
962
|
+
.with_bindings(
|
963
|
+
uri_method: :post,
|
964
|
+
uri_template: "/v1/{parent}/branchRules",
|
965
|
+
body: "branch_rule",
|
966
|
+
matches: [
|
967
|
+
["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false]
|
968
|
+
]
|
969
|
+
)
|
970
|
+
transcoder.transcode request_pb
|
971
|
+
end
|
972
|
+
|
973
|
+
##
|
974
|
+
# @private
|
975
|
+
#
|
976
|
+
# GRPC transcoding helper method for the list_branch_rules REST call
|
977
|
+
#
|
978
|
+
# @param request_pb [::Google::Cloud::SecureSourceManager::V1::ListBranchRulesRequest]
|
979
|
+
# A request object representing the call parameters. Required.
|
980
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
981
|
+
# Uri, Body, Query string parameters
|
982
|
+
def self.transcode_list_branch_rules_request request_pb
|
983
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
984
|
+
.with_bindings(
|
985
|
+
uri_method: :get,
|
986
|
+
uri_template: "/v1/{parent}/branchRules",
|
987
|
+
matches: [
|
988
|
+
["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false]
|
989
|
+
]
|
990
|
+
)
|
991
|
+
transcoder.transcode request_pb
|
992
|
+
end
|
993
|
+
|
994
|
+
##
|
995
|
+
# @private
|
996
|
+
#
|
997
|
+
# GRPC transcoding helper method for the get_branch_rule REST call
|
998
|
+
#
|
999
|
+
# @param request_pb [::Google::Cloud::SecureSourceManager::V1::GetBranchRuleRequest]
|
1000
|
+
# A request object representing the call parameters. Required.
|
1001
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
1002
|
+
# Uri, Body, Query string parameters
|
1003
|
+
def self.transcode_get_branch_rule_request request_pb
|
1004
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
1005
|
+
.with_bindings(
|
1006
|
+
uri_method: :get,
|
1007
|
+
uri_template: "/v1/{name}",
|
1008
|
+
matches: [
|
1009
|
+
["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/branchRules/[^/]+/?$}, false]
|
1010
|
+
]
|
1011
|
+
)
|
1012
|
+
transcoder.transcode request_pb
|
1013
|
+
end
|
1014
|
+
|
1015
|
+
##
|
1016
|
+
# @private
|
1017
|
+
#
|
1018
|
+
# GRPC transcoding helper method for the update_branch_rule REST call
|
1019
|
+
#
|
1020
|
+
# @param request_pb [::Google::Cloud::SecureSourceManager::V1::UpdateBranchRuleRequest]
|
1021
|
+
# A request object representing the call parameters. Required.
|
1022
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
1023
|
+
# Uri, Body, Query string parameters
|
1024
|
+
def self.transcode_update_branch_rule_request request_pb
|
1025
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
1026
|
+
.with_bindings(
|
1027
|
+
uri_method: :patch,
|
1028
|
+
uri_template: "/v1/{branch_rule.name}",
|
1029
|
+
body: "branch_rule",
|
1030
|
+
matches: [
|
1031
|
+
["branch_rule.name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/branchRules/[^/]+/?$}, false]
|
1032
|
+
]
|
1033
|
+
)
|
1034
|
+
transcoder.transcode request_pb
|
1035
|
+
end
|
1036
|
+
|
1037
|
+
##
|
1038
|
+
# @private
|
1039
|
+
#
|
1040
|
+
# GRPC transcoding helper method for the delete_branch_rule REST call
|
1041
|
+
#
|
1042
|
+
# @param request_pb [::Google::Cloud::SecureSourceManager::V1::DeleteBranchRuleRequest]
|
1043
|
+
# A request object representing the call parameters. Required.
|
1044
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
1045
|
+
# Uri, Body, Query string parameters
|
1046
|
+
def self.transcode_delete_branch_rule_request request_pb
|
1047
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
1048
|
+
.with_bindings(
|
1049
|
+
uri_method: :delete,
|
1050
|
+
uri_template: "/v1/{name}",
|
1051
|
+
matches: [
|
1052
|
+
["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/branchRules/[^/]+/?$}, false]
|
1053
|
+
]
|
1054
|
+
)
|
1055
|
+
transcoder.transcode request_pb
|
1056
|
+
end
|
716
1057
|
end
|
717
1058
|
end
|
718
1059
|
end
|