google-cloud-compute-v1 2.1.0 → 2.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (191) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/compute/v1/accelerator_types/rest/client.rb +4 -2
  3. data/lib/google/cloud/compute/v1/accelerator_types/rest/service_stub.rb +3 -3
  4. data/lib/google/cloud/compute/v1/addresses/rest/client.rb +92 -2
  5. data/lib/google/cloud/compute/v1/addresses/rest/service_stub.rb +68 -6
  6. data/lib/google/cloud/compute/v1/autoscalers/rest/client.rb +4 -2
  7. data/lib/google/cloud/compute/v1/autoscalers/rest/service_stub.rb +7 -7
  8. data/lib/google/cloud/compute/v1/backend_buckets/rest/client.rb +4 -2
  9. data/lib/google/cloud/compute/v1/backend_buckets/rest/service_stub.rb +9 -9
  10. data/lib/google/cloud/compute/v1/backend_services/rest/client.rb +4 -2
  11. data/lib/google/cloud/compute/v1/backend_services/rest/service_stub.rb +14 -14
  12. data/lib/google/cloud/compute/v1/compute_pb.rb +68 -10873
  13. data/lib/google/cloud/compute/v1/disk_types/rest/client.rb +4 -2
  14. data/lib/google/cloud/compute/v1/disk_types/rest/service_stub.rb +3 -3
  15. data/lib/google/cloud/compute/v1/disks/rest/client.rb +350 -2
  16. data/lib/google/cloud/compute/v1/disks/rest/service_stub.rb +259 -14
  17. data/lib/google/cloud/compute/v1/external_vpn_gateways/rest/client.rb +4 -2
  18. data/lib/google/cloud/compute/v1/external_vpn_gateways/rest/service_stub.rb +6 -6
  19. data/lib/google/cloud/compute/v1/firewall_policies/rest/client.rb +4 -2
  20. data/lib/google/cloud/compute/v1/firewall_policies/rest/service_stub.rb +18 -18
  21. data/lib/google/cloud/compute/v1/firewalls/rest/client.rb +4 -2
  22. data/lib/google/cloud/compute/v1/firewalls/rest/service_stub.rb +6 -6
  23. data/lib/google/cloud/compute/v1/forwarding_rules/rest/client.rb +4 -2
  24. data/lib/google/cloud/compute/v1/forwarding_rules/rest/service_stub.rb +8 -8
  25. data/lib/google/cloud/compute/v1/global_addresses/rest/client.rb +89 -2
  26. data/lib/google/cloud/compute/v1/global_addresses/rest/service_stub.rb +66 -5
  27. data/lib/google/cloud/compute/v1/global_forwarding_rules/rest/client.rb +4 -2
  28. data/lib/google/cloud/compute/v1/global_forwarding_rules/rest/service_stub.rb +7 -7
  29. data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest/client.rb +4 -2
  30. data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest/service_stub.rb +7 -7
  31. data/lib/google/cloud/compute/v1/global_operations/rest/client.rb +4 -2
  32. data/lib/google/cloud/compute/v1/global_operations/rest/service_stub.rb +5 -5
  33. data/lib/google/cloud/compute/v1/global_organization_operations/rest/client.rb +4 -2
  34. data/lib/google/cloud/compute/v1/global_organization_operations/rest/service_stub.rb +3 -3
  35. data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest/client.rb +4 -2
  36. data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest/service_stub.rb +5 -5
  37. data/lib/google/cloud/compute/v1/health_checks/rest/client.rb +4 -2
  38. data/lib/google/cloud/compute/v1/health_checks/rest/service_stub.rb +7 -7
  39. data/lib/google/cloud/compute/v1/image_family_views/rest/client.rb +4 -2
  40. data/lib/google/cloud/compute/v1/image_family_views/rest/service_stub.rb +1 -1
  41. data/lib/google/cloud/compute/v1/images/rest/client.rb +4 -2
  42. data/lib/google/cloud/compute/v1/images/rest/service_stub.rb +11 -11
  43. data/lib/google/cloud/compute/v1/instance_group_managers/rest/client.rb +4 -2
  44. data/lib/google/cloud/compute/v1/instance_group_managers/rest/service_stub.rb +20 -20
  45. data/lib/google/cloud/compute/v1/instance_groups/rest/client.rb +4 -2
  46. data/lib/google/cloud/compute/v1/instance_groups/rest/service_stub.rb +9 -9
  47. data/lib/google/cloud/compute/v1/instance_templates/rest/client.rb +4 -2
  48. data/lib/google/cloud/compute/v1/instance_templates/rest/service_stub.rb +8 -8
  49. data/lib/google/cloud/compute/v1/instances/rest/client.rb +7 -3
  50. data/lib/google/cloud/compute/v1/instances/rest/service_stub.rb +46 -46
  51. data/lib/google/cloud/compute/v1/interconnect_attachments/rest/client.rb +4 -2
  52. data/lib/google/cloud/compute/v1/interconnect_attachments/rest/service_stub.rb +7 -7
  53. data/lib/google/cloud/compute/v1/interconnect_locations/rest/client.rb +4 -2
  54. data/lib/google/cloud/compute/v1/interconnect_locations/rest/service_stub.rb +2 -2
  55. data/lib/google/cloud/compute/v1/interconnect_remote_locations/credentials.rb +53 -0
  56. data/lib/google/cloud/compute/v1/interconnect_remote_locations/rest/client.rb +436 -0
  57. data/lib/google/cloud/compute/v1/interconnect_remote_locations/rest/service_stub.rb +167 -0
  58. data/lib/google/cloud/compute/v1/interconnect_remote_locations/rest.rb +51 -0
  59. data/lib/google/cloud/compute/v1/interconnect_remote_locations.rb +47 -0
  60. data/lib/google/cloud/compute/v1/interconnects/rest/client.rb +4 -2
  61. data/lib/google/cloud/compute/v1/interconnects/rest/service_stub.rb +7 -7
  62. data/lib/google/cloud/compute/v1/license_codes/rest/client.rb +4 -2
  63. data/lib/google/cloud/compute/v1/license_codes/rest/service_stub.rb +2 -2
  64. data/lib/google/cloud/compute/v1/licenses/rest/client.rb +4 -2
  65. data/lib/google/cloud/compute/v1/licenses/rest/service_stub.rb +7 -7
  66. data/lib/google/cloud/compute/v1/machine_images/rest/client.rb +4 -2
  67. data/lib/google/cloud/compute/v1/machine_images/rest/service_stub.rb +7 -7
  68. data/lib/google/cloud/compute/v1/machine_types/rest/client.rb +4 -2
  69. data/lib/google/cloud/compute/v1/machine_types/rest/service_stub.rb +3 -3
  70. data/lib/google/cloud/compute/v1/network_attachments/rest/client.rb +4 -2
  71. data/lib/google/cloud/compute/v1/network_attachments/rest/service_stub.rb +8 -8
  72. data/lib/google/cloud/compute/v1/network_edge_security_services/rest/client.rb +4 -2
  73. data/lib/google/cloud/compute/v1/network_edge_security_services/rest/service_stub.rb +5 -5
  74. data/lib/google/cloud/compute/v1/network_endpoint_groups/rest/client.rb +4 -2
  75. data/lib/google/cloud/compute/v1/network_endpoint_groups/rest/service_stub.rb +9 -9
  76. data/lib/google/cloud/compute/v1/network_firewall_policies/rest/client.rb +4 -2
  77. data/lib/google/cloud/compute/v1/network_firewall_policies/rest/service_stub.rb +16 -16
  78. data/lib/google/cloud/compute/v1/networks/rest/client.rb +4 -2
  79. data/lib/google/cloud/compute/v1/networks/rest/service_stub.rb +11 -11
  80. data/lib/google/cloud/compute/v1/node_groups/rest/client.rb +4 -2
  81. data/lib/google/cloud/compute/v1/node_groups/rest/service_stub.rb +14 -14
  82. data/lib/google/cloud/compute/v1/node_templates/rest/client.rb +4 -2
  83. data/lib/google/cloud/compute/v1/node_templates/rest/service_stub.rb +8 -8
  84. data/lib/google/cloud/compute/v1/node_types/rest/client.rb +4 -2
  85. data/lib/google/cloud/compute/v1/node_types/rest/service_stub.rb +3 -3
  86. data/lib/google/cloud/compute/v1/packet_mirrorings/rest/client.rb +4 -2
  87. data/lib/google/cloud/compute/v1/packet_mirrorings/rest/service_stub.rb +7 -7
  88. data/lib/google/cloud/compute/v1/projects/rest/client.rb +5 -3
  89. data/lib/google/cloud/compute/v1/projects/rest/service_stub.rb +13 -13
  90. data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/client.rb +4 -2
  91. data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/service_stub.rb +5 -5
  92. data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/client.rb +4 -2
  93. data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/service_stub.rb +6 -6
  94. data/lib/google/cloud/compute/v1/region_autoscalers/rest/client.rb +4 -2
  95. data/lib/google/cloud/compute/v1/region_autoscalers/rest/service_stub.rb +6 -6
  96. data/lib/google/cloud/compute/v1/region_backend_services/rest/client.rb +4 -2
  97. data/lib/google/cloud/compute/v1/region_backend_services/rest/service_stub.rb +9 -9
  98. data/lib/google/cloud/compute/v1/region_commitments/rest/client.rb +4 -2
  99. data/lib/google/cloud/compute/v1/region_commitments/rest/service_stub.rb +5 -5
  100. data/lib/google/cloud/compute/v1/region_disk_types/rest/client.rb +4 -2
  101. data/lib/google/cloud/compute/v1/region_disk_types/rest/service_stub.rb +2 -2
  102. data/lib/google/cloud/compute/v1/region_disks/rest/client.rb +350 -2
  103. data/lib/google/cloud/compute/v1/region_disks/rest/service_stub.rb +258 -13
  104. data/lib/google/cloud/compute/v1/region_health_check_services/rest/client.rb +4 -2
  105. data/lib/google/cloud/compute/v1/region_health_check_services/rest/service_stub.rb +5 -5
  106. data/lib/google/cloud/compute/v1/region_health_checks/rest/client.rb +4 -2
  107. data/lib/google/cloud/compute/v1/region_health_checks/rest/service_stub.rb +6 -6
  108. data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/client.rb +4 -2
  109. data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/service_stub.rb +19 -19
  110. data/lib/google/cloud/compute/v1/region_instance_groups/rest/client.rb +4 -2
  111. data/lib/google/cloud/compute/v1/region_instance_groups/rest/service_stub.rb +4 -4
  112. data/lib/google/cloud/compute/v1/region_instance_templates/rest/client.rb +4 -2
  113. data/lib/google/cloud/compute/v1/region_instance_templates/rest/service_stub.rb +4 -4
  114. data/lib/google/cloud/compute/v1/region_instances/rest/client.rb +4 -2
  115. data/lib/google/cloud/compute/v1/region_instances/rest/service_stub.rb +1 -1
  116. data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/client.rb +4 -2
  117. data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/service_stub.rb +4 -4
  118. data/lib/google/cloud/compute/v1/region_network_firewall_policies/rest/client.rb +4 -2
  119. data/lib/google/cloud/compute/v1/region_network_firewall_policies/rest/service_stub.rb +17 -17
  120. data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/client.rb +4 -2
  121. data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/service_stub.rb +4 -4
  122. data/lib/google/cloud/compute/v1/region_operations/rest/client.rb +4 -2
  123. data/lib/google/cloud/compute/v1/region_operations/rest/service_stub.rb +4 -4
  124. data/lib/google/cloud/compute/v1/region_security_policies/rest/client.rb +4 -2
  125. data/lib/google/cloud/compute/v1/region_security_policies/rest/service_stub.rb +5 -5
  126. data/lib/google/cloud/compute/v1/region_ssl_certificates/rest/client.rb +4 -2
  127. data/lib/google/cloud/compute/v1/region_ssl_certificates/rest/service_stub.rb +4 -4
  128. data/lib/google/cloud/compute/v1/region_ssl_policies/rest/client.rb +4 -2
  129. data/lib/google/cloud/compute/v1/region_ssl_policies/rest/service_stub.rb +6 -6
  130. data/lib/google/cloud/compute/v1/region_target_http_proxies/rest/client.rb +4 -2
  131. data/lib/google/cloud/compute/v1/region_target_http_proxies/rest/service_stub.rb +5 -5
  132. data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/client.rb +4 -2
  133. data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/service_stub.rb +7 -7
  134. data/lib/google/cloud/compute/v1/region_target_tcp_proxies/rest/client.rb +4 -2
  135. data/lib/google/cloud/compute/v1/region_target_tcp_proxies/rest/service_stub.rb +4 -4
  136. data/lib/google/cloud/compute/v1/region_url_maps/rest/client.rb +4 -2
  137. data/lib/google/cloud/compute/v1/region_url_maps/rest/service_stub.rb +7 -7
  138. data/lib/google/cloud/compute/v1/regions/rest/client.rb +4 -2
  139. data/lib/google/cloud/compute/v1/regions/rest/service_stub.rb +2 -2
  140. data/lib/google/cloud/compute/v1/reservations/rest/client.rb +4 -2
  141. data/lib/google/cloud/compute/v1/reservations/rest/service_stub.rb +10 -10
  142. data/lib/google/cloud/compute/v1/resource_policies/rest/client.rb +4 -2
  143. data/lib/google/cloud/compute/v1/resource_policies/rest/service_stub.rb +8 -8
  144. data/lib/google/cloud/compute/v1/rest.rb +1 -0
  145. data/lib/google/cloud/compute/v1/routers/rest/client.rb +7 -3
  146. data/lib/google/cloud/compute/v1/routers/rest/service_stub.rb +10 -10
  147. data/lib/google/cloud/compute/v1/routes/rest/client.rb +4 -2
  148. data/lib/google/cloud/compute/v1/routes/rest/service_stub.rb +4 -4
  149. data/lib/google/cloud/compute/v1/security_policies/rest/client.rb +4 -2
  150. data/lib/google/cloud/compute/v1/security_policies/rest/service_stub.rb +12 -12
  151. data/lib/google/cloud/compute/v1/service_attachments/rest/client.rb +4 -2
  152. data/lib/google/cloud/compute/v1/service_attachments/rest/service_stub.rb +9 -9
  153. data/lib/google/cloud/compute/v1/snapshots/rest/client.rb +4 -2
  154. data/lib/google/cloud/compute/v1/snapshots/rest/service_stub.rb +8 -8
  155. data/lib/google/cloud/compute/v1/ssl_certificates/rest/client.rb +4 -2
  156. data/lib/google/cloud/compute/v1/ssl_certificates/rest/service_stub.rb +5 -5
  157. data/lib/google/cloud/compute/v1/ssl_policies/rest/client.rb +4 -2
  158. data/lib/google/cloud/compute/v1/ssl_policies/rest/service_stub.rb +7 -7
  159. data/lib/google/cloud/compute/v1/subnetworks/rest/client.rb +4 -2
  160. data/lib/google/cloud/compute/v1/subnetworks/rest/service_stub.rb +12 -12
  161. data/lib/google/cloud/compute/v1/target_grpc_proxies/rest/client.rb +4 -2
  162. data/lib/google/cloud/compute/v1/target_grpc_proxies/rest/service_stub.rb +5 -5
  163. data/lib/google/cloud/compute/v1/target_http_proxies/rest/client.rb +4 -2
  164. data/lib/google/cloud/compute/v1/target_http_proxies/rest/service_stub.rb +7 -7
  165. data/lib/google/cloud/compute/v1/target_https_proxies/rest/client.rb +4 -2
  166. data/lib/google/cloud/compute/v1/target_https_proxies/rest/service_stub.rb +11 -11
  167. data/lib/google/cloud/compute/v1/target_instances/rest/client.rb +4 -2
  168. data/lib/google/cloud/compute/v1/target_instances/rest/service_stub.rb +5 -5
  169. data/lib/google/cloud/compute/v1/target_pools/rest/client.rb +4 -2
  170. data/lib/google/cloud/compute/v1/target_pools/rest/service_stub.rb +11 -11
  171. data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/client.rb +4 -2
  172. data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/service_stub.rb +9 -9
  173. data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/client.rb +4 -2
  174. data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/service_stub.rb +7 -7
  175. data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/client.rb +4 -2
  176. data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/service_stub.rb +6 -6
  177. data/lib/google/cloud/compute/v1/url_maps/rest/client.rb +4 -2
  178. data/lib/google/cloud/compute/v1/url_maps/rest/service_stub.rb +9 -9
  179. data/lib/google/cloud/compute/v1/version.rb +1 -1
  180. data/lib/google/cloud/compute/v1/vpn_gateways/rest/client.rb +4 -2
  181. data/lib/google/cloud/compute/v1/vpn_gateways/rest/service_stub.rb +8 -8
  182. data/lib/google/cloud/compute/v1/vpn_tunnels/rest/client.rb +4 -2
  183. data/lib/google/cloud/compute/v1/vpn_tunnels/rest/service_stub.rb +6 -6
  184. data/lib/google/cloud/compute/v1/zone_operations/rest/client.rb +4 -2
  185. data/lib/google/cloud/compute/v1/zone_operations/rest/service_stub.rb +4 -4
  186. data/lib/google/cloud/compute/v1/zones/rest/client.rb +4 -2
  187. data/lib/google/cloud/compute/v1/zones/rest/service_stub.rb +2 -2
  188. data/lib/google/cloud/compute/v1.rb +1 -0
  189. data/proto_docs/google/api/client.rb +58 -1
  190. data/proto_docs/google/cloud/compute/v1/compute.rb +1025 -102
  191. metadata +9 -4
