google-cloud-gke_multi_cloud-v1 0.6.0 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. checksums.yaml +4 -4
  2. data/AUTHENTICATION.md +72 -99
  3. data/lib/google/cloud/gke_multi_cloud/v1/attached_clusters/client.rb +157 -12
  4. data/lib/google/cloud/gke_multi_cloud/v1/attached_clusters/operations.rb +28 -6
  5. data/lib/google/cloud/gke_multi_cloud/v1/attached_clusters/rest/client.rb +1354 -0
  6. data/lib/google/cloud/gke_multi_cloud/v1/attached_clusters/rest/operations.rb +895 -0
  7. data/lib/google/cloud/gke_multi_cloud/v1/attached_clusters/rest/service_stub.rb +595 -0
  8. data/lib/google/cloud/gke_multi_cloud/v1/attached_clusters/rest.rb +55 -0
  9. data/lib/google/cloud/gke_multi_cloud/v1/attached_clusters.rb +6 -0
  10. data/lib/google/cloud/gke_multi_cloud/v1/aws_clusters/client.rb +492 -10
  11. data/lib/google/cloud/gke_multi_cloud/v1/aws_clusters/operations.rb +28 -6
  12. data/lib/google/cloud/gke_multi_cloud/v1/aws_clusters/rest/client.rb +2122 -0
  13. data/lib/google/cloud/gke_multi_cloud/v1/aws_clusters/rest/operations.rb +895 -0
  14. data/lib/google/cloud/gke_multi_cloud/v1/aws_clusters/rest/service_stub.rb +1010 -0
  15. data/lib/google/cloud/gke_multi_cloud/v1/aws_clusters/rest.rb +54 -0
  16. data/lib/google/cloud/gke_multi_cloud/v1/aws_clusters.rb +6 -0
  17. data/lib/google/cloud/gke_multi_cloud/v1/azure_clusters/client.rb +356 -10
  18. data/lib/google/cloud/gke_multi_cloud/v1/azure_clusters/operations.rb +28 -6
  19. data/lib/google/cloud/gke_multi_cloud/v1/azure_clusters/rest/client.rb +2430 -0
  20. data/lib/google/cloud/gke_multi_cloud/v1/azure_clusters/rest/operations.rb +895 -0
  21. data/lib/google/cloud/gke_multi_cloud/v1/azure_clusters/rest/service_stub.rb +1187 -0
  22. data/lib/google/cloud/gke_multi_cloud/v1/azure_clusters/rest.rb +54 -0
  23. data/lib/google/cloud/gke_multi_cloud/v1/azure_clusters.rb +6 -0
  24. data/lib/google/cloud/gke_multi_cloud/v1/rest.rb +39 -0
  25. data/lib/google/cloud/gke_multi_cloud/v1/version.rb +1 -1
  26. data/lib/google/cloud/gke_multi_cloud/v1.rb +5 -0
  27. data/lib/google/cloud/gkemulticloud/v1/attached_resources_pb.rb +4 -1
  28. data/lib/google/cloud/gkemulticloud/v1/attached_service_pb.rb +6 -2
  29. data/lib/google/cloud/gkemulticloud/v1/attached_service_services_pb.rb +2 -0
  30. data/lib/google/cloud/gkemulticloud/v1/aws_resources_pb.rb +10 -1
  31. data/lib/google/cloud/gkemulticloud/v1/aws_service_pb.rb +8 -1
  32. data/lib/google/cloud/gkemulticloud/v1/aws_service_services_pb.rb +18 -0
  33. data/lib/google/cloud/gkemulticloud/v1/azure_resources_pb.rb +7 -1
  34. data/lib/google/cloud/gkemulticloud/v1/azure_service_pb.rb +7 -1
  35. data/lib/google/cloud/gkemulticloud/v1/azure_service_services_pb.rb +11 -0
  36. data/lib/google/cloud/gkemulticloud/v1/common_resources_pb.rb +4 -1
  37. data/proto_docs/google/api/client.rb +14 -0
  38. data/proto_docs/google/cloud/gkemulticloud/v1/attached_resources.rb +48 -2
  39. data/proto_docs/google/cloud/gkemulticloud/v1/attached_service.rb +55 -2
  40. data/proto_docs/google/cloud/gkemulticloud/v1/aws_resources.rb +181 -6
  41. data/proto_docs/google/cloud/gkemulticloud/v1/aws_service.rb +117 -0
  42. data/proto_docs/google/cloud/gkemulticloud/v1/azure_resources.rb +103 -6
  43. data/proto_docs/google/cloud/gkemulticloud/v1/azure_service.rb +80 -4
  44. data/proto_docs/google/cloud/gkemulticloud/v1/common_resources.rb +56 -0
  45. data/proto_docs/google/type/date.rb +53 -0
  46. metadata +19 -5
