google-cloud-compute-v1 1.4.0 → 1.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -5
- data/lib/google/cloud/compute/v1/accelerator_types/rest/service_stub.rb +90 -52
- data/lib/google/cloud/compute/v1/accelerator_types.rb +5 -0
- data/lib/google/cloud/compute/v1/addresses/rest/service_stub.rb +156 -89
- data/lib/google/cloud/compute/v1/addresses.rb +3 -0
- data/lib/google/cloud/compute/v1/autoscalers/rest/service_stub.rb +222 -129
- data/lib/google/cloud/compute/v1/autoscalers.rb +3 -0
- data/lib/google/cloud/compute/v1/backend_buckets/rest/service_stub.rb +285 -161
- data/lib/google/cloud/compute/v1/backend_buckets.rb +3 -0
- data/lib/google/cloud/compute/v1/backend_services/rest/service_stub.rb +383 -221
- data/lib/google/cloud/compute/v1/backend_services.rb +3 -0
- data/lib/google/cloud/compute/v1/disk_types/rest/service_stub.rb +90 -52
- data/lib/google/cloud/compute/v1/disk_types.rb +3 -0
- data/lib/google/cloud/compute/v1/disks/rest/service_stub.rb +429 -240
- data/lib/google/cloud/compute/v1/disks.rb +3 -0
- data/lib/google/cloud/compute/v1/external_vpn_gateways/rest/service_stub.rb +189 -102
- data/lib/google/cloud/compute/v1/external_vpn_gateways.rb +3 -0
- data/lib/google/cloud/compute/v1/firewall_policies/rest/service_stub.rb +555 -330
- data/lib/google/cloud/compute/v1/firewall_policies.rb +3 -0
- data/lib/google/cloud/compute/v1/firewalls/rest/service_stub.rb +187 -104
- data/lib/google/cloud/compute/v1/firewalls.rb +3 -0
- data/lib/google/cloud/compute/v1/forwarding_rules/rest/service_stub.rb +258 -146
- data/lib/google/cloud/compute/v1/forwarding_rules.rb +3 -0
- data/lib/google/cloud/compute/v1/global_addresses/rest/service_stub.rb +121 -66
- data/lib/google/cloud/compute/v1/global_addresses.rb +3 -0
- data/lib/google/cloud/compute/v1/global_forwarding_rules/rest/service_stub.rb +221 -122
- data/lib/google/cloud/compute/v1/global_forwarding_rules.rb +3 -0
- data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest/service_stub.rb +219 -126
- data/lib/google/cloud/compute/v1/global_network_endpoint_groups.rb +3 -0
- data/lib/google/cloud/compute/v1/global_operations/rest/service_stub.rb +154 -86
- data/lib/google/cloud/compute/v1/global_operations.rb +3 -0
- data/lib/google/cloud/compute/v1/global_organization_operations/rest/service_stub.rb +84 -49
- data/lib/google/cloud/compute/v1/global_organization_operations.rb +3 -0
- data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest/service_stub.rb +154 -85
- data/lib/google/cloud/compute/v1/global_public_delegated_prefixes.rb +3 -0
- data/lib/google/cloud/compute/v1/health_checks/rest/service_stub.rb +218 -127
- data/lib/google/cloud/compute/v1/health_checks.rb +3 -0
- data/lib/google/cloud/compute/v1/image_family_views/rest/service_stub.rb +27 -7
- data/lib/google/cloud/compute/v1/image_family_views.rb +3 -0
- data/lib/google/cloud/compute/v1/images/rest/service_stub.rb +354 -194
- data/lib/google/cloud/compute/v1/images.rb +3 -0
- data/lib/google/cloud/compute/v1/instance_group_managers/rest/service_stub.rb +664 -381
- data/lib/google/cloud/compute/v1/instance_group_managers.rb +3 -0
- data/lib/google/cloud/compute/v1/instance_groups/rest/service_stub.rb +292 -169
- data/lib/google/cloud/compute/v1/instance_groups.rb +3 -0
- data/lib/google/cloud/compute/v1/instance_templates/rest/service_stub.rb +221 -120
- data/lib/google/cloud/compute/v1/instance_templates.rb +3 -0
- data/lib/google/cloud/compute/v1/instances/rest/service_stub.rb +1503 -845
- data/lib/google/cloud/compute/v1/instances.rb +3 -0
- data/lib/google/cloud/compute/v1/interconnect_attachments/rest/service_stub.rb +190 -109
- data/lib/google/cloud/compute/v1/interconnect_attachments.rb +3 -0
- data/lib/google/cloud/compute/v1/interconnect_locations/rest/service_stub.rb +57 -29
- data/lib/google/cloud/compute/v1/interconnect_locations.rb +3 -0
- data/lib/google/cloud/compute/v1/interconnects/rest/service_stub.rb +187 -102
- data/lib/google/cloud/compute/v1/interconnects.rb +3 -0
- data/lib/google/cloud/compute/v1/license_codes/rest/service_stub.rb +60 -25
- data/lib/google/cloud/compute/v1/license_codes.rb +3 -0
- data/lib/google/cloud/compute/v1/licenses/rest/service_stub.rb +221 -120
- data/lib/google/cloud/compute/v1/licenses.rb +3 -0
- data/lib/google/cloud/compute/v1/machine_images/rest/service_stub.rb +221 -121
- data/lib/google/cloud/compute/v1/machine_images.rb +3 -0
- data/lib/google/cloud/compute/v1/machine_types/rest/service_stub.rb +90 -52
- data/lib/google/cloud/compute/v1/machine_types.rb +3 -0
- data/lib/google/cloud/compute/v1/network_edge_security_services/rest/service_stub.rb +158 -89
- data/lib/google/cloud/compute/v1/network_edge_security_services.rb +3 -0
- data/lib/google/cloud/compute/v1/network_endpoint_groups/rest/service_stub.rb +293 -168
- data/lib/google/cloud/compute/v1/network_endpoint_groups.rb +3 -0
- data/lib/google/cloud/compute/v1/network_firewall_policies/rest/service_stub.rb +513 -293
- data/lib/google/cloud/compute/v1/network_firewall_policies.rb +3 -0
- data/lib/google/cloud/compute/v1/networks/rest/service_stub.rb +350 -202
- data/lib/google/cloud/compute/v1/networks.rb +3 -0
- data/lib/google/cloud/compute/v1/node_groups/rest/service_stub.rb +428 -242
- data/lib/google/cloud/compute/v1/node_groups.rb +3 -0
- data/lib/google/cloud/compute/v1/node_templates/rest/service_stub.rb +259 -143
- data/lib/google/cloud/compute/v1/node_templates.rb +3 -0
- data/lib/google/cloud/compute/v1/node_types/rest/service_stub.rb +90 -52
- data/lib/google/cloud/compute/v1/node_types.rb +3 -0
- data/lib/google/cloud/compute/v1/packet_mirrorings/rest/service_stub.rb +225 -126
- data/lib/google/cloud/compute/v1/packet_mirrorings.rb +3 -0
- data/lib/google/cloud/compute/v1/projects/rest/service_stub.rb +406 -238
- data/lib/google/cloud/compute/v1/projects.rb +3 -0
- data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/service_stub.rb +154 -85
- data/lib/google/cloud/compute/v1/public_advertised_prefixes.rb +3 -0
- data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/service_stub.rb +190 -108
- data/lib/google/cloud/compute/v1/public_delegated_prefixes.rb +3 -0
- data/lib/google/cloud/compute/v1/region_autoscalers/rest/service_stub.rb +191 -106
- data/lib/google/cloud/compute/v1/region_autoscalers.rb +3 -0
- data/lib/google/cloud/compute/v1/region_backend_services/rest/service_stub.rb +228 -122
- data/lib/google/cloud/compute/v1/region_backend_services.rb +3 -0
- data/lib/google/cloud/compute/v1/region_commitments/rest/service_stub.rb +157 -92
- data/lib/google/cloud/compute/v1/region_commitments.rb +3 -0
- data/lib/google/cloud/compute/v1/region_disk_types/rest/service_stub.rb +59 -29
- data/lib/google/cloud/compute/v1/region_disk_types.rb +3 -0
- data/lib/google/cloud/compute/v1/region_disks/rest/service_stub.rb +398 -216
- data/lib/google/cloud/compute/v1/region_disks.rb +3 -0
- data/lib/google/cloud/compute/v1/region_health_check_services/rest/service_stub.rb +159 -85
- data/lib/google/cloud/compute/v1/region_health_check_services.rb +3 -0
- data/lib/google/cloud/compute/v1/region_health_checks/rest/service_stub.rb +193 -104
- data/lib/google/cloud/compute/v1/region_health_checks.rb +3 -0
- data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/service_stub.rb +633 -358
- data/lib/google/cloud/compute/v1/region_instance_group_managers.rb +3 -0
- data/lib/google/cloud/compute/v1/region_instance_groups/rest/service_stub.rb +127 -71
- data/lib/google/cloud/compute/v1/region_instance_groups.rb +3 -0
- data/lib/google/cloud/compute/v1/region_instances/rest/service_stub.rb +26 -9
- data/lib/google/cloud/compute/v1/region_instances.rb +3 -0
- data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/service_stub.rb +125 -66
- data/lib/google/cloud/compute/v1/region_network_endpoint_groups.rb +3 -0
- data/lib/google/cloud/compute/v1/region_network_firewall_policies/rest/service_stub.rb +561 -311
- data/lib/google/cloud/compute/v1/region_network_firewall_policies.rb +3 -0
- data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/service_stub.rb +125 -66
- data/lib/google/cloud/compute/v1/region_notification_endpoints.rb +3 -0
- data/lib/google/cloud/compute/v1/region_operations/rest/service_stub.rb +127 -63
- data/lib/google/cloud/compute/v1/region_operations.rb +3 -0
- data/lib/google/cloud/compute/v1/region_security_policies/rest/service_stub.rb +159 -86
- data/lib/google/cloud/compute/v1/region_security_policies.rb +3 -0
- data/lib/google/cloud/compute/v1/region_ssl_certificates/rest/service_stub.rb +125 -66
- data/lib/google/cloud/compute/v1/region_ssl_certificates.rb +3 -0
- data/lib/google/cloud/compute/v1/region_target_http_proxies/rest/service_stub.rb +159 -85
- data/lib/google/cloud/compute/v1/region_target_http_proxies.rb +3 -0
- data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/service_stub.rb +227 -123
- data/lib/google/cloud/compute/v1/region_target_https_proxies.rb +3 -0
- data/lib/google/cloud/compute/v1/region_url_maps/rest/service_stub.rb +228 -122
- data/lib/google/cloud/compute/v1/region_url_maps.rb +3 -0
- data/lib/google/cloud/compute/v1/regions/rest/service_stub.rb +57 -29
- data/lib/google/cloud/compute/v1/regions.rb +3 -0
- data/lib/google/cloud/compute/v1/reservations/rest/service_stub.rb +327 -183
- data/lib/google/cloud/compute/v1/reservations.rb +3 -0
- data/lib/google/cloud/compute/v1/resource_policies/rest/service_stub.rb +259 -143
- data/lib/google/cloud/compute/v1/resource_policies.rb +3 -0
- data/lib/google/cloud/compute/v1/routers/rest/service_stub.rb +326 -184
- data/lib/google/cloud/compute/v1/routers.rb +3 -0
- data/lib/google/cloud/compute/v1/routes/rest/service_stub.rb +121 -66
- data/lib/google/cloud/compute/v1/routes.rb +3 -0
- data/lib/google/cloud/compute/v1/security_policies/rest/service_stub.rb +346 -206
- data/lib/google/cloud/compute/v1/security_policies.rb +3 -0
- data/lib/google/cloud/compute/v1/service_attachments/rest/service_stub.rb +293 -162
- data/lib/google/cloud/compute/v1/service_attachments.rb +3 -0
- data/lib/google/cloud/compute/v1/snapshots/rest/service_stub.rb +255 -138
- data/lib/google/cloud/compute/v1/snapshots.rb +3 -0
- data/lib/google/cloud/compute/v1/ssl_certificates/rest/service_stub.rb +152 -89
- data/lib/google/cloud/compute/v1/ssl_certificates.rb +3 -0
- data/lib/google/cloud/compute/v1/ssl_policies/rest/service_stub.rb +185 -107
- data/lib/google/cloud/compute/v1/ssl_policies.rb +3 -0
- data/lib/google/cloud/compute/v1/subnetworks/rest/service_stub.rb +392 -223
- data/lib/google/cloud/compute/v1/subnetworks.rb +3 -0
- data/lib/google/cloud/compute/v1/target_grpc_proxies/rest/service_stub.rb +154 -85
- data/lib/google/cloud/compute/v1/target_grpc_proxies.rb +3 -0
- data/lib/google/cloud/compute/v1/target_http_proxies/rest/service_stub.rb +218 -127
- data/lib/google/cloud/compute/v1/target_http_proxies.rb +3 -0
- data/lib/google/cloud/compute/v1/target_https_proxies/rest/service_stub.rb +350 -203
- data/lib/google/cloud/compute/v1/target_https_proxies.rb +3 -0
- data/lib/google/cloud/compute/v1/target_instances/rest/service_stub.rb +156 -89
- data/lib/google/cloud/compute/v1/target_instances.rb +3 -0
- data/lib/google/cloud/compute/v1/target_pools/rest/service_stub.rb +361 -203
- data/lib/google/cloud/compute/v1/target_pools.rb +3 -0
- data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/service_stub.rb +286 -161
- data/lib/google/cloud/compute/v1/target_ssl_proxies.rb +3 -0
- data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/service_stub.rb +187 -104
- data/lib/google/cloud/compute/v1/target_tcp_proxies.rb +3 -0
- data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/service_stub.rb +156 -89
- data/lib/google/cloud/compute/v1/target_vpn_gateways.rb +3 -0
- data/lib/google/cloud/compute/v1/url_maps/rest/service_stub.rb +285 -164
- data/lib/google/cloud/compute/v1/url_maps.rb +3 -0
- data/lib/google/cloud/compute/v1/version.rb +1 -1
- data/lib/google/cloud/compute/v1/vpn_gateways/rest/service_stub.rb +259 -143
- data/lib/google/cloud/compute/v1/vpn_gateways.rb +3 -0
- data/lib/google/cloud/compute/v1/vpn_tunnels/rest/service_stub.rb +156 -89
- data/lib/google/cloud/compute/v1/vpn_tunnels.rb +3 -0
- data/lib/google/cloud/compute/v1/zone_operations/rest/service_stub.rb +127 -63
- data/lib/google/cloud/compute/v1/zone_operations.rb +3 -0
- data/lib/google/cloud/compute/v1/zones/rest/service_stub.rb +57 -29
- data/lib/google/cloud/compute/v1/zones.rb +3 -0
- metadata +11 -11
@@ -55,10 +55,17 @@ module Google
|
|
55
55
|
def add_resource_policies request_pb, options = nil
|
56
56
|
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
57
57
|
|
58
|
-
|
59
|
-
|
58
|
+
verb, uri, query_string_params, body = transcode_add_resource_policies_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,
|
60
67
|
uri: uri,
|
61
|
-
body: body,
|
68
|
+
body: body || "",
|
62
69
|
params: query_string_params,
|
63
70
|
options: options
|
64
71
|
)
|
@@ -68,22 +75,6 @@ module Google
|
|
68
75
|
result
|
69
76
|
end
|
70
77
|
|
71
|
-
##
|
72
|
-
# GRPC transcoding helper method for the add_resource_policies REST call
|
73
|
-
#
|
74
|
-
# @param request_pb [::Google::Cloud::Compute::V1::AddResourcePoliciesDiskRequest]
|
75
|
-
# A request object representing the call parameters. Required.
|
76
|
-
# @return [Array(String, [String, nil], Hash{String => String})]
|
77
|
-
# Uri, Body, Query string parameters
|
78
|
-
def transcode_add_resource_policies_request request_pb
|
79
|
-
uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/disks/#{request_pb.disk}/addResourcePolicies"
|
80
|
-
body = request_pb.disks_add_resource_policies_request_resource.to_json
|
81
|
-
query_string_params = {}
|
82
|
-
query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
|
83
|
-
|
84
|
-
[uri, body, query_string_params]
|
85
|
-
end
|
86
|
-
|
87
78
|
##
|
88
79
|
# Baseline implementation for the aggregated_list REST call
|
89
80
|
#
|
@@ -101,9 +92,17 @@ module Google
|
|
101
92
|
def aggregated_list request_pb, options = nil
|
102
93
|
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
103
94
|
|
104
|
-
|
105
|
-
|
95
|
+
verb, uri, query_string_params, body = transcode_aggregated_list_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,
|
106
104
|
uri: uri,
|
105
|
+
body: body || "",
|
107
106
|
params: query_string_params,
|
108
107
|
options: options
|
109
108
|
)
|
@@ -113,27 +112,6 @@ module Google
|
|
113
112
|
result
|
114
113
|
end
|
115
114
|
|
116
|
-
##
|
117
|
-
# GRPC transcoding helper method for the aggregated_list REST call
|
118
|
-
#
|
119
|
-
# @param request_pb [::Google::Cloud::Compute::V1::AggregatedListDisksRequest]
|
120
|
-
# A request object representing the call parameters. Required.
|
121
|
-
# @return [Array(String, [String, nil], Hash{String => String})]
|
122
|
-
# Uri, Body, Query string parameters
|
123
|
-
def transcode_aggregated_list_request request_pb
|
124
|
-
uri = "/compute/v1/projects/#{request_pb.project}/aggregated/disks"
|
125
|
-
body = nil
|
126
|
-
query_string_params = {}
|
127
|
-
query_string_params["filter"] = request_pb.filter.to_s if request_pb.has_filter?
|
128
|
-
query_string_params["includeAllScopes"] = request_pb.include_all_scopes.to_s if request_pb.has_include_all_scopes?
|
129
|
-
query_string_params["maxResults"] = request_pb.max_results.to_s if request_pb.has_max_results?
|
130
|
-
query_string_params["orderBy"] = request_pb.order_by.to_s if request_pb.has_order_by?
|
131
|
-
query_string_params["pageToken"] = request_pb.page_token.to_s if request_pb.has_page_token?
|
132
|
-
query_string_params["returnPartialSuccess"] = request_pb.return_partial_success.to_s if request_pb.has_return_partial_success?
|
133
|
-
|
134
|
-
[uri, body, query_string_params]
|
135
|
-
end
|
136
|
-
|
137
115
|
##
|
138
116
|
# Baseline implementation for the create_snapshot REST call
|
139
117
|
#
|
@@ -151,10 +129,17 @@ module Google
|
|
151
129
|
def create_snapshot request_pb, options = nil
|
152
130
|
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
153
131
|
|
154
|
-
|
155
|
-
|
132
|
+
verb, uri, query_string_params, body = transcode_create_snapshot_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,
|
156
141
|
uri: uri,
|
157
|
-
body: body,
|
142
|
+
body: body || "",
|
158
143
|
params: query_string_params,
|
159
144
|
options: options
|
160
145
|
)
|
@@ -164,23 +149,6 @@ module Google
|
|
164
149
|
result
|
165
150
|
end
|
166
151
|
|
167
|
-
##
|
168
|
-
# GRPC transcoding helper method for the create_snapshot REST call
|
169
|
-
#
|
170
|
-
# @param request_pb [::Google::Cloud::Compute::V1::CreateSnapshotDiskRequest]
|
171
|
-
# A request object representing the call parameters. Required.
|
172
|
-
# @return [Array(String, [String, nil], Hash{String => String})]
|
173
|
-
# Uri, Body, Query string parameters
|
174
|
-
def transcode_create_snapshot_request request_pb
|
175
|
-
uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/disks/#{request_pb.disk}/createSnapshot"
|
176
|
-
body = request_pb.snapshot_resource.to_json
|
177
|
-
query_string_params = {}
|
178
|
-
query_string_params["guestFlush"] = request_pb.guest_flush.to_s if request_pb.has_guest_flush?
|
179
|
-
query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
|
180
|
-
|
181
|
-
[uri, body, query_string_params]
|
182
|
-
end
|
183
|
-
|
184
152
|
##
|
185
153
|
# Baseline implementation for the delete REST call
|
186
154
|
#
|
@@ -198,9 +166,17 @@ module Google
|
|
198
166
|
def delete request_pb, options = nil
|
199
167
|
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
200
168
|
|
201
|
-
|
202
|
-
|
169
|
+
verb, uri, query_string_params, body = transcode_delete_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,
|
203
178
|
uri: uri,
|
179
|
+
body: body || "",
|
204
180
|
params: query_string_params,
|
205
181
|
options: options
|
206
182
|
)
|
@@ -210,22 +186,6 @@ module Google
|
|
210
186
|
result
|
211
187
|
end
|
212
188
|
|
213
|
-
##
|
214
|
-
# GRPC transcoding helper method for the delete REST call
|
215
|
-
#
|
216
|
-
# @param request_pb [::Google::Cloud::Compute::V1::DeleteDiskRequest]
|
217
|
-
# A request object representing the call parameters. Required.
|
218
|
-
# @return [Array(String, [String, nil], Hash{String => String})]
|
219
|
-
# Uri, Body, Query string parameters
|
220
|
-
def transcode_delete_request request_pb
|
221
|
-
uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/disks/#{request_pb.disk}"
|
222
|
-
body = nil
|
223
|
-
query_string_params = {}
|
224
|
-
query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
|
225
|
-
|
226
|
-
[uri, body, query_string_params]
|
227
|
-
end
|
228
|
-
|
229
189
|
##
|
230
190
|
# Baseline implementation for the get REST call
|
231
191
|
#
|
@@ -243,9 +203,18 @@ module Google
|
|
243
203
|
def get request_pb, options = nil
|
244
204
|
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
245
205
|
|
246
|
-
uri,
|
247
|
-
|
206
|
+
verb, uri, query_string_params, body = transcode_get_request request_pb
|
207
|
+
query_string_params = if query_string_params.any?
|
208
|
+
query_string_params.to_h { |p| p.split("=", 2) }
|
209
|
+
else
|
210
|
+
{}
|
211
|
+
end
|
212
|
+
|
213
|
+
response = @client_stub.make_http_request(
|
214
|
+
verb,
|
248
215
|
uri: uri,
|
216
|
+
body: body || "",
|
217
|
+
params: query_string_params,
|
249
218
|
options: options
|
250
219
|
)
|
251
220
|
result = ::Google::Cloud::Compute::V1::Disk.decode_json response.body, ignore_unknown_fields: true
|
@@ -254,21 +223,6 @@ module Google
|
|
254
223
|
result
|
255
224
|
end
|
256
225
|
|
257
|
-
##
|
258
|
-
# GRPC transcoding helper method for the get REST call
|
259
|
-
#
|
260
|
-
# @param request_pb [::Google::Cloud::Compute::V1::GetDiskRequest]
|
261
|
-
# A request object representing the call parameters. Required.
|
262
|
-
# @return [Array(String, [String, nil], Hash{String => String})]
|
263
|
-
# Uri, Body, Query string parameters
|
264
|
-
def transcode_get_request request_pb
|
265
|
-
uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/disks/#{request_pb.disk}"
|
266
|
-
body = nil
|
267
|
-
query_string_params = {}
|
268
|
-
|
269
|
-
[uri, body, query_string_params]
|
270
|
-
end
|
271
|
-
|
272
226
|
##
|
273
227
|
# Baseline implementation for the get_iam_policy REST call
|
274
228
|
#
|
@@ -286,9 +240,17 @@ module Google
|
|
286
240
|
def get_iam_policy request_pb, options = nil
|
287
241
|
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
288
242
|
|
289
|
-
|
290
|
-
|
243
|
+
verb, uri, query_string_params, body = transcode_get_iam_policy_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,
|
291
252
|
uri: uri,
|
253
|
+
body: body || "",
|
292
254
|
params: query_string_params,
|
293
255
|
options: options
|
294
256
|
)
|
@@ -298,22 +260,6 @@ module Google
|
|
298
260
|
result
|
299
261
|
end
|
300
262
|
|
301
|
-
##
|
302
|
-
# GRPC transcoding helper method for the get_iam_policy REST call
|
303
|
-
#
|
304
|
-
# @param request_pb [::Google::Cloud::Compute::V1::GetIamPolicyDiskRequest]
|
305
|
-
# A request object representing the call parameters. Required.
|
306
|
-
# @return [Array(String, [String, nil], Hash{String => String})]
|
307
|
-
# Uri, Body, Query string parameters
|
308
|
-
def transcode_get_iam_policy_request request_pb
|
309
|
-
uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/disks/#{request_pb.resource}/getIamPolicy"
|
310
|
-
body = nil
|
311
|
-
query_string_params = {}
|
312
|
-
query_string_params["optionsRequestedPolicyVersion"] = request_pb.options_requested_policy_version.to_s if request_pb.has_options_requested_policy_version?
|
313
|
-
|
314
|
-
[uri, body, query_string_params]
|
315
|
-
end
|
316
|
-
|
317
263
|
##
|
318
264
|
# Baseline implementation for the insert REST call
|
319
265
|
#
|
@@ -331,10 +277,17 @@ module Google
|
|
331
277
|
def insert request_pb, options = nil
|
332
278
|
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
333
279
|
|
334
|
-
|
335
|
-
|
280
|
+
verb, uri, query_string_params, body = transcode_insert_request request_pb
|
281
|
+
query_string_params = if query_string_params.any?
|
282
|
+
query_string_params.to_h { |p| p.split("=", 2) }
|
283
|
+
else
|
284
|
+
{}
|
285
|
+
end
|
286
|
+
|
287
|
+
response = @client_stub.make_http_request(
|
288
|
+
verb,
|
336
289
|
uri: uri,
|
337
|
-
body: body,
|
290
|
+
body: body || "",
|
338
291
|
params: query_string_params,
|
339
292
|
options: options
|
340
293
|
)
|
@@ -344,23 +297,6 @@ module Google
|
|
344
297
|
result
|
345
298
|
end
|
346
299
|
|
347
|
-
##
|
348
|
-
# GRPC transcoding helper method for the insert REST call
|
349
|
-
#
|
350
|
-
# @param request_pb [::Google::Cloud::Compute::V1::InsertDiskRequest]
|
351
|
-
# A request object representing the call parameters. Required.
|
352
|
-
# @return [Array(String, [String, nil], Hash{String => String})]
|
353
|
-
# Uri, Body, Query string parameters
|
354
|
-
def transcode_insert_request request_pb
|
355
|
-
uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/disks"
|
356
|
-
body = request_pb.disk_resource.to_json
|
357
|
-
query_string_params = {}
|
358
|
-
query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
|
359
|
-
query_string_params["sourceImage"] = request_pb.source_image.to_s if request_pb.has_source_image?
|
360
|
-
|
361
|
-
[uri, body, query_string_params]
|
362
|
-
end
|
363
|
-
|
364
300
|
##
|
365
301
|
# Baseline implementation for the list REST call
|
366
302
|
#
|
@@ -378,9 +314,17 @@ module Google
|
|
378
314
|
def list request_pb, options = nil
|
379
315
|
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
380
316
|
|
381
|
-
|
382
|
-
|
317
|
+
verb, uri, query_string_params, body = transcode_list_request request_pb
|
318
|
+
query_string_params = if query_string_params.any?
|
319
|
+
query_string_params.to_h { |p| p.split("=", 2) }
|
320
|
+
else
|
321
|
+
{}
|
322
|
+
end
|
323
|
+
|
324
|
+
response = @client_stub.make_http_request(
|
325
|
+
verb,
|
383
326
|
uri: uri,
|
327
|
+
body: body || "",
|
384
328
|
params: query_string_params,
|
385
329
|
options: options
|
386
330
|
)
|
@@ -390,26 +334,6 @@ module Google
|
|
390
334
|
result
|
391
335
|
end
|
392
336
|
|
393
|
-
##
|
394
|
-
# GRPC transcoding helper method for the list REST call
|
395
|
-
#
|
396
|
-
# @param request_pb [::Google::Cloud::Compute::V1::ListDisksRequest]
|
397
|
-
# A request object representing the call parameters. Required.
|
398
|
-
# @return [Array(String, [String, nil], Hash{String => String})]
|
399
|
-
# Uri, Body, Query string parameters
|
400
|
-
def transcode_list_request request_pb
|
401
|
-
uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/disks"
|
402
|
-
body = nil
|
403
|
-
query_string_params = {}
|
404
|
-
query_string_params["filter"] = request_pb.filter.to_s if request_pb.has_filter?
|
405
|
-
query_string_params["maxResults"] = request_pb.max_results.to_s if request_pb.has_max_results?
|
406
|
-
query_string_params["orderBy"] = request_pb.order_by.to_s if request_pb.has_order_by?
|
407
|
-
query_string_params["pageToken"] = request_pb.page_token.to_s if request_pb.has_page_token?
|
408
|
-
query_string_params["returnPartialSuccess"] = request_pb.return_partial_success.to_s if request_pb.has_return_partial_success?
|
409
|
-
|
410
|
-
[uri, body, query_string_params]
|
411
|
-
end
|
412
|
-
|
413
337
|
##
|
414
338
|
# Baseline implementation for the remove_resource_policies REST call
|
415
339
|
#
|
@@ -427,10 +351,17 @@ module Google
|
|
427
351
|
def remove_resource_policies request_pb, options = nil
|
428
352
|
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
429
353
|
|
430
|
-
|
431
|
-
|
354
|
+
verb, uri, query_string_params, body = transcode_remove_resource_policies_request request_pb
|
355
|
+
query_string_params = if query_string_params.any?
|
356
|
+
query_string_params.to_h { |p| p.split("=", 2) }
|
357
|
+
else
|
358
|
+
{}
|
359
|
+
end
|
360
|
+
|
361
|
+
response = @client_stub.make_http_request(
|
362
|
+
verb,
|
432
363
|
uri: uri,
|
433
|
-
body: body,
|
364
|
+
body: body || "",
|
434
365
|
params: query_string_params,
|
435
366
|
options: options
|
436
367
|
)
|
@@ -440,22 +371,6 @@ module Google
|
|
440
371
|
result
|
441
372
|
end
|
442
373
|
|
443
|
-
##
|
444
|
-
# GRPC transcoding helper method for the remove_resource_policies REST call
|
445
|
-
#
|
446
|
-
# @param request_pb [::Google::Cloud::Compute::V1::RemoveResourcePoliciesDiskRequest]
|
447
|
-
# A request object representing the call parameters. Required.
|
448
|
-
# @return [Array(String, [String, nil], Hash{String => String})]
|
449
|
-
# Uri, Body, Query string parameters
|
450
|
-
def transcode_remove_resource_policies_request request_pb
|
451
|
-
uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/disks/#{request_pb.disk}/removeResourcePolicies"
|
452
|
-
body = request_pb.disks_remove_resource_policies_request_resource.to_json
|
453
|
-
query_string_params = {}
|
454
|
-
query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
|
455
|
-
|
456
|
-
[uri, body, query_string_params]
|
457
|
-
end
|
458
|
-
|
459
374
|
##
|
460
375
|
# Baseline implementation for the resize REST call
|
461
376
|
#
|
@@ -473,10 +388,17 @@ module Google
|
|
473
388
|
def resize request_pb, options = nil
|
474
389
|
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
475
390
|
|
476
|
-
|
477
|
-
|
391
|
+
verb, uri, query_string_params, body = transcode_resize_request request_pb
|
392
|
+
query_string_params = if query_string_params.any?
|
393
|
+
query_string_params.to_h { |p| p.split("=", 2) }
|
394
|
+
else
|
395
|
+
{}
|
396
|
+
end
|
397
|
+
|
398
|
+
response = @client_stub.make_http_request(
|
399
|
+
verb,
|
478
400
|
uri: uri,
|
479
|
-
body: body,
|
401
|
+
body: body || "",
|
480
402
|
params: query_string_params,
|
481
403
|
options: options
|
482
404
|
)
|
@@ -486,22 +408,6 @@ module Google
|
|
486
408
|
result
|
487
409
|
end
|
488
410
|
|
489
|
-
##
|
490
|
-
# GRPC transcoding helper method for the resize REST call
|
491
|
-
#
|
492
|
-
# @param request_pb [::Google::Cloud::Compute::V1::ResizeDiskRequest]
|
493
|
-
# A request object representing the call parameters. Required.
|
494
|
-
# @return [Array(String, [String, nil], Hash{String => String})]
|
495
|
-
# Uri, Body, Query string parameters
|
496
|
-
def transcode_resize_request request_pb
|
497
|
-
uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/disks/#{request_pb.disk}/resize"
|
498
|
-
body = request_pb.disks_resize_request_resource.to_json
|
499
|
-
query_string_params = {}
|
500
|
-
query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
|
501
|
-
|
502
|
-
[uri, body, query_string_params]
|
503
|
-
end
|
504
|
-
|
505
411
|
##
|
506
412
|
# Baseline implementation for the set_iam_policy REST call
|
507
413
|
#
|
@@ -519,10 +425,18 @@ module Google
|
|
519
425
|
def set_iam_policy request_pb, options = nil
|
520
426
|
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
521
427
|
|
522
|
-
uri,
|
523
|
-
|
428
|
+
verb, uri, query_string_params, body = transcode_set_iam_policy_request request_pb
|
429
|
+
query_string_params = if query_string_params.any?
|
430
|
+
query_string_params.to_h { |p| p.split("=", 2) }
|
431
|
+
else
|
432
|
+
{}
|
433
|
+
end
|
434
|
+
|
435
|
+
response = @client_stub.make_http_request(
|
436
|
+
verb,
|
524
437
|
uri: uri,
|
525
|
-
body: body,
|
438
|
+
body: body || "",
|
439
|
+
params: query_string_params,
|
526
440
|
options: options
|
527
441
|
)
|
528
442
|
result = ::Google::Cloud::Compute::V1::Policy.decode_json response.body, ignore_unknown_fields: true
|
@@ -531,21 +445,6 @@ module Google
|
|
531
445
|
result
|
532
446
|
end
|
533
447
|
|
534
|
-
##
|
535
|
-
# GRPC transcoding helper method for the set_iam_policy REST call
|
536
|
-
#
|
537
|
-
# @param request_pb [::Google::Cloud::Compute::V1::SetIamPolicyDiskRequest]
|
538
|
-
# A request object representing the call parameters. Required.
|
539
|
-
# @return [Array(String, [String, nil], Hash{String => String})]
|
540
|
-
# Uri, Body, Query string parameters
|
541
|
-
def transcode_set_iam_policy_request request_pb
|
542
|
-
uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/disks/#{request_pb.resource}/setIamPolicy"
|
543
|
-
body = request_pb.zone_set_policy_request_resource.to_json
|
544
|
-
query_string_params = {}
|
545
|
-
|
546
|
-
[uri, body, query_string_params]
|
547
|
-
end
|
548
|
-
|
549
448
|
##
|
550
449
|
# Baseline implementation for the set_labels REST call
|
551
450
|
#
|
@@ -563,10 +462,17 @@ module Google
|
|
563
462
|
def set_labels request_pb, options = nil
|
564
463
|
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
565
464
|
|
566
|
-
|
567
|
-
|
465
|
+
verb, uri, query_string_params, body = transcode_set_labels_request request_pb
|
466
|
+
query_string_params = if query_string_params.any?
|
467
|
+
query_string_params.to_h { |p| p.split("=", 2) }
|
468
|
+
else
|
469
|
+
{}
|
470
|
+
end
|
471
|
+
|
472
|
+
response = @client_stub.make_http_request(
|
473
|
+
verb,
|
568
474
|
uri: uri,
|
569
|
-
body: body,
|
475
|
+
body: body || "",
|
570
476
|
params: query_string_params,
|
571
477
|
options: options
|
572
478
|
)
|
@@ -576,22 +482,6 @@ module Google
|
|
576
482
|
result
|
577
483
|
end
|
578
484
|
|
579
|
-
##
|
580
|
-
# GRPC transcoding helper method for the set_labels REST call
|
581
|
-
#
|
582
|
-
# @param request_pb [::Google::Cloud::Compute::V1::SetLabelsDiskRequest]
|
583
|
-
# A request object representing the call parameters. Required.
|
584
|
-
# @return [Array(String, [String, nil], Hash{String => String})]
|
585
|
-
# Uri, Body, Query string parameters
|
586
|
-
def transcode_set_labels_request request_pb
|
587
|
-
uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/disks/#{request_pb.resource}/setLabels"
|
588
|
-
body = request_pb.zone_set_labels_request_resource.to_json
|
589
|
-
query_string_params = {}
|
590
|
-
query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
|
591
|
-
|
592
|
-
[uri, body, query_string_params]
|
593
|
-
end
|
594
|
-
|
595
485
|
##
|
596
486
|
# Baseline implementation for the test_iam_permissions REST call
|
597
487
|
#
|
@@ -609,10 +499,18 @@ module Google
|
|
609
499
|
def test_iam_permissions request_pb, options = nil
|
610
500
|
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
611
501
|
|
612
|
-
uri,
|
613
|
-
|
502
|
+
verb, uri, query_string_params, body = transcode_test_iam_permissions_request request_pb
|
503
|
+
query_string_params = if query_string_params.any?
|
504
|
+
query_string_params.to_h { |p| p.split("=", 2) }
|
505
|
+
else
|
506
|
+
{}
|
507
|
+
end
|
508
|
+
|
509
|
+
response = @client_stub.make_http_request(
|
510
|
+
verb,
|
614
511
|
uri: uri,
|
615
|
-
body: body,
|
512
|
+
body: body || "",
|
513
|
+
params: query_string_params,
|
616
514
|
options: options
|
617
515
|
)
|
618
516
|
result = ::Google::Cloud::Compute::V1::TestPermissionsResponse.decode_json response.body, ignore_unknown_fields: true
|
@@ -621,7 +519,291 @@ module Google
|
|
621
519
|
result
|
622
520
|
end
|
623
521
|
|
522
|
+
|
523
|
+
private
|
524
|
+
|
525
|
+
##
|
526
|
+
# @private
|
527
|
+
#
|
528
|
+
# GRPC transcoding helper method for the add_resource_policies REST call
|
529
|
+
#
|
530
|
+
# @param request_pb [::Google::Cloud::Compute::V1::AddResourcePoliciesDiskRequest]
|
531
|
+
# A request object representing the call parameters. Required.
|
532
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
533
|
+
# Uri, Body, Query string parameters
|
534
|
+
def transcode_add_resource_policies_request request_pb
|
535
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
536
|
+
.with_bindings(
|
537
|
+
uri_method: :post,
|
538
|
+
uri_template: "/compute/v1/projects/{project}/zones/{zone}/disks/{disk}/addResourcePolicies",
|
539
|
+
body: "disks_add_resource_policies_request_resource",
|
540
|
+
matches: [
|
541
|
+
["project", %r{[^/]+}, false],
|
542
|
+
["zone", %r{[^/]+}, false],
|
543
|
+
["disk", %r{[^/]+}, false]
|
544
|
+
]
|
545
|
+
)
|
546
|
+
transcoder.transcode request_pb
|
547
|
+
end
|
548
|
+
|
549
|
+
##
|
550
|
+
# @private
|
551
|
+
#
|
552
|
+
# GRPC transcoding helper method for the aggregated_list REST call
|
553
|
+
#
|
554
|
+
# @param request_pb [::Google::Cloud::Compute::V1::AggregatedListDisksRequest]
|
555
|
+
# A request object representing the call parameters. Required.
|
556
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
557
|
+
# Uri, Body, Query string parameters
|
558
|
+
def transcode_aggregated_list_request request_pb
|
559
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
560
|
+
.with_bindings(
|
561
|
+
uri_method: :get,
|
562
|
+
uri_template: "/compute/v1/projects/{project}/aggregated/disks",
|
563
|
+
matches: [
|
564
|
+
["project", %r{[^/]+}, false]
|
565
|
+
]
|
566
|
+
)
|
567
|
+
transcoder.transcode request_pb
|
568
|
+
end
|
569
|
+
|
570
|
+
##
|
571
|
+
# @private
|
572
|
+
#
|
573
|
+
# GRPC transcoding helper method for the create_snapshot REST call
|
574
|
+
#
|
575
|
+
# @param request_pb [::Google::Cloud::Compute::V1::CreateSnapshotDiskRequest]
|
576
|
+
# A request object representing the call parameters. Required.
|
577
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
578
|
+
# Uri, Body, Query string parameters
|
579
|
+
def transcode_create_snapshot_request request_pb
|
580
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
581
|
+
.with_bindings(
|
582
|
+
uri_method: :post,
|
583
|
+
uri_template: "/compute/v1/projects/{project}/zones/{zone}/disks/{disk}/createSnapshot",
|
584
|
+
body: "snapshot_resource",
|
585
|
+
matches: [
|
586
|
+
["project", %r{[^/]+}, false],
|
587
|
+
["zone", %r{[^/]+}, false],
|
588
|
+
["disk", %r{[^/]+}, false]
|
589
|
+
]
|
590
|
+
)
|
591
|
+
transcoder.transcode request_pb
|
592
|
+
end
|
593
|
+
|
594
|
+
##
|
595
|
+
# @private
|
596
|
+
#
|
597
|
+
# GRPC transcoding helper method for the delete REST call
|
598
|
+
#
|
599
|
+
# @param request_pb [::Google::Cloud::Compute::V1::DeleteDiskRequest]
|
600
|
+
# A request object representing the call parameters. Required.
|
601
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
602
|
+
# Uri, Body, Query string parameters
|
603
|
+
def transcode_delete_request request_pb
|
604
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
605
|
+
.with_bindings(
|
606
|
+
uri_method: :delete,
|
607
|
+
uri_template: "/compute/v1/projects/{project}/zones/{zone}/disks/{disk}",
|
608
|
+
matches: [
|
609
|
+
["project", %r{[^/]+}, false],
|
610
|
+
["zone", %r{[^/]+}, false],
|
611
|
+
["disk", %r{[^/]+}, false]
|
612
|
+
]
|
613
|
+
)
|
614
|
+
transcoder.transcode request_pb
|
615
|
+
end
|
616
|
+
|
617
|
+
##
|
618
|
+
# @private
|
619
|
+
#
|
620
|
+
# GRPC transcoding helper method for the get REST call
|
621
|
+
#
|
622
|
+
# @param request_pb [::Google::Cloud::Compute::V1::GetDiskRequest]
|
623
|
+
# A request object representing the call parameters. Required.
|
624
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
625
|
+
# Uri, Body, Query string parameters
|
626
|
+
def transcode_get_request request_pb
|
627
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
628
|
+
.with_bindings(
|
629
|
+
uri_method: :get,
|
630
|
+
uri_template: "/compute/v1/projects/{project}/zones/{zone}/disks/{disk}",
|
631
|
+
matches: [
|
632
|
+
["project", %r{[^/]+}, false],
|
633
|
+
["zone", %r{[^/]+}, false],
|
634
|
+
["disk", %r{[^/]+}, false]
|
635
|
+
]
|
636
|
+
)
|
637
|
+
transcoder.transcode request_pb
|
638
|
+
end
|
639
|
+
|
640
|
+
##
|
641
|
+
# @private
|
642
|
+
#
|
643
|
+
# GRPC transcoding helper method for the get_iam_policy REST call
|
644
|
+
#
|
645
|
+
# @param request_pb [::Google::Cloud::Compute::V1::GetIamPolicyDiskRequest]
|
646
|
+
# A request object representing the call parameters. Required.
|
647
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
648
|
+
# Uri, Body, Query string parameters
|
649
|
+
def transcode_get_iam_policy_request request_pb
|
650
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
651
|
+
.with_bindings(
|
652
|
+
uri_method: :get,
|
653
|
+
uri_template: "/compute/v1/projects/{project}/zones/{zone}/disks/{resource}/getIamPolicy",
|
654
|
+
matches: [
|
655
|
+
["project", %r{[^/]+}, false],
|
656
|
+
["zone", %r{[^/]+}, false],
|
657
|
+
["resource", %r{[^/]+}, false]
|
658
|
+
]
|
659
|
+
)
|
660
|
+
transcoder.transcode request_pb
|
661
|
+
end
|
662
|
+
|
663
|
+
##
|
664
|
+
# @private
|
665
|
+
#
|
666
|
+
# GRPC transcoding helper method for the insert REST call
|
667
|
+
#
|
668
|
+
# @param request_pb [::Google::Cloud::Compute::V1::InsertDiskRequest]
|
669
|
+
# A request object representing the call parameters. Required.
|
670
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
671
|
+
# Uri, Body, Query string parameters
|
672
|
+
def transcode_insert_request request_pb
|
673
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
674
|
+
.with_bindings(
|
675
|
+
uri_method: :post,
|
676
|
+
uri_template: "/compute/v1/projects/{project}/zones/{zone}/disks",
|
677
|
+
body: "disk_resource",
|
678
|
+
matches: [
|
679
|
+
["project", %r{[^/]+}, false],
|
680
|
+
["zone", %r{[^/]+}, false]
|
681
|
+
]
|
682
|
+
)
|
683
|
+
transcoder.transcode request_pb
|
684
|
+
end
|
685
|
+
|
686
|
+
##
|
687
|
+
# @private
|
688
|
+
#
|
689
|
+
# GRPC transcoding helper method for the list REST call
|
690
|
+
#
|
691
|
+
# @param request_pb [::Google::Cloud::Compute::V1::ListDisksRequest]
|
692
|
+
# A request object representing the call parameters. Required.
|
693
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
694
|
+
# Uri, Body, Query string parameters
|
695
|
+
def transcode_list_request request_pb
|
696
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
697
|
+
.with_bindings(
|
698
|
+
uri_method: :get,
|
699
|
+
uri_template: "/compute/v1/projects/{project}/zones/{zone}/disks",
|
700
|
+
matches: [
|
701
|
+
["project", %r{[^/]+}, false],
|
702
|
+
["zone", %r{[^/]+}, false]
|
703
|
+
]
|
704
|
+
)
|
705
|
+
transcoder.transcode request_pb
|
706
|
+
end
|
707
|
+
|
708
|
+
##
|
709
|
+
# @private
|
710
|
+
#
|
711
|
+
# GRPC transcoding helper method for the remove_resource_policies REST call
|
712
|
+
#
|
713
|
+
# @param request_pb [::Google::Cloud::Compute::V1::RemoveResourcePoliciesDiskRequest]
|
714
|
+
# A request object representing the call parameters. Required.
|
715
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
716
|
+
# Uri, Body, Query string parameters
|
717
|
+
def transcode_remove_resource_policies_request request_pb
|
718
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
719
|
+
.with_bindings(
|
720
|
+
uri_method: :post,
|
721
|
+
uri_template: "/compute/v1/projects/{project}/zones/{zone}/disks/{disk}/removeResourcePolicies",
|
722
|
+
body: "disks_remove_resource_policies_request_resource",
|
723
|
+
matches: [
|
724
|
+
["project", %r{[^/]+}, false],
|
725
|
+
["zone", %r{[^/]+}, false],
|
726
|
+
["disk", %r{[^/]+}, false]
|
727
|
+
]
|
728
|
+
)
|
729
|
+
transcoder.transcode request_pb
|
730
|
+
end
|
731
|
+
|
624
732
|
##
|
733
|
+
# @private
|
734
|
+
#
|
735
|
+
# GRPC transcoding helper method for the resize REST call
|
736
|
+
#
|
737
|
+
# @param request_pb [::Google::Cloud::Compute::V1::ResizeDiskRequest]
|
738
|
+
# A request object representing the call parameters. Required.
|
739
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
740
|
+
# Uri, Body, Query string parameters
|
741
|
+
def transcode_resize_request request_pb
|
742
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
743
|
+
.with_bindings(
|
744
|
+
uri_method: :post,
|
745
|
+
uri_template: "/compute/v1/projects/{project}/zones/{zone}/disks/{disk}/resize",
|
746
|
+
body: "disks_resize_request_resource",
|
747
|
+
matches: [
|
748
|
+
["project", %r{[^/]+}, false],
|
749
|
+
["zone", %r{[^/]+}, false],
|
750
|
+
["disk", %r{[^/]+}, false]
|
751
|
+
]
|
752
|
+
)
|
753
|
+
transcoder.transcode request_pb
|
754
|
+
end
|
755
|
+
|
756
|
+
##
|
757
|
+
# @private
|
758
|
+
#
|
759
|
+
# GRPC transcoding helper method for the set_iam_policy REST call
|
760
|
+
#
|
761
|
+
# @param request_pb [::Google::Cloud::Compute::V1::SetIamPolicyDiskRequest]
|
762
|
+
# A request object representing the call parameters. Required.
|
763
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
764
|
+
# Uri, Body, Query string parameters
|
765
|
+
def transcode_set_iam_policy_request request_pb
|
766
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
767
|
+
.with_bindings(
|
768
|
+
uri_method: :post,
|
769
|
+
uri_template: "/compute/v1/projects/{project}/zones/{zone}/disks/{resource}/setIamPolicy",
|
770
|
+
body: "zone_set_policy_request_resource",
|
771
|
+
matches: [
|
772
|
+
["project", %r{[^/]+}, false],
|
773
|
+
["zone", %r{[^/]+}, false],
|
774
|
+
["resource", %r{[^/]+}, false]
|
775
|
+
]
|
776
|
+
)
|
777
|
+
transcoder.transcode request_pb
|
778
|
+
end
|
779
|
+
|
780
|
+
##
|
781
|
+
# @private
|
782
|
+
#
|
783
|
+
# GRPC transcoding helper method for the set_labels REST call
|
784
|
+
#
|
785
|
+
# @param request_pb [::Google::Cloud::Compute::V1::SetLabelsDiskRequest]
|
786
|
+
# A request object representing the call parameters. Required.
|
787
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
788
|
+
# Uri, Body, Query string parameters
|
789
|
+
def transcode_set_labels_request request_pb
|
790
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
791
|
+
.with_bindings(
|
792
|
+
uri_method: :post,
|
793
|
+
uri_template: "/compute/v1/projects/{project}/zones/{zone}/disks/{resource}/setLabels",
|
794
|
+
body: "zone_set_labels_request_resource",
|
795
|
+
matches: [
|
796
|
+
["project", %r{[^/]+}, false],
|
797
|
+
["zone", %r{[^/]+}, false],
|
798
|
+
["resource", %r{[^/]+}, false]
|
799
|
+
]
|
800
|
+
)
|
801
|
+
transcoder.transcode request_pb
|
802
|
+
end
|
803
|
+
|
804
|
+
##
|
805
|
+
# @private
|
806
|
+
#
|
625
807
|
# GRPC transcoding helper method for the test_iam_permissions REST call
|
626
808
|
#
|
627
809
|
# @param request_pb [::Google::Cloud::Compute::V1::TestIamPermissionsDiskRequest]
|
@@ -629,11 +811,18 @@ module Google
|
|
629
811
|
# @return [Array(String, [String, nil], Hash{String => String})]
|
630
812
|
# Uri, Body, Query string parameters
|
631
813
|
def transcode_test_iam_permissions_request request_pb
|
632
|
-
|
633
|
-
|
634
|
-
|
635
|
-
|
636
|
-
|
814
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
815
|
+
.with_bindings(
|
816
|
+
uri_method: :post,
|
817
|
+
uri_template: "/compute/v1/projects/{project}/zones/{zone}/disks/{resource}/testIamPermissions",
|
818
|
+
body: "test_permissions_request_resource",
|
819
|
+
matches: [
|
820
|
+
["project", %r{[^/]+}, false],
|
821
|
+
["zone", %r{[^/]+}, false],
|
822
|
+
["resource", %r{[^/]+}, false]
|
823
|
+
]
|
824
|
+
)
|
825
|
+
transcoder.transcode request_pb
|
637
826
|
end
|
638
827
|
end
|
639
828
|
end
|