google-cloud-compute-v1 1.5.0 → 1.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +1 -1
- data/lib/google/cloud/compute/v1/accelerator_types/rest/service_stub.rb +8 -8
- data/lib/google/cloud/compute/v1/addresses/rest/client.rb +87 -0
- data/lib/google/cloud/compute/v1/addresses/rest/service_stub.rb +74 -13
- data/lib/google/cloud/compute/v1/autoscalers/rest/service_stub.rb +17 -17
- data/lib/google/cloud/compute/v1/backend_buckets/rest/service_stub.rb +18 -18
- data/lib/google/cloud/compute/v1/backend_services/rest/client.rb +151 -0
- data/lib/google/cloud/compute/v1/backend_services/rest/service_stub.rb +142 -23
- data/lib/google/cloud/compute/v1/compute_pb.rb +357 -0
- data/lib/google/cloud/compute/v1/disk_types/rest/service_stub.rb +8 -8
- data/lib/google/cloud/compute/v1/disks/rest/service_stub.rb +37 -37
- data/lib/google/cloud/compute/v1/external_vpn_gateways/rest/service_stub.rb +12 -12
- data/lib/google/cloud/compute/v1/firewall_policies/rest/service_stub.rb +17 -17
- data/lib/google/cloud/compute/v1/firewalls/rest/service_stub.rb +12 -12
- data/lib/google/cloud/compute/v1/forwarding_rules/rest/service_stub.rb +22 -22
- data/lib/google/cloud/compute/v1/global_addresses/rest/client.rb +82 -0
- data/lib/google/cloud/compute/v1/global_addresses/rest/service_stub.rb +68 -8
- data/lib/google/cloud/compute/v1/global_forwarding_rules/rest/service_stub.rb +14 -14
- data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest/service_stub.rb +14 -14
- data/lib/google/cloud/compute/v1/global_operations/rest/service_stub.rb +10 -10
- data/lib/google/cloud/compute/v1/global_operations/rest.rb +1 -0
- data/lib/google/cloud/compute/v1/global_operations.rb +0 -1
- data/lib/google/cloud/compute/v1/global_organization_operations/rest/service_stub.rb +4 -4
- data/lib/google/cloud/compute/v1/global_organization_operations/rest.rb +1 -0
- data/lib/google/cloud/compute/v1/global_organization_operations.rb +0 -1
- data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest/service_stub.rb +10 -10
- data/lib/google/cloud/compute/v1/health_checks/rest/service_stub.rb +13 -13
- data/lib/google/cloud/compute/v1/image_family_views/rest/service_stub.rb +5 -5
- data/lib/google/cloud/compute/v1/images/rest/service_stub.rb +22 -22
- data/lib/google/cloud/compute/v1/instance_group_managers/rest/client.rb +1 -1
- data/lib/google/cloud/compute/v1/instance_group_managers/rest/service_stub.rb +58 -58
- data/lib/google/cloud/compute/v1/instance_groups/rest/service_stub.rb +25 -25
- data/lib/google/cloud/compute/v1/instance_templates/rest/service_stub.rb +14 -14
- data/lib/google/cloud/compute/v1/instances/rest/client.rb +1 -1
- data/lib/google/cloud/compute/v1/instances/rest/service_stub.rb +132 -132
- data/lib/google/cloud/compute/v1/interconnect_attachments/rest/client.rb +87 -0
- data/lib/google/cloud/compute/v1/interconnect_attachments/rest/service_stub.rb +77 -16
- data/lib/google/cloud/compute/v1/interconnect_locations/rest/service_stub.rb +5 -5
- data/lib/google/cloud/compute/v1/interconnects/rest/client.rb +82 -0
- data/lib/google/cloud/compute/v1/interconnects/rest/service_stub.rb +72 -12
- data/lib/google/cloud/compute/v1/license_codes/rest/service_stub.rb +6 -6
- data/lib/google/cloud/compute/v1/licenses/rest/service_stub.rb +14 -14
- data/lib/google/cloud/compute/v1/machine_images/rest/service_stub.rb +14 -14
- data/lib/google/cloud/compute/v1/machine_types/rest/service_stub.rb +8 -8
- data/lib/google/cloud/compute/v1/network_edge_security_services/rest/service_stub.rb +14 -14
- data/lib/google/cloud/compute/v1/network_endpoint_groups/rest/service_stub.rb +25 -25
- data/lib/google/cloud/compute/v1/network_firewall_policies/rest/service_stub.rb +32 -32
- data/lib/google/cloud/compute/v1/networks/rest/service_stub.rb +22 -22
- data/lib/google/cloud/compute/v1/node_groups/rest/service_stub.rb +37 -37
- data/lib/google/cloud/compute/v1/node_templates/rest/service_stub.rb +22 -22
- data/lib/google/cloud/compute/v1/node_types/rest/service_stub.rb +8 -8
- data/lib/google/cloud/compute/v1/packet_mirrorings/rest/service_stub.rb +19 -19
- data/lib/google/cloud/compute/v1/projects/rest/service_stub.rb +15 -15
- data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/service_stub.rb +10 -10
- data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/service_stub.rb +16 -16
- data/lib/google/cloud/compute/v1/region_autoscalers/rest/service_stub.rb +16 -16
- data/lib/google/cloud/compute/v1/region_backend_services/rest/client.rb +155 -0
- data/lib/google/cloud/compute/v1/region_backend_services/rest/service_stub.rb +142 -21
- data/lib/google/cloud/compute/v1/region_commitments/rest/service_stub.rb +13 -13
- data/lib/google/cloud/compute/v1/region_disk_types/rest/service_stub.rb +7 -7
- data/lib/google/cloud/compute/v1/region_disks/rest/service_stub.rb +36 -36
- data/lib/google/cloud/compute/v1/region_health_check_services/rest/service_stub.rb +15 -15
- data/lib/google/cloud/compute/v1/region_health_checks/rest/service_stub.rb +18 -18
- data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/client.rb +1 -1
- data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/service_stub.rb +57 -57
- data/lib/google/cloud/compute/v1/region_instance_groups/rest/service_stub.rb +13 -13
- data/lib/google/cloud/compute/v1/region_instances/rest/service_stub.rb +4 -4
- data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/service_stub.rb +12 -12
- data/lib/google/cloud/compute/v1/region_network_firewall_policies/rest/service_stub.rb +50 -50
- data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/service_stub.rb +12 -12
- data/lib/google/cloud/compute/v1/region_operations/rest/service_stub.rb +13 -13
- data/lib/google/cloud/compute/v1/region_operations/rest.rb +1 -0
- data/lib/google/cloud/compute/v1/region_operations.rb +0 -1
- data/lib/google/cloud/compute/v1/region_security_policies/rest/service_stub.rb +15 -15
- data/lib/google/cloud/compute/v1/region_ssl_certificates/rest/service_stub.rb +12 -12
- data/lib/google/cloud/compute/v1/region_ssl_policies/credentials.rb +52 -0
- data/lib/google/cloud/compute/v1/region_ssl_policies/rest/client.rb +759 -0
- data/lib/google/cloud/compute/v1/region_ssl_policies/rest/service_stub.rb +408 -0
- data/lib/google/cloud/compute/v1/region_ssl_policies/rest.rb +33 -0
- data/lib/google/cloud/compute/v1/region_ssl_policies.rb +47 -0
- data/lib/google/cloud/compute/v1/region_target_http_proxies/rest/service_stub.rb +15 -15
- data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/service_stub.rb +21 -21
- data/lib/google/cloud/compute/v1/region_target_tcp_proxies/credentials.rb +52 -0
- data/lib/google/cloud/compute/v1/region_target_tcp_proxies/rest/client.rb +587 -0
- data/lib/google/cloud/compute/v1/region_target_tcp_proxies/rest/service_stub.rb +288 -0
- data/lib/google/cloud/compute/v1/region_target_tcp_proxies/rest.rb +33 -0
- data/lib/google/cloud/compute/v1/region_target_tcp_proxies.rb +47 -0
- data/lib/google/cloud/compute/v1/region_url_maps/rest/service_stub.rb +21 -21
- data/lib/google/cloud/compute/v1/regions/rest/service_stub.rb +5 -5
- data/lib/google/cloud/compute/v1/reservations/rest/service_stub.rb +28 -28
- data/lib/google/cloud/compute/v1/resource_policies/rest/service_stub.rb +22 -22
- data/lib/google/cloud/compute/v1/routers/rest/service_stub.rb +28 -28
- data/lib/google/cloud/compute/v1/routes/rest/service_stub.rb +8 -8
- data/lib/google/cloud/compute/v1/security_policies/rest/client.rb +82 -0
- data/lib/google/cloud/compute/v1/security_policies/rest/service_stub.rb +80 -20
- data/lib/google/cloud/compute/v1/service_attachments/rest/service_stub.rb +25 -25
- data/lib/google/cloud/compute/v1/snapshots/rest/service_stub.rb +16 -16
- data/lib/google/cloud/compute/v1/ssl_certificates/rest/service_stub.rb +9 -9
- data/lib/google/cloud/compute/v1/ssl_policies/rest/client.rb +86 -0
- data/lib/google/cloud/compute/v1/ssl_policies/rest/service_stub.rb +69 -11
- data/lib/google/cloud/compute/v1/subnetworks/rest/service_stub.rb +32 -32
- data/lib/google/cloud/compute/v1/target_grpc_proxies/rest/service_stub.rb +10 -10
- data/lib/google/cloud/compute/v1/target_http_proxies/rest/service_stub.rb +13 -13
- data/lib/google/cloud/compute/v1/target_https_proxies/rest/service_stub.rb +21 -21
- data/lib/google/cloud/compute/v1/target_instances/rest/service_stub.rb +13 -13
- data/lib/google/cloud/compute/v1/target_pools/rest/service_stub.rb +31 -31
- data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/service_stub.rb +18 -18
- data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/service_stub.rb +12 -12
- data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/client.rb +87 -0
- data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/service_stub.rb +74 -13
- data/lib/google/cloud/compute/v1/url_maps/rest/service_stub.rb +17 -17
- data/lib/google/cloud/compute/v1/version.rb +1 -1
- data/lib/google/cloud/compute/v1/vpn_gateways/rest/service_stub.rb +22 -22
- data/lib/google/cloud/compute/v1/vpn_tunnels/rest/client.rb +87 -0
- data/lib/google/cloud/compute/v1/vpn_tunnels/rest/service_stub.rb +74 -13
- data/lib/google/cloud/compute/v1/zone_operations/rest/service_stub.rb +13 -13
- data/lib/google/cloud/compute/v1/zone_operations/rest.rb +1 -0
- data/lib/google/cloud/compute/v1/zone_operations.rb +0 -1
- data/lib/google/cloud/compute/v1/zones/rest/service_stub.rb +5 -5
- data/lib/google/cloud/compute/v1.rb +2 -0
- data/proto_docs/google/cloud/compute/v1/compute.rb +968 -39
- metadata +12 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d0aaa16fd7afb4567283bb33beebd318db50ff76376e50533a50459d454a012f
|
4
|
+
data.tar.gz: 2124b114f86fd09ab529e297ef8e4cd3d289d73aae4605a765a9435b581550f4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cbcf833d82e49dd635485752e931a06cf5fa9e748127a5a53cab594e8605c74c8366744abce1ff81d798a34ca7789859d952c894729b5bb90c0d965b27ea6ae0
|
7
|
+
data.tar.gz: ed6f83765dbe2269082400f69c6e344b5dece40392f9c6536195f621b520c22982a5752640cc328cc607a91153a3e7ca6613a228dd144e0d9d8e0ea9bb506391
|
data/AUTHENTICATION.md
CHANGED
@@ -114,7 +114,7 @@ credentials are discovered.
|
|
114
114
|
To configure your system for this, simply:
|
115
115
|
|
116
116
|
1. [Download and install the Cloud SDK](https://cloud.google.com/sdk)
|
117
|
-
2. Authenticate using OAuth 2.0 `$ gcloud auth login`
|
117
|
+
2. Authenticate using OAuth 2.0 `$ gcloud auth application-default login`
|
118
118
|
3. Write code as if already authenticated.
|
119
119
|
|
120
120
|
**NOTE:** This is _not_ recommended for running in production. The Cloud SDK
|
@@ -26,8 +26,8 @@ module Google
|
|
26
26
|
module Rest
|
27
27
|
##
|
28
28
|
# REST service stub for the AcceleratorTypes service.
|
29
|
-
#
|
30
|
-
# including transcoding, making the REST call and deserialing the response
|
29
|
+
# Service stub contains baseline method implementations
|
30
|
+
# including transcoding, making the REST call, and deserialing the response.
|
31
31
|
#
|
32
32
|
class ServiceStub
|
33
33
|
def initialize endpoint:, credentials:
|
@@ -167,7 +167,7 @@ module Google
|
|
167
167
|
uri_method: :get,
|
168
168
|
uri_template: "/compute/v1/projects/{project}/aggregated/acceleratorTypes",
|
169
169
|
matches: [
|
170
|
-
["project", %r{[^/]
|
170
|
+
["project", %r{^[^/]+/?$}, false]
|
171
171
|
]
|
172
172
|
)
|
173
173
|
transcoder.transcode request_pb
|
@@ -188,9 +188,9 @@ module Google
|
|
188
188
|
uri_method: :get,
|
189
189
|
uri_template: "/compute/v1/projects/{project}/zones/{zone}/acceleratorTypes/{accelerator_type}",
|
190
190
|
matches: [
|
191
|
-
["project", %r{[^/]
|
192
|
-
["zone", %r{[^/]
|
193
|
-
["accelerator_type", %r{[^/]
|
191
|
+
["project", %r{^[^/]+/?$}, false],
|
192
|
+
["zone", %r{^[^/]+/?$}, false],
|
193
|
+
["accelerator_type", %r{^[^/]+/?$}, false]
|
194
194
|
]
|
195
195
|
)
|
196
196
|
transcoder.transcode request_pb
|
@@ -211,8 +211,8 @@ module Google
|
|
211
211
|
uri_method: :get,
|
212
212
|
uri_template: "/compute/v1/projects/{project}/zones/{zone}/acceleratorTypes",
|
213
213
|
matches: [
|
214
|
-
["project", %r{[^/]
|
215
|
-
["zone", %r{[^/]
|
214
|
+
["project", %r{^[^/]+/?$}, false],
|
215
|
+
["zone", %r{^[^/]+/?$}, false]
|
216
216
|
]
|
217
217
|
)
|
218
218
|
transcoder.transcode request_pb
|
@@ -84,6 +84,8 @@ module Google
|
|
84
84
|
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
85
85
|
}
|
86
86
|
|
87
|
+
default_config.rpcs.set_labels.timeout = 600.0
|
88
|
+
|
87
89
|
default_config
|
88
90
|
end
|
89
91
|
yield @configure if block_given?
|
@@ -522,6 +524,84 @@ module Google
|
|
522
524
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
523
525
|
end
|
524
526
|
|
527
|
+
##
|
528
|
+
# Sets the labels on an Address. To learn more about labels, read the Labeling Resources documentation.
|
529
|
+
#
|
530
|
+
# @overload set_labels(request, options = nil)
|
531
|
+
# Pass arguments to `set_labels` via a request object, either of type
|
532
|
+
# {::Google::Cloud::Compute::V1::SetLabelsAddressRequest} or an equivalent Hash.
|
533
|
+
#
|
534
|
+
# @param request [::Google::Cloud::Compute::V1::SetLabelsAddressRequest, ::Hash]
|
535
|
+
# A request object representing the call parameters. Required. To specify no
|
536
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
537
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
538
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
539
|
+
# Note: currently retry functionality is not implemented. While it is possible
|
540
|
+
# to set it using ::Gapic::CallOptions, it will not be applied
|
541
|
+
#
|
542
|
+
# @overload set_labels(project: nil, region: nil, region_set_labels_request_resource: nil, request_id: nil, resource: nil)
|
543
|
+
# Pass arguments to `set_labels` via keyword arguments. Note that at
|
544
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
545
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
546
|
+
#
|
547
|
+
# @param project [::String]
|
548
|
+
# Project ID for this request.
|
549
|
+
# @param region [::String]
|
550
|
+
# The region for this request.
|
551
|
+
# @param region_set_labels_request_resource [::Google::Cloud::Compute::V1::RegionSetLabelsRequest, ::Hash]
|
552
|
+
# The body resource for this request
|
553
|
+
# @param request_id [::String]
|
554
|
+
# 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).
|
555
|
+
# @param resource [::String]
|
556
|
+
# Name or id of the resource for this request.
|
557
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
558
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
559
|
+
# @yieldparam response [::Faraday::Response]
|
560
|
+
#
|
561
|
+
# @return [::Gapic::GenericLRO::Operation]
|
562
|
+
#
|
563
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
564
|
+
def set_labels request, options = nil
|
565
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
566
|
+
|
567
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::SetLabelsAddressRequest
|
568
|
+
|
569
|
+
# Converts hash and nil to an options object
|
570
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
571
|
+
|
572
|
+
# Customize the options with defaults
|
573
|
+
call_metadata = @config.rpcs.set_labels.metadata.to_h
|
574
|
+
|
575
|
+
# Set x-goog-api-client header
|
576
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
577
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
578
|
+
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
579
|
+
transports_version_send: [:rest]
|
580
|
+
|
581
|
+
options.apply_defaults timeout: @config.rpcs.set_labels.timeout,
|
582
|
+
metadata: call_metadata
|
583
|
+
|
584
|
+
options.apply_defaults timeout: @config.timeout,
|
585
|
+
metadata: @config.metadata
|
586
|
+
|
587
|
+
@addresses_stub.set_labels request, options do |result, response|
|
588
|
+
result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
|
589
|
+
operation: result,
|
590
|
+
client: region_operations,
|
591
|
+
request_values: {
|
592
|
+
"project" => request.project,
|
593
|
+
"region" => request.region
|
594
|
+
},
|
595
|
+
options: options
|
596
|
+
)
|
597
|
+
yield result, response if block_given?
|
598
|
+
return result
|
599
|
+
end
|
600
|
+
rescue ::Faraday::Error => e
|
601
|
+
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
602
|
+
raise ::Google::Cloud::Error.from_error(gapic_error)
|
603
|
+
end
|
604
|
+
|
525
605
|
##
|
526
606
|
# Configuration class for the Addresses REST API.
|
527
607
|
#
|
@@ -646,6 +726,11 @@ module Google
|
|
646
726
|
# @return [::Gapic::Config::Method]
|
647
727
|
#
|
648
728
|
attr_reader :list
|
729
|
+
##
|
730
|
+
# RPC-specific configuration for `set_labels`
|
731
|
+
# @return [::Gapic::Config::Method]
|
732
|
+
#
|
733
|
+
attr_reader :set_labels
|
649
734
|
|
650
735
|
# @private
|
651
736
|
def initialize parent_rpcs = nil
|
@@ -659,6 +744,8 @@ module Google
|
|
659
744
|
@insert = ::Gapic::Config::Method.new insert_config
|
660
745
|
list_config = parent_rpcs.list if parent_rpcs.respond_to? :list
|
661
746
|
@list = ::Gapic::Config::Method.new list_config
|
747
|
+
set_labels_config = parent_rpcs.set_labels if parent_rpcs.respond_to? :set_labels
|
748
|
+
@set_labels = ::Gapic::Config::Method.new set_labels_config
|
662
749
|
|
663
750
|
yield self if block_given?
|
664
751
|
end
|
@@ -26,8 +26,8 @@ module Google
|
|
26
26
|
module Rest
|
27
27
|
##
|
28
28
|
# REST service stub for the Addresses service.
|
29
|
-
#
|
30
|
-
# including transcoding, making the REST call and deserialing the response
|
29
|
+
# Service stub contains baseline method implementations
|
30
|
+
# including transcoding, making the REST call, and deserialing the response.
|
31
31
|
#
|
32
32
|
class ServiceStub
|
33
33
|
def initialize endpoint:, credentials:
|
@@ -223,6 +223,43 @@ module Google
|
|
223
223
|
result
|
224
224
|
end
|
225
225
|
|
226
|
+
##
|
227
|
+
# Baseline implementation for the set_labels REST call
|
228
|
+
#
|
229
|
+
# @param request_pb [::Google::Cloud::Compute::V1::SetLabelsAddressRequest]
|
230
|
+
# A request object representing the call parameters. Required.
|
231
|
+
# @param options [::Gapic::CallOptions]
|
232
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
233
|
+
#
|
234
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
235
|
+
# @yieldparam result [::Google::Cloud::Compute::V1::Operation]
|
236
|
+
# @yieldparam response [::Faraday::Response]
|
237
|
+
#
|
238
|
+
# @return [::Google::Cloud::Compute::V1::Operation]
|
239
|
+
# A result object deserialized from the server's reply
|
240
|
+
def set_labels request_pb, options = nil
|
241
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
242
|
+
|
243
|
+
verb, uri, query_string_params, body = transcode_set_labels_request request_pb
|
244
|
+
query_string_params = if query_string_params.any?
|
245
|
+
query_string_params.to_h { |p| p.split("=", 2) }
|
246
|
+
else
|
247
|
+
{}
|
248
|
+
end
|
249
|
+
|
250
|
+
response = @client_stub.make_http_request(
|
251
|
+
verb,
|
252
|
+
uri: uri,
|
253
|
+
body: body || "",
|
254
|
+
params: query_string_params,
|
255
|
+
options: options
|
256
|
+
)
|
257
|
+
result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
|
258
|
+
|
259
|
+
yield result, response if block_given?
|
260
|
+
result
|
261
|
+
end
|
262
|
+
|
226
263
|
|
227
264
|
private
|
228
265
|
|
@@ -241,7 +278,7 @@ module Google
|
|
241
278
|
uri_method: :get,
|
242
279
|
uri_template: "/compute/v1/projects/{project}/aggregated/addresses",
|
243
280
|
matches: [
|
244
|
-
["project", %r{[^/]
|
281
|
+
["project", %r{^[^/]+/?$}, false]
|
245
282
|
]
|
246
283
|
)
|
247
284
|
transcoder.transcode request_pb
|
@@ -262,9 +299,9 @@ module Google
|
|
262
299
|
uri_method: :delete,
|
263
300
|
uri_template: "/compute/v1/projects/{project}/regions/{region}/addresses/{address}",
|
264
301
|
matches: [
|
265
|
-
["project", %r{[^/]
|
266
|
-
["region", %r{[^/]
|
267
|
-
["address", %r{[^/]
|
302
|
+
["project", %r{^[^/]+/?$}, false],
|
303
|
+
["region", %r{^[^/]+/?$}, false],
|
304
|
+
["address", %r{^[^/]+/?$}, false]
|
268
305
|
]
|
269
306
|
)
|
270
307
|
transcoder.transcode request_pb
|
@@ -285,9 +322,9 @@ module Google
|
|
285
322
|
uri_method: :get,
|
286
323
|
uri_template: "/compute/v1/projects/{project}/regions/{region}/addresses/{address}",
|
287
324
|
matches: [
|
288
|
-
["project", %r{[^/]
|
289
|
-
["region", %r{[^/]
|
290
|
-
["address", %r{[^/]
|
325
|
+
["project", %r{^[^/]+/?$}, false],
|
326
|
+
["region", %r{^[^/]+/?$}, false],
|
327
|
+
["address", %r{^[^/]+/?$}, false]
|
291
328
|
]
|
292
329
|
)
|
293
330
|
transcoder.transcode request_pb
|
@@ -309,8 +346,8 @@ module Google
|
|
309
346
|
uri_template: "/compute/v1/projects/{project}/regions/{region}/addresses",
|
310
347
|
body: "address_resource",
|
311
348
|
matches: [
|
312
|
-
["project", %r{[^/]
|
313
|
-
["region", %r{[^/]
|
349
|
+
["project", %r{^[^/]+/?$}, false],
|
350
|
+
["region", %r{^[^/]+/?$}, false]
|
314
351
|
]
|
315
352
|
)
|
316
353
|
transcoder.transcode request_pb
|
@@ -331,8 +368,32 @@ module Google
|
|
331
368
|
uri_method: :get,
|
332
369
|
uri_template: "/compute/v1/projects/{project}/regions/{region}/addresses",
|
333
370
|
matches: [
|
334
|
-
["project", %r{[^/]
|
335
|
-
["region", %r{[^/]
|
371
|
+
["project", %r{^[^/]+/?$}, false],
|
372
|
+
["region", %r{^[^/]+/?$}, false]
|
373
|
+
]
|
374
|
+
)
|
375
|
+
transcoder.transcode request_pb
|
376
|
+
end
|
377
|
+
|
378
|
+
##
|
379
|
+
# @private
|
380
|
+
#
|
381
|
+
# GRPC transcoding helper method for the set_labels REST call
|
382
|
+
#
|
383
|
+
# @param request_pb [::Google::Cloud::Compute::V1::SetLabelsAddressRequest]
|
384
|
+
# A request object representing the call parameters. Required.
|
385
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
386
|
+
# Uri, Body, Query string parameters
|
387
|
+
def transcode_set_labels_request request_pb
|
388
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
389
|
+
.with_bindings(
|
390
|
+
uri_method: :post,
|
391
|
+
uri_template: "/compute/v1/projects/{project}/regions/{region}/addresses/{resource}/setLabels",
|
392
|
+
body: "region_set_labels_request_resource",
|
393
|
+
matches: [
|
394
|
+
["project", %r{^[^/]+/?$}, false],
|
395
|
+
["region", %r{^[^/]+/?$}, false],
|
396
|
+
["resource", %r{^[^/]+/?$}, false]
|
336
397
|
]
|
337
398
|
)
|
338
399
|
transcoder.transcode request_pb
|
@@ -26,8 +26,8 @@ module Google
|
|
26
26
|
module Rest
|
27
27
|
##
|
28
28
|
# REST service stub for the Autoscalers service.
|
29
|
-
#
|
30
|
-
# including transcoding, making the REST call and deserialing the response
|
29
|
+
# Service stub contains baseline method implementations
|
30
|
+
# including transcoding, making the REST call, and deserialing the response.
|
31
31
|
#
|
32
32
|
class ServiceStub
|
33
33
|
def initialize endpoint:, credentials:
|
@@ -315,7 +315,7 @@ module Google
|
|
315
315
|
uri_method: :get,
|
316
316
|
uri_template: "/compute/v1/projects/{project}/aggregated/autoscalers",
|
317
317
|
matches: [
|
318
|
-
["project", %r{[^/]
|
318
|
+
["project", %r{^[^/]+/?$}, false]
|
319
319
|
]
|
320
320
|
)
|
321
321
|
transcoder.transcode request_pb
|
@@ -336,9 +336,9 @@ module Google
|
|
336
336
|
uri_method: :delete,
|
337
337
|
uri_template: "/compute/v1/projects/{project}/zones/{zone}/autoscalers/{autoscaler}",
|
338
338
|
matches: [
|
339
|
-
["project", %r{[^/]
|
340
|
-
["zone", %r{[^/]
|
341
|
-
["autoscaler", %r{[^/]
|
339
|
+
["project", %r{^[^/]+/?$}, false],
|
340
|
+
["zone", %r{^[^/]+/?$}, false],
|
341
|
+
["autoscaler", %r{^[^/]+/?$}, false]
|
342
342
|
]
|
343
343
|
)
|
344
344
|
transcoder.transcode request_pb
|
@@ -359,9 +359,9 @@ module Google
|
|
359
359
|
uri_method: :get,
|
360
360
|
uri_template: "/compute/v1/projects/{project}/zones/{zone}/autoscalers/{autoscaler}",
|
361
361
|
matches: [
|
362
|
-
["project", %r{[^/]
|
363
|
-
["zone", %r{[^/]
|
364
|
-
["autoscaler", %r{[^/]
|
362
|
+
["project", %r{^[^/]+/?$}, false],
|
363
|
+
["zone", %r{^[^/]+/?$}, false],
|
364
|
+
["autoscaler", %r{^[^/]+/?$}, false]
|
365
365
|
]
|
366
366
|
)
|
367
367
|
transcoder.transcode request_pb
|
@@ -383,8 +383,8 @@ module Google
|
|
383
383
|
uri_template: "/compute/v1/projects/{project}/zones/{zone}/autoscalers",
|
384
384
|
body: "autoscaler_resource",
|
385
385
|
matches: [
|
386
|
-
["project", %r{[^/]
|
387
|
-
["zone", %r{[^/]
|
386
|
+
["project", %r{^[^/]+/?$}, false],
|
387
|
+
["zone", %r{^[^/]+/?$}, false]
|
388
388
|
]
|
389
389
|
)
|
390
390
|
transcoder.transcode request_pb
|
@@ -405,8 +405,8 @@ module Google
|
|
405
405
|
uri_method: :get,
|
406
406
|
uri_template: "/compute/v1/projects/{project}/zones/{zone}/autoscalers",
|
407
407
|
matches: [
|
408
|
-
["project", %r{[^/]
|
409
|
-
["zone", %r{[^/]
|
408
|
+
["project", %r{^[^/]+/?$}, false],
|
409
|
+
["zone", %r{^[^/]+/?$}, false]
|
410
410
|
]
|
411
411
|
)
|
412
412
|
transcoder.transcode request_pb
|
@@ -428,8 +428,8 @@ module Google
|
|
428
428
|
uri_template: "/compute/v1/projects/{project}/zones/{zone}/autoscalers",
|
429
429
|
body: "autoscaler_resource",
|
430
430
|
matches: [
|
431
|
-
["project", %r{[^/]
|
432
|
-
["zone", %r{[^/]
|
431
|
+
["project", %r{^[^/]+/?$}, false],
|
432
|
+
["zone", %r{^[^/]+/?$}, false]
|
433
433
|
]
|
434
434
|
)
|
435
435
|
transcoder.transcode request_pb
|
@@ -451,8 +451,8 @@ module Google
|
|
451
451
|
uri_template: "/compute/v1/projects/{project}/zones/{zone}/autoscalers",
|
452
452
|
body: "autoscaler_resource",
|
453
453
|
matches: [
|
454
|
-
["project", %r{[^/]
|
455
|
-
["zone", %r{[^/]
|
454
|
+
["project", %r{^[^/]+/?$}, false],
|
455
|
+
["zone", %r{^[^/]+/?$}, false]
|
456
456
|
]
|
457
457
|
)
|
458
458
|
transcoder.transcode request_pb
|
@@ -26,8 +26,8 @@ module Google
|
|
26
26
|
module Rest
|
27
27
|
##
|
28
28
|
# REST service stub for the BackendBuckets service.
|
29
|
-
#
|
30
|
-
# including transcoding, making the REST call and deserialing the response
|
29
|
+
# Service stub contains baseline method implementations
|
30
|
+
# including transcoding, making the REST call, and deserialing the response.
|
31
31
|
#
|
32
32
|
class ServiceStub
|
33
33
|
def initialize endpoint:, credentials:
|
@@ -390,8 +390,8 @@ module Google
|
|
390
390
|
uri_template: "/compute/v1/projects/{project}/global/backendBuckets/{backend_bucket}/addSignedUrlKey",
|
391
391
|
body: "signed_url_key_resource",
|
392
392
|
matches: [
|
393
|
-
["project", %r{[^/]
|
394
|
-
["backend_bucket", %r{[^/]
|
393
|
+
["project", %r{^[^/]+/?$}, false],
|
394
|
+
["backend_bucket", %r{^[^/]+/?$}, false]
|
395
395
|
]
|
396
396
|
)
|
397
397
|
transcoder.transcode request_pb
|
@@ -412,8 +412,8 @@ module Google
|
|
412
412
|
uri_method: :delete,
|
413
413
|
uri_template: "/compute/v1/projects/{project}/global/backendBuckets/{backend_bucket}",
|
414
414
|
matches: [
|
415
|
-
["project", %r{[^/]
|
416
|
-
["backend_bucket", %r{[^/]
|
415
|
+
["project", %r{^[^/]+/?$}, false],
|
416
|
+
["backend_bucket", %r{^[^/]+/?$}, false]
|
417
417
|
]
|
418
418
|
)
|
419
419
|
transcoder.transcode request_pb
|
@@ -434,8 +434,8 @@ module Google
|
|
434
434
|
uri_method: :post,
|
435
435
|
uri_template: "/compute/v1/projects/{project}/global/backendBuckets/{backend_bucket}/deleteSignedUrlKey",
|
436
436
|
matches: [
|
437
|
-
["project", %r{[^/]
|
438
|
-
["backend_bucket", %r{[^/]
|
437
|
+
["project", %r{^[^/]+/?$}, false],
|
438
|
+
["backend_bucket", %r{^[^/]+/?$}, false]
|
439
439
|
]
|
440
440
|
)
|
441
441
|
transcoder.transcode request_pb
|
@@ -456,8 +456,8 @@ module Google
|
|
456
456
|
uri_method: :get,
|
457
457
|
uri_template: "/compute/v1/projects/{project}/global/backendBuckets/{backend_bucket}",
|
458
458
|
matches: [
|
459
|
-
["project", %r{[^/]
|
460
|
-
["backend_bucket", %r{[^/]
|
459
|
+
["project", %r{^[^/]+/?$}, false],
|
460
|
+
["backend_bucket", %r{^[^/]+/?$}, false]
|
461
461
|
]
|
462
462
|
)
|
463
463
|
transcoder.transcode request_pb
|
@@ -479,7 +479,7 @@ module Google
|
|
479
479
|
uri_template: "/compute/v1/projects/{project}/global/backendBuckets",
|
480
480
|
body: "backend_bucket_resource",
|
481
481
|
matches: [
|
482
|
-
["project", %r{[^/]
|
482
|
+
["project", %r{^[^/]+/?$}, false]
|
483
483
|
]
|
484
484
|
)
|
485
485
|
transcoder.transcode request_pb
|
@@ -500,7 +500,7 @@ module Google
|
|
500
500
|
uri_method: :get,
|
501
501
|
uri_template: "/compute/v1/projects/{project}/global/backendBuckets",
|
502
502
|
matches: [
|
503
|
-
["project", %r{[^/]
|
503
|
+
["project", %r{^[^/]+/?$}, false]
|
504
504
|
]
|
505
505
|
)
|
506
506
|
transcoder.transcode request_pb
|
@@ -522,8 +522,8 @@ module Google
|
|
522
522
|
uri_template: "/compute/v1/projects/{project}/global/backendBuckets/{backend_bucket}",
|
523
523
|
body: "backend_bucket_resource",
|
524
524
|
matches: [
|
525
|
-
["project", %r{[^/]
|
526
|
-
["backend_bucket", %r{[^/]
|
525
|
+
["project", %r{^[^/]+/?$}, false],
|
526
|
+
["backend_bucket", %r{^[^/]+/?$}, false]
|
527
527
|
]
|
528
528
|
)
|
529
529
|
transcoder.transcode request_pb
|
@@ -545,8 +545,8 @@ module Google
|
|
545
545
|
uri_template: "/compute/v1/projects/{project}/global/backendBuckets/{backend_bucket}/setEdgeSecurityPolicy",
|
546
546
|
body: "security_policy_reference_resource",
|
547
547
|
matches: [
|
548
|
-
["project", %r{[^/]
|
549
|
-
["backend_bucket", %r{[^/]
|
548
|
+
["project", %r{^[^/]+/?$}, false],
|
549
|
+
["backend_bucket", %r{^[^/]+/?$}, false]
|
550
550
|
]
|
551
551
|
)
|
552
552
|
transcoder.transcode request_pb
|
@@ -568,8 +568,8 @@ module Google
|
|
568
568
|
uri_template: "/compute/v1/projects/{project}/global/backendBuckets/{backend_bucket}",
|
569
569
|
body: "backend_bucket_resource",
|
570
570
|
matches: [
|
571
|
-
["project", %r{[^/]
|
572
|
-
["backend_bucket", %r{[^/]
|
571
|
+
["project", %r{^[^/]+/?$}, false],
|
572
|
+
["backend_bucket", %r{^[^/]+/?$}, false]
|
573
573
|
]
|
574
574
|
)
|
575
575
|
transcoder.transcode request_pb
|