@@ -59,7 +59,7 @@ module Google
59
59
 
60
60
  verb, uri, query_string_params, body = ServiceStub.transcode_get_request request_pb
61
61
  query_string_params = if query_string_params.any?
62
- query_string_params.to_h { |p| p.split("=", 2) }
62
+ query_string_params.to_h { |p| p.split "=", 2 }
63
63
  else
64
64
  {}
65
65
  end
@@ -97,7 +97,7 @@ module Google
97
97
 
98
98
  verb, uri, query_string_params, body = ServiceStub.transcode_list_request request_pb
99
99
  query_string_params = if query_string_params.any?
100
- query_string_params.to_h { |p| p.split("=", 2) }
100
+ query_string_params.to_h { |p| p.split "=", 2 }
101
101
  else
102
102
  {}
103
103
  end
@@ -67,6 +67,8 @@ module Google
67
67
 
68
68
  default_config.rpcs.add_resource_policies.timeout = 600.0
69
69
 
70
+ default_config.rpcs.bulk_insert.timeout = 600.0
71
+
70
72
  default_config.rpcs.create_snapshot.timeout = 600.0
71
73
 
72
74
  default_config.rpcs.delete.timeout = 600.0
@@ -96,6 +98,12 @@ module Google
96
98
 
97
99
  default_config.rpcs.set_labels.timeout = 600.0
