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
@@ -132,7 +132,7 @@ module Google
132
132
  credentials = @config.credentials
133
133
  # Use self-signed JWT if the endpoint is unchanged from default,
134
134
  # but only if the default endpoint does not have a region prefix.
135
- enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
135
+ enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
136
136
  !@config.endpoint.split(".").first.include?("-")
137
137
  credentials ||= Credentials.default scope: @config.scope,
138
138
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -437,7 +437,9 @@ module Google
437
437
  class Configuration
438
438
  extend ::Gapic::Config
439
439
 
440
- config_attr :endpoint, "compute.googleapis.com", ::String
440
+ DEFAULT_ENDPOINT = "compute.googleapis.com"
441
+
442
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
441
443
  config_attr :credentials, nil do |value|
442
444
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
443
445
  allowed.any? { |klass| klass === value }
@@ -59,7 +59,7 @@ module Google
59
59
 
60
60
  verb, uri, query_string_params, body = ServiceStub.transcode_aggregated_list_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_get_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
@@ -135,7 +135,7 @@ module Google
135
135
 
136
136
  verb, uri, query_string_params, body = ServiceStub.transcode_list_request request_pb
137
137
  query_string_params = if query_string_params.any?
138
- query_string_params.to_h { |p| p.split("=", 2) }
138
+ query_string_params.to_h { |p| p.split "=", 2 }
139
139
  else
140
140
  {}
141
141
  end
@@ -72,6 +72,8 @@ module Google
72
72
  initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
73
73
  }
74
74
 
75
+ default_config.rpcs.bulk_insert.timeout = 600.0
76
+
75
77
  default_config.rpcs.create_snapshot.timeout = 600.0
76
78
 
77
79
  default_config.rpcs.delete.timeout = 600.0
@@ -101,6 +103,12 @@ module Google
101
103
 
102
104
  default_config.rpcs.set_labels.timeout = 600.0
103
105
 
106
+ default_config.rpcs.start_async_replication.timeout = 600.0
107
+
108
+ default_config.rpcs.stop_async_replication.timeout = 600.0
109
+
110
+ default_config.rpcs.stop_group_async_replication.timeout = 600.0
111
+
104
112
  default_config.rpcs.test_iam_permissions.timeout = 600.0
105
113
 
106
114
  default_config.rpcs.update.timeout = 600.0
@@ -158,7 +166,7 @@ module Google
158
166
  credentials = @config.credentials
159
167
  # Use self-signed JWT if the endpoint is unchanged from default,
160
168
  # but only if the default endpoint does not have a region prefix.
161
- enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
169
+ enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
162
170
  !@config.endpoint.split(".").first.include?("-")
163
171
  credentials ||= Credentials.default scope: @config.scope,
164
172
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -341,6 +349,83 @@ module Google
341
349
  raise ::Google::Cloud::Error.from_error(e)
342
350
  end
343
351
 
