google-cloud-config_service-v1 0.a → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) 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/config/v1/config_pb.rb +100 -0
  6. data/lib/google/cloud/config/v1/config_services_pb.rb +79 -0
  7. data/lib/google/cloud/config_service/v1/bindings_override.rb +135 -0
  8. data/lib/google/cloud/config_service/v1/config/client.rb +2090 -0
  9. data/lib/google/cloud/config_service/v1/config/credentials.rb +47 -0
  10. data/lib/google/cloud/config_service/v1/config/operations.rb +801 -0
  11. data/lib/google/cloud/config_service/v1/config/paths.rb +149 -0
  12. data/lib/google/cloud/config_service/v1/config/rest/client.rb +1958 -0
  13. data/lib/google/cloud/config_service/v1/config/rest/operations.rb +895 -0
  14. data/lib/google/cloud/config_service/v1/config/rest/service_stub.rb +1012 -0
  15. data/lib/google/cloud/config_service/v1/config/rest.rb +55 -0
  16. data/lib/google/cloud/config_service/v1/config.rb +57 -0
  17. data/lib/google/cloud/config_service/v1/rest.rb +38 -0
  18. data/lib/google/cloud/config_service/v1/version.rb +7 -2
  19. data/lib/google/cloud/config_service/v1.rb +45 -0
  20. data/lib/google-cloud-config_service-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/config/v1/config.rb +1082 -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/struct.rb +96 -0
  33. data/proto_docs/google/protobuf/timestamp.rb +127 -0
  34. data/proto_docs/google/rpc/status.rb +48 -0
  35. data/proto_docs/google/type/expr.rb +75 -0
  36. metadata +230 -13
