google-cloud-compute-v1 1.1.0 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (79) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/compute/v1/addresses/rest/client.rb +35 -6
  3. data/lib/google/cloud/compute/v1/autoscalers/rest/client.rb +57 -12
  4. data/lib/google/cloud/compute/v1/backend_buckets/rest/client.rb +83 -21
  5. data/lib/google/cloud/compute/v1/backend_services/rest/client.rb +93 -24
  6. data/lib/google/cloud/compute/v1/disks/rest/client.rb +90 -21
  7. data/lib/google/cloud/compute/v1/external_vpn_gateways/rest/client.rb +43 -9
  8. data/lib/google/cloud/compute/v1/firewall_policies/rest/client.rb +97 -30
  9. data/lib/google/cloud/compute/v1/firewalls/rest/client.rb +53 -12
  10. data/lib/google/cloud/compute/v1/forwarding_rules/rest/client.rb +68 -15
  11. data/lib/google/cloud/compute/v1/global_addresses/rest/client.rb +33 -6
  12. data/lib/google/cloud/compute/v1/global_forwarding_rules/rest/client.rb +63 -15
  13. data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest/client.rb +53 -12
  14. data/lib/google/cloud/compute/v1/global_operations/rest/nonstandard_lro.rb +68 -0
  15. data/lib/google/cloud/compute/v1/global_operations.rb +1 -0
  16. data/lib/google/cloud/compute/v1/global_organization_operations/rest/nonstandard_lro.rb +68 -0
  17. data/lib/google/cloud/compute/v1/global_organization_operations.rb +1 -0
  18. data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest/client.rb +43 -9
  19. data/lib/google/cloud/compute/v1/health_checks/rest/client.rb +53 -12
  20. data/lib/google/cloud/compute/v1/images/rest/client.rb +63 -15
  21. data/lib/google/cloud/compute/v1/instance_group_managers/rest/client.rb +167 -42
  22. data/lib/google/cloud/compute/v1/instance_groups/rest/client.rb +68 -15
  23. data/lib/google/cloud/compute/v1/instance_templates/rest/client.rb +33 -6
  24. data/lib/google/cloud/compute/v1/instances/rest/client.rb +365 -96
  25. data/lib/google/cloud/compute/v1/interconnect_attachments/rest/client.rb +46 -9
  26. data/lib/google/cloud/compute/v1/interconnects/rest/client.rb +43 -9
  27. data/lib/google/cloud/compute/v1/licenses/rest/client.rb +33 -6
  28. data/lib/google/cloud/compute/v1/machine_images/rest/client.rb +33 -6
  29. data/lib/google/cloud/compute/v1/network_endpoint_groups/rest/client.rb +57 -12
  30. data/lib/google/cloud/compute/v1/networks/rest/client.rb +83 -21
  31. data/lib/google/cloud/compute/v1/node_groups/rest/client.rb +79 -18
  32. data/lib/google/cloud/compute/v1/node_templates/rest/client.rb +35 -6
  33. data/lib/google/cloud/compute/v1/packet_mirrorings/rest/client.rb +46 -9
  34. data/lib/google/cloud/compute/v1/projects/rest/client.rb +103 -27
  35. data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/client.rb +43 -9
  36. data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/client.rb +46 -9
  37. data/lib/google/cloud/compute/v1/region_autoscalers/rest/client.rb +57 -12
  38. data/lib/google/cloud/compute/v1/region_backend_services/rest/client.rb +57 -12
  39. data/lib/google/cloud/compute/v1/region_commitments/rest/client.rb +35 -6
  40. data/lib/google/cloud/compute/v1/region_disks/rest/client.rb +90 -21
  41. data/lib/google/cloud/compute/v1/region_health_check_services/rest/client.rb +46 -9
  42. data/lib/google/cloud/compute/v1/region_health_checks/rest/client.rb +57 -12
  43. data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/client.rb +167 -42
  44. data/lib/google/cloud/compute/v1/region_instance_groups/rest/client.rb +24 -3
  45. data/lib/google/cloud/compute/v1/region_instances/rest/client.rb +24 -3
  46. data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/client.rb +35 -6
  47. data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/client.rb +35 -6
  48. data/lib/google/cloud/compute/v1/region_operations/rest/nonstandard_lro.rb +68 -0
  49. data/lib/google/cloud/compute/v1/region_operations.rb +1 -0
  50. data/lib/google/cloud/compute/v1/region_ssl_certificates/rest/client.rb +35 -6
  51. data/lib/google/cloud/compute/v1/region_target_http_proxies/rest/client.rb +46 -9
  52. data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/client.rb +57 -12
  53. data/lib/google/cloud/compute/v1/region_url_maps/rest/client.rb +57 -12
  54. data/lib/google/cloud/compute/v1/reservations/rest/client.rb +57 -12
  55. data/lib/google/cloud/compute/v1/resource_policies/rest/client.rb +35 -6
  56. data/lib/google/cloud/compute/v1/routers/rest/client.rb +57 -12
  57. data/lib/google/cloud/compute/v1/routes/rest/client.rb +33 -6
  58. data/lib/google/cloud/compute/v1/security_policies/rest/client.rb +73 -18
  59. data/lib/google/cloud/compute/v1/service_attachments/rest/client.rb +46 -9
  60. data/lib/google/cloud/compute/v1/snapshots/rest/client.rb +43 -9
  61. data/lib/google/cloud/compute/v1/ssl_certificates/rest/client.rb +33 -6
  62. data/lib/google/cloud/compute/v1/ssl_policies/rest/client.rb +43 -9
  63. data/lib/google/cloud/compute/v1/subnetworks/rest/client.rb +68 -15
  64. data/lib/google/cloud/compute/v1/target_grpc_proxies/rest/client.rb +43 -9
  65. data/lib/google/cloud/compute/v1/target_http_proxies/rest/client.rb +53 -12
  66. data/lib/google/cloud/compute/v1/target_https_proxies/rest/client.rb +83 -21
  67. data/lib/google/cloud/compute/v1/target_instances/rest/client.rb +35 -6
  68. data/lib/google/cloud/compute/v1/target_pools/rest/client.rb +90 -21
  69. data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/client.rb +73 -18
  70. data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/client.rb +53 -12
  71. data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/client.rb +35 -6
  72. data/lib/google/cloud/compute/v1/url_maps/rest/client.rb +63 -15
  73. data/lib/google/cloud/compute/v1/version.rb +1 -1
  74. data/lib/google/cloud/compute/v1/vpn_gateways/rest/client.rb +46 -9
  75. data/lib/google/cloud/compute/v1/vpn_tunnels/rest/client.rb +35 -6
  76. data/lib/google/cloud/compute/v1/zone_operations/rest/nonstandard_lro.rb +68 -0
  77. data/lib/google/cloud/compute/v1/zone_operations.rb +1 -0
  78. data/lib/google/cloud/compute/v1.rb +2 -0
  79. metadata +6 -2