352
+ ##
353
+ # Bulk create a set of disks.
354
+ #
355
+ # @overload bulk_insert(request, options = nil)
356
+ # Pass arguments to `bulk_insert` via a request object, either of type
357
+ # {::Google::Cloud::Compute::V1::BulkInsertDiskRequest} or an equivalent Hash.
358
+ #
359
+ # @param request [::Google::Cloud::Compute::V1::BulkInsertDiskRequest, ::Hash]
360
+ # A request object representing the call parameters. Required. To specify no
361
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
362
+ # @param options [::Gapic::CallOptions, ::Hash]
363
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
364
+ #
365
+ # @overload bulk_insert(bulk_insert_disk_resource_resource: nil, project: nil, request_id: nil, zone: nil)
366
+ # Pass arguments to `bulk_insert` via keyword arguments. Note that at
367
+ # least one keyword argument is required. To specify no parameters, or to keep all
368
+ # the default parameter values, pass an empty Hash as a request object (see above).
369
+ #
370
+ # @param bulk_insert_disk_resource_resource [::Google::Cloud::Compute::V1::BulkInsertDiskResource, ::Hash]
371
+ # The body resource for this request
372
+ # @param project [::String]
373
+ # Project ID for this request.
374
+ # @param request_id [::String]
375
+ # 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).
376
+ # @param zone [::String]
377
+ # The name of the zone for this request.
378
+ # @yield [result, operation] Access the result along with the TransportOperation object
379
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
380
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
381
+ #
382
+ # @return [::Gapic::GenericLRO::Operation]
383
+ #
384
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
385
+ def bulk_insert request, options = nil
386
+ raise ::ArgumentError, "request must be provided" if request.nil?
387
+
388
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::BulkInsertDiskRequest
389
+
390
+ # Converts hash and nil to an options object
391
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
392
+
393
+ # Customize the options with defaults
394
+ call_metadata = @config.rpcs.bulk_insert.metadata.to_h
395
+
396
+ # Set x-goog-api-client and x-goog-user-project headers
397
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
398
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
399
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
400
+ transports_version_send: [:rest]
401
+
402
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
403
+
404
+ options.apply_defaults timeout: @config.rpcs.bulk_insert.timeout,
405
+ metadata: call_metadata,
406
+ retry_policy: @config.rpcs.bulk_insert.retry_policy
407
+
408
+ options.apply_defaults timeout: @config.timeout,
409
+ metadata: @config.metadata,
410
+ retry_policy: @config.retry_policy
411
+
412
+ @disks_stub.bulk_insert request, options do |result, response|
413
+ result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
414
+ operation: result,
415
+ client: zone_operations,
416
+ request_values: {
417
+ "project" => request.project,
418
+ "zone" => request.zone
419
+ },
420
+ options: options
421
+ )
422
+ yield result, response if block_given?
423
+ return result
424
+ end
425
+ rescue ::Gapic::Rest::Error => e
426
+ raise ::Google::Cloud::Error.from_error(e)
427
+ end
428
+
344
429
  ##
345
430
  # 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.
346
431
  #
@@ -1092,6 +1177,239 @@ module Google
1092
1177
  raise ::Google::Cloud::Error.from_error(e)
1093
1178
  end
1094
1179
 
