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
@@ -0,0 +1,288 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2022 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
require "google/cloud/compute/v1/compute_pb"
|
20
|
+
|
21
|
+
module Google
|
22
|
+
module Cloud
|
23
|
+
module Compute
|
24
|
+
module V1
|
25
|
+
module RegionTargetTcpProxies
|
26
|
+
module Rest
|
27
|
+
##
|
28
|
+
# REST service stub for the RegionTargetTcpProxies service.
|
29
|
+
# Service stub contains baseline method implementations
|
30
|
+
# including transcoding, making the REST call, and deserialing the response.
|
31
|
+
#
|
32
|
+
class ServiceStub
|
33
|
+
def initialize endpoint:, credentials:
|
34
|
+
# These require statements are intentionally placed here to initialize
|
35
|
+
# the REST modules only when it's required.
|
36
|
+
require "gapic/rest"
|
37
|
+
|
38
|
+
@client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, credentials: credentials
|
39
|
+
end
|
40
|
+
|
41
|
+
##
|
42
|
+
# Baseline implementation for the delete REST call
|
43
|
+
#
|
44
|
+
# @param request_pb [::Google::Cloud::Compute::V1::DeleteRegionTargetTcpProxyRequest]
|
45
|
+
# A request object representing the call parameters. Required.
|
46
|
+
# @param options [::Gapic::CallOptions]
|
47
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
48
|
+
#
|
49
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
50
|
+
# @yieldparam result [::Google::Cloud::Compute::V1::Operation]
|
51
|
+
# @yieldparam response [::Faraday::Response]
|
52
|
+
#
|
53
|
+
# @return [::Google::Cloud::Compute::V1::Operation]
|
54
|
+
# A result object deserialized from the server's reply
|
55
|
+
def delete request_pb, options = nil
|
56
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
57
|
+
|
58
|
+
verb, uri, query_string_params, body = transcode_delete_request request_pb
|
59
|
+
query_string_params = if query_string_params.any?
|
60
|
+
query_string_params.to_h { |p| p.split("=", 2) }
|
61
|
+
else
|
62
|
+
{}
|
63
|
+
end
|
64
|
+
|
65
|
+
response = @client_stub.make_http_request(
|
66
|
+
verb,
|
67
|
+
uri: uri,
|
68
|
+
body: body || "",
|
69
|
+
params: query_string_params,
|
70
|
+
options: options
|
71
|
+
)
|
72
|
+
result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
|
73
|
+
|
74
|
+
yield result, response if block_given?
|
75
|
+
result
|
76
|
+
end
|
77
|
+
|
78
|
+
##
|
79
|
+
# Baseline implementation for the get REST call
|
80
|
+
#
|
81
|
+
# @param request_pb [::Google::Cloud::Compute::V1::GetRegionTargetTcpProxyRequest]
|
82
|
+
# A request object representing the call parameters. Required.
|
83
|
+
# @param options [::Gapic::CallOptions]
|
84
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
85
|
+
#
|
86
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
87
|
+
# @yieldparam result [::Google::Cloud::Compute::V1::TargetTcpProxy]
|
88
|
+
# @yieldparam response [::Faraday::Response]
|
89
|
+
#
|
90
|
+
# @return [::Google::Cloud::Compute::V1::TargetTcpProxy]
|
91
|
+
# A result object deserialized from the server's reply
|
92
|
+
def get request_pb, options = nil
|
93
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
94
|
+
|
95
|
+
verb, uri, query_string_params, body = transcode_get_request request_pb
|
96
|
+
query_string_params = if query_string_params.any?
|
97
|
+
query_string_params.to_h { |p| p.split("=", 2) }
|
98
|
+
else
|
99
|
+
{}
|
100
|
+
end
|
101
|
+
|
102
|
+
response = @client_stub.make_http_request(
|
103
|
+
verb,
|
104
|
+
uri: uri,
|
105
|
+
body: body || "",
|
106
|
+
params: query_string_params,
|
107
|
+
options: options
|
108
|
+
)
|
109
|
+
result = ::Google::Cloud::Compute::V1::TargetTcpProxy.decode_json response.body, ignore_unknown_fields: true
|
110
|
+
|
111
|
+
yield result, response if block_given?
|
112
|
+
result
|
113
|
+
end
|
114
|
+
|
115
|
+
##
|
116
|
+
# Baseline implementation for the insert REST call
|
117
|
+
#
|
118
|
+
# @param request_pb [::Google::Cloud::Compute::V1::InsertRegionTargetTcpProxyRequest]
|
119
|
+
# A request object representing the call parameters. Required.
|
120
|
+
# @param options [::Gapic::CallOptions]
|
121
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
122
|
+
#
|
123
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
124
|
+
# @yieldparam result [::Google::Cloud::Compute::V1::Operation]
|
125
|
+
# @yieldparam response [::Faraday::Response]
|
126
|
+
#
|
127
|
+
# @return [::Google::Cloud::Compute::V1::Operation]
|
128
|
+
# A result object deserialized from the server's reply
|
129
|
+
def insert request_pb, options = nil
|
130
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
131
|
+
|
132
|
+
verb, uri, query_string_params, body = transcode_insert_request request_pb
|
133
|
+
query_string_params = if query_string_params.any?
|
134
|
+
query_string_params.to_h { |p| p.split("=", 2) }
|
135
|
+
else
|
136
|
+
{}
|
137
|
+
end
|
138
|
+
|
139
|
+
response = @client_stub.make_http_request(
|
140
|
+
verb,
|
141
|
+
uri: uri,
|
142
|
+
body: body || "",
|
143
|
+
params: query_string_params,
|
144
|
+
options: options
|
145
|
+
)
|
146
|
+
result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
|
147
|
+
|
148
|
+
yield result, response if block_given?
|
149
|
+
result
|
150
|
+
end
|
151
|
+
|
152
|
+
##
|
153
|
+
# Baseline implementation for the list REST call
|
154
|
+
#
|
155
|
+
# @param request_pb [::Google::Cloud::Compute::V1::ListRegionTargetTcpProxiesRequest]
|
156
|
+
# A request object representing the call parameters. Required.
|
157
|
+
# @param options [::Gapic::CallOptions]
|
158
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
159
|
+
#
|
160
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
161
|
+
# @yieldparam result [::Google::Cloud::Compute::V1::TargetTcpProxyList]
|
162
|
+
# @yieldparam response [::Faraday::Response]
|
163
|
+
#
|
164
|
+
# @return [::Google::Cloud::Compute::V1::TargetTcpProxyList]
|
165
|
+
# A result object deserialized from the server's reply
|
166
|
+
def list request_pb, options = nil
|
167
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
168
|
+
|
169
|
+
verb, uri, query_string_params, body = transcode_list_request request_pb
|
170
|
+
query_string_params = if query_string_params.any?
|
171
|
+
query_string_params.to_h { |p| p.split("=", 2) }
|
172
|
+
else
|
173
|
+
{}
|
174
|
+
end
|
175
|
+
|
176
|
+
response = @client_stub.make_http_request(
|
177
|
+
verb,
|
178
|
+
uri: uri,
|
179
|
+
body: body || "",
|
180
|
+
params: query_string_params,
|
181
|
+
options: options
|
182
|
+
)
|
183
|
+
result = ::Google::Cloud::Compute::V1::TargetTcpProxyList.decode_json response.body, ignore_unknown_fields: true
|
184
|
+
|
185
|
+
yield result, response if block_given?
|
186
|
+
result
|
187
|
+
end
|
188
|
+
|
189
|
+
|
190
|
+
private
|
191
|
+
|
192
|
+
##
|
193
|
+
# @private
|
194
|
+
#
|
195
|
+
# GRPC transcoding helper method for the delete REST call
|
196
|
+
#
|
197
|
+
# @param request_pb [::Google::Cloud::Compute::V1::DeleteRegionTargetTcpProxyRequest]
|
198
|
+
# A request object representing the call parameters. Required.
|
199
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
200
|
+
# Uri, Body, Query string parameters
|
201
|
+
def transcode_delete_request request_pb
|
202
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
203
|
+
.with_bindings(
|
204
|
+
uri_method: :delete,
|
205
|
+
uri_template: "/compute/v1/projects/{project}/regions/{region}/targetTcpProxies/{target_tcp_proxy}",
|
206
|
+
matches: [
|
207
|
+
["project", %r{^[^/]+/?$}, false],
|
208
|
+
["region", %r{^[^/]+/?$}, false],
|
209
|
+
["target_tcp_proxy", %r{^[^/]+/?$}, false]
|
210
|
+
]
|
211
|
+
)
|
212
|
+
transcoder.transcode request_pb
|
213
|
+
end
|
214
|
+
|
215
|
+
##
|
216
|
+
# @private
|
217
|
+
#
|
218
|
+
# GRPC transcoding helper method for the get REST call
|
219
|
+
#
|
220
|
+
# @param request_pb [::Google::Cloud::Compute::V1::GetRegionTargetTcpProxyRequest]
|
221
|
+
# A request object representing the call parameters. Required.
|
222
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
223
|
+
# Uri, Body, Query string parameters
|
224
|
+
def transcode_get_request request_pb
|
225
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
226
|
+
.with_bindings(
|
227
|
+
uri_method: :get,
|
228
|
+
uri_template: "/compute/v1/projects/{project}/regions/{region}/targetTcpProxies/{target_tcp_proxy}",
|
229
|
+
matches: [
|
230
|
+
["project", %r{^[^/]+/?$}, false],
|
231
|
+
["region", %r{^[^/]+/?$}, false],
|
232
|
+
["target_tcp_proxy", %r{^[^/]+/?$}, false]
|
233
|
+
]
|
234
|
+
)
|
235
|
+
transcoder.transcode request_pb
|
236
|
+
end
|
237
|
+
|
238
|
+
##
|
239
|
+
# @private
|
240
|
+
#
|
241
|
+
# GRPC transcoding helper method for the insert REST call
|
242
|
+
#
|
243
|
+
# @param request_pb [::Google::Cloud::Compute::V1::InsertRegionTargetTcpProxyRequest]
|
244
|
+
# A request object representing the call parameters. Required.
|
245
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
246
|
+
# Uri, Body, Query string parameters
|
247
|
+
def transcode_insert_request request_pb
|
248
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
249
|
+
.with_bindings(
|
250
|
+
uri_method: :post,
|
251
|
+
uri_template: "/compute/v1/projects/{project}/regions/{region}/targetTcpProxies",
|
252
|
+
body: "target_tcp_proxy_resource",
|
253
|
+
matches: [
|
254
|
+
["project", %r{^[^/]+/?$}, false],
|
255
|
+
["region", %r{^[^/]+/?$}, false]
|
256
|
+
]
|
257
|
+
)
|
258
|
+
transcoder.transcode request_pb
|
259
|
+
end
|
260
|
+
|
261
|
+
##
|
262
|
+
# @private
|
263
|
+
#
|
264
|
+
# GRPC transcoding helper method for the list REST call
|
265
|
+
#
|
266
|
+
# @param request_pb [::Google::Cloud::Compute::V1::ListRegionTargetTcpProxiesRequest]
|
267
|
+
# A request object representing the call parameters. Required.
|
268
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
269
|
+
# Uri, Body, Query string parameters
|
270
|
+
def transcode_list_request request_pb
|
271
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
272
|
+
.with_bindings(
|
273
|
+
uri_method: :get,
|
274
|
+
uri_template: "/compute/v1/projects/{project}/regions/{region}/targetTcpProxies",
|
275
|
+
matches: [
|
276
|
+
["project", %r{^[^/]+/?$}, false],
|
277
|
+
["region", %r{^[^/]+/?$}, false]
|
278
|
+
]
|
279
|
+
)
|
280
|
+
transcoder.transcode request_pb
|
281
|
+
end
|
282
|
+
end
|
283
|
+
end
|
284
|
+
end
|
285
|
+
end
|
286
|
+
end
|
287
|
+
end
|
288
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2022 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
require "google/cloud/compute/v1/region_target_tcp_proxies/rest/client"
|
20
|
+
|
21
|
+
module Google
|
22
|
+
module Cloud
|
23
|
+
module Compute
|
24
|
+
module V1
|
25
|
+
module RegionTargetTcpProxies
|
26
|
+
# Client for the REST transport
|
27
|
+
module Rest
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2022 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
require "gapic/config"
|
20
|
+
require "gapic/config/method"
|
21
|
+
|
22
|
+
require "google/cloud/compute/v1/version"
|
23
|
+
|
24
|
+
require "google/cloud/compute/v1/region_target_tcp_proxies/credentials"
|
25
|
+
require "google/cloud/compute/v1/region_target_tcp_proxies/rest"
|
26
|
+
|
27
|
+
module Google
|
28
|
+
module Cloud
|
29
|
+
module Compute
|
30
|
+
module V1
|
31
|
+
##
|
32
|
+
# The RegionTargetTcpProxies API.
|
33
|
+
#
|
34
|
+
# To load this service and instantiate a REST client:
|
35
|
+
#
|
36
|
+
# require "google/cloud/compute/v1/region_target_tcp_proxies"
|
37
|
+
# client = ::Google::Cloud::Compute::V1::RegionTargetTcpProxies::Rest::Client.new
|
38
|
+
#
|
39
|
+
module RegionTargetTcpProxies
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
helper_path = ::File.join __dir__, "region_target_tcp_proxies", "helpers.rb"
|
47
|
+
require "google/cloud/compute/v1/region_target_tcp_proxies/helpers" if ::File.file? helper_path
|
@@ -26,8 +26,8 @@ module Google
|
|
26
26
|
module Rest
|
27
27
|
##
|
28
28
|
# REST service stub for the RegionUrlMaps 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,9 +315,9 @@ module Google
|
|
315
315
|
uri_method: :delete,
|
316
316
|
uri_template: "/compute/v1/projects/{project}/regions/{region}/urlMaps/{url_map}",
|
317
317
|
matches: [
|
318
|
-
["project", %r{[^/]
|
319
|
-
["region", %r{[^/]
|
320
|
-
["url_map", %r{[^/]
|
318
|
+
["project", %r{^[^/]+/?$}, false],
|
319
|
+
["region", %r{^[^/]+/?$}, false],
|
320
|
+
["url_map", %r{^[^/]+/?$}, false]
|
321
321
|
]
|
322
322
|
)
|
323
323
|
transcoder.transcode request_pb
|
@@ -338,9 +338,9 @@ module Google
|
|
338
338
|
uri_method: :get,
|
339
339
|
uri_template: "/compute/v1/projects/{project}/regions/{region}/urlMaps/{url_map}",
|
340
340
|
matches: [
|
341
|
-
["project", %r{[^/]
|
342
|
-
["region", %r{[^/]
|
343
|
-
["url_map", %r{[^/]
|
341
|
+
["project", %r{^[^/]+/?$}, false],
|
342
|
+
["region", %r{^[^/]+/?$}, false],
|
343
|
+
["url_map", %r{^[^/]+/?$}, false]
|
344
344
|
]
|
345
345
|
)
|
346
346
|
transcoder.transcode request_pb
|
@@ -362,8 +362,8 @@ module Google
|
|
362
362
|
uri_template: "/compute/v1/projects/{project}/regions/{region}/urlMaps",
|
363
363
|
body: "url_map_resource",
|
364
364
|
matches: [
|
365
|
-
["project", %r{[^/]
|
366
|
-
["region", %r{[^/]
|
365
|
+
["project", %r{^[^/]+/?$}, false],
|
366
|
+
["region", %r{^[^/]+/?$}, false]
|
367
367
|
]
|
368
368
|
)
|
369
369
|
transcoder.transcode request_pb
|
@@ -384,8 +384,8 @@ module Google
|
|
384
384
|
uri_method: :get,
|
385
385
|
uri_template: "/compute/v1/projects/{project}/regions/{region}/urlMaps",
|
386
386
|
matches: [
|
387
|
-
["project", %r{[^/]
|
388
|
-
["region", %r{[^/]
|
387
|
+
["project", %r{^[^/]+/?$}, false],
|
388
|
+
["region", %r{^[^/]+/?$}, false]
|
389
389
|
]
|
390
390
|
)
|
391
391
|
transcoder.transcode request_pb
|
@@ -407,9 +407,9 @@ module Google
|
|
407
407
|
uri_template: "/compute/v1/projects/{project}/regions/{region}/urlMaps/{url_map}",
|
408
408
|
body: "url_map_resource",
|
409
409
|
matches: [
|
410
|
-
["project", %r{[^/]
|
411
|
-
["region", %r{[^/]
|
412
|
-
["url_map", %r{[^/]
|
410
|
+
["project", %r{^[^/]+/?$}, false],
|
411
|
+
["region", %r{^[^/]+/?$}, false],
|
412
|
+
["url_map", %r{^[^/]+/?$}, false]
|
413
413
|
]
|
414
414
|
)
|
415
415
|
transcoder.transcode request_pb
|
@@ -431,9 +431,9 @@ module Google
|
|
431
431
|
uri_template: "/compute/v1/projects/{project}/regions/{region}/urlMaps/{url_map}",
|
432
432
|
body: "url_map_resource",
|
433
433
|
matches: [
|
434
|
-
["project", %r{[^/]
|
435
|
-
["region", %r{[^/]
|
436
|
-
["url_map", %r{[^/]
|
434
|
+
["project", %r{^[^/]+/?$}, false],
|
435
|
+
["region", %r{^[^/]+/?$}, false],
|
436
|
+
["url_map", %r{^[^/]+/?$}, false]
|
437
437
|
]
|
438
438
|
)
|
439
439
|
transcoder.transcode request_pb
|
@@ -455,9 +455,9 @@ module Google
|
|
455
455
|
uri_template: "/compute/v1/projects/{project}/regions/{region}/urlMaps/{url_map}/validate",
|
456
456
|
body: "region_url_maps_validate_request_resource",
|
457
457
|
matches: [
|
458
|
-
["project", %r{[^/]
|
459
|
-
["region", %r{[^/]
|
460
|
-
["url_map", %r{[^/]
|
458
|
+
["project", %r{^[^/]+/?$}, false],
|
459
|
+
["region", %r{^[^/]+/?$}, false],
|
460
|
+
["url_map", %r{^[^/]+/?$}, false]
|
461
461
|
]
|
462
462
|
)
|
463
463
|
transcoder.transcode request_pb
|
@@ -26,8 +26,8 @@ module Google
|
|
26
26
|
module Rest
|
27
27
|
##
|
28
28
|
# REST service stub for the Regions 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:
|
@@ -130,8 +130,8 @@ module Google
|
|
130
130
|
uri_method: :get,
|
131
131
|
uri_template: "/compute/v1/projects/{project}/regions/{region}",
|
132
132
|
matches: [
|
133
|
-
["project", %r{[^/]
|
134
|
-
["region", %r{[^/]
|
133
|
+
["project", %r{^[^/]+/?$}, false],
|
134
|
+
["region", %r{^[^/]+/?$}, false]
|
135
135
|
]
|
136
136
|
)
|
137
137
|
transcoder.transcode request_pb
|
@@ -152,7 +152,7 @@ module Google
|
|
152
152
|
uri_method: :get,
|
153
153
|
uri_template: "/compute/v1/projects/{project}/regions",
|
154
154
|
matches: [
|
155
|
-
["project", %r{[^/]
|
155
|
+
["project", %r{^[^/]+/?$}, false]
|
156
156
|
]
|
157
157
|
)
|
158
158
|
transcoder.transcode request_pb
|
@@ -26,8 +26,8 @@ module Google
|
|
26
26
|
module Rest
|
27
27
|
##
|
28
28
|
# REST service stub for the Reservations 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:
|
@@ -426,7 +426,7 @@ module Google
|
|
426
426
|
uri_method: :get,
|
427
427
|
uri_template: "/compute/v1/projects/{project}/aggregated/reservations",
|
428
428
|
matches: [
|
429
|
-
["project", %r{[^/]
|
429
|
+
["project", %r{^[^/]+/?$}, false]
|
430
430
|
]
|
431
431
|
)
|
432
432
|
transcoder.transcode request_pb
|
@@ -447,9 +447,9 @@ module Google
|
|
447
447
|
uri_method: :delete,
|
448
448
|
uri_template: "/compute/v1/projects/{project}/zones/{zone}/reservations/{reservation}",
|
449
449
|
matches: [
|
450
|
-
["project", %r{[^/]
|
451
|
-
["zone", %r{[^/]
|
452
|
-
["reservation", %r{[^/]
|
450
|
+
["project", %r{^[^/]+/?$}, false],
|
451
|
+
["zone", %r{^[^/]+/?$}, false],
|
452
|
+
["reservation", %r{^[^/]+/?$}, false]
|
453
453
|
]
|
454
454
|
)
|
455
455
|
transcoder.transcode request_pb
|
@@ -470,9 +470,9 @@ module Google
|
|
470
470
|
uri_method: :get,
|
471
471
|
uri_template: "/compute/v1/projects/{project}/zones/{zone}/reservations/{reservation}",
|
472
472
|
matches: [
|
473
|
-
["project", %r{[^/]
|
474
|
-
["zone", %r{[^/]
|
475
|
-
["reservation", %r{[^/]
|
473
|
+
["project", %r{^[^/]+/?$}, false],
|
474
|
+
["zone", %r{^[^/]+/?$}, false],
|
475
|
+
["reservation", %r{^[^/]+/?$}, false]
|
476
476
|
]
|
477
477
|
)
|
478
478
|
transcoder.transcode request_pb
|
@@ -493,9 +493,9 @@ module Google
|
|
493
493
|
uri_method: :get,
|
494
494
|
uri_template: "/compute/v1/projects/{project}/zones/{zone}/reservations/{resource}/getIamPolicy",
|
495
495
|
matches: [
|
496
|
-
["project", %r{[^/]
|
497
|
-
["zone", %r{[^/]
|
498
|
-
["resource", %r{[^/]
|
496
|
+
["project", %r{^[^/]+/?$}, false],
|
497
|
+
["zone", %r{^[^/]+/?$}, false],
|
498
|
+
["resource", %r{^[^/]+/?$}, false]
|
499
499
|
]
|
500
500
|
)
|
501
501
|
transcoder.transcode request_pb
|
@@ -517,8 +517,8 @@ module Google
|
|
517
517
|
uri_template: "/compute/v1/projects/{project}/zones/{zone}/reservations",
|
518
518
|
body: "reservation_resource",
|
519
519
|
matches: [
|
520
|
-
["project", %r{[^/]
|
521
|
-
["zone", %r{[^/]
|
520
|
+
["project", %r{^[^/]+/?$}, false],
|
521
|
+
["zone", %r{^[^/]+/?$}, false]
|
522
522
|
]
|
523
523
|
)
|
524
524
|
transcoder.transcode request_pb
|
@@ -539,8 +539,8 @@ module Google
|
|
539
539
|
uri_method: :get,
|
540
540
|
uri_template: "/compute/v1/projects/{project}/zones/{zone}/reservations",
|
541
541
|
matches: [
|
542
|
-
["project", %r{[^/]
|
543
|
-
["zone", %r{[^/]
|
542
|
+
["project", %r{^[^/]+/?$}, false],
|
543
|
+
["zone", %r{^[^/]+/?$}, false]
|
544
544
|
]
|
545
545
|
)
|
546
546
|
transcoder.transcode request_pb
|
@@ -562,9 +562,9 @@ module Google
|
|
562
562
|
uri_template: "/compute/v1/projects/{project}/zones/{zone}/reservations/{reservation}/resize",
|
563
563
|
body: "reservations_resize_request_resource",
|
564
564
|
matches: [
|
565
|
-
["project", %r{[^/]
|
566
|
-
["zone", %r{[^/]
|
567
|
-
["reservation", %r{[^/]
|
565
|
+
["project", %r{^[^/]+/?$}, false],
|
566
|
+
["zone", %r{^[^/]+/?$}, false],
|
567
|
+
["reservation", %r{^[^/]+/?$}, false]
|
568
568
|
]
|
569
569
|
)
|
570
570
|
transcoder.transcode request_pb
|
@@ -586,9 +586,9 @@ module Google
|
|
586
586
|
uri_template: "/compute/v1/projects/{project}/zones/{zone}/reservations/{resource}/setIamPolicy",
|
587
587
|
body: "zone_set_policy_request_resource",
|
588
588
|
matches: [
|
589
|
-
["project", %r{[^/]
|
590
|
-
["zone", %r{[^/]
|
591
|
-
["resource", %r{[^/]
|
589
|
+
["project", %r{^[^/]+/?$}, false],
|
590
|
+
["zone", %r{^[^/]+/?$}, false],
|
591
|
+
["resource", %r{^[^/]+/?$}, false]
|
592
592
|
]
|
593
593
|
)
|
594
594
|
transcoder.transcode request_pb
|
@@ -610,9 +610,9 @@ module Google
|
|
610
610
|
uri_template: "/compute/v1/projects/{project}/zones/{zone}/reservations/{resource}/testIamPermissions",
|
611
611
|
body: "test_permissions_request_resource",
|
612
612
|
matches: [
|
613
|
-
["project", %r{[^/]
|
614
|
-
["zone", %r{[^/]
|
615
|
-
["resource", %r{[^/]
|
613
|
+
["project", %r{^[^/]+/?$}, false],
|
614
|
+
["zone", %r{^[^/]+/?$}, false],
|
615
|
+
["resource", %r{^[^/]+/?$}, false]
|
616
616
|
]
|
617
617
|
)
|
618
618
|
transcoder.transcode request_pb
|
@@ -634,9 +634,9 @@ module Google
|
|
634
634
|
uri_template: "/compute/v1/projects/{project}/zones/{zone}/reservations/{reservation}",
|
635
635
|
body: "reservation_resource",
|
636
636
|
matches: [
|
637
|
-
["project", %r{[^/]
|
638
|
-
["zone", %r{[^/]
|
639
|
-
["reservation", %r{[^/]
|
637
|
+
["project", %r{^[^/]+/?$}, false],
|
638
|
+
["zone", %r{^[^/]+/?$}, false],
|
639
|
+
["reservation", %r{^[^/]+/?$}, false]
|
640
640
|
]
|
641
641
|
)
|
642
642
|
transcoder.transcode request_pb
|