@@ -0,0 +1,1012 @@
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/config/v1/config_pb"
20
+
21
+ module Google
22
+ module Cloud
23
+ module ConfigService
24
+ module V1
25
+ module Config
26
+ module Rest
27
+ ##
28
+ # REST service stub for the Config 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_deployments REST call
57
+ #
58
+ # @param request_pb [::Google::Cloud::ConfigService::V1::ListDeploymentsRequest]
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::ConfigService::V1::ListDeploymentsResponse]
65
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
66
+ #
67
+ # @return [::Google::Cloud::ConfigService::V1::ListDeploymentsResponse]
68
+ # A result object deserialized from the server's reply
69
+ def list_deployments 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_deployments_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::ConfigService::V1::ListDeploymentsResponse.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_deployment REST call
95
+ #
96
+ # @param request_pb [::Google::Cloud::ConfigService::V1::GetDeploymentRequest]
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::ConfigService::V1::Deployment]
103
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
104
+ #
105
+ # @return [::Google::Cloud::ConfigService::V1::Deployment]
106
+ # A result object deserialized from the server's reply
107
+ def get_deployment 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_deployment_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::ConfigService::V1::Deployment.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_deployment REST call
133
+ #
134
+ # @param request_pb [::Google::Cloud::ConfigService::V1::CreateDeploymentRequest]
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_deployment 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_deployment_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 update_deployment REST call
171
+ #
172
+ # @param request_pb [::Google::Cloud::ConfigService::V1::UpdateDeploymentRequest]
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 update_deployment 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_update_deployment_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 delete_deployment REST call
209
+ #
210
+ # @param request_pb [::Google::Cloud::ConfigService::V1::DeleteDeploymentRequest]
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::Longrunning::Operation]
217
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
218
+ #
219
+ # @return [::Google::Longrunning::Operation]
220
+ # A result object deserialized from the server's reply
221
+ def delete_deployment 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_delete_deployment_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::Longrunning::Operation.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 list_revisions REST call
247
+ #
248
+ # @param request_pb [::Google::Cloud::ConfigService::V1::ListRevisionsRequest]
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::ConfigService::V1::ListRevisionsResponse]
255
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
256
+ #
257
+ # @return [::Google::Cloud::ConfigService::V1::ListRevisionsResponse]
258
+ # A result object deserialized from the server's reply
259
+ def list_revisions 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_list_revisions_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::ConfigService::V1::ListRevisionsResponse.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 get_revision REST call
285
+ #
286
+ # @param request_pb [::Google::Cloud::ConfigService::V1::GetRevisionRequest]
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::Cloud::ConfigService::V1::Revision]
293
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
294
+ #
295
+ # @return [::Google::Cloud::ConfigService::V1::Revision]
296
+ # A result object deserialized from the server's reply
297
+ def get_revision 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_get_revision_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::Cloud::ConfigService::V1::Revision.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 get_resource REST call
323
+ #
324
+ # @param request_pb [::Google::Cloud::ConfigService::V1::GetResourceRequest]
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::Cloud::ConfigService::V1::Resource]
331
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
332
+ #
333
+ # @return [::Google::Cloud::ConfigService::V1::Resource]
334
+ # A result object deserialized from the server's reply
335
+ def get_resource 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_get_resource_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::Cloud::ConfigService::V1::Resource.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 list_resources REST call
361
+ #
362
+ # @param request_pb [::Google::Cloud::ConfigService::V1::ListResourcesRequest]
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::Cloud::ConfigService::V1::ListResourcesResponse]
369
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
370
+ #
371
+ # @return [::Google::Cloud::ConfigService::V1::ListResourcesResponse]
372
+ # A result object deserialized from the server's reply
373
+ def list_resources 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_list_resources_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::Cloud::ConfigService::V1::ListResourcesResponse.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 export_deployment_statefile REST call
399
+ #
400
+ # @param request_pb [::Google::Cloud::ConfigService::V1::ExportDeploymentStatefileRequest]
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::Cloud::ConfigService::V1::Statefile]
407
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
408
+ #
409
+ # @return [::Google::Cloud::ConfigService::V1::Statefile]
410
+ # A result object deserialized from the server's reply
411
+ def export_deployment_statefile 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_export_deployment_statefile_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::Cloud::ConfigService::V1::Statefile.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 export_revision_statefile REST call
437
+ #
438
+ # @param request_pb [::Google::Cloud::ConfigService::V1::ExportRevisionStatefileRequest]
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::Cloud::ConfigService::V1::Statefile]
445
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
446
+ #
447
+ # @return [::Google::Cloud::ConfigService::V1::Statefile]
448
+ # A result object deserialized from the server's reply
449
+ def export_revision_statefile 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_export_revision_statefile_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::Cloud::ConfigService::V1::Statefile.decode_json response.body, ignore_unknown_fields: true
468
+
469
+ yield result, operation if block_given?
470
+ result
471
+ end
472
+
473
+ ##
474
+ # Baseline implementation for the import_statefile REST call
475
+ #
476
+ # @param request_pb [::Google::Cloud::ConfigService::V1::ImportStatefileRequest]
477
+ # A request object representing the call parameters. Required.
478
+ # @param options [::Gapic::CallOptions]
479
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
480
+ #
481
+ # @yield [result, operation] Access the result along with the TransportOperation object
482
+ # @yieldparam result [::Google::Cloud::ConfigService::V1::Statefile]
483
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
484
+ #
485
+ # @return [::Google::Cloud::ConfigService::V1::Statefile]
486
+ # A result object deserialized from the server's reply
487
+ def import_statefile request_pb, options = nil
488
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
489
+
490
+ verb, uri, query_string_params, body = ServiceStub.transcode_import_statefile_request request_pb
491
+ query_string_params = if query_string_params.any?
492
+ query_string_params.to_h { |p| p.split "=", 2 }
493
+ else
494
+ {}
495
+ end
496
+
497
+ response = @client_stub.make_http_request(
498
+ verb,
499
+ uri: uri,
500
+ body: body || "",
501
+ params: query_string_params,
502
+ options: options
503
+ )
504
+ operation = ::Gapic::Rest::TransportOperation.new response
505
+ result = ::Google::Cloud::ConfigService::V1::Statefile.decode_json response.body, ignore_unknown_fields: true
506
+
507
+ yield result, operation if block_given?
508
+ result
509
+ end
510
+
511
+ ##
512
+ # Baseline implementation for the delete_statefile REST call
513
+ #
514
+ # @param request_pb [::Google::Cloud::ConfigService::V1::DeleteStatefileRequest]
515
+ # A request object representing the call parameters. Required.
516
+ # @param options [::Gapic::CallOptions]
517
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
518
+ #
519
+ # @yield [result, operation] Access the result along with the TransportOperation object
520
+ # @yieldparam result [::Google::Protobuf::Empty]
521
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
522
+ #
523
+ # @return [::Google::Protobuf::Empty]
524
+ # A result object deserialized from the server's reply
525
+ def delete_statefile request_pb, options = nil
526
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
527
+
528
+ verb, uri, query_string_params, body = ServiceStub.transcode_delete_statefile_request request_pb
529
+ query_string_params = if query_string_params.any?
530
+ query_string_params.to_h { |p| p.split "=", 2 }
531
+ else
532
+ {}
533
+ end
534
+
535
+ response = @client_stub.make_http_request(
536
+ verb,
537
+ uri: uri,
538
+ body: body || "",
539
+ params: query_string_params,
540
+ options: options
541
+ )
542
+ operation = ::Gapic::Rest::TransportOperation.new response
543
+ result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
544
+
545
+ yield result, operation if block_given?
546
+ result
547
+ end
548
+
549
+ ##
550
+ # Baseline implementation for the lock_deployment REST call
551
+ #
552
+ # @param request_pb [::Google::Cloud::ConfigService::V1::LockDeploymentRequest]
553
+ # A request object representing the call parameters. Required.
554
+ # @param options [::Gapic::CallOptions]
555
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
556
+ #
557
+ # @yield [result, operation] Access the result along with the TransportOperation object
558
+ # @yieldparam result [::Google::Longrunning::Operation]
559
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
560
+ #
561
+ # @return [::Google::Longrunning::Operation]
562
+ # A result object deserialized from the server's reply
563
+ def lock_deployment request_pb, options = nil
564
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
565
+
566
+ verb, uri, query_string_params, body = ServiceStub.transcode_lock_deployment_request request_pb
567
+ query_string_params = if query_string_params.any?
568
+ query_string_params.to_h { |p| p.split "=", 2 }
569
+ else
570
+ {}
571
+ end
572
+
573
+ response = @client_stub.make_http_request(
574
+ verb,
575
+ uri: uri,
576
+ body: body || "",
577
+ params: query_string_params,
578
+ options: options
579
+ )
580
+ operation = ::Gapic::Rest::TransportOperation.new response
581
+ result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
582
+
583
+ yield result, operation if block_given?
584
+ result
585
+ end
586
+
587
+ ##
588
+ # Baseline implementation for the unlock_deployment REST call
589
+ #
590
+ # @param request_pb [::Google::Cloud::ConfigService::V1::UnlockDeploymentRequest]
591
+ # A request object representing the call parameters. Required.
592
+ # @param options [::Gapic::CallOptions]
593
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
594
+ #
595
+ # @yield [result, operation] Access the result along with the TransportOperation object
596
+ # @yieldparam result [::Google::Longrunning::Operation]
597
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
598
+ #
599
+ # @return [::Google::Longrunning::Operation]
600
+ # A result object deserialized from the server's reply
601
+ def unlock_deployment request_pb, options = nil
602
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
603
+
604
+ verb, uri, query_string_params, body = ServiceStub.transcode_unlock_deployment_request request_pb
605
+ query_string_params = if query_string_params.any?
606
+ query_string_params.to_h { |p| p.split "=", 2 }
607
+ else
608
+ {}
609
+ end
610
+
611
+ response = @client_stub.make_http_request(
612
+ verb,
613
+ uri: uri,
614
+ body: body || "",
615
+ params: query_string_params,
616
+ options: options
617
+ )
618
+ operation = ::Gapic::Rest::TransportOperation.new response
619
+ result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
620
+
621
+ yield result, operation if block_given?
622
+ result
623
+ end
624
+
625
+ ##
626
+ # Baseline implementation for the export_lock_info REST call
627
+ #
628
+ # @param request_pb [::Google::Cloud::ConfigService::V1::ExportLockInfoRequest]
629
+ # A request object representing the call parameters. Required.
630
+ # @param options [::Gapic::CallOptions]
631
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
632
+ #
633
+ # @yield [result, operation] Access the result along with the TransportOperation object
634
+ # @yieldparam result [::Google::Cloud::ConfigService::V1::LockInfo]
635
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
636
+ #
637
+ # @return [::Google::Cloud::ConfigService::V1::LockInfo]
638
+ # A result object deserialized from the server's reply
639
+ def export_lock_info request_pb, options = nil
640
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
641
+
642
+ verb, uri, query_string_params, body = ServiceStub.transcode_export_lock_info_request request_pb
643
+ query_string_params = if query_string_params.any?
644
+ query_string_params.to_h { |p| p.split "=", 2 }
645
+ else
646
+ {}
647
+ end
648
+
649
+ response = @client_stub.make_http_request(
650
+ verb,
651
+ uri: uri,
652
+ body: body || "",
653
+ params: query_string_params,
654
+ options: options
655
+ )
656
+ operation = ::Gapic::Rest::TransportOperation.new response
657
+ result = ::Google::Cloud::ConfigService::V1::LockInfo.decode_json response.body, ignore_unknown_fields: true
658
+
659
+ yield result, operation if block_given?
660
+ result
661
+ end
662
+
663
+ ##
664
+ # @private
665
+ #
666
+ # GRPC transcoding helper method for the list_deployments REST call
667
+ #
668
+ # @param request_pb [::Google::Cloud::ConfigService::V1::ListDeploymentsRequest]
669
+ # A request object representing the call parameters. Required.
670
+ # @return [Array(String, [String, nil], Hash{String => String})]
671
+ # Uri, Body, Query string parameters
672
+ def self.transcode_list_deployments_request request_pb
673
+ transcoder = Gapic::Rest::GrpcTranscoder.new
674
+ .with_bindings(
675
+ uri_method: :get,
676
+ uri_template: "/v1/{parent}/deployments",
677
+ matches: [
678
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
679
+ ]
680
+ )
681
+ transcoder.transcode request_pb
682
+ end
683
+
684
+ ##
685
+ # @private
686
+ #
687
+ # GRPC transcoding helper method for the get_deployment REST call
688
+ #
689
+ # @param request_pb [::Google::Cloud::ConfigService::V1::GetDeploymentRequest]
690
+ # A request object representing the call parameters. Required.
691
+ # @return [Array(String, [String, nil], Hash{String => String})]
692
+ # Uri, Body, Query string parameters
693
+ def self.transcode_get_deployment_request request_pb
694
+ transcoder = Gapic::Rest::GrpcTranscoder.new
695
+ .with_bindings(
696
+ uri_method: :get,
697
+ uri_template: "/v1/{name}",
698
+ matches: [
699
+ ["name", %r{^projects/[^/]+/locations/[^/]+/deployments/[^/]+/?$}, false]
700
+ ]
701
+ )
702
+ transcoder.transcode request_pb
703
+ end
704
+
705
+ ##
706
+ # @private
707
+ #
708
+ # GRPC transcoding helper method for the create_deployment REST call
709
+ #
710
+ # @param request_pb [::Google::Cloud::ConfigService::V1::CreateDeploymentRequest]
711
+ # A request object representing the call parameters. Required.
712
+ # @return [Array(String, [String, nil], Hash{String => String})]
713
+ # Uri, Body, Query string parameters
714
+ def self.transcode_create_deployment_request request_pb
715
+ transcoder = Gapic::Rest::GrpcTranscoder.new
716
+ .with_bindings(
717
+ uri_method: :post,
718
+ uri_template: "/v1/{parent}/deployments",
719
+ body: "deployment",
720
+ matches: [
721
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
722
+ ]
723
+ )
724
+ transcoder.transcode request_pb
725
+ end
726
+
727
+ ##
728
+ # @private
729
+ #
730
+ # GRPC transcoding helper method for the update_deployment REST call
731
+ #
732
+ # @param request_pb [::Google::Cloud::ConfigService::V1::UpdateDeploymentRequest]
733
+ # A request object representing the call parameters. Required.
734
+ # @return [Array(String, [String, nil], Hash{String => String})]
735
+ # Uri, Body, Query string parameters
736
+ def self.transcode_update_deployment_request request_pb
737
+ transcoder = Gapic::Rest::GrpcTranscoder.new
738
+ .with_bindings(
739
+ uri_method: :patch,
740
+ uri_template: "/v1/{deployment.name}",
741
+ body: "deployment",
742
+ matches: [
743
+ ["deployment.name", %r{^projects/[^/]+/locations/[^/]+/deployments/[^/]+/?$}, false]
744
+ ]
745
+ )
746
+ transcoder.transcode request_pb
747
+ end
748
+
749
+ ##
750
+ # @private
751
+ #
752
+ # GRPC transcoding helper method for the delete_deployment REST call
753
+ #
754
+ # @param request_pb [::Google::Cloud::ConfigService::V1::DeleteDeploymentRequest]
755
+ # A request object representing the call parameters. Required.
756
+ # @return [Array(String, [String, nil], Hash{String => String})]
757
+ # Uri, Body, Query string parameters
758
+ def self.transcode_delete_deployment_request request_pb
759
+ transcoder = Gapic::Rest::GrpcTranscoder.new
760
+ .with_bindings(
761
+ uri_method: :delete,
762
+ uri_template: "/v1/{name}",
763
+ matches: [
764
+ ["name", %r{^projects/[^/]+/locations/[^/]+/deployments/[^/]+/?$}, false]
765
+ ]
766
+ )
767
+ transcoder.transcode request_pb
768
+ end
769
+
770
+ ##
771
+ # @private
772
+ #
773
+ # GRPC transcoding helper method for the list_revisions REST call
774
+ #
775
+ # @param request_pb [::Google::Cloud::ConfigService::V1::ListRevisionsRequest]
776
+ # A request object representing the call parameters. Required.
777
+ # @return [Array(String, [String, nil], Hash{String => String})]
778
+ # Uri, Body, Query string parameters
779
+ def self.transcode_list_revisions_request request_pb
780
+ transcoder = Gapic::Rest::GrpcTranscoder.new
781
+ .with_bindings(
782
+ uri_method: :get,
783
+ uri_template: "/v1/{parent}/revisions",
784
+ matches: [
785
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/deployments/[^/]+/?$}, false]
786
+ ]
787
+ )
788
+ transcoder.transcode request_pb
789
+ end
790
+
791
+ ##
792
+ # @private
793
+ #
794
+ # GRPC transcoding helper method for the get_revision REST call
795
+ #
796
+ # @param request_pb [::Google::Cloud::ConfigService::V1::GetRevisionRequest]
797
+ # A request object representing the call parameters. Required.
798
+ # @return [Array(String, [String, nil], Hash{String => String})]
799
+ # Uri, Body, Query string parameters
800
+ def self.transcode_get_revision_request request_pb
801
+ transcoder = Gapic::Rest::GrpcTranscoder.new
802
+ .with_bindings(
803
+ uri_method: :get,
804
+ uri_template: "/v1/{name}",
805
+ matches: [
806
+ ["name", %r{^projects/[^/]+/locations/[^/]+/deployments/[^/]+/revisions/[^/]+/?$}, false]
807
+ ]
808
+ )
809
+ transcoder.transcode request_pb
810
+ end
811
+
812
+ ##
813
+ # @private
814
+ #
815
+ # GRPC transcoding helper method for the get_resource REST call
816
+ #
817
+ # @param request_pb [::Google::Cloud::ConfigService::V1::GetResourceRequest]
818
+ # A request object representing the call parameters. Required.
819
+ # @return [Array(String, [String, nil], Hash{String => String})]
820
+ # Uri, Body, Query string parameters
821
+ def self.transcode_get_resource_request request_pb
822
+ transcoder = Gapic::Rest::GrpcTranscoder.new
823
+ .with_bindings(
824
+ uri_method: :get,
825
+ uri_template: "/v1/{name}",
826
+ matches: [
827
+ ["name", %r{^projects/[^/]+/locations/[^/]+/deployments/[^/]+/revisions/[^/]+/resources/[^/]+/?$}, false]
828
+ ]
829
+ )
830
+ transcoder.transcode request_pb
831
+ end
832
+
833
+ ##
834
+ # @private
835
+ #
836
+ # GRPC transcoding helper method for the list_resources REST call
837
+ #
838
+ # @param request_pb [::Google::Cloud::ConfigService::V1::ListResourcesRequest]
839
+ # A request object representing the call parameters. Required.
840
+ # @return [Array(String, [String, nil], Hash{String => String})]
841
+ # Uri, Body, Query string parameters
842
+ def self.transcode_list_resources_request request_pb
843
+ transcoder = Gapic::Rest::GrpcTranscoder.new
844
+ .with_bindings(
845
+ uri_method: :get,
846
+ uri_template: "/v1/{parent}/resources",
847
+ matches: [
848
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/deployments/[^/]+/revisions/[^/]+/?$}, false]
849
+ ]
850
+ )
851
+ transcoder.transcode request_pb
852
+ end
853
+
854
+ ##
855
+ # @private
856
+ #
857
+ # GRPC transcoding helper method for the export_deployment_statefile REST call
858
+ #
859
+ # @param request_pb [::Google::Cloud::ConfigService::V1::ExportDeploymentStatefileRequest]
860
+ # A request object representing the call parameters. Required.
861
+ # @return [Array(String, [String, nil], Hash{String => String})]
862
+ # Uri, Body, Query string parameters
863
+ def self.transcode_export_deployment_statefile_request request_pb
864
+ transcoder = Gapic::Rest::GrpcTranscoder.new
865
+ .with_bindings(
866
+ uri_method: :post,
867
+ uri_template: "/v1/{parent}:exportState",
868
+ body: "*",
869
+ matches: [
870
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/deployments/[^/]+/?$}, false]
871
+ ]
872
+ )
873
+ transcoder.transcode request_pb
874
+ end
875
+
876
+ ##
877
+ # @private
878
+ #
879
+ # GRPC transcoding helper method for the export_revision_statefile REST call
880
+ #
881
+ # @param request_pb [::Google::Cloud::ConfigService::V1::ExportRevisionStatefileRequest]
882
+ # A request object representing the call parameters. Required.
883
+ # @return [Array(String, [String, nil], Hash{String => String})]
884
+ # Uri, Body, Query string parameters
885
+ def self.transcode_export_revision_statefile_request request_pb
886
+ transcoder = Gapic::Rest::GrpcTranscoder.new
887
+ .with_bindings(
888
+ uri_method: :post,
889
+ uri_template: "/v1/{parent}:exportState",
890
+ body: "*",
891
+ matches: [
892
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/deployments/[^/]+/revisions/[^/]+/?$}, false]
893
+ ]
894
+ )
895
+ transcoder.transcode request_pb
896
+ end
897
+
898
+ ##
899
+ # @private
900
+ #
901
+ # GRPC transcoding helper method for the import_statefile REST call
902
+ #
903
+ # @param request_pb [::Google::Cloud::ConfigService::V1::ImportStatefileRequest]
904
+ # A request object representing the call parameters. Required.
905
+ # @return [Array(String, [String, nil], Hash{String => String})]
906
+ # Uri, Body, Query string parameters
907
+ def self.transcode_import_statefile_request request_pb
908
+ transcoder = Gapic::Rest::GrpcTranscoder.new
909
+ .with_bindings(
910
+ uri_method: :post,
911
+ uri_template: "/v1/{parent}:importState",
912
+ body: "*",
913
+ matches: [
914
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/deployments/[^/]+/?$}, false]
915
+ ]
916
+ )
917
+ transcoder.transcode request_pb
918
+ end
919
+
920
+ ##
921
+ # @private
922
+ #
923
+ # GRPC transcoding helper method for the delete_statefile REST call
924
+ #
925
+ # @param request_pb [::Google::Cloud::ConfigService::V1::DeleteStatefileRequest]
926
+ # A request object representing the call parameters. Required.
927
+ # @return [Array(String, [String, nil], Hash{String => String})]
928
+ # Uri, Body, Query string parameters
929
+ def self.transcode_delete_statefile_request request_pb
930
+ transcoder = Gapic::Rest::GrpcTranscoder.new
931
+ .with_bindings(
932
+ uri_method: :post,
933
+ uri_template: "/v1/{name}:deleteState",
934
+ body: "*",
935
+ matches: [
936
+ ["name", %r{^projects/[^/]+/locations/[^/]+/deployments/[^/]+/?$}, false]
937
+ ]
938
+ )
939
+ transcoder.transcode request_pb
940
+ end
941
+
942
+ ##
943
+ # @private
944
+ #
945
+ # GRPC transcoding helper method for the lock_deployment REST call
946
+ #
947
+ # @param request_pb [::Google::Cloud::ConfigService::V1::LockDeploymentRequest]
948
+ # A request object representing the call parameters. Required.
949
+ # @return [Array(String, [String, nil], Hash{String => String})]
950
+ # Uri, Body, Query string parameters
951
+ def self.transcode_lock_deployment_request request_pb
952
+ transcoder = Gapic::Rest::GrpcTranscoder.new
953
+ .with_bindings(
954
+ uri_method: :post,
955
+ uri_template: "/v1/{name}:lock",
956
+ body: "*",
957
+ matches: [
958
+ ["name", %r{^projects/[^/]+/locations/[^/]+/deployments/[^/]+/?$}, false]
959
+ ]
960
+ )
961
+ transcoder.transcode request_pb
962
+ end
963
+
964
+ ##
965
+ # @private
966
+ #
967
+ # GRPC transcoding helper method for the unlock_deployment REST call
968
+ #
969
+ # @param request_pb [::Google::Cloud::ConfigService::V1::UnlockDeploymentRequest]
970
+ # A request object representing the call parameters. Required.
971
+ # @return [Array(String, [String, nil], Hash{String => String})]
972
+ # Uri, Body, Query string parameters
973
+ def self.transcode_unlock_deployment_request request_pb
974
+ transcoder = Gapic::Rest::GrpcTranscoder.new
975
+ .with_bindings(
976
+ uri_method: :post,
977
+ uri_template: "/v1/{name}:unlock",
978
+ body: "*",
979
+ matches: [
980
+ ["name", %r{^projects/[^/]+/locations/[^/]+/deployments/[^/]+/?$}, false]
981
+ ]
982
+ )
983
+ transcoder.transcode request_pb
984
+ end
985
+
986
+ ##
987
+ # @private
988
+ #
989
+ # GRPC transcoding helper method for the export_lock_info REST call
990
+ #
991
+ # @param request_pb [::Google::Cloud::ConfigService::V1::ExportLockInfoRequest]
992
+ # A request object representing the call parameters. Required.
993
+ # @return [Array(String, [String, nil], Hash{String => String})]
994
+ # Uri, Body, Query string parameters
995
+ def self.transcode_export_lock_info_request request_pb
996
+ transcoder = Gapic::Rest::GrpcTranscoder.new
997
+ .with_bindings(
998
+ uri_method: :get,
999
+ uri_template: "/v1/{name}:exportLock",
1000
+ matches: [
1001
+ ["name", %r{^projects/[^/]+/locations/[^/]+/deployments/[^/]+/?$}, false]
1002
+ ]
1003
+ )
1004
+ transcoder.transcode request_pb
1005
+ end
1006
+ end
1007
+ end
1008
+ end
1009
+ end
1010
+ end
1011
+ end
1012
+ end