98
100
 
101
+ default_config.rpcs.start_async_replication.timeout = 600.0
102
+
103
+ default_config.rpcs.stop_async_replication.timeout = 600.0
104
+
105
+ default_config.rpcs.stop_group_async_replication.timeout = 600.0
106
+
99
107
  default_config.rpcs.test_iam_permissions.timeout = 600.0
100
108
 
101
109
  default_config.rpcs.update.timeout = 600.0
@@ -153,7 +161,7 @@ module Google
153
161
  credentials = @config.credentials
154
162
  # Use self-signed JWT if the endpoint is unchanged from default,
155
163
  # but only if the default endpoint does not have a region prefix.
156
- enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
164
+ enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
157
165
  !@config.endpoint.split(".").first.include?("-")
158
166
  credentials ||= Credentials.default scope: @config.scope,
159
167
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -261,6 +269,83 @@ module Google
261
269
  raise ::Google::Cloud::Error.from_error(e)
262
270
  end
263
271
 
272
+ ##
273
+ # Bulk create a set of disks.
274
+ #
275
+ # @overload bulk_insert(request, options = nil)
276
+ # Pass arguments to `bulk_insert` via a request object, either of type
277
+ # {::Google::Cloud::Compute::V1::BulkInsertRegionDiskRequest} or an equivalent Hash.
278
+ #
279
+ # @param request [::Google::Cloud::Compute::V1::BulkInsertRegionDiskRequest, ::Hash]
280
+ # A request object representing the call parameters. Required. To specify no
281
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
282
+ # @param options [::Gapic::CallOptions, ::Hash]
283
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
284
+ #
285
+ # @overload bulk_insert(bulk_insert_disk_resource_resource: nil, project: nil, region: nil, request_id: nil)
286
+ # Pass arguments to `bulk_insert` via keyword arguments. Note that at
287
+ # least one keyword argument is required. To specify no parameters, or to keep all
288
+ # the default parameter values, pass an empty Hash as a request object (see above).
289
+ #
290
+ # @param bulk_insert_disk_resource_resource [::Google::Cloud::Compute::V1::BulkInsertDiskResource, ::Hash]
291
+ # The body resource for this request
292
+ # @param project [::String]
293
+ # Project ID for this request.
294
+ # @param region [::String]
295
+ # The name of the region for this request.
296
+ # @param request_id [::String]
297
+ # 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).
298
+ # @yield [result, operation] Access the result along with the TransportOperation object
299
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
300
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
301
+ #
302
+ # @return [::Gapic::GenericLRO::Operation]
303
+ #
304
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
305
+ def bulk_insert request, options = nil
306
+ raise ::ArgumentError, "request must be provided" if request.nil?
307
+
308
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::BulkInsertRegionDiskRequest
309
+
310
+ # Converts hash and nil to an options object
311
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
312
+
313
+ # Customize the options with defaults
314
+ call_metadata = @config.rpcs.bulk_insert.metadata.to_h
315
+
316
+ # Set x-goog-api-client and x-goog-user-project headers
317
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
318
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
319
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
320
+ transports_version_send: [:rest]
321
+
322
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
323
+
324
+ options.apply_defaults timeout: @config.rpcs.bulk_insert.timeout,
325
+ metadata: call_metadata,
326
+ retry_policy: @config.rpcs.bulk_insert.retry_policy
327
+
328
+ options.apply_defaults timeout: @config.timeout,
329
+ metadata: @config.metadata,
330
+ retry_policy: @config.retry_policy
331
+
332
+ @region_disks_stub.bulk_insert request, options do |result, response|
333
+ result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
334
+ operation: result,
335
+ client: region_operations,
336
+ request_values: {
337
+ "project" => request.project,
338
+ "region" => request.region
339
+ },
340
+ options: options
341
+ )
342
+ yield result, response if block_given?
343
+ return result
344
+ end
345
+ rescue ::Gapic::Rest::Error => e
346
+ raise ::Google::Cloud::Error.from_error(e)
347
+ end
348
+
264
349
  ##
