google-cloud-compute-v1 1.0.0 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (127) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/lib/google/cloud/compute/v1/accelerator_types/rest/client.rb +2 -2
  4. data/lib/google/cloud/compute/v1/addresses/rest/client.rb +37 -8
  5. data/lib/google/cloud/compute/v1/autoscalers/rest/client.rb +59 -14
  6. data/lib/google/cloud/compute/v1/backend_buckets/rest/client.rb +158 -19
  7. data/lib/google/cloud/compute/v1/backend_buckets/rest/service_stub.rb +46 -0
  8. data/lib/google/cloud/compute/v1/backend_services/rest/client.rb +169 -23
  9. data/lib/google/cloud/compute/v1/backend_services/rest/service_stub.rb +46 -0
  10. data/lib/google/cloud/compute/v1/compute_pb.rb +1117 -9
  11. data/lib/google/cloud/compute/v1/disk_types/rest/client.rb +2 -2
  12. data/lib/google/cloud/compute/v1/disks/rest/client.rb +94 -25
  13. data/lib/google/cloud/compute/v1/external_vpn_gateways/rest/client.rb +44 -10
  14. data/lib/google/cloud/compute/v1/firewall_policies/rest/client.rb +98 -31
  15. data/lib/google/cloud/compute/v1/firewall_policies/rest/service_stub.rb +1 -1
  16. data/lib/google/cloud/compute/v1/firewalls/rest/client.rb +54 -13
  17. data/lib/google/cloud/compute/v1/forwarding_rules/rest/client.rb +70 -17
  18. data/lib/google/cloud/compute/v1/global_addresses/rest/client.rb +34 -7
  19. data/lib/google/cloud/compute/v1/global_forwarding_rules/rest/client.rb +64 -16
  20. data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest/client.rb +55 -14
  21. data/lib/google/cloud/compute/v1/global_operations/rest/client.rb +2 -2
  22. data/lib/google/cloud/compute/v1/global_operations/rest/nonstandard_lro.rb +68 -0
  23. data/lib/google/cloud/compute/v1/global_operations.rb +1 -0
  24. data/lib/google/cloud/compute/v1/global_organization_operations/rest/client.rb +1 -1
  25. data/lib/google/cloud/compute/v1/global_organization_operations/rest/nonstandard_lro.rb +68 -0
  26. data/lib/google/cloud/compute/v1/global_organization_operations.rb +1 -0
  27. data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest/client.rb +47 -13
  28. data/lib/google/cloud/compute/v1/health_checks/rest/client.rb +55 -14
  29. data/lib/google/cloud/compute/v1/images/rest/client.rb +64 -16
  30. data/lib/google/cloud/compute/v1/instance_group_managers/rest/client.rb +172 -47
  31. data/lib/google/cloud/compute/v1/instance_groups/rest/client.rb +71 -18
  32. data/lib/google/cloud/compute/v1/instance_templates/rest/client.rb +34 -7
  33. data/lib/google/cloud/compute/v1/instances/rest/client.rb +524 -97
  34. data/lib/google/cloud/compute/v1/instances/rest/service_stub.rb +91 -0
  35. data/lib/google/cloud/compute/v1/interconnect_attachments/rest/client.rb +48 -11
  36. data/lib/google/cloud/compute/v1/interconnect_locations/rest/client.rb +1 -1
  37. data/lib/google/cloud/compute/v1/interconnects/rest/client.rb +44 -10
  38. data/lib/google/cloud/compute/v1/licenses/rest/client.rb +34 -7
  39. data/lib/google/cloud/compute/v1/machine_images/credentials.rb +52 -0
  40. data/lib/google/cloud/compute/v1/machine_images/rest/client.rb +804 -0
  41. data/lib/google/cloud/compute/v1/machine_images/rest/service_stub.rb +363 -0
  42. data/lib/google/cloud/compute/v1/machine_images/rest.rb +33 -0
  43. data/lib/google/cloud/compute/v1/machine_images.rb +44 -0
  44. data/lib/google/cloud/compute/v1/machine_types/rest/client.rb +2 -2
  45. data/lib/google/cloud/compute/v1/network_edge_security_services/credentials.rb +52 -0
  46. data/lib/google/cloud/compute/v1/network_edge_security_services/rest/client.rb +679 -0
  47. data/lib/google/cloud/compute/v1/network_edge_security_services/rest/service_stub.rb +279 -0
  48. data/lib/google/cloud/compute/v1/network_edge_security_services/rest.rb +33 -0
  49. data/lib/google/cloud/compute/v1/network_edge_security_services.rb +44 -0
  50. data/lib/google/cloud/compute/v1/network_endpoint_groups/rest/client.rb +60 -15
  51. data/lib/google/cloud/compute/v1/network_firewall_policies/credentials.rb +52 -0
  52. data/lib/google/cloud/compute/v1/network_firewall_policies/rest/client.rb +1552 -0
  53. data/lib/google/cloud/compute/v1/network_firewall_policies/rest/service_stub.rb +778 -0
  54. data/lib/google/cloud/compute/v1/network_firewall_policies/rest.rb +33 -0
  55. data/lib/google/cloud/compute/v1/network_firewall_policies.rb +44 -0
  56. data/lib/google/cloud/compute/v1/networks/rest/client.rb +85 -23
  57. data/lib/google/cloud/compute/v1/node_groups/rest/client.rb +82 -21
  58. data/lib/google/cloud/compute/v1/node_templates/rest/client.rb +37 -8
  59. data/lib/google/cloud/compute/v1/node_types/rest/client.rb +2 -2
  60. data/lib/google/cloud/compute/v1/packet_mirrorings/rest/client.rb +48 -11
  61. data/lib/google/cloud/compute/v1/projects/rest/client.rb +107 -31
  62. data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/client.rb +47 -13
  63. data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/client.rb +51 -14
  64. data/lib/google/cloud/compute/v1/region_autoscalers/rest/client.rb +58 -13
  65. data/lib/google/cloud/compute/v1/region_backend_services/rest/client.rb +58 -13
  66. data/lib/google/cloud/compute/v1/region_commitments/rest/client.rb +116 -5
  67. data/lib/google/cloud/compute/v1/region_commitments/rest/service_stub.rb +48 -0
  68. data/lib/google/cloud/compute/v1/region_disk_types/rest/client.rb +1 -1
  69. data/lib/google/cloud/compute/v1/region_disks/rest/client.rb +92 -23
  70. data/lib/google/cloud/compute/v1/region_health_check_services/rest/client.rb +47 -10
  71. data/lib/google/cloud/compute/v1/region_health_checks/rest/client.rb +58 -13
  72. data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/client.rb +171 -46
  73. data/lib/google/cloud/compute/v1/region_instance_groups/rest/client.rb +26 -5
  74. data/lib/google/cloud/compute/v1/region_instances/rest/client.rb +24 -3
  75. data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/client.rb +36 -7
  76. data/lib/google/cloud/compute/v1/region_network_firewall_policies/credentials.rb +52 -0
  77. data/lib/google/cloud/compute/v1/region_network_firewall_policies/rest/client.rb +1670 -0
  78. data/lib/google/cloud/compute/v1/region_network_firewall_policies/rest/service_stub.rb +823 -0
  79. data/lib/google/cloud/compute/v1/region_network_firewall_policies/rest.rb +33 -0
  80. data/lib/google/cloud/compute/v1/region_network_firewall_policies.rb +44 -0
  81. data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/client.rb +38 -9
  82. data/lib/google/cloud/compute/v1/region_operations/rest/client.rb +1 -1
  83. data/lib/google/cloud/compute/v1/region_operations/rest/nonstandard_lro.rb +68 -0
  84. data/lib/google/cloud/compute/v1/region_operations.rb +1 -0
  85. data/lib/google/cloud/compute/v1/region_security_policies/credentials.rb +52 -0
  86. data/lib/google/cloud/compute/v1/region_security_policies/rest/client.rb +676 -0
  87. data/lib/google/cloud/compute/v1/region_security_policies/rest/service_stub.rb +276 -0
  88. data/lib/google/cloud/compute/v1/region_security_policies/rest.rb +33 -0
  89. data/lib/google/cloud/compute/v1/region_security_policies.rb +44 -0
  90. data/lib/google/cloud/compute/v1/region_ssl_certificates/rest/client.rb +38 -9
  91. data/lib/google/cloud/compute/v1/region_target_http_proxies/rest/client.rb +47 -10
  92. data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/client.rb +149 -17
  93. data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/service_stub.rb +46 -0
  94. data/lib/google/cloud/compute/v1/region_url_maps/rest/client.rb +58 -13
  95. data/lib/google/cloud/compute/v1/regions/rest/client.rb +3 -3
  96. data/lib/google/cloud/compute/v1/reservations/rest/client.rb +138 -11
  97. data/lib/google/cloud/compute/v1/reservations/rest/service_stub.rb +48 -0
  98. data/lib/google/cloud/compute/v1/resource_policies/rest/client.rb +37 -8
  99. data/lib/google/cloud/compute/v1/routers/rest/client.rb +60 -15
  100. data/lib/google/cloud/compute/v1/routes/rest/client.rb +34 -7
  101. data/lib/google/cloud/compute/v1/security_policies/rest/client.rb +161 -20
  102. data/lib/google/cloud/compute/v1/security_policies/rest/service_stub.rb +50 -0
  103. data/lib/google/cloud/compute/v1/service_attachments/rest/client.rb +51 -14
  104. data/lib/google/cloud/compute/v1/snapshots/rest/client.rb +116 -7
  105. data/lib/google/cloud/compute/v1/snapshots/rest/service_stub.rb +46 -0
  106. data/lib/google/cloud/compute/v1/ssl_certificates/rest/client.rb +37 -10
  107. data/lib/google/cloud/compute/v1/ssl_policies/rest/client.rb +45 -11
  108. data/lib/google/cloud/compute/v1/subnetworks/rest/client.rb +71 -18
  109. data/lib/google/cloud/compute/v1/target_grpc_proxies/rest/client.rb +47 -13
  110. data/lib/google/cloud/compute/v1/target_http_proxies/rest/client.rb +56 -15
  111. data/lib/google/cloud/compute/v1/target_https_proxies/rest/client.rb +86 -24
  112. data/lib/google/cloud/compute/v1/target_instances/rest/client.rb +37 -8
  113. data/lib/google/cloud/compute/v1/target_pools/rest/client.rb +92 -23
  114. data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/client.rb +74 -19
  115. data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/client.rb +54 -13
  116. data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/client.rb +37 -8
  117. data/lib/google/cloud/compute/v1/url_maps/rest/client.rb +65 -17
  118. data/lib/google/cloud/compute/v1/version.rb +1 -1
  119. data/lib/google/cloud/compute/v1/vpn_gateways/rest/client.rb +48 -11
  120. data/lib/google/cloud/compute/v1/vpn_tunnels/rest/client.rb +37 -8
  121. data/lib/google/cloud/compute/v1/zone_operations/rest/client.rb +1 -1
  122. data/lib/google/cloud/compute/v1/zone_operations/rest/nonstandard_lro.rb +68 -0
  123. data/lib/google/cloud/compute/v1/zone_operations.rb +1 -0
  124. data/lib/google/cloud/compute/v1/zones/rest/client.rb +1 -1
  125. data/lib/google/cloud/compute/v1.rb +7 -0
  126. data/proto_docs/google/cloud/compute/v1/compute.rb +3236 -422
  127. metadata +32 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9253ae55abf0ab260c55dfbb0936dca400f45c660681ca2ed14edfd07931bb25
