google-cloud-access_approval-v1 0.7.0 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,717 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "google/cloud/accessapproval/v1/accessapproval_pb"
20
+
21
+ module Google
22
+ module Cloud
23
+ module AccessApproval
24
+ module V1
25
+ module AccessApproval
26
+ module Rest
27
+ ##
28
+ # REST service stub for the AccessApproval 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:, 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, credentials: credentials,
39
+ numeric_enums: true,
40
+ raise_faraday_errors: false
41
+ end
42
+
43
+ ##
44
+ # Baseline implementation for the list_approval_requests REST call
45
+ #
46
+ # @param request_pb [::Google::Cloud::AccessApproval::V1::ListApprovalRequestsMessage]
47
+ # A request object representing the call parameters. Required.
48
+ # @param options [::Gapic::CallOptions]
49
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
50
+ #
51
+ # @yield [result, operation] Access the result along with the TransportOperation object
52
+ # @yieldparam result [::Google::Cloud::AccessApproval::V1::ListApprovalRequestsResponse]
53
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
54
+ #
55
+ # @return [::Google::Cloud::AccessApproval::V1::ListApprovalRequestsResponse]
56
+ # A result object deserialized from the server's reply
57
+ def list_approval_requests request_pb, options = nil
58
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
59
+
60
+ verb, uri, query_string_params, body = ServiceStub.transcode_list_approval_requests_request request_pb
61
+ query_string_params = if query_string_params.any?
62
+ query_string_params.to_h { |p| p.split("=", 2) }
63
+ else
64
+ {}
65
+ end
66
+
67
+ response = @client_stub.make_http_request(
68
+ verb,
69
+ uri: uri,
70
+ body: body || "",
71
+ params: query_string_params,
72
+ options: options
73
+ )
74
+ operation = ::Gapic::Rest::TransportOperation.new response
75
+ result = ::Google::Cloud::AccessApproval::V1::ListApprovalRequestsResponse.decode_json response.body, ignore_unknown_fields: true
76
+
77
+ yield result, operation if block_given?
78
+ result
79
+ end
80
+
81
+ ##
82
+ # Baseline implementation for the get_approval_request REST call
83
+ #
84
+ # @param request_pb [::Google::Cloud::AccessApproval::V1::GetApprovalRequestMessage]
85
+ # A request object representing the call parameters. Required.
86
+ # @param options [::Gapic::CallOptions]
87
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
88
+ #
89
+ # @yield [result, operation] Access the result along with the TransportOperation object
90
+ # @yieldparam result [::Google::Cloud::AccessApproval::V1::ApprovalRequest]
91
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
92
+ #
93
+ # @return [::Google::Cloud::AccessApproval::V1::ApprovalRequest]
94
+ # A result object deserialized from the server's reply
95
+ def get_approval_request request_pb, options = nil
96
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
97
+
98
+ verb, uri, query_string_params, body = ServiceStub.transcode_get_approval_request_request request_pb
99
+ query_string_params = if query_string_params.any?
100
+ query_string_params.to_h { |p| p.split("=", 2) }
101
+ else
102
+ {}
103
+ end
104
+
105
+ response = @client_stub.make_http_request(
106
+ verb,
107
+ uri: uri,
108
+ body: body || "",
109
+ params: query_string_params,
110
+ options: options
111
+ )
112
+ operation = ::Gapic::Rest::TransportOperation.new response
113
+ result = ::Google::Cloud::AccessApproval::V1::ApprovalRequest.decode_json response.body, ignore_unknown_fields: true
114
+
115
+ yield result, operation if block_given?
116
+ result
117
+ end
118
+
119
+ ##
120
+ # Baseline implementation for the approve_approval_request REST call
121
+ #
122
+ # @param request_pb [::Google::Cloud::AccessApproval::V1::ApproveApprovalRequestMessage]
123
+ # A request object representing the call parameters. Required.
124
+ # @param options [::Gapic::CallOptions]
125
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
126
+ #
127
+ # @yield [result, operation] Access the result along with the TransportOperation object
128
+ # @yieldparam result [::Google::Cloud::AccessApproval::V1::ApprovalRequest]
129
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
130
+ #
131
+ # @return [::Google::Cloud::AccessApproval::V1::ApprovalRequest]
132
+ # A result object deserialized from the server's reply
133
+ def approve_approval_request request_pb, options = nil
134
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
135
+
136
+ verb, uri, query_string_params, body = ServiceStub.transcode_approve_approval_request_request request_pb
137
+ query_string_params = if query_string_params.any?
138
+ query_string_params.to_h { |p| p.split("=", 2) }
139
+ else
140
+ {}
141
+ end
142
+
143
+ response = @client_stub.make_http_request(
144
+ verb,
145
+ uri: uri,
146
+ body: body || "",
147
+ params: query_string_params,
148
+ options: options
149
+ )
150
+ operation = ::Gapic::Rest::TransportOperation.new response
151
+ result = ::Google::Cloud::AccessApproval::V1::ApprovalRequest.decode_json response.body, ignore_unknown_fields: true
152
+
153
+ yield result, operation if block_given?
154
+ result
155
+ end
156
+
157
+ ##
158
+ # Baseline implementation for the dismiss_approval_request REST call
159
+ #
160
+ # @param request_pb [::Google::Cloud::AccessApproval::V1::DismissApprovalRequestMessage]
161
+ # A request object representing the call parameters. Required.
162
+ # @param options [::Gapic::CallOptions]
163
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
164
+ #
165
+ # @yield [result, operation] Access the result along with the TransportOperation object
166
+ # @yieldparam result [::Google::Cloud::AccessApproval::V1::ApprovalRequest]
167
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
168
+ #
169
+ # @return [::Google::Cloud::AccessApproval::V1::ApprovalRequest]
170
+ # A result object deserialized from the server's reply
171
+ def dismiss_approval_request request_pb, options = nil
172
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
173
+
174
+ verb, uri, query_string_params, body = ServiceStub.transcode_dismiss_approval_request_request request_pb
175
+ query_string_params = if query_string_params.any?
176
+ query_string_params.to_h { |p| p.split("=", 2) }
177
+ else
178
+ {}
179
+ end
180
+
181
+ response = @client_stub.make_http_request(
182
+ verb,
183
+ uri: uri,
184
+ body: body || "",
185
+ params: query_string_params,
186
+ options: options
187
+ )
188
+ operation = ::Gapic::Rest::TransportOperation.new response
189
+ result = ::Google::Cloud::AccessApproval::V1::ApprovalRequest.decode_json response.body, ignore_unknown_fields: true
190
+
191
+ yield result, operation if block_given?
192
+ result
193
+ end
194
+
195
+ ##
196
+ # Baseline implementation for the invalidate_approval_request REST call
197
+ #
198
+ # @param request_pb [::Google::Cloud::AccessApproval::V1::InvalidateApprovalRequestMessage]
199
+ # A request object representing the call parameters. Required.
200
+ # @param options [::Gapic::CallOptions]
201
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
202
+ #
203
+ # @yield [result, operation] Access the result along with the TransportOperation object
204
+ # @yieldparam result [::Google::Cloud::AccessApproval::V1::ApprovalRequest]
205
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
206
+ #
207
+ # @return [::Google::Cloud::AccessApproval::V1::ApprovalRequest]
208
+ # A result object deserialized from the server's reply
209
+ def invalidate_approval_request request_pb, options = nil
210
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
211
+
212
+ verb, uri, query_string_params, body = ServiceStub.transcode_invalidate_approval_request_request request_pb
213
+ query_string_params = if query_string_params.any?
214
+ query_string_params.to_h { |p| p.split("=", 2) }
215
+ else
216
+ {}
217
+ end
218
+
219
+ response = @client_stub.make_http_request(
220
+ verb,
221
+ uri: uri,
222
+ body: body || "",
223
+ params: query_string_params,
224
+ options: options
225
+ )
226
+ operation = ::Gapic::Rest::TransportOperation.new response
227
+ result = ::Google::Cloud::AccessApproval::V1::ApprovalRequest.decode_json response.body, ignore_unknown_fields: true
228
+
229
+ yield result, operation if block_given?
230
+ result
231
+ end
232
+
233
+ ##
234
+ # Baseline implementation for the get_access_approval_settings REST call
235
+ #
236
+ # @param request_pb [::Google::Cloud::AccessApproval::V1::GetAccessApprovalSettingsMessage]
237
+ # A request object representing the call parameters. Required.
238
+ # @param options [::Gapic::CallOptions]
239
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
240
+ #
241
+ # @yield [result, operation] Access the result along with the TransportOperation object
242
+ # @yieldparam result [::Google::Cloud::AccessApproval::V1::AccessApprovalSettings]
243
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
244
+ #
245
+ # @return [::Google::Cloud::AccessApproval::V1::AccessApprovalSettings]
246
+ # A result object deserialized from the server's reply
247
+ def get_access_approval_settings request_pb, options = nil
248
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
249
+
250
+ verb, uri, query_string_params, body = ServiceStub.transcode_get_access_approval_settings_request request_pb
251
+ query_string_params = if query_string_params.any?
252
+ query_string_params.to_h { |p| p.split("=", 2) }
253
+ else
254
+ {}
255
+ end
256
+
257
+ response = @client_stub.make_http_request(
258
+ verb,
259
+ uri: uri,
260
+ body: body || "",
261
+ params: query_string_params,
262
+ options: options
263
+ )
264
+ operation = ::Gapic::Rest::TransportOperation.new response
265
+ result = ::Google::Cloud::AccessApproval::V1::AccessApprovalSettings.decode_json response.body, ignore_unknown_fields: true
266
+
267
+ yield result, operation if block_given?
268
+ result
269
+ end
270
+
271
+ ##
272
+ # Baseline implementation for the update_access_approval_settings REST call
273
+ #
274
+ # @param request_pb [::Google::Cloud::AccessApproval::V1::UpdateAccessApprovalSettingsMessage]
275
+ # A request object representing the call parameters. Required.
276
+ # @param options [::Gapic::CallOptions]
277
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
278
+ #
279
+ # @yield [result, operation] Access the result along with the TransportOperation object
280
+ # @yieldparam result [::Google::Cloud::AccessApproval::V1::AccessApprovalSettings]
281
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
282
+ #
283
+ # @return [::Google::Cloud::AccessApproval::V1::AccessApprovalSettings]
284
+ # A result object deserialized from the server's reply
285
+ def update_access_approval_settings request_pb, options = nil
286
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
287
+
288
+ verb, uri, query_string_params, body = ServiceStub.transcode_update_access_approval_settings_request request_pb
289
+ query_string_params = if query_string_params.any?
290
+ query_string_params.to_h { |p| p.split("=", 2) }
291
+ else
292
+ {}
293
+ end
294
+
295
+ response = @client_stub.make_http_request(
296
+ verb,
297
+ uri: uri,
298
+ body: body || "",
299
+ params: query_string_params,
300
+ options: options
301
+ )
302
+ operation = ::Gapic::Rest::TransportOperation.new response
303
+ result = ::Google::Cloud::AccessApproval::V1::AccessApprovalSettings.decode_json response.body, ignore_unknown_fields: true
304
+
305
+ yield result, operation if block_given?
306
+ result
307
+ end
308
+
309
+ ##
310
+ # Baseline implementation for the delete_access_approval_settings REST call
311
+ #
312
+ # @param request_pb [::Google::Cloud::AccessApproval::V1::DeleteAccessApprovalSettingsMessage]
313
+ # A request object representing the call parameters. Required.
314
+ # @param options [::Gapic::CallOptions]
315
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
316
+ #
317
+ # @yield [result, operation] Access the result along with the TransportOperation object
318
+ # @yieldparam result [::Google::Protobuf::Empty]
319
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
320
+ #
321
+ # @return [::Google::Protobuf::Empty]
322
+ # A result object deserialized from the server's reply
323
+ def delete_access_approval_settings request_pb, options = nil
324
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
325
+
326
+ verb, uri, query_string_params, body = ServiceStub.transcode_delete_access_approval_settings_request request_pb
327
+ query_string_params = if query_string_params.any?
328
+ query_string_params.to_h { |p| p.split("=", 2) }
329
+ else
330
+ {}
331
+ end
332
+
333
+ response = @client_stub.make_http_request(
334
+ verb,
335
+ uri: uri,
336
+ body: body || "",
337
+ params: query_string_params,
338
+ options: options
339
+ )
340
+ operation = ::Gapic::Rest::TransportOperation.new response
341
+ result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
342
+
343
+ yield result, operation if block_given?
344
+ result
345
+ end
346
+
347
+ ##
348
+ # Baseline implementation for the get_access_approval_service_account REST call
349
+ #
350
+ # @param request_pb [::Google::Cloud::AccessApproval::V1::GetAccessApprovalServiceAccountMessage]
351
+ # A request object representing the call parameters. Required.
352
+ # @param options [::Gapic::CallOptions]
353
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
354
+ #
355
+ # @yield [result, operation] Access the result along with the TransportOperation object
356
+ # @yieldparam result [::Google::Cloud::AccessApproval::V1::AccessApprovalServiceAccount]
357
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
358
+ #
359
+ # @return [::Google::Cloud::AccessApproval::V1::AccessApprovalServiceAccount]
360
+ # A result object deserialized from the server's reply
361
+ def get_access_approval_service_account request_pb, options = nil
362
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
363
+
364
+ verb, uri, query_string_params, body = ServiceStub.transcode_get_access_approval_service_account_request request_pb
365
+ query_string_params = if query_string_params.any?
366
+ query_string_params.to_h { |p| p.split("=", 2) }
367
+ else
368
+ {}
369
+ end
370
+
371
+ response = @client_stub.make_http_request(
372
+ verb,
373
+ uri: uri,
374
+ body: body || "",
375
+ params: query_string_params,
376
+ options: options
377
+ )
378
+ operation = ::Gapic::Rest::TransportOperation.new response
379
+ result = ::Google::Cloud::AccessApproval::V1::AccessApprovalServiceAccount.decode_json response.body, ignore_unknown_fields: true
380
+
381
+ yield result, operation if block_given?
382
+ result
383
+ end
384
+
385
+ ##
386
+ # @private
387
+ #
388
+ # GRPC transcoding helper method for the list_approval_requests REST call
389
+ #
390
+ # @param request_pb [::Google::Cloud::AccessApproval::V1::ListApprovalRequestsMessage]
391
+ # A request object representing the call parameters. Required.
392
+ # @return [Array(String, [String, nil], Hash{String => String})]
393
+ # Uri, Body, Query string parameters
394
+ def self.transcode_list_approval_requests_request request_pb
395
+ transcoder = Gapic::Rest::GrpcTranscoder.new
396
+ .with_bindings(
397
+ uri_method: :get,
398
+ uri_template: "/v1/{parent}/approvalRequests",
399
+ matches: [
400
+ ["parent", %r{^projects/[^/]+/?$}, false]
401
+ ]
402
+ )
403
+ .with_bindings(
404
+ uri_method: :get,
405
+ uri_template: "/v1/{parent}/approvalRequests",
406
+ matches: [
407
+ ["parent", %r{^folders/[^/]+/?$}, false]
408
+ ]
409
+ )
410
+ .with_bindings(
411
+ uri_method: :get,
412
+ uri_template: "/v1/{parent}/approvalRequests",
413
+ matches: [
414
+ ["parent", %r{^organizations/[^/]+/?$}, false]
415
+ ]
416
+ )
417
+ transcoder.transcode request_pb
418
+ end
419
+
420
+ ##
421
+ # @private
422
+ #
423
+ # GRPC transcoding helper method for the get_approval_request REST call
424
+ #
425
+ # @param request_pb [::Google::Cloud::AccessApproval::V1::GetApprovalRequestMessage]
426
+ # A request object representing the call parameters. Required.
427
+ # @return [Array(String, [String, nil], Hash{String => String})]
428
+ # Uri, Body, Query string parameters
429
+ def self.transcode_get_approval_request_request request_pb
430
+ transcoder = Gapic::Rest::GrpcTranscoder.new
431
+ .with_bindings(
432
+ uri_method: :get,
433
+ uri_template: "/v1/{name}",
434
+ matches: [
435
+ ["name", %r{^projects/[^/]+/approvalRequests/[^/]+/?$}, false]
436
+ ]
437
+ )
438
+ .with_bindings(
439
+ uri_method: :get,
440
+ uri_template: "/v1/{name}",
441
+ matches: [
442
+ ["name", %r{^folders/[^/]+/approvalRequests/[^/]+/?$}, false]
443
+ ]
444
+ )
445
+ .with_bindings(
446
+ uri_method: :get,
447
+ uri_template: "/v1/{name}",
448
+ matches: [
449
+ ["name", %r{^organizations/[^/]+/approvalRequests/[^/]+/?$}, false]
450
+ ]
451
+ )
452
+ transcoder.transcode request_pb
453
+ end
454
+
455
+ ##
456
+ # @private
457
+ #
458
+ # GRPC transcoding helper method for the approve_approval_request REST call
459
+ #
460
+ # @param request_pb [::Google::Cloud::AccessApproval::V1::ApproveApprovalRequestMessage]
461
+ # A request object representing the call parameters. Required.
462
+ # @return [Array(String, [String, nil], Hash{String => String})]
463
+ # Uri, Body, Query string parameters
464
+ def self.transcode_approve_approval_request_request request_pb
465
+ transcoder = Gapic::Rest::GrpcTranscoder.new
466
+ .with_bindings(
467
+ uri_method: :post,
468
+ uri_template: "/v1/{name}:approve",
469
+ body: "*",
470
+ matches: [
471
+ ["name", %r{^projects/[^/]+/approvalRequests/[^/]+/?$}, false]
472
+ ]
473
+ )
474
+ .with_bindings(
475
+ uri_method: :post,
476
+ uri_template: "/v1/{name}:approve",
477
+ body: "*",
478
+ matches: [
479
+ ["name", %r{^folders/[^/]+/approvalRequests/[^/]+/?$}, false]
480
+ ]
481
+ )
482
+ .with_bindings(
483
+ uri_method: :post,
484
+ uri_template: "/v1/{name}:approve",
485
+ body: "*",
486
+ matches: [
487
+ ["name", %r{^organizations/[^/]+/approvalRequests/[^/]+/?$}, false]
488
+ ]
489
+ )
490
+ transcoder.transcode request_pb
491
+ end
492
+
493
+ ##
494
+ # @private
495
+ #
496
+ # GRPC transcoding helper method for the dismiss_approval_request REST call
497
+ #
498
+ # @param request_pb [::Google::Cloud::AccessApproval::V1::DismissApprovalRequestMessage]
499
+ # A request object representing the call parameters. Required.
500
+ # @return [Array(String, [String, nil], Hash{String => String})]
501
+ # Uri, Body, Query string parameters
502
+ def self.transcode_dismiss_approval_request_request request_pb
503
+ transcoder = Gapic::Rest::GrpcTranscoder.new
504
+ .with_bindings(
505
+ uri_method: :post,
506
+ uri_template: "/v1/{name}:dismiss",
507
+ body: "*",
508
+ matches: [
509
+ ["name", %r{^projects/[^/]+/approvalRequests/[^/]+/?$}, false]
510
+ ]
511
+ )
512
+ .with_bindings(
513
+ uri_method: :post,
514
+ uri_template: "/v1/{name}:dismiss",
515
+ body: "*",
516
+ matches: [
517
+ ["name", %r{^folders/[^/]+/approvalRequests/[^/]+/?$}, false]
518
+ ]
519
+ )
520
+ .with_bindings(
521
+ uri_method: :post,
522
+ uri_template: "/v1/{name}:dismiss",
523
+ body: "*",
524
+ matches: [
525
+ ["name", %r{^organizations/[^/]+/approvalRequests/[^/]+/?$}, false]
526
+ ]
527
+ )
528
+ transcoder.transcode request_pb
529
+ end
530
+
531
+ ##
532
+ # @private
533
+ #
534
+ # GRPC transcoding helper method for the invalidate_approval_request REST call
535
+ #
536
+ # @param request_pb [::Google::Cloud::AccessApproval::V1::InvalidateApprovalRequestMessage]
537
+ # A request object representing the call parameters. Required.
538
+ # @return [Array(String, [String, nil], Hash{String => String})]
539
+ # Uri, Body, Query string parameters
540
+ def self.transcode_invalidate_approval_request_request request_pb
541
+ transcoder = Gapic::Rest::GrpcTranscoder.new
542
+ .with_bindings(
543
+ uri_method: :post,
544
+ uri_template: "/v1/{name}:invalidate",
545
+ body: "*",
546
+ matches: [
547
+ ["name", %r{^projects/[^/]+/approvalRequests/[^/]+/?$}, false]
548
+ ]
549
+ )
550
+ .with_bindings(
551
+ uri_method: :post,
552
+ uri_template: "/v1/{name}:invalidate",
553
+ body: "*",
554
+ matches: [
555
+ ["name", %r{^folders/[^/]+/approvalRequests/[^/]+/?$}, false]
556
+ ]
557
+ )
558
+ .with_bindings(
559
+ uri_method: :post,
560
+ uri_template: "/v1/{name}:invalidate",
561
+ body: "*",
562
+ matches: [
563
+ ["name", %r{^organizations/[^/]+/approvalRequests/[^/]+/?$}, false]
564
+ ]
565
+ )
566
+ transcoder.transcode request_pb
567
+ end
568
+
569
+ ##
570
+ # @private
571
+ #
572
+ # GRPC transcoding helper method for the get_access_approval_settings REST call
573
+ #
574
+ # @param request_pb [::Google::Cloud::AccessApproval::V1::GetAccessApprovalSettingsMessage]
575
+ # A request object representing the call parameters. Required.
576
+ # @return [Array(String, [String, nil], Hash{String => String})]
577
+ # Uri, Body, Query string parameters
578
+ def self.transcode_get_access_approval_settings_request request_pb
579
+ transcoder = Gapic::Rest::GrpcTranscoder.new
580
+ .with_bindings(
581
+ uri_method: :get,
582
+ uri_template: "/v1/{name}",
583
+ matches: [
584
+ ["name", %r{^projects/[^/]+/accessApprovalSettings/?$}, false]
585
+ ]
586
+ )
587
+ .with_bindings(
588
+ uri_method: :get,
589
+ uri_template: "/v1/{name}",
590
+ matches: [
591
+ ["name", %r{^folders/[^/]+/accessApprovalSettings/?$}, false]
592
+ ]
593
+ )
594
+ .with_bindings(
595
+ uri_method: :get,
596
+ uri_template: "/v1/{name}",
597
+ matches: [
598
+ ["name", %r{^organizations/[^/]+/accessApprovalSettings/?$}, false]
599
+ ]
600
+ )
601
+ transcoder.transcode request_pb
602
+ end
603
+
604
+ ##
605
+ # @private
606
+ #
607
+ # GRPC transcoding helper method for the update_access_approval_settings REST call
608
+ #
609
+ # @param request_pb [::Google::Cloud::AccessApproval::V1::UpdateAccessApprovalSettingsMessage]
610
+ # A request object representing the call parameters. Required.
611
+ # @return [Array(String, [String, nil], Hash{String => String})]
612
+ # Uri, Body, Query string parameters
613
+ def self.transcode_update_access_approval_settings_request request_pb
614
+ transcoder = Gapic::Rest::GrpcTranscoder.new
615
+ .with_bindings(
616
+ uri_method: :patch,
617
+ uri_template: "/v1/{settings.name}",
618
+ body: "settings",
619
+ matches: [
620
+ ["settings.name", %r{^projects/[^/]+/accessApprovalSettings/?$}, false]
621
+ ]
622
+ )
623
+ .with_bindings(
624
+ uri_method: :patch,
625
+ uri_template: "/v1/{settings.name}",
626
+ body: "settings",
627
+ matches: [
628
+ ["settings.name", %r{^folders/[^/]+/accessApprovalSettings/?$}, false]
629
+ ]
630
+ )
631
+ .with_bindings(
632
+ uri_method: :patch,
633
+ uri_template: "/v1/{settings.name}",
634
+ body: "settings",
635
+ matches: [
636
+ ["settings.name", %r{^organizations/[^/]+/accessApprovalSettings/?$}, false]
637
+ ]
638
+ )
639
+ transcoder.transcode request_pb
640
+ end
641
+
642
+ ##
643
+ # @private
644
+ #
645
+ # GRPC transcoding helper method for the delete_access_approval_settings REST call
646
+ #
647
+ # @param request_pb [::Google::Cloud::AccessApproval::V1::DeleteAccessApprovalSettingsMessage]
648
+ # A request object representing the call parameters. Required.
649
+ # @return [Array(String, [String, nil], Hash{String => String})]
650
+ # Uri, Body, Query string parameters
651
+ def self.transcode_delete_access_approval_settings_request request_pb
652
+ transcoder = Gapic::Rest::GrpcTranscoder.new
653
+ .with_bindings(
654
+ uri_method: :delete,
655
+ uri_template: "/v1/{name}",
656
+ matches: [
657
+ ["name", %r{^projects/[^/]+/accessApprovalSettings/?$}, false]
658
+ ]
659
+ )
660
+ .with_bindings(
661
+ uri_method: :delete,
662
+ uri_template: "/v1/{name}",
663
+ matches: [
664
+ ["name", %r{^folders/[^/]+/accessApprovalSettings/?$}, false]
665
+ ]
666
+ )
667
+ .with_bindings(
668
+ uri_method: :delete,
669
+ uri_template: "/v1/{name}",
670
+ matches: [
671
+ ["name", %r{^organizations/[^/]+/accessApprovalSettings/?$}, false]
672
+ ]
673
+ )
674
+ transcoder.transcode request_pb
675
+ end
676
+
677
+ ##
678
+ # @private
679
+ #
680
+ # GRPC transcoding helper method for the get_access_approval_service_account REST call
681
+ #
682
+ # @param request_pb [::Google::Cloud::AccessApproval::V1::GetAccessApprovalServiceAccountMessage]
683
+ # A request object representing the call parameters. Required.
684
+ # @return [Array(String, [String, nil], Hash{String => String})]
685
+ # Uri, Body, Query string parameters
686
+ def self.transcode_get_access_approval_service_account_request request_pb
687
+ transcoder = Gapic::Rest::GrpcTranscoder.new
688
+ .with_bindings(
689
+ uri_method: :get,
690
+ uri_template: "/v1/{name}",
691
+ matches: [
692
+ ["name", %r{^projects/[^/]+/serviceAccount/?$}, false]
693
+ ]
694
+ )
695
+ .with_bindings(
696
+ uri_method: :get,
697
+ uri_template: "/v1/{name}",
698
+ matches: [
699
+ ["name", %r{^folders/[^/]+/serviceAccount/?$}, false]
700
+ ]
701
+ )
702
+ .with_bindings(
703
+ uri_method: :get,
704
+ uri_template: "/v1/{name}",
705
+ matches: [
706
+ ["name", %r{^organizations/[^/]+/serviceAccount/?$}, false]
707
+ ]
708
+ )
709
+ transcoder.transcode request_pb
710
+ end
711
+ end
712
+ end
713
+ end
714
+ end
715
+ end
716
+ end
717
+ end