265
350
  # Creates a snapshot of a specified persistent disk. For regular snapshot creation, consider using snapshots.insert instead, as that method supports more features, such as creating snapshots in a project different from the source disk project.
266
351
  #
@@ -1010,6 +1095,239 @@ module Google
1010
1095
  raise ::Google::Cloud::Error.from_error(e)
1011
1096
  end
1012
1097
 
1098
+ ##
1099
+ # Starts asynchronous replication. Must be invoked on the primary disk.
1100
+ #
1101
+ # @overload start_async_replication(request, options = nil)
1102
+ # Pass arguments to `start_async_replication` via a request object, either of type
1103
+ # {::Google::Cloud::Compute::V1::StartAsyncReplicationRegionDiskRequest} or an equivalent Hash.
1104
+ #
1105
+ # @param request [::Google::Cloud::Compute::V1::StartAsyncReplicationRegionDiskRequest, ::Hash]
1106
+ # A request object representing the call parameters. Required. To specify no
1107
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1108
+ # @param options [::Gapic::CallOptions, ::Hash]
1109
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1110
+ #
1111
+ # @overload start_async_replication(disk: nil, project: nil, region: nil, region_disks_start_async_replication_request_resource: nil, request_id: nil)
1112
+ # Pass arguments to `start_async_replication` via keyword arguments. Note that at
1113
+ # least one keyword argument is required. To specify no parameters, or to keep all
1114
+ # the default parameter values, pass an empty Hash as a request object (see above).
1115
+ #
1116
+ # @param disk [::String]
1117
+ # The name of the persistent disk.
1118
+ # @param project [::String]
1119
+ # Project ID for this request.
1120
+ # @param region [::String]
1121
+ # The name of the region for this request.
1122
+ # @param region_disks_start_async_replication_request_resource [::Google::Cloud::Compute::V1::RegionDisksStartAsyncReplicationRequest, ::Hash]
1123
+ # The body resource for this request
1124
+ # @param request_id [::String]
1125
+ # 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).
1126
+ # @yield [result, operation] Access the result along with the TransportOperation object
1127
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
1128
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1129
+ #
1130
+ # @return [::Gapic::GenericLRO::Operation]
1131
+ #
1132
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1133
+ def start_async_replication request, options = nil
1134
+ raise ::ArgumentError, "request must be provided" if request.nil?
1135
+
1136
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::StartAsyncReplicationRegionDiskRequest
1137
+
1138
+ # Converts hash and nil to an options object
1139
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1140
+
1141
+ # Customize the options with defaults
1142
+ call_metadata = @config.rpcs.start_async_replication.metadata.to_h
1143
+
1144
+ # Set x-goog-api-client and x-goog-user-project headers
1145
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1146
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1147
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
1148
+ transports_version_send: [:rest]
1149
+
1150
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1151
+
1152
+ options.apply_defaults timeout: @config.rpcs.start_async_replication.timeout,
1153
+ metadata: call_metadata,
1154
+ retry_policy: @config.rpcs.start_async_replication.retry_policy
1155
+
1156
+ options.apply_defaults timeout: @config.timeout,
1157
+ metadata: @config.metadata,
1158
+ retry_policy: @config.retry_policy
1159
+
1160
+ @region_disks_stub.start_async_replication request, options do |result, response|
1161
+ result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
1162
+ operation: result,
1163
+ client: region_operations,
1164
+ request_values: {
1165
+ "project" => request.project,
1166
+ "region" => request.region
1167
+ },
1168
+ options: options
1169
+ )
1170
+ yield result, response if block_given?
1171
+ return result
1172
+ end
1173
+ rescue ::Gapic::Rest::Error => e
1174
+ raise ::Google::Cloud::Error.from_error(e)
1175
+ end
1176
+
1177
+ ##
1178
+ # Stops asynchronous replication. Can be invoked either on the primary or on the secondary disk.
1179
+ #
1180
+ # @overload stop_async_replication(request, options = nil)
1181
+ # Pass arguments to `stop_async_replication` via a request object, either of type
1182
+ # {::Google::Cloud::Compute::V1::StopAsyncReplicationRegionDiskRequest} or an equivalent Hash.
1183
+ #
1184
+ # @param request [::Google::Cloud::Compute::V1::StopAsyncReplicationRegionDiskRequest, ::Hash]
1185
+ # A request object representing the call parameters. Required. To specify no
1186
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1187
+ # @param options [::Gapic::CallOptions, ::Hash]
1188
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1189
+ #
1190
+ # @overload stop_async_replication(disk: nil, project: nil, region: nil, request_id: nil)
1191
+ # Pass arguments to `stop_async_replication` via keyword arguments. Note that at
1192
+ # least one keyword argument is required. To specify no parameters, or to keep all
1193
+ # the default parameter values, pass an empty Hash as a request object (see above).
1194
+ #
1195
+ # @param disk [::String]
1196
+ # The name of the persistent disk.
1197
+ # @param project [::String]
1198
+ # Project ID for this request.
1199
+ # @param region [::String]
1200
+ # The name of the region for this request.
1201
+ # @param request_id [::String]
1202
+ # 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).
1203
+ # @yield [result, operation] Access the result along with the TransportOperation object
1204
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
1205
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1206
+ #
1207
+ # @return [::Gapic::GenericLRO::Operation]
1208
+ #
1209
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1210
+ def stop_async_replication request, options = nil
1211
+ raise ::ArgumentError, "request must be provided" if request.nil?
1212
+
1213
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::StopAsyncReplicationRegionDiskRequest
1214
+
1215
+ # Converts hash and nil to an options object
1216
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1217
+
1218
+ # Customize the options with defaults
1219
+ call_metadata = @config.rpcs.stop_async_replication.metadata.to_h
1220
+
1221
+ # Set x-goog-api-client and x-goog-user-project headers
1222
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1223
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1224
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
1225
+ transports_version_send: [:rest]
1226
+
1227
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1228
+
1229
+ options.apply_defaults timeout: @config.rpcs.stop_async_replication.timeout,
1230
+ metadata: call_metadata,
1231
+ retry_policy: @config.rpcs.stop_async_replication.retry_policy
1232
+
1233
+ options.apply_defaults timeout: @config.timeout,
1234
+ metadata: @config.metadata,
1235
+ retry_policy: @config.retry_policy
1236
+
1237
+ @region_disks_stub.stop_async_replication request, options do |result, response|
1238
+ result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
1239
+ operation: result,
1240
+ client: region_operations,
1241
+ request_values: {
1242
+ "project" => request.project,
1243
+ "region" => request.region
1244
+ },
1245
+ options: options
1246
+ )
1247
+ yield result, response if block_given?
1248
+ return result
1249
+ end
1250
+ rescue ::Gapic::Rest::Error => e
1251
+ raise ::Google::Cloud::Error.from_error(e)
1252
+ end
1253
+
1254
+ ##
1255
+ # Stops asynchronous replication for a consistency group of disks. Can be invoked either in the primary or secondary scope.
1256
+ #
1257
+ # @overload stop_group_async_replication(request, options = nil)
1258
+ # Pass arguments to `stop_group_async_replication` via a request object, either of type
1259
+ # {::Google::Cloud::Compute::V1::StopGroupAsyncReplicationRegionDiskRequest} or an equivalent Hash.
1260
+ #
1261
+ # @param request [::Google::Cloud::Compute::V1::StopGroupAsyncReplicationRegionDiskRequest, ::Hash]
1262
+ # A request object representing the call parameters. Required. To specify no
1263
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1264
+ # @param options [::Gapic::CallOptions, ::Hash]
1265
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1266
+ #
1267
+ # @overload stop_group_async_replication(disks_stop_group_async_replication_resource_resource: nil, project: nil, region: nil, request_id: nil)
1268
+ # Pass arguments to `stop_group_async_replication` via keyword arguments. Note that at
1269
+ # least one keyword argument is required. To specify no parameters, or to keep all
1270
+ # the default parameter values, pass an empty Hash as a request object (see above).
1271
+ #
1272
+ # @param disks_stop_group_async_replication_resource_resource [::Google::Cloud::Compute::V1::DisksStopGroupAsyncReplicationResource, ::Hash]
1273
+ # The body resource for this request
1274
+ # @param project [::String]
1275
+ # Project ID for this request.
1276
+ # @param region [::String]
1277
+ # The name of the region for this request. This must be the region of the primary or secondary disks in the consistency group.
1278
+ # @param request_id [::String]
1279
+ # 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).
1280
+ # @yield [result, operation] Access the result along with the TransportOperation object
1281
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
1282
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1283
+ #
1284
+ # @return [::Gapic::GenericLRO::Operation]
1285
+ #
1286
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1287
+ def stop_group_async_replication request, options = nil
1288
+ raise ::ArgumentError, "request must be provided" if request.nil?
1289
+
1290
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::StopGroupAsyncReplicationRegionDiskRequest
1291
+
1292
+ # Converts hash and nil to an options object
1293
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1294
+
1295
+ # Customize the options with defaults
1296
+ call_metadata = @config.rpcs.stop_group_async_replication.metadata.to_h
1297
+
1298
+ # Set x-goog-api-client and x-goog-user-project headers
1299
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1300
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1301
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
1302
+ transports_version_send: [:rest]
1303
+
1304
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1305
+
1306
+ options.apply_defaults timeout: @config.rpcs.stop_group_async_replication.timeout,
1307
+ metadata: call_metadata,
1308
+ retry_policy: @config.rpcs.stop_group_async_replication.retry_policy
1309
+
1310
+ options.apply_defaults timeout: @config.timeout,
1311
+ metadata: @config.metadata,
1312
+ retry_policy: @config.retry_policy
1313
+
1314
+ @region_disks_stub.stop_group_async_replication request, options do |result, response|
1315
+ result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
1316
+ operation: result,
1317
+ client: region_operations,
1318
+ request_values: {
1319
+ "project" => request.project,
1320
+ "region" => request.region
1321
+ },
1322
+ options: options
1323
+ )
1324
+ yield result, response if block_given?
1325
+ return result
1326
+ end
1327
+ rescue ::Gapic::Rest::Error => e
1328
+ raise ::Google::Cloud::Error.from_error(e)
1329
+ end
1330
+
1013
1331
  ##