4
- data.tar.gz: a44dcdba909d9cb6a06c970129b5aa9ac68c0eea4e13785bc550d081322c9077
3
+ metadata.gz: cb689d7b7b9c20d34054394475f539e81b148d54a57f1847b11e121483a0b35e
4
+ data.tar.gz: b4b1f534b74aba5092d9ed50cee1a1d536e885c93f6c130f219d2be967c7f635
5
5
  SHA512:
6
- metadata.gz: d79d8cb09a376f878451ca4f9165649be84e4b41c8615fb6979c9d48c8802450cc9bf736766a17eee8d1c8b303594de582f483c6f67ebdebb5498877e44552e9
7
- data.tar.gz: a39af9a02cc31fb084e5f18e0d0993ef46f0961494ca2c24c45a79e66a3d68c16354b8533fc89b411e20a46799485b47039ddec008c4e60a545dbcb9ed21db72
6
+ metadata.gz: 947098a688c701d235bf09cefe014b34c2faf064794a0f0bed87e97cfab57100f58463b2cb410115dbe5b277038a9826958152dd3bde0325887ff06fcde7f1b4
7
+ data.tar.gz: cce2d5bffcd477a408cb204f145f7cae48a4b12d4884554680a0fd53ec08afbbb4f2b8c9632f64ee104fb665c8dedd5f54b46afb58f5957a19ddcd1173f728cf
data/README.md CHANGED
@@ -31,7 +31,7 @@ request = ::Google::Cloud::Compute::V1::AggregatedListAcceleratorTypesRequest.ne
31
31
  response = client.aggregated_list request