@@ -19,6 +19,7 @@
19
19
  require "google/cloud/errors"
20
20
  require "google/cloud/compute/v1/compute_pb"
21
21
  require "google/cloud/compute/v1/instance_templates/rest/service_stub"
22
+ require "google/cloud/compute/v1/global_operations/rest"
22
23
 
23
24
  module Google
24
25
  module Cloud
@@ -143,9 +144,21 @@ module Google
143
144
  credentials = Credentials.new credentials, scope: @config.scope
144
145
  end
145
146
 
147
+ @global_operations = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::Client.new do |config|
148
+ config.credentials = credentials
149
+ config.endpoint = @config.endpoint
150
+ end
151
+
146
152
  @instance_templates_stub = ::Google::Cloud::Compute::V1::InstanceTemplates::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
147
153
  end
148
154
 
155
+ ##
156
+ # Get the associated client for long-running operations via GlobalOperations.
157
+ #
158
+ # @return [::Google::Cloud::Compute::V1::GlobalOperations::Rest::Client]
159
+ #
160
+ attr_reader :global_operations
161
+
149
162
  # Service calls
150
163
 
151
164
  ##
@@ -175,10 +188,10 @@ module Google
175
188
  # @param request_id [::String]
176
189
  # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
177
190
  # @yield [result, response] Access the result along with the Faraday response object
178
- # @yieldparam result [::Gapic::Rest::BaseOperation]
191
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
179
192
  # @yieldparam response [::Faraday::Response]
180
193
  #
181
- # @return [::Gapic::Rest::BaseOperation]
194
+ # @return [::Gapic::GenericLRO::Operation]
182
195
  #
183
196
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
184
197
  def delete request, options = nil
@@ -205,7 +218,14 @@ module Google
205
218
  metadata: @config.metadata
206
219
 
207
220
  @instance_templates_stub.delete request, options do |result, response|
208
- result = ::Gapic::Rest::BaseOperation.new result
221
+ result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
222
+ operation: result,
223
+ client: global_operations,
224
+ request_values: {
225
+ "project" => request.project
226
+ },
227
+ options: options
228
+ )
209
229
  yield result, response if block_given?
210
230
  return result
211
231
  end
@@ -369,10 +389,10 @@ module Google
369
389
  # @param request_id [::String]
370
390
  # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
371
391
  # @yield [result, response] Access the result along with the Faraday response object
372
- # @yieldparam result [::Gapic::Rest::BaseOperation]
392
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
373
393
  # @yieldparam response [::Faraday::Response]
374
394
  #
375
- # @return [::Gapic::Rest::BaseOperation]
395
+ # @return [::Gapic::GenericLRO::Operation]
376
396
  #
377
397
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
378
398
  def insert request, options = nil
@@ -399,7 +419,14 @@ module Google
399
419
  metadata: @config.metadata
400
420
 
401
421
  @instance_templates_stub.insert request, options do |result, response|
402
- result = ::Gapic::Rest::BaseOperation.new result
422
+ result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
423
+ operation: result,
424
+ client: global_operations,
425
+ request_values: {
426
+ "project" => request.project
427
+ },
428
+ options: options
429
+ )
403
430
  yield result, response if block_given?
404
431
  return result
405
432
  end