1014
1332
  # Returns permissions that a caller has on the specified resource.
1015
1333
  #
@@ -1233,7 +1551,9 @@ module Google
1233
1551
  class Configuration
1234
1552
  extend ::Gapic::Config
1235
1553
 
1236
- config_attr :endpoint, "compute.googleapis.com", ::String
1554
+ DEFAULT_ENDPOINT = "compute.googleapis.com"
1555
+
1556
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
1237
1557
  config_attr :credentials, nil do |value|
1238
1558
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
1239
1559
  allowed.any? { |klass| klass === value }
@@ -1289,6 +1609,11 @@ module Google
1289
1609
  #
1290
1610
  attr_reader :add_resource_policies
1291
1611
  ##
1612
+ # RPC-specific configuration for `bulk_insert`
1613
+ # @return [::Gapic::Config::Method]
1614
+ #
1615
+ attr_reader :bulk_insert
1616
+ ##
1292
1617
  # RPC-specific configuration for `create_snapshot`
1293
1618
  # @return [::Gapic::Config::Method]
1294
1619
  #
@@ -1339,6 +1664,21 @@ module Google
1339
1664
  #
1340
1665
  attr_reader :set_labels
1341
1666
  ##
1667
+ # RPC-specific configuration for `start_async_replication`
1668
+ # @return [::Gapic::Config::Method]
1669
+ #
1670
+ attr_reader :start_async_replication
1671
+ ##
1672
+ # RPC-specific configuration for `stop_async_replication`
1673
+ # @return [::Gapic::Config::Method]
1674
+ #
1675
+ attr_reader :stop_async_replication
1676
+ ##
1677
+ # RPC-specific configuration for `stop_group_async_replication`
1678
+ # @return [::Gapic::Config::Method]
1679
+ #
1680
+ attr_reader :stop_group_async_replication
1681
+ ##
1342
1682
  # RPC-specific configuration for `test_iam_permissions`