@@ -0,0 +1,595 @@
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/gkemulticloud/v1/attached_service_pb"
20
+
21
+ module Google
22
+ module Cloud
23
+ module GkeMultiCloud
24
+ module V1
25
+ module AttachedClusters
26
+ module Rest
27
+ ##
28
+ # REST service stub for the AttachedClusters 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: false,
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 create_attached_cluster REST call
57
+ #
58
+ # @param request_pb [::Google::Cloud::GkeMultiCloud::V1::CreateAttachedClusterRequest]
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::Longrunning::Operation]
65
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
66
+ #
67
+ # @return [::Google::Longrunning::Operation]
68
+ # A result object deserialized from the server's reply
69
+ def create_attached_cluster 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_create_attached_cluster_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::Longrunning::Operation.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 update_attached_cluster REST call
95
+ #
96
+ # @param request_pb [::Google::Cloud::GkeMultiCloud::V1::UpdateAttachedClusterRequest]
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::Longrunning::Operation]
103
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
104
+ #
105
+ # @return [::Google::Longrunning::Operation]
106
+ # A result object deserialized from the server's reply
107
+ def update_attached_cluster 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_update_attached_cluster_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::Longrunning::Operation.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 import_attached_cluster REST call
133
+ #
134
+ # @param request_pb [::Google::Cloud::GkeMultiCloud::V1::ImportAttachedClusterRequest]
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 import_attached_cluster 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_import_attached_cluster_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 get_attached_cluster REST call
171
+ #
172
+ # @param request_pb [::Google::Cloud::GkeMultiCloud::V1::GetAttachedClusterRequest]
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::Cloud::GkeMultiCloud::V1::AttachedCluster]
179
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
180
+ #
181
+ # @return [::Google::Cloud::GkeMultiCloud::V1::AttachedCluster]
182
+ # A result object deserialized from the server's reply
183
+ def get_attached_cluster 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_get_attached_cluster_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::Cloud::GkeMultiCloud::V1::AttachedCluster.decode_json response.body, ignore_unknown_fields: true
202
+
203
+ yield result, operation if block_given?
204
+ result
205
+ end
206
+
207
+ ##
208
+ # Baseline implementation for the list_attached_clusters REST call
209
+ #
210
+ # @param request_pb [::Google::Cloud::GkeMultiCloud::V1::ListAttachedClustersRequest]
211
+ # A request object representing the call parameters. Required.
212
+ # @param options [::Gapic::CallOptions]
213
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
214
+ #
215
+ # @yield [result, operation] Access the result along with the TransportOperation object
216
+ # @yieldparam result [::Google::Cloud::GkeMultiCloud::V1::ListAttachedClustersResponse]
217
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
218
+ #
219
+ # @return [::Google::Cloud::GkeMultiCloud::V1::ListAttachedClustersResponse]
220
+ # A result object deserialized from the server's reply
221
+ def list_attached_clusters request_pb, options = nil
222
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
223
+
224
+ verb, uri, query_string_params, body = ServiceStub.transcode_list_attached_clusters_request request_pb
225
+ query_string_params = if query_string_params.any?
226
+ query_string_params.to_h { |p| p.split "=", 2 }
227
+ else
228
+ {}
229
+ end
230
+
231
+ response = @client_stub.make_http_request(
232
+ verb,
233
+ uri: uri,
234
+ body: body || "",
235
+ params: query_string_params,
236
+ options: options
237
+ )
238
+ operation = ::Gapic::Rest::TransportOperation.new response
239
+ result = ::Google::Cloud::GkeMultiCloud::V1::ListAttachedClustersResponse.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 delete_attached_cluster REST call
247
+ #
248
+ # @param request_pb [::Google::Cloud::GkeMultiCloud::V1::DeleteAttachedClusterRequest]
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::Longrunning::Operation]
255
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
256
+ #
257
+ # @return [::Google::Longrunning::Operation]
258
+ # A result object deserialized from the server's reply
259
+ def delete_attached_cluster 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_delete_attached_cluster_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::Longrunning::Operation.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_attached_server_config REST call
285
+ #
286
+ # @param request_pb [::Google::Cloud::GkeMultiCloud::V1::GetAttachedServerConfigRequest]
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::GkeMultiCloud::V1::AttachedServerConfig]
293
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
294
+ #
295
+ # @return [::Google::Cloud::GkeMultiCloud::V1::AttachedServerConfig]
296
+ # A result object deserialized from the server's reply
297
+ def get_attached_server_config 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_attached_server_config_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::GkeMultiCloud::V1::AttachedServerConfig.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 generate_attached_cluster_install_manifest REST call
323
+ #
324
+ # @param request_pb [::Google::Cloud::GkeMultiCloud::V1::GenerateAttachedClusterInstallManifestRequest]
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::GkeMultiCloud::V1::GenerateAttachedClusterInstallManifestResponse]
331
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
332
+ #
333
+ # @return [::Google::Cloud::GkeMultiCloud::V1::GenerateAttachedClusterInstallManifestResponse]
334
+ # A result object deserialized from the server's reply
335
+ def generate_attached_cluster_install_manifest 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_generate_attached_cluster_install_manifest_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::GkeMultiCloud::V1::GenerateAttachedClusterInstallManifestResponse.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 generate_attached_cluster_agent_token REST call
361
+ #
362
+ # @param request_pb [::Google::Cloud::GkeMultiCloud::V1::GenerateAttachedClusterAgentTokenRequest]
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::GkeMultiCloud::V1::GenerateAttachedClusterAgentTokenResponse]
369
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
370
+ #
371
+ # @return [::Google::Cloud::GkeMultiCloud::V1::GenerateAttachedClusterAgentTokenResponse]
372
+ # A result object deserialized from the server's reply
373
+ def generate_attached_cluster_agent_token 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_generate_attached_cluster_agent_token_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::GkeMultiCloud::V1::GenerateAttachedClusterAgentTokenResponse.decode_json response.body, ignore_unknown_fields: true
392
+
393
+ yield result, operation if block_given?
394
+ result
395
+ end
396
+
397
+ ##
398
+ # @private
399
+ #
400
+ # GRPC transcoding helper method for the create_attached_cluster REST call
401
+ #
402
+ # @param request_pb [::Google::Cloud::GkeMultiCloud::V1::CreateAttachedClusterRequest]
403
+ # A request object representing the call parameters. Required.
404
+ # @return [Array(String, [String, nil], Hash{String => String})]
405
+ # Uri, Body, Query string parameters
406
+ def self.transcode_create_attached_cluster_request request_pb
407
+ transcoder = Gapic::Rest::GrpcTranscoder.new
408
+ .with_bindings(
409
+ uri_method: :post,
410
+ uri_template: "/v1/{parent}/attachedClusters",
411
+ body: "attached_cluster",
412
+ matches: [
413
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
414
+ ]
415
+ )
416
+ transcoder.transcode request_pb
417
+ end
418
+
419
+ ##
420
+ # @private
421
+ #
422
+ # GRPC transcoding helper method for the update_attached_cluster REST call
423
+ #
424
+ # @param request_pb [::Google::Cloud::GkeMultiCloud::V1::UpdateAttachedClusterRequest]
425
+ # A request object representing the call parameters. Required.
426
+ # @return [Array(String, [String, nil], Hash{String => String})]
427
+ # Uri, Body, Query string parameters
428
+ def self.transcode_update_attached_cluster_request request_pb
429
+ transcoder = Gapic::Rest::GrpcTranscoder.new
430
+ .with_bindings(
431
+ uri_method: :patch,
432
+ uri_template: "/v1/{attached_cluster.name}",
433
+ body: "attached_cluster",
434
+ matches: [
435
+ ["attached_cluster.name", %r{^projects/[^/]+/locations/[^/]+/attachedClusters/[^/]+/?$}, false]
436
+ ]
437
+ )
438
+ transcoder.transcode request_pb
439
+ end
440
+
441
+ ##
442
+ # @private
443
+ #
444
+ # GRPC transcoding helper method for the import_attached_cluster REST call
445
+ #
446
+ # @param request_pb [::Google::Cloud::GkeMultiCloud::V1::ImportAttachedClusterRequest]
447
+ # A request object representing the call parameters. Required.
448
+ # @return [Array(String, [String, nil], Hash{String => String})]
449
+ # Uri, Body, Query string parameters
450
+ def self.transcode_import_attached_cluster_request request_pb
451
+ transcoder = Gapic::Rest::GrpcTranscoder.new
452
+ .with_bindings(
453
+ uri_method: :post,
454
+ uri_template: "/v1/{parent}/attachedClusters:import",
455
+ body: "*",
456
+ matches: [
457
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
458
+ ]
459
+ )
460
+ transcoder.transcode request_pb
461
+ end
462
+
463
+ ##
464
+ # @private
465
+ #
466
+ # GRPC transcoding helper method for the get_attached_cluster REST call
467
+ #
468
+ # @param request_pb [::Google::Cloud::GkeMultiCloud::V1::GetAttachedClusterRequest]
469
+ # A request object representing the call parameters. Required.
470
+ # @return [Array(String, [String, nil], Hash{String => String})]
471
+ # Uri, Body, Query string parameters
472
+ def self.transcode_get_attached_cluster_request request_pb
473
+ transcoder = Gapic::Rest::GrpcTranscoder.new
474
+ .with_bindings(
475
+ uri_method: :get,
476
+ uri_template: "/v1/{name}",
477
+ matches: [
478
+ ["name", %r{^projects/[^/]+/locations/[^/]+/attachedClusters/[^/]+/?$}, false]
479
+ ]
480
+ )
481
+ transcoder.transcode request_pb
482
+ end
483
+
484
+ ##
485
+ # @private
486
+ #
487
+ # GRPC transcoding helper method for the list_attached_clusters REST call
488
+ #
489
+ # @param request_pb [::Google::Cloud::GkeMultiCloud::V1::ListAttachedClustersRequest]
490
+ # A request object representing the call parameters. Required.
491
+ # @return [Array(String, [String, nil], Hash{String => String})]
492
+ # Uri, Body, Query string parameters
493
+ def self.transcode_list_attached_clusters_request request_pb
494
+ transcoder = Gapic::Rest::GrpcTranscoder.new
495
+ .with_bindings(
496
+ uri_method: :get,
497
+ uri_template: "/v1/{parent}/attachedClusters",
498
+ matches: [
499
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
500
+ ]
501
+ )
502
+ transcoder.transcode request_pb
503
+ end
504
+
505
+ ##
506
+ # @private
507
+ #
508
+ # GRPC transcoding helper method for the delete_attached_cluster REST call
509
+ #
510
+ # @param request_pb [::Google::Cloud::GkeMultiCloud::V1::DeleteAttachedClusterRequest]
511
+ # A request object representing the call parameters. Required.
512
+ # @return [Array(String, [String, nil], Hash{String => String})]
513
+ # Uri, Body, Query string parameters
514
+ def self.transcode_delete_attached_cluster_request request_pb
515
+ transcoder = Gapic::Rest::GrpcTranscoder.new
516
+ .with_bindings(
517
+ uri_method: :delete,
518
+ uri_template: "/v1/{name}",
519
+ matches: [
520
+ ["name", %r{^projects/[^/]+/locations/[^/]+/attachedClusters/[^/]+/?$}, false]
521
+ ]
522
+ )
523
+ transcoder.transcode request_pb
524
+ end
525
+
526
+ ##
527
+ # @private
528
+ #
529
+ # GRPC transcoding helper method for the get_attached_server_config REST call
530
+ #
531
+ # @param request_pb [::Google::Cloud::GkeMultiCloud::V1::GetAttachedServerConfigRequest]
532
+ # A request object representing the call parameters. Required.
533
+ # @return [Array(String, [String, nil], Hash{String => String})]
534
+ # Uri, Body, Query string parameters
535
+ def self.transcode_get_attached_server_config_request request_pb
536
+ transcoder = Gapic::Rest::GrpcTranscoder.new
537
+ .with_bindings(
538
+ uri_method: :get,
539
+ uri_template: "/v1/{name}",
540
+ matches: [
541
+ ["name", %r{^projects/[^/]+/locations/[^/]+/attachedServerConfig/?$}, false]
542
+ ]
543
+ )
544
+ transcoder.transcode request_pb
545
+ end
546
+
547
+ ##
548
+ # @private
549
+ #
550
+ # GRPC transcoding helper method for the generate_attached_cluster_install_manifest REST call
551
+ #
552
+ # @param request_pb [::Google::Cloud::GkeMultiCloud::V1::GenerateAttachedClusterInstallManifestRequest]
553
+ # A request object representing the call parameters. Required.
554
+ # @return [Array(String, [String, nil], Hash{String => String})]
555
+ # Uri, Body, Query string parameters
556
+ def self.transcode_generate_attached_cluster_install_manifest_request request_pb
557
+ transcoder = Gapic::Rest::GrpcTranscoder.new
558
+ .with_bindings(
559
+ uri_method: :get,
560
+ uri_template: "/v1/{parent}:generateAttachedClusterInstallManifest",
561
+ matches: [
562
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
563
+ ]
564
+ )
565
+ transcoder.transcode request_pb
566
+ end
567
+
568
+ ##
569
+ # @private
570
+ #
571
+ # GRPC transcoding helper method for the generate_attached_cluster_agent_token REST call
572
+ #
573
+ # @param request_pb [::Google::Cloud::GkeMultiCloud::V1::GenerateAttachedClusterAgentTokenRequest]
574
+ # A request object representing the call parameters. Required.
575
+ # @return [Array(String, [String, nil], Hash{String => String})]
576
+ # Uri, Body, Query string parameters
577
+ def self.transcode_generate_attached_cluster_agent_token_request request_pb
578
+ transcoder = Gapic::Rest::GrpcTranscoder.new
579
+ .with_bindings(
580
+ uri_method: :post,
581
+ uri_template: "/v1/{attached_cluster}:generateAttachedClusterAgentToken",
582
+ body: "*",
583
+ matches: [
584
+ ["attached_cluster", %r{^projects/[^/]+/locations/[^/]+/attachedClusters/[^/]+/?$}, false]
585
+ ]
586
+ )
587
+ transcoder.transcode request_pb
588
+ end
589
+ end
590
+ end
591
+ end
592
+ end
593
+ end
594
+ end
595
+ end
@@ -0,0 +1,55 @@
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 "gapic/rest"
20
+ require "gapic/config"
21
+ require "gapic/config/method"
22
+
23
+ require "google/cloud/gke_multi_cloud/v1/version"
24
+
25
+ require "google/cloud/gke_multi_cloud/v1/attached_clusters/credentials"
26
+ require "google/cloud/gke_multi_cloud/v1/attached_clusters/paths"
27
+ require "google/cloud/gke_multi_cloud/v1/attached_clusters/rest/operations"
28
+ require "google/cloud/gke_multi_cloud/v1/attached_clusters/rest/client"
29
+
30
+ module Google
31
+ module Cloud
32
+ module GkeMultiCloud
33
+ module V1
34
+ ##
35
+ # The AttachedClusters API provides a single centrally managed service
36
+ # to register and manage Anthos attached clusters that run on customer's owned
37
+ # infrastructure.
38
+ #
39
+ # To load this service and instantiate a REST client:
40
+ #
41
+ # require "google/cloud/gke_multi_cloud/v1/attached_clusters/rest"
42
+ # client = ::Google::Cloud::GkeMultiCloud::V1::AttachedClusters::Rest::Client.new
43
+ #
44
+ module AttachedClusters
45
+ # Client for the REST transport
46
+ module Rest
47
+ end
48
+ end
49
+ end
50
+ end
51
+ end
52
+ end
53
+
54
+ helper_path = ::File.join __dir__, "rest", "helpers.rb"
55
+ require "google/cloud/gke_multi_cloud/v1/attached_clusters/rest/helpers" if ::File.file? helper_path
@@ -26,6 +26,7 @@ require "google/cloud/gke_multi_cloud/v1/attached_clusters/credentials"
26
26
  require "google/cloud/gke_multi_cloud/v1/attached_clusters/paths"
27
27
  require "google/cloud/gke_multi_cloud/v1/attached_clusters/operations"
28
28
  require "google/cloud/gke_multi_cloud/v1/attached_clusters/client"
29
+ require "google/cloud/gke_multi_cloud/v1/attached_clusters/rest"
29
30
 
30
31
  module Google
31
32
  module Cloud
@@ -41,6 +42,11 @@ module Google
41
42
  # require "google/cloud/gke_multi_cloud/v1/attached_clusters"
42
43
  # client = ::Google::Cloud::GkeMultiCloud::V1::AttachedClusters::Client.new
43
44
  #
45
+ # @example Load this service and instantiate a REST client
46
+ #
47
+ # require "google/cloud/gke_multi_cloud/v1/attached_clusters/rest"
48
+ # client = ::Google::Cloud::GkeMultiCloud::V1::AttachedClusters::Rest::Client.new
49
+ #
44
50
  module AttachedClusters
45
51
  end
46
52
  end