1180
+ ##
1181
+ # Starts asynchronous replication. Must be invoked on the primary disk.
1182
+ #
1183
+ # @overload start_async_replication(request, options = nil)
1184
+ # Pass arguments to `start_async_replication` via a request object, either of type
1185
+ # {::Google::Cloud::Compute::V1::StartAsyncReplicationDiskRequest} or an equivalent Hash.
1186
+ #
1187
+ # @param request [::Google::Cloud::Compute::V1::StartAsyncReplicationDiskRequest, ::Hash]
1188
+ # A request object representing the call parameters. Required. To specify no
1189
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1190
+ # @param options [::Gapic::CallOptions, ::Hash]
1191
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1192
+ #
1193
+ # @overload start_async_replication(disk: nil, disks_start_async_replication_request_resource: nil, project: nil, request_id: nil, zone: nil)
1194
+ # Pass arguments to `start_async_replication` via keyword arguments. Note that at
1195
+ # least one keyword argument is required. To specify no parameters, or to keep all
1196
+ # the default parameter values, pass an empty Hash as a request object (see above).
1197
+ #
1198
+ # @param disk [::String]
1199
+ # The name of the persistent disk.
1200
+ # @param disks_start_async_replication_request_resource [::Google::Cloud::Compute::V1::DisksStartAsyncReplicationRequest, ::Hash]
1201
+ # The body resource for this request
1202
+ # @param project [::String]
1203
+ # Project ID for this request.
1204
+ # @param request_id [::String]
1205
+ # 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).
1206
+ # @param zone [::String]
1207
+ # The name of the zone for this request.
1208
+ # @yield [result, operation] Access the result along with the TransportOperation object
1209
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
1210
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1211
+ #
1212
+ # @return [::Gapic::GenericLRO::Operation]
1213
+ #
1214
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1215
+ def start_async_replication request, options = nil
1216
+ raise ::ArgumentError, "request must be provided" if request.nil?
1217
+
1218
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::StartAsyncReplicationDiskRequest
1219
+
1220
+ # Converts hash and nil to an options object
1221
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1222
+
1223
+ # Customize the options with defaults
1224
+ call_metadata = @config.rpcs.start_async_replication.metadata.to_h
1225
+
1226
+ # Set x-goog-api-client and x-goog-user-project headers
1227
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1228
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1229
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
1230
+ transports_version_send: [:rest]
1231
+
1232
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1233
+
1234
+ options.apply_defaults timeout: @config.rpcs.start_async_replication.timeout,
1235
+ metadata: call_metadata,
1236
+ retry_policy: @config.rpcs.start_async_replication.retry_policy
1237
+
1238
+ options.apply_defaults timeout: @config.timeout,
1239
+ metadata: @config.metadata,
1240
+ retry_policy: @config.retry_policy
1241
+
1242
+ @disks_stub.start_async_replication request, options do |result, response|
1243
+ result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
1244
+ operation: result,
1245
+ client: zone_operations,
1246
+ request_values: {
1247
+ "project" => request.project,
1248
+ "zone" => request.zone
1249
+ },
1250
+ options: options
1251
+ )
1252
+ yield result, response if block_given?
1253
+ return result
1254
+ end
1255
+ rescue ::Gapic::Rest::Error => e
1256
+ raise ::Google::Cloud::Error.from_error(e)
1257
+ end
1258
+
1259
+ ##
1260
+ # Stops asynchronous replication. Can be invoked either on the primary or on the secondary disk.
1261
+ #
1262
+ # @overload stop_async_replication(request, options = nil)
1263
+ # Pass arguments to `stop_async_replication` via a request object, either of type
1264
+ # {::Google::Cloud::Compute::V1::StopAsyncReplicationDiskRequest} or an equivalent Hash.
1265
+ #
1266
+ # @param request [::Google::Cloud::Compute::V1::StopAsyncReplicationDiskRequest, ::Hash]
1267
+ # A request object representing the call parameters. Required. To specify no
1268
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1269
+ # @param options [::Gapic::CallOptions, ::Hash]
1270
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1271
+ #
1272
+ # @overload stop_async_replication(disk: nil, project: nil, request_id: nil, zone: nil)
1273
+ # Pass arguments to `stop_async_replication` via keyword arguments. Note that at
1274
+ # least one keyword argument is required. To specify no parameters, or to keep all
1275
+ # the default parameter values, pass an empty Hash as a request object (see above).
1276
+ #
1277
+ # @param disk [::String]
1278
+ # The name of the persistent disk.
1279
+ # @param project [::String]
1280
+ # Project ID for this request.
1281
+ # @param request_id [::String]
1282
+ # 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).
1283
+ # @param zone [::String]
1284
+ # The name of the zone for this request.
1285
+ # @yield [result, operation] Access the result along with the TransportOperation object
1286
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
1287
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1288
+ #
1289
+ # @return [::Gapic::GenericLRO::Operation]
1290
+ #
1291
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1292
+ def stop_async_replication request, options = nil
1293
+ raise ::ArgumentError, "request must be provided" if request.nil?
1294
+
1295
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::StopAsyncReplicationDiskRequest
1296
+
1297
+ # Converts hash and nil to an options object
1298
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1299
+
1300
+ # Customize the options with defaults
1301
+ call_metadata = @config.rpcs.stop_async_replication.metadata.to_h
1302
+
1303
+ # Set x-goog-api-client and x-goog-user-project headers
1304
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1305
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1306
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
1307
+ transports_version_send: [:rest]
1308
+
1309
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1310
+
1311
+ options.apply_defaults timeout: @config.rpcs.stop_async_replication.timeout,
1312
+ metadata: call_metadata,
1313
+ retry_policy: @config.rpcs.stop_async_replication.retry_policy
1314
+
1315
+ options.apply_defaults timeout: @config.timeout,
1316
+ metadata: @config.metadata,
1317
+ retry_policy: @config.retry_policy
1318
+
1319
+ @disks_stub.stop_async_replication request, options do |result, response|
1320
+ result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
1321
+ operation: result,
1322
+ client: zone_operations,
1323
+ request_values: {
1324
+ "project" => request.project,
1325
+ "zone" => request.zone
1326
+ },
1327
+ options: options
1328
+ )
1329
+ yield result, response if block_given?
1330
+ return result
1331
+ end
1332
+ rescue ::Gapic::Rest::Error => e
1333
+ raise ::Google::Cloud::Error.from_error(e)
1334
+ end
1335
+
1336
+ ##
1337
+ # Stops asynchronous replication for a consistency group of disks. Can be invoked either in the primary or secondary scope.
1338
+ #
1339
+ # @overload stop_group_async_replication(request, options = nil)
1340
+ # Pass arguments to `stop_group_async_replication` via a request object, either of type
1341
+ # {::Google::Cloud::Compute::V1::StopGroupAsyncReplicationDiskRequest} or an equivalent Hash.
1342
+ #
1343
+ # @param request [::Google::Cloud::Compute::V1::StopGroupAsyncReplicationDiskRequest, ::Hash]
1344
+ # A request object representing the call parameters. Required. To specify no
1345
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1346
+ # @param options [::Gapic::CallOptions, ::Hash]
1347
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1348
+ #
1349
+ # @overload stop_group_async_replication(disks_stop_group_async_replication_resource_resource: nil, project: nil, request_id: nil, zone: nil)
1350
+ # Pass arguments to `stop_group_async_replication` via keyword arguments. Note that at
1351
+ # least one keyword argument is required. To specify no parameters, or to keep all
1352
+ # the default parameter values, pass an empty Hash as a request object (see above).
1353
+ #
1354
+ # @param disks_stop_group_async_replication_resource_resource [::Google::Cloud::Compute::V1::DisksStopGroupAsyncReplicationResource, ::Hash]
1355
+ # The body resource for this request
1356
+ # @param project [::String]
1357
+ # Project ID for this request.
1358
+ # @param request_id [::String]
1359
+ # 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).
1360
+ # @param zone [::String]
1361
+ # The name of the zone for this request. This must be the zone of the primary or secondary disks in the consistency group.
1362
+ # @yield [result, operation] Access the result along with the TransportOperation object
1363
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
1364
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1365
+ #
1366
+ # @return [::Gapic::GenericLRO::Operation]
1367
+ #
1368
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1369
+ def stop_group_async_replication request, options = nil
1370
+ raise ::ArgumentError, "request must be provided" if request.nil?
1371
+
1372
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::StopGroupAsyncReplicationDiskRequest
1373
+
1374
+ # Converts hash and nil to an options object
1375
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1376
+
1377
+ # Customize the options with defaults
1378
+ call_metadata = @config.rpcs.stop_group_async_replication.metadata.to_h
1379
+
1380
+ # Set x-goog-api-client and x-goog-user-project headers
1381
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1382
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1383
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
1384
+ transports_version_send: [:rest]
1385
+
1386
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1387
+
1388
+ options.apply_defaults timeout: @config.rpcs.stop_group_async_replication.timeout,
1389
+ metadata: call_metadata,
1390
+ retry_policy: @config.rpcs.stop_group_async_replication.retry_policy
1391
+
1392
+ options.apply_defaults timeout: @config.timeout,
1393
+ metadata: @config.metadata,
1394
+ retry_policy: @config.retry_policy
1395
+
1396
+ @disks_stub.stop_group_async_replication request, options do |result, response|
1397
+ result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
1398
+ operation: result,
1399
+ client: zone_operations,
1400
+ request_values: {
1401
+ "project" => request.project,
1402
+ "zone" => request.zone
1403
+ },
1404
+ options: options
1405
+ )
1406
+ yield result, response if block_given?
1407
+ return result
1408
+ end
1409
+ rescue ::Gapic::Rest::Error => e
1410
+ raise ::Google::Cloud::Error.from_error(e)
1411
+ end
1412
+
1095
1413
  ##
1096
1414
  # Returns permissions that a caller has on the specified resource.
1097
1415
  #
@@ -1315,7 +1633,9 @@ module Google
1315
1633
  class Configuration
1316
1634
  extend ::Gapic::Config
1317
1635
 
1318
- config_attr :endpoint, "compute.googleapis.com", ::String
1636
+ DEFAULT_ENDPOINT = "compute.googleapis.com"
1637
+
1638
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
1319
1639
  config_attr :credentials, nil do |value|
1320
1640
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
1321
1641
  allowed.any? { |klass| klass === value }
@@ -1376,6 +1696,11 @@ module Google
1376
1696
  #
1377
1697
  attr_reader :aggregated_list
1378
1698
  ##
1699
+ # RPC-specific configuration for `bulk_insert`
1700
+ # @return [::Gapic::Config::Method]
1701
+ #
1702
+ attr_reader :bulk_insert
1703
+ ##
1379
1704
  # RPC-specific configuration for `create_snapshot`
1380
1705
  # @return [::Gapic::Config::Method]
1381
1706
  #
@@ -1426,6 +1751,21 @@ module Google
1426
1751
  #
1427
1752
  attr_reader :set_labels
1428
1753
  ##
1754
+ # RPC-specific configuration for `start_async_replication`
1755
+ # @return [::Gapic::Config::Method]
1756
+ #
1757
+ attr_reader :start_async_replication
1758
+ ##
1759
+ # RPC-specific configuration for `stop_async_replication`
1760
+ # @return [::Gapic::Config::Method]
1761
+ #
1762
+ attr_reader :stop_async_replication
1763
+ ##
1764
+ # RPC-specific configuration for `stop_group_async_replication`
1765
+ # @return [::Gapic::Config::Method]
1766
+ #
1767
+ attr_reader :stop_group_async_replication
1768
+ ##
1429
1769
  # RPC-specific configuration for `test_iam_permissions`