32
32
  ```
33
33
 
34
- View the [Client Library Documentation](https://googleapis.dev/ruby/google-cloud-compute-v1/latest)
34
+ View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-compute-v1/latest)
35
35
  for class and method documentation.
36
36
 
37
37
  See also the [Product Documentation](https://cloud.google.com/compute/)
@@ -163,7 +163,7 @@ module Google
163
163
  # the default parameter values, pass an empty Hash as a request object (see above).
164
164
  #
165
165
  # @param filter [::String]
166
- # A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
166
+ # A filter expression that filters resources listed in the response. The expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
167
167
  # @param include_all_scopes [::Boolean]
168
168
  # Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
169
169
  # @param max_results [::Integer]
@@ -302,7 +302,7 @@ module Google
302
302
  # the default parameter values, pass an empty Hash as a request object (see above).
303
303
  #
304
304
  # @param filter [::String]
305
- # A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
305
+ # A filter expression that filters resources listed in the response. The expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
306
306
  # @param max_results [::Integer]
307
307
  # The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
308
308
  # @param order_by [::String]
@@ -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/addresses/rest/service_stub"
22
+ require "google/cloud/compute/v1/region_operations/rest"
22
23
 
23
24
  module Google
24
25
  module Cloud
@@ -139,9 +140,21 @@ module Google
139
140
  credentials = Credentials.new credentials, scope: @config.scope
140
141
  end
141
142
 
143
+ @region_operations = ::Google::Cloud::Compute::V1::RegionOperations::Rest::Client.new do |config|
144
+ config.credentials = credentials
145
+ config.endpoint = @config.endpoint
146
+ end
147
+
142
148
  @addresses_stub = ::Google::Cloud::Compute::V1::Addresses::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
143
149
  end
144
150
 
151
+ ##
152
+ # Get the associated client for long-running operations via RegionOperations.
153
+ #
154
+ # @return [::Google::Cloud::Compute::V1::RegionOperations::Rest::Client]
155
+ #
156
+ attr_reader :region_operations
157
+
145
158
  # Service calls
146
159
 
147
160
  ##
@@ -165,7 +178,7 @@ module Google
165
178
  # the default parameter values, pass an empty Hash as a request object (see above).
166
179
  #
167
180
  # @param filter [::String]
168
- # A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
181
+ # A filter expression that filters resources listed in the response. The expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
169
182
  # @param include_all_scopes [::Boolean]
170
183
  # Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
171
184
  # @param max_results [::Integer]
@@ -247,10 +260,10 @@ module Google
247
260
  # @param request_id [::String]
248
261
  # 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).
249
262
  # @yield [result, response] Access the result along with the Faraday response object
250
- # @yieldparam result [::Gapic::Rest::BaseOperation]
263
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
251
264
  # @yieldparam response [::Faraday::Response]
252
265
  #
253
- # @return [::Gapic::Rest::BaseOperation]
266
+ # @return [::Gapic::GenericLRO::Operation]
254
267
  #
255
268
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
256
269
  def delete request, options = nil
@@ -277,7 +290,15 @@ module Google
277
290
  metadata: @config.metadata
278
291
 
279
292
  @addresses_stub.delete request, options do |result, response|
280
- result = ::Gapic::Rest::BaseOperation.new result
293
+ result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
294
+ operation: result,
295
+ client: region_operations,
296
+ request_values: {
297
+ "project" => request.project,
298
+ "region" => request.region
299
+ },
300
+ options: options
301
+ )
281
302
  yield result, response if block_given?
282
303
  return result
283
304
  end
@@ -380,10 +401,10 @@ module Google
380
401
  # @param request_id [::String]
381
402
  # 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).
382
403
  # @yield [result, response] Access the result along with the Faraday response object
383
- # @yieldparam result [::Gapic::Rest::BaseOperation]
404
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
384
405
  # @yieldparam response [::Faraday::Response]
385
406
  #
386
- # @return [::Gapic::Rest::BaseOperation]
407
+ # @return [::Gapic::GenericLRO::Operation]
387
408
  #
388
409
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
389
410
  def insert request, options = nil
@@ -410,7 +431,15 @@ module Google
410
431
  metadata: @config.metadata
411
432
 
412
433
  @addresses_stub.insert request, options do |result, response|
413
- result = ::Gapic::Rest::BaseOperation.new result
434
+ result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
435
+ operation: result,
436
+ client: region_operations,
437
+ request_values: {
438
+ "project" => request.project,
439
+ "region" => request.region
440
+ },
441
+ options: options
442
+ )
414
443
  yield result, response if block_given?
415
444
  return result
416
445
  end
@@ -440,7 +469,7 @@ module Google
440
469
  # the default parameter values, pass an empty Hash as a request object (see above).
441
470
  #
442
471
  # @param filter [::String]
443
- # A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
472
+ # A filter expression that filters resources listed in the response. The expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
444
473
  # @param max_results [::Integer]
445
474
  # The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
446
475
  # @param order_by [::String]
@@ -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/autoscalers/rest/service_stub"
22
+ require "google/cloud/compute/v1/zone_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
+ @zone_operations = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::Client.new do |config|
148
+ config.credentials = credentials
149
+ config.endpoint = @config.endpoint
150
+ end
151
+
146
152
  @autoscalers_stub = ::Google::Cloud::Compute::V1::Autoscalers::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
147
153
  end
148
154
 
155
+ ##
156
+ # Get the associated client for long-running operations via ZoneOperations.
157
+ #
158
+ # @return [::Google::Cloud::Compute::V1::ZoneOperations::Rest::Client]
159
+ #
160
+ attr_reader :zone_operations
161
+
149
162
  # Service calls
150
163
 
151
164
  ##
@@ -169,7 +182,7 @@ module Google
169
182
  # the default parameter values, pass an empty Hash as a request object (see above).
170
183
  #
171
184
  # @param filter [::String]
172
- # A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
185
+ # A filter expression that filters resources listed in the response. The expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
173
186
  # @param include_all_scopes [::Boolean]
174
187
  # Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
175
188
  # @param max_results [::Integer]
@@ -251,10 +264,10 @@ module Google
251
264
  # @param zone [::String]
252
265
  # Name of the zone for this request.
253
266
  # @yield [result, response] Access the result along with the Faraday response object
254
- # @yieldparam result [::Gapic::Rest::BaseOperation]
267
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
255
268
  # @yieldparam response [::Faraday::Response]
256
269
  #
257
- # @return [::Gapic::Rest::BaseOperation]
270
+ # @return [::Gapic::GenericLRO::Operation]
258
271
  #
259
272
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
260
273
  def delete request, options = nil
@@ -281,7 +294,15 @@ module Google
281
294
  metadata: @config.metadata
282
295
 
283
296
  @autoscalers_stub.delete request, options do |result, response|
284
- result = ::Gapic::Rest::BaseOperation.new result
297
+ result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
298
+ operation: result,
299
+ client: zone_operations,
300
+ request_values: {
301
+ "project" => request.project,
302
+ "zone" => request.zone
303
+ },
304
+ options: options
305
+ )
285
306
  yield result, response if block_given?
286
307
  return result
287
308
  end
@@ -384,10 +405,10 @@ module Google
384
405
  # @param zone [::String]
385
406
  # Name of the zone for this request.
386
407
  # @yield [result, response] Access the result along with the Faraday response object
387
- # @yieldparam result [::Gapic::Rest::BaseOperation]
408
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
388
409
  # @yieldparam response [::Faraday::Response]
389
410
  #
390
- # @return [::Gapic::Rest::BaseOperation]
411
+ # @return [::Gapic::GenericLRO::Operation]
391
412
  #
392
413
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
393
414
  def insert request, options = nil
@@ -414,7 +435,15 @@ module Google
414
435
  metadata: @config.metadata
415
436
 
416
437
  @autoscalers_stub.insert request, options do |result, response|
417
- result = ::Gapic::Rest::BaseOperation.new result
438
+ result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
439
+ operation: result,
440
+ client: zone_operations,
441
+ request_values: {
442
+ "project" => request.project,
443
+ "zone" => request.zone
444
+ },
445
+ options: options
446
+ )
418
447
  yield result, response if block_given?
419
448
  return result
420
449
  end
@@ -444,7 +473,7 @@ module Google
444
473
  # the default parameter values, pass an empty Hash as a request object (see above).
445
474
  #
446
475
  # @param filter [::String]
447
- # A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
476
+ # A filter expression that filters resources listed in the response. The expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
448
477
  # @param max_results [::Integer]
449
478
  # The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
450
479
  # @param order_by [::String]
@@ -528,10 +557,10 @@ module Google
528
557
  # @param zone [::String]
529
558
  # Name of the zone for this request.
530
559
  # @yield [result, response] Access the result along with the Faraday response object
531
- # @yieldparam result [::Gapic::Rest::BaseOperation]
560
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
532
561
  # @yieldparam response [::Faraday::Response]
533
562
  #
534
- # @return [::Gapic::Rest::BaseOperation]
563
+ # @return [::Gapic::GenericLRO::Operation]
535
564
  #
536
565
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
537
566
  def patch request, options = nil
@@ -558,7 +587,15 @@ module Google
558
587
  metadata: @config.metadata
559
588
 
560
589
  @autoscalers_stub.patch request, options do |result, response|
561
- result = ::Gapic::Rest::BaseOperation.new result
590
+ result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
591
+ operation: result,
592
+ client: zone_operations,
593
+ request_values: {
594
+ "project" => request.project,
595
+ "zone" => request.zone
596
+ },
597
+ options: options
598
+ )
562
599
  yield result, response if block_given?
563
600
  return result
564
601
  end
@@ -598,10 +635,10 @@ module Google
598
635
  # @param zone [::String]
599
636
  # Name of the zone for this request.
600
637
  # @yield [result, response] Access the result along with the Faraday response object
601
- # @yieldparam result [::Gapic::Rest::BaseOperation]
638
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
602
639
  # @yieldparam response [::Faraday::Response]
603
640
  #
604
- # @return [::Gapic::Rest::BaseOperation]
641
+ # @return [::Gapic::GenericLRO::Operation]
605
642
  #
606
643
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
607
644
  def update request, options = nil
@@ -628,7 +665,15 @@ module Google
628
665
  metadata: @config.metadata
629
666
 
630
667
  @autoscalers_stub.update request, options do |result, response|
631
- result = ::Gapic::Rest::BaseOperation.new result
668
+ result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
669
+ operation: result,
670
+ client: zone_operations,
671
+ request_values: {
672
+ "project" => request.project,
673
+ "zone" => request.zone
674
+ },
675
+ options: options
676
+ )
632
677
  yield result, response if block_given?
633
678
  return result
634
679
  end