1343
1683
  # @return [::Gapic::Config::Method]
1344
1684
  #
@@ -1353,6 +1693,8 @@ module Google
1353
1693
  def initialize parent_rpcs = nil
1354
1694
  add_resource_policies_config = parent_rpcs.add_resource_policies if parent_rpcs.respond_to? :add_resource_policies
1355
1695
  @add_resource_policies = ::Gapic::Config::Method.new add_resource_policies_config
1696
+ bulk_insert_config = parent_rpcs.bulk_insert if parent_rpcs.respond_to? :bulk_insert
1697
+ @bulk_insert = ::Gapic::Config::Method.new bulk_insert_config
1356
1698
  create_snapshot_config = parent_rpcs.create_snapshot if parent_rpcs.respond_to? :create_snapshot
1357
1699
  @create_snapshot = ::Gapic::Config::Method.new create_snapshot_config
1358
1700
  delete_config = parent_rpcs.delete if parent_rpcs.respond_to? :delete
@@ -1373,6 +1715,12 @@ module Google
1373
1715
  @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config
1374
1716
  set_labels_config = parent_rpcs.set_labels if parent_rpcs.respond_to? :set_labels
1375
1717
  @set_labels = ::Gapic::Config::Method.new set_labels_config
1718
+ start_async_replication_config = parent_rpcs.start_async_replication if parent_rpcs.respond_to? :start_async_replication
1719
+ @start_async_replication = ::Gapic::Config::Method.new start_async_replication_config
1720
+ stop_async_replication_config = parent_rpcs.stop_async_replication if parent_rpcs.respond_to? :stop_async_replication
1721
+ @stop_async_replication = ::Gapic::Config::Method.new stop_async_replication_config
1722
+ stop_group_async_replication_config = parent_rpcs.stop_group_async_replication if parent_rpcs.respond_to? :stop_group_async_replication
1723
+ @stop_group_async_replication = ::Gapic::Config::Method.new stop_group_async_replication_config
1376
1724
  test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions
1377
1725
  @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config
1378
1726
  update_config = parent_rpcs.update if parent_rpcs.respond_to? :update