1430
1770
  # @return [::Gapic::Config::Method]
1431
1771
  #
@@ -1442,6 +1782,8 @@ module Google
1442
1782
  @add_resource_policies = ::Gapic::Config::Method.new add_resource_policies_config
1443
1783
  aggregated_list_config = parent_rpcs.aggregated_list if parent_rpcs.respond_to? :aggregated_list
1444
1784
  @aggregated_list = ::Gapic::Config::Method.new aggregated_list_config
1785
+ bulk_insert_config = parent_rpcs.bulk_insert if parent_rpcs.respond_to? :bulk_insert
1786
+ @bulk_insert = ::Gapic::Config::Method.new bulk_insert_config
1445
1787
  create_snapshot_config = parent_rpcs.create_snapshot if parent_rpcs.respond_to? :create_snapshot
1446
1788
  @create_snapshot = ::Gapic::Config::Method.new create_snapshot_config
1447
1789
  delete_config = parent_rpcs.delete if parent_rpcs.respond_to? :delete
@@ -1462,6 +1804,12 @@ module Google
1462
1804
  @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config
1463
1805
  set_labels_config = parent_rpcs.set_labels if parent_rpcs.respond_to? :set_labels
1464
1806
  @set_labels = ::Gapic::Config::Method.new set_labels_config
1807
+ start_async_replication_config = parent_rpcs.start_async_replication if parent_rpcs.respond_to? :start_async_replication
1808
+ @start_async_replication = ::Gapic::Config::Method.new start_async_replication_config
1809
+ stop_async_replication_config = parent_rpcs.stop_async_replication if parent_rpcs.respond_to? :stop_async_replication
1810
+ @stop_async_replication = ::Gapic::Config::Method.new stop_async_replication_config
1811
+ stop_group_async_replication_config = parent_rpcs.stop_group_async_replication if parent_rpcs.respond_to? :stop_group_async_replication
1812
+ @stop_group_async_replication = ::Gapic::Config::Method.new stop_group_async_replication_config
1465
1813
  test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions
1466
1814
  @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config
1467
1815
  update_config = parent_rpcs.update if parent_rpcs.respond_to? :update