google-cloud-compute-v1 0.5.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.yardopts +1 -1
- data/AUTHENTICATION.md +7 -25
- data/README.md +4 -4
- data/lib/google/cloud/compute/v1/accelerator_types/rest/client.rb +2 -2
- data/lib/google/cloud/compute/v1/addresses/rest/client.rb +37 -8
- data/lib/google/cloud/compute/v1/autoscalers/rest/client.rb +59 -14
- data/lib/google/cloud/compute/v1/backend_buckets/rest/client.rb +158 -19
- data/lib/google/cloud/compute/v1/backend_buckets/rest/service_stub.rb +46 -0
- data/lib/google/cloud/compute/v1/backend_services/rest/client.rb +169 -23
- data/lib/google/cloud/compute/v1/backend_services/rest/service_stub.rb +46 -0
- data/lib/google/cloud/compute/v1/compute_pb.rb +534 -2
- data/lib/google/cloud/compute/v1/disk_types/rest/client.rb +2 -2
- data/lib/google/cloud/compute/v1/disks/rest/client.rb +93 -24
- data/lib/google/cloud/compute/v1/external_vpn_gateways/rest/client.rb +44 -10
- data/lib/google/cloud/compute/v1/firewall_policies/rest/client.rb +98 -31
- data/lib/google/cloud/compute/v1/firewall_policies/rest/service_stub.rb +2 -2
- data/lib/google/cloud/compute/v1/firewalls/rest/client.rb +54 -13
- data/lib/google/cloud/compute/v1/forwarding_rules/rest/client.rb +70 -17
- data/lib/google/cloud/compute/v1/global_addresses/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/global_forwarding_rules/rest/client.rb +64 -16
- data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest/client.rb +55 -14
- data/lib/google/cloud/compute/v1/global_operations/rest/client.rb +2 -2
- data/lib/google/cloud/compute/v1/global_operations/rest/nonstandard_lro.rb +68 -0
- data/lib/google/cloud/compute/v1/global_operations.rb +1 -0
- data/lib/google/cloud/compute/v1/global_organization_operations/rest/client.rb +1 -1
- data/lib/google/cloud/compute/v1/global_organization_operations/rest/nonstandard_lro.rb +68 -0
- data/lib/google/cloud/compute/v1/global_organization_operations.rb +1 -0
- data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest/client.rb +47 -13
- data/lib/google/cloud/compute/v1/health_checks/rest/client.rb +55 -14
- data/lib/google/cloud/compute/v1/images/rest/client.rb +64 -16
- data/lib/google/cloud/compute/v1/instance_group_managers/rest/client.rb +172 -47
- data/lib/google/cloud/compute/v1/instance_groups/rest/client.rb +71 -18
- data/lib/google/cloud/compute/v1/instance_templates/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/instances/rest/client.rb +521 -96
- data/lib/google/cloud/compute/v1/instances/rest/service_stub.rb +91 -0
- data/lib/google/cloud/compute/v1/interconnect_attachments/rest/client.rb +48 -11
- data/lib/google/cloud/compute/v1/interconnect_locations/rest/client.rb +1 -1
- data/lib/google/cloud/compute/v1/interconnects/rest/client.rb +44 -10
- data/lib/google/cloud/compute/v1/licenses/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/machine_images/credentials.rb +52 -0
- data/lib/google/cloud/compute/v1/machine_images/rest/client.rb +804 -0
- data/lib/google/cloud/compute/v1/machine_images/rest/service_stub.rb +363 -0
- data/lib/google/cloud/compute/v1/machine_images/rest.rb +33 -0
- data/lib/google/cloud/compute/v1/machine_images.rb +44 -0
- data/lib/google/cloud/compute/v1/machine_types/rest/client.rb +2 -2
- data/lib/google/cloud/compute/v1/network_endpoint_groups/rest/client.rb +60 -15
- data/lib/google/cloud/compute/v1/networks/rest/client.rb +85 -23
- data/lib/google/cloud/compute/v1/node_groups/rest/client.rb +82 -21
- data/lib/google/cloud/compute/v1/node_templates/rest/client.rb +37 -8
- data/lib/google/cloud/compute/v1/node_types/rest/client.rb +2 -2
- data/lib/google/cloud/compute/v1/packet_mirrorings/rest/client.rb +48 -11
- data/lib/google/cloud/compute/v1/projects/rest/client.rb +107 -31
- data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/client.rb +47 -13
- data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/client.rb +51 -14
- data/lib/google/cloud/compute/v1/region_autoscalers/rest/client.rb +58 -13
- data/lib/google/cloud/compute/v1/region_backend_services/rest/client.rb +58 -13
- data/lib/google/cloud/compute/v1/region_commitments/rest/client.rb +116 -5
- data/lib/google/cloud/compute/v1/region_commitments/rest/service_stub.rb +48 -0
- data/lib/google/cloud/compute/v1/region_disk_types/rest/client.rb +1 -1
- data/lib/google/cloud/compute/v1/region_disks/rest/client.rb +92 -23
- data/lib/google/cloud/compute/v1/region_health_check_services/rest/client.rb +47 -10
- data/lib/google/cloud/compute/v1/region_health_checks/rest/client.rb +58 -13
- data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/client.rb +171 -46
- data/lib/google/cloud/compute/v1/region_instance_groups/rest/client.rb +26 -5
- data/lib/google/cloud/compute/v1/region_instances/rest/client.rb +24 -3
- data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/client.rb +36 -7
- data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/client.rb +38 -9
- data/lib/google/cloud/compute/v1/region_operations/rest/client.rb +1 -1
- data/lib/google/cloud/compute/v1/region_operations/rest/nonstandard_lro.rb +68 -0
- data/lib/google/cloud/compute/v1/region_operations.rb +1 -0
- data/lib/google/cloud/compute/v1/region_ssl_certificates/rest/client.rb +38 -9
- data/lib/google/cloud/compute/v1/region_target_http_proxies/rest/client.rb +47 -10
- data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/client.rb +62 -17
- data/lib/google/cloud/compute/v1/region_url_maps/rest/client.rb +58 -13
- data/lib/google/cloud/compute/v1/regions/rest/client.rb +3 -3
- data/lib/google/cloud/compute/v1/reservations/rest/client.rb +138 -11
- data/lib/google/cloud/compute/v1/reservations/rest/service_stub.rb +48 -0
- data/lib/google/cloud/compute/v1/resource_policies/rest/client.rb +37 -8
- data/lib/google/cloud/compute/v1/routers/rest/client.rb +60 -15
- data/lib/google/cloud/compute/v1/routes/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/security_policies/rest/client.rb +75 -20
- data/lib/google/cloud/compute/v1/service_attachments/rest/client.rb +51 -14
- data/lib/google/cloud/compute/v1/snapshots/rest/client.rb +116 -7
- data/lib/google/cloud/compute/v1/snapshots/rest/service_stub.rb +46 -0
- data/lib/google/cloud/compute/v1/ssl_certificates/rest/client.rb +37 -10
- data/lib/google/cloud/compute/v1/ssl_policies/rest/client.rb +45 -11
- data/lib/google/cloud/compute/v1/subnetworks/rest/client.rb +71 -18
- data/lib/google/cloud/compute/v1/target_grpc_proxies/rest/client.rb +47 -13
- data/lib/google/cloud/compute/v1/target_http_proxies/rest/client.rb +56 -15
- data/lib/google/cloud/compute/v1/target_https_proxies/rest/client.rb +86 -24
- data/lib/google/cloud/compute/v1/target_instances/rest/client.rb +37 -8
- data/lib/google/cloud/compute/v1/target_pools/rest/client.rb +92 -23
- data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/client.rb +74 -19
- data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/client.rb +54 -13
- data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/client.rb +37 -8
- data/lib/google/cloud/compute/v1/url_maps/rest/client.rb +65 -17
- data/lib/google/cloud/compute/v1/version.rb +1 -1
- data/lib/google/cloud/compute/v1/vpn_gateways/rest/client.rb +48 -11
- data/lib/google/cloud/compute/v1/vpn_tunnels/rest/client.rb +37 -8
- data/lib/google/cloud/compute/v1/zone_operations/rest/client.rb +1 -1
- data/lib/google/cloud/compute/v1/zone_operations/rest/nonstandard_lro.rb +68 -0
- data/lib/google/cloud/compute/v1/zone_operations.rb +1 -0
- data/lib/google/cloud/compute/v1/zones/rest/client.rb +1 -1
- data/lib/google/cloud/compute/v1.rb +3 -0
- data/proto_docs/README.md +1 -1
- data/proto_docs/google/api/resource.rb +10 -71
- data/proto_docs/google/cloud/compute/v1/compute.rb +1647 -330
- metadata +14 -7
@@ -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/region_target_https_proxies/rest/service_stub"
|
22
|
+
require "google/cloud/compute/v1/region_operations/rest"
|
22
23
|
|
23
24
|
module Google
|
24
25
|
module Cloud
|
@@ -138,9 +139,21 @@ module Google
|
|
138
139
|
credentials = Credentials.new credentials, scope: @config.scope
|
139
140
|
end
|
140
141
|
|
142
|
+
@region_operations = ::Google::Cloud::Compute::V1::RegionOperations::Rest::Client.new do |config|
|
143
|
+
config.credentials = credentials
|
144
|
+
config.endpoint = @config.endpoint
|
145
|
+
end
|
146
|
+
|
141
147
|
@region_target_https_proxies_stub = ::Google::Cloud::Compute::V1::RegionTargetHttpsProxies::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
|
142
148
|
end
|
143
149
|
|
150
|
+
##
|
151
|
+
# Get the associated client for long-running operations via RegionOperations.
|
152
|
+
#
|
153
|
+
# @return [::Google::Cloud::Compute::V1::RegionOperations::Rest::Client]
|
154
|
+
#
|
155
|
+
attr_reader :region_operations
|
156
|
+
|
144
157
|
# Service calls
|
145
158
|
|
146
159
|
##
|
@@ -168,14 +181,14 @@ module Google
|
|
168
181
|
# @param region [::String]
|
169
182
|
# Name of the region scoping this request.
|
170
183
|
# @param request_id [::String]
|
171
|
-
# 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).
|
184
|
+
# 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).
|
172
185
|
# @param target_https_proxy [::String]
|
173
186
|
# Name of the TargetHttpsProxy resource to delete.
|
174
187
|
# @yield [result, response] Access the result along with the Faraday response object
|
175
|
-
# @yieldparam result [::Gapic::
|
188
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
176
189
|
# @yieldparam response [::Faraday::Response]
|
177
190
|
#
|
178
|
-
# @return [::Gapic::
|
191
|
+
# @return [::Gapic::GenericLRO::Operation]
|
179
192
|
#
|
180
193
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
181
194
|
def delete request, options = nil
|
@@ -202,7 +215,15 @@ module Google
|
|
202
215
|
metadata: @config.metadata
|
203
216
|
|
204
217
|
@region_target_https_proxies_stub.delete request, options do |result, response|
|
205
|
-
result = ::
|
218
|
+
result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
|
219
|
+
operation: result,
|
220
|
+
client: region_operations,
|
221
|
+
request_values: {
|
222
|
+
"project" => request.project,
|
223
|
+
"region" => request.region
|
224
|
+
},
|
225
|
+
options: options
|
226
|
+
)
|
206
227
|
yield result, response if block_given?
|
207
228
|
return result
|
208
229
|
end
|
@@ -301,14 +322,14 @@ module Google
|
|
301
322
|
# @param region [::String]
|
302
323
|
# Name of the region scoping this request.
|
303
324
|
# @param request_id [::String]
|
304
|
-
# 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).
|
325
|
+
# 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).
|
305
326
|
# @param target_https_proxy_resource [::Google::Cloud::Compute::V1::TargetHttpsProxy, ::Hash]
|
306
327
|
# The body resource for this request
|
307
328
|
# @yield [result, response] Access the result along with the Faraday response object
|
308
|
-
# @yieldparam result [::Gapic::
|
329
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
309
330
|
# @yieldparam response [::Faraday::Response]
|
310
331
|
#
|
311
|
-
# @return [::Gapic::
|
332
|
+
# @return [::Gapic::GenericLRO::Operation]
|
312
333
|
#
|
313
334
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
314
335
|
def insert request, options = nil
|
@@ -335,7 +356,15 @@ module Google
|
|
335
356
|
metadata: @config.metadata
|
336
357
|
|
337
358
|
@region_target_https_proxies_stub.insert request, options do |result, response|
|
338
|
-
result = ::
|
359
|
+
result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
|
360
|
+
operation: result,
|
361
|
+
client: region_operations,
|
362
|
+
request_values: {
|
363
|
+
"project" => request.project,
|
364
|
+
"region" => request.region
|
365
|
+
},
|
366
|
+
options: options
|
367
|
+
)
|
339
368
|
yield result, response if block_given?
|
340
369
|
return result
|
341
370
|
end
|
@@ -365,7 +394,7 @@ module Google
|
|
365
394
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
366
395
|
#
|
367
396
|
# @param filter [::String]
|
368
|
-
# A filter expression that filters resources listed in the response. The expression must specify the field name,
|
397
|
+
# 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) ```
|
369
398
|
# @param max_results [::Integer]
|
370
399
|
# 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`)
|
371
400
|
# @param order_by [::String]
|
@@ -445,14 +474,14 @@ module Google
|
|
445
474
|
# @param region_target_https_proxies_set_ssl_certificates_request_resource [::Google::Cloud::Compute::V1::RegionTargetHttpsProxiesSetSslCertificatesRequest, ::Hash]
|
446
475
|
# The body resource for this request
|
447
476
|
# @param request_id [::String]
|
448
|
-
# 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).
|
477
|
+
# 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).
|
449
478
|
# @param target_https_proxy [::String]
|
450
479
|
# Name of the TargetHttpsProxy resource to set an SslCertificates resource for.
|
451
480
|
# @yield [result, response] Access the result along with the Faraday response object
|
452
|
-
# @yieldparam result [::Gapic::
|
481
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
453
482
|
# @yieldparam response [::Faraday::Response]
|
454
483
|
#
|
455
|
-
# @return [::Gapic::
|
484
|
+
# @return [::Gapic::GenericLRO::Operation]
|
456
485
|
#
|
457
486
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
458
487
|
def set_ssl_certificates request, options = nil
|
@@ -479,7 +508,15 @@ module Google
|
|
479
508
|
metadata: @config.metadata
|
480
509
|
|
481
510
|
@region_target_https_proxies_stub.set_ssl_certificates request, options do |result, response|
|
482
|
-
result = ::
|
511
|
+
result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
|
512
|
+
operation: result,
|
513
|
+
client: region_operations,
|
514
|
+
request_values: {
|
515
|
+
"project" => request.project,
|
516
|
+
"region" => request.region
|
517
|
+
},
|
518
|
+
options: options
|
519
|
+
)
|
483
520
|
yield result, response if block_given?
|
484
521
|
return result
|
485
522
|
end
|
@@ -513,16 +550,16 @@ module Google
|
|
513
550
|
# @param region [::String]
|
514
551
|
# Name of the region scoping this request.
|
515
552
|
# @param request_id [::String]
|
516
|
-
# 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).
|
553
|
+
# 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).
|
517
554
|
# @param target_https_proxy [::String]
|
518
555
|
# Name of the TargetHttpsProxy to set a URL map for.
|
519
556
|
# @param url_map_reference_resource [::Google::Cloud::Compute::V1::UrlMapReference, ::Hash]
|
520
557
|
# The body resource for this request
|
521
558
|
# @yield [result, response] Access the result along with the Faraday response object
|
522
|
-
# @yieldparam result [::Gapic::
|
559
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
523
560
|
# @yieldparam response [::Faraday::Response]
|
524
561
|
#
|
525
|
-
# @return [::Gapic::
|
562
|
+
# @return [::Gapic::GenericLRO::Operation]
|
526
563
|
#
|
527
564
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
528
565
|
def set_url_map request, options = nil
|
@@ -549,7 +586,15 @@ module Google
|
|
549
586
|
metadata: @config.metadata
|
550
587
|
|
551
588
|
@region_target_https_proxies_stub.set_url_map request, options do |result, response|
|
552
|
-
result = ::
|
589
|
+
result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
|
590
|
+
operation: result,
|
591
|
+
client: region_operations,
|
592
|
+
request_values: {
|
593
|
+
"project" => request.project,
|
594
|
+
"region" => request.region
|
595
|
+
},
|
596
|
+
options: options
|
597
|
+
)
|
553
598
|
yield result, response if block_given?
|
554
599
|
return result
|
555
600
|
end
|
@@ -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/region_url_maps/rest/service_stub"
|
22
|
+
require "google/cloud/compute/v1/region_operations/rest"
|
22
23
|
|
23
24
|
module Google
|
24
25
|
module Cloud
|
@@ -140,9 +141,21 @@ module Google
|
|
140
141
|
credentials = Credentials.new credentials, scope: @config.scope
|
141
142
|
end
|
142
143
|
|
144
|
+
@region_operations = ::Google::Cloud::Compute::V1::RegionOperations::Rest::Client.new do |config|
|
145
|
+
config.credentials = credentials
|
146
|
+
config.endpoint = @config.endpoint
|
147
|
+
end
|
148
|
+
|
143
149
|
@region_url_maps_stub = ::Google::Cloud::Compute::V1::RegionUrlMaps::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
|
144
150
|
end
|
145
151
|
|
152
|
+
##
|
153
|
+
# Get the associated client for long-running operations via RegionOperations.
|
154
|
+
#
|
155
|
+
# @return [::Google::Cloud::Compute::V1::RegionOperations::Rest::Client]
|
156
|
+
#
|
157
|
+
attr_reader :region_operations
|
158
|
+
|
146
159
|
# Service calls
|
147
160
|
|
148
161
|
##
|
@@ -174,10 +187,10 @@ module Google
|
|
174
187
|
# @param url_map [::String]
|
175
188
|
# Name of the UrlMap resource to delete.
|
176
189
|
# @yield [result, response] Access the result along with the Faraday response object
|
177
|
-
# @yieldparam result [::Gapic::
|
190
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
178
191
|
# @yieldparam response [::Faraday::Response]
|
179
192
|
#
|
180
|
-
# @return [::Gapic::
|
193
|
+
# @return [::Gapic::GenericLRO::Operation]
|
181
194
|
#
|
182
195
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
183
196
|
def delete request, options = nil
|
@@ -204,7 +217,15 @@ module Google
|
|
204
217
|
metadata: @config.metadata
|
205
218
|
|
206
219
|
@region_url_maps_stub.delete request, options do |result, response|
|
207
|
-
result = ::
|
220
|
+
result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
|
221
|
+
operation: result,
|
222
|
+
client: region_operations,
|
223
|
+
request_values: {
|
224
|
+
"project" => request.project,
|
225
|
+
"region" => request.region
|
226
|
+
},
|
227
|
+
options: options
|
228
|
+
)
|
208
229
|
yield result, response if block_given?
|
209
230
|
return result
|
210
231
|
end
|
@@ -307,10 +328,10 @@ module Google
|
|
307
328
|
# @param url_map_resource [::Google::Cloud::Compute::V1::UrlMap, ::Hash]
|
308
329
|
# The body resource for this request
|
309
330
|
# @yield [result, response] Access the result along with the Faraday response object
|
310
|
-
# @yieldparam result [::Gapic::
|
331
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
311
332
|
# @yieldparam response [::Faraday::Response]
|
312
333
|
#
|
313
|
-
# @return [::Gapic::
|
334
|
+
# @return [::Gapic::GenericLRO::Operation]
|
314
335
|
#
|
315
336
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
316
337
|
def insert request, options = nil
|
@@ -337,7 +358,15 @@ module Google
|
|
337
358
|
metadata: @config.metadata
|
338
359
|
|
339
360
|
@region_url_maps_stub.insert request, options do |result, response|
|
340
|
-
result = ::
|
361
|
+
result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
|
362
|
+
operation: result,
|
363
|
+
client: region_operations,
|
364
|
+
request_values: {
|
365
|
+
"project" => request.project,
|
366
|
+
"region" => request.region
|
367
|
+
},
|
368
|
+
options: options
|
369
|
+
)
|
341
370
|
yield result, response if block_given?
|
342
371
|
return result
|
343
372
|
end
|
@@ -367,7 +396,7 @@ module Google
|
|
367
396
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
368
397
|
#
|
369
398
|
# @param filter [::String]
|
370
|
-
# A filter expression that filters resources listed in the response. The expression must specify the field name,
|
399
|
+
# 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) ```
|
371
400
|
# @param max_results [::Integer]
|
372
401
|
# 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`)
|
373
402
|
# @param order_by [::String]
|
@@ -451,10 +480,10 @@ module Google
|
|
451
480
|
# @param url_map_resource [::Google::Cloud::Compute::V1::UrlMap, ::Hash]
|
452
481
|
# The body resource for this request
|
453
482
|
# @yield [result, response] Access the result along with the Faraday response object
|
454
|
-
# @yieldparam result [::Gapic::
|
483
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
455
484
|
# @yieldparam response [::Faraday::Response]
|
456
485
|
#
|
457
|
-
# @return [::Gapic::
|
486
|
+
# @return [::Gapic::GenericLRO::Operation]
|
458
487
|
#
|
459
488
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
460
489
|
def patch request, options = nil
|
@@ -481,7 +510,15 @@ module Google
|
|
481
510
|
metadata: @config.metadata
|
482
511
|
|
483
512
|
@region_url_maps_stub.patch request, options do |result, response|
|
484
|
-
result = ::
|
513
|
+
result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
|
514
|
+
operation: result,
|
515
|
+
client: region_operations,
|
516
|
+
request_values: {
|
517
|
+
"project" => request.project,
|
518
|
+
"region" => request.region
|
519
|
+
},
|
520
|
+
options: options
|
521
|
+
)
|
485
522
|
yield result, response if block_given?
|
486
523
|
return result
|
487
524
|
end
|
@@ -521,10 +558,10 @@ module Google
|
|
521
558
|
# @param url_map_resource [::Google::Cloud::Compute::V1::UrlMap, ::Hash]
|
522
559
|
# The body resource for this request
|
523
560
|
# @yield [result, response] Access the result along with the Faraday response object
|
524
|
-
# @yieldparam result [::Gapic::
|
561
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
525
562
|
# @yieldparam response [::Faraday::Response]
|
526
563
|
#
|
527
|
-
# @return [::Gapic::
|
564
|
+
# @return [::Gapic::GenericLRO::Operation]
|
528
565
|
#
|
529
566
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
530
567
|
def update request, options = nil
|
@@ -551,7 +588,15 @@ module Google
|
|
551
588
|
metadata: @config.metadata
|
552
589
|
|
553
590
|
@region_url_maps_stub.update request, options do |result, response|
|
554
|
-
result = ::
|
591
|
+
result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
|
592
|
+
operation: result,
|
593
|
+
client: region_operations,
|
594
|
+
request_values: {
|
595
|
+
"project" => request.project,
|
596
|
+
"region" => request.region
|
597
|
+
},
|
598
|
+
options: options
|
599
|
+
)
|
555
600
|
yield result, response if block_given?
|
556
601
|
return result
|
557
602
|
end
|
@@ -136,7 +136,7 @@ module Google
|
|
136
136
|
# Service calls
|
137
137
|
|
138
138
|
##
|
139
|
-
# Returns the specified Region resource. Gets a list of available regions by making a list() request.
|
139
|
+
# Returns the specified Region resource. Gets a list of available regions by making a list() request. To decrease latency for this method, you can optionally omit any unneeded information from the response by using a field mask. This practice is especially recommended for unused quota information (the `quotas` field). To exclude one or more fields, set your request's `fields` query parameter to only include the fields you need. For example, to only include the `id` and `selfLink` fields, add the query parameter `?fields=id,selfLink` to your request.
|
140
140
|
#
|
141
141
|
# @overload get(request, options = nil)
|
142
142
|
# Pass arguments to `get` via a request object, either of type
|
@@ -199,7 +199,7 @@ module Google
|
|
199
199
|
end
|
200
200
|
|
201
201
|
##
|
202
|
-
# Retrieves the list of region resources available to the specified project.
|
202
|
+
# Retrieves the list of region resources available to the specified project. To decrease latency for this method, you can optionally omit any unneeded information from the response by using a field mask. This practice is especially recommended for unused quota information (the `items.quotas` field). To exclude one or more fields, set your request's `fields` query parameter to only include the fields you need. For example, to only include the `id` and `selfLink` fields, add the query parameter `?fields=id,selfLink` to your request.
|
203
203
|
#
|
204
204
|
# @overload list(request, options = nil)
|
205
205
|
# Pass arguments to `list` via a request object, either of type
|
@@ -219,7 +219,7 @@ module Google
|
|
219
219
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
220
220
|
#
|
221
221
|
# @param filter [::String]
|
222
|
-
# A filter expression that filters resources listed in the response. The expression must specify the field name,
|
222
|
+
# 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) ```
|
223
223
|
# @param max_results [::Integer]
|
224
224
|
# 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`)
|
225
225
|
# @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/reservations/rest/service_stub"
|
22
|
+
require "google/cloud/compute/v1/zone_operations/rest"
|
22
23
|
|
23
24
|
module Google
|
24
25
|
module Cloud
|
@@ -94,6 +95,8 @@ module Google
|
|
94
95
|
|
95
96
|
default_config.rpcs.test_iam_permissions.timeout = 600.0
|
96
97
|
|
98
|
+
default_config.rpcs.update.timeout = 600.0
|
99
|
+
|
97
100
|
default_config
|
98
101
|
end
|
99
102
|
yield @configure if block_given?
|
@@ -150,9 +153,21 @@ module Google
|
|
150
153
|
credentials = Credentials.new credentials, scope: @config.scope
|
151
154
|
end
|
152
155
|
|
156
|
+
@zone_operations = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::Client.new do |config|
|
157
|
+
config.credentials = credentials
|
158
|
+
config.endpoint = @config.endpoint
|
159
|
+
end
|
160
|
+
|
153
161
|
@reservations_stub = ::Google::Cloud::Compute::V1::Reservations::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
|
154
162
|
end
|
155
163
|
|
164
|
+
##
|
165
|
+
# Get the associated client for long-running operations via ZoneOperations.
|
166
|
+
#
|
167
|
+
# @return [::Google::Cloud::Compute::V1::ZoneOperations::Rest::Client]
|
168
|
+
#
|
169
|
+
attr_reader :zone_operations
|
170
|
+
|
156
171
|
# Service calls
|
157
172
|
|
158
173
|
##
|
@@ -176,7 +191,7 @@ module Google
|
|
176
191
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
177
192
|
#
|
178
193
|
# @param filter [::String]
|
179
|
-
# A filter expression that filters resources listed in the response. The expression must specify the field name,
|
194
|
+
# 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) ```
|
180
195
|
# @param include_all_scopes [::Boolean]
|
181
196
|
# 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.
|
182
197
|
# @param max_results [::Integer]
|
@@ -258,10 +273,10 @@ module Google
|
|
258
273
|
# @param zone [::String]
|
259
274
|
# Name of the zone for this request.
|
260
275
|
# @yield [result, response] Access the result along with the Faraday response object
|
261
|
-
# @yieldparam result [::Gapic::
|
276
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
262
277
|
# @yieldparam response [::Faraday::Response]
|
263
278
|
#
|
264
|
-
# @return [::Gapic::
|
279
|
+
# @return [::Gapic::GenericLRO::Operation]
|
265
280
|
#
|
266
281
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
267
282
|
def delete request, options = nil
|
@@ -288,7 +303,15 @@ module Google
|
|
288
303
|
metadata: @config.metadata
|
289
304
|
|
290
305
|
@reservations_stub.delete request, options do |result, response|
|
291
|
-
result = ::
|
306
|
+
result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
|
307
|
+
operation: result,
|
308
|
+
client: zone_operations,
|
309
|
+
request_values: {
|
310
|
+
"project" => request.project,
|
311
|
+
"zone" => request.zone
|
312
|
+
},
|
313
|
+
options: options
|
314
|
+
)
|
292
315
|
yield result, response if block_given?
|
293
316
|
return result
|
294
317
|
end
|
@@ -458,10 +481,10 @@ module Google
|
|
458
481
|
# @param zone [::String]
|
459
482
|
# Name of the zone for this request.
|
460
483
|
# @yield [result, response] Access the result along with the Faraday response object
|
461
|
-
# @yieldparam result [::Gapic::
|
484
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
462
485
|
# @yieldparam response [::Faraday::Response]
|
463
486
|
#
|
464
|
-
# @return [::Gapic::
|
487
|
+
# @return [::Gapic::GenericLRO::Operation]
|
465
488
|
#
|
466
489
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
467
490
|
def insert request, options = nil
|
@@ -488,7 +511,15 @@ module Google
|
|
488
511
|
metadata: @config.metadata
|
489
512
|
|
490
513
|
@reservations_stub.insert request, options do |result, response|
|
491
|
-
result = ::
|
514
|
+
result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
|
515
|
+
operation: result,
|
516
|
+
client: zone_operations,
|
517
|
+
request_values: {
|
518
|
+
"project" => request.project,
|
519
|
+
"zone" => request.zone
|
520
|
+
},
|
521
|
+
options: options
|
522
|
+
)
|
492
523
|
yield result, response if block_given?
|
493
524
|
return result
|
494
525
|
end
|
@@ -518,7 +549,7 @@ module Google
|
|
518
549
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
519
550
|
#
|
520
551
|
# @param filter [::String]
|
521
|
-
# A filter expression that filters resources listed in the response. The expression must specify the field name,
|
552
|
+
# 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) ```
|
522
553
|
# @param max_results [::Integer]
|
523
554
|
# 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`)
|
524
555
|
# @param order_by [::String]
|
@@ -602,10 +633,10 @@ module Google
|
|
602
633
|
# @param zone [::String]
|
603
634
|
# Name of the zone for this request.
|
604
635
|
# @yield [result, response] Access the result along with the Faraday response object
|
605
|
-
# @yieldparam result [::Gapic::
|
636
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
606
637
|
# @yieldparam response [::Faraday::Response]
|
607
638
|
#
|
608
|
-
# @return [::Gapic::
|
639
|
+
# @return [::Gapic::GenericLRO::Operation]
|
609
640
|
#
|
610
641
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
611
642
|
def resize request, options = nil
|
@@ -632,7 +663,15 @@ module Google
|
|
632
663
|
metadata: @config.metadata
|
633
664
|
|
634
665
|
@reservations_stub.resize request, options do |result, response|
|
635
|
-
result = ::
|
666
|
+
result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
|
667
|
+
operation: result,
|
668
|
+
client: zone_operations,
|
669
|
+
request_values: {
|
670
|
+
"project" => request.project,
|
671
|
+
"zone" => request.zone
|
672
|
+
},
|
673
|
+
options: options
|
674
|
+
)
|
636
675
|
yield result, response if block_given?
|
637
676
|
return result
|
638
677
|
end
|
@@ -775,6 +814,87 @@ module Google
|
|
775
814
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
776
815
|
end
|
777
816
|
|
817
|
+
##
|
818
|
+
# Update share settings of the reservation.
|
819
|
+
#
|
820
|
+
# @overload update(request, options = nil)
|
821
|
+
# Pass arguments to `update` via a request object, either of type
|
822
|
+
# {::Google::Cloud::Compute::V1::UpdateReservationRequest} or an equivalent Hash.
|
823
|
+
#
|
824
|
+
# @param request [::Google::Cloud::Compute::V1::UpdateReservationRequest, ::Hash]
|
825
|
+
# A request object representing the call parameters. Required. To specify no
|
826
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
827
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
828
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
829
|
+
# Note: currently retry functionality is not implemented. While it is possible
|
830
|
+
# to set it using ::Gapic::CallOptions, it will not be applied
|
831
|
+
#
|
832
|
+
# @overload update(paths: nil, project: nil, request_id: nil, reservation: nil, reservation_resource: nil, update_mask: nil, zone: nil)
|
833
|
+
# Pass arguments to `update` via keyword arguments. Note that at
|
834
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
835
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
836
|
+
#
|
837
|
+
# @param paths [::String]
|
838
|
+
# @param project [::String]
|
839
|
+
# Project ID for this request.
|
840
|
+
# @param request_id [::String]
|
841
|
+
# 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).
|
842
|
+
# @param reservation [::String]
|
843
|
+
# Name of the reservation to update.
|
844
|
+
# @param reservation_resource [::Google::Cloud::Compute::V1::Reservation, ::Hash]
|
845
|
+
# The body resource for this request
|
846
|
+
# @param update_mask [::String]
|
847
|
+
# Update_mask indicates fields to be updated as part of this request.
|
848
|
+
# @param zone [::String]
|
849
|
+
# Name of the zone for this request.
|
850
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
851
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
852
|
+
# @yieldparam response [::Faraday::Response]
|
853
|
+
#
|
854
|
+
# @return [::Gapic::GenericLRO::Operation]
|
855
|
+
#
|
856
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
857
|
+
def update request, options = nil
|
858
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
859
|
+
|
860
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::UpdateReservationRequest
|
861
|
+
|
862
|
+
# Converts hash and nil to an options object
|
863
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
864
|
+
|
865
|
+
# Customize the options with defaults
|
866
|
+
call_metadata = @config.rpcs.update.metadata.to_h
|
867
|
+
|
868
|
+
# Set x-goog-api-client header
|
869
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
870
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
871
|
+
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
872
|
+
transports_version_send: [:rest]
|
873
|
+
|
874
|
+
options.apply_defaults timeout: @config.rpcs.update.timeout,
|
875
|
+
metadata: call_metadata
|
876
|
+
|
877
|
+
options.apply_defaults timeout: @config.timeout,
|
878
|
+
metadata: @config.metadata
|
879
|
+
|
880
|
+
@reservations_stub.update request, options do |result, response|
|
881
|
+
result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
|
882
|
+
operation: result,
|
883
|
+
client: zone_operations,
|
884
|
+
request_values: {
|
885
|
+
"project" => request.project,
|
886
|
+
"zone" => request.zone
|
887
|
+
},
|
888
|
+
options: options
|
889
|
+
)
|
890
|
+
yield result, response if block_given?
|
891
|
+
return result
|
892
|
+
end
|
893
|
+
rescue ::Faraday::Error => e
|
894
|
+
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
895
|
+
raise ::Google::Cloud::Error.from_error(gapic_error)
|
896
|
+
end
|
897
|
+
|
778
898
|
##
|
779
899
|
# Configuration class for the Reservations REST API.
|
780
900
|
#
|
@@ -919,6 +1039,11 @@ module Google
|
|
919
1039
|
# @return [::Gapic::Config::Method]
|
920
1040
|
#
|
921
1041
|
attr_reader :test_iam_permissions
|
1042
|
+
##
|
1043
|
+
# RPC-specific configuration for `update`
|
1044
|
+
# @return [::Gapic::Config::Method]
|
1045
|
+
#
|
1046
|
+
attr_reader :update
|
922
1047
|
|
923
1048
|
# @private
|
924
1049
|
def initialize parent_rpcs = nil
|
@@ -940,6 +1065,8 @@ module Google
|
|
940
1065
|
@set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config
|
941
1066
|
test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions
|
942
1067
|
@test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config
|
1068
|
+
update_config = parent_rpcs.update if parent_rpcs.respond_to? :update
|
1069
|
+
@update = ::Gapic::Config::Method.new update_config
|
943
1070
|
|
944
1071
|
yield self if block_given?
|
945
1072
|
end
|