google-cloud-compute-v1 1.2.0 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +10 -5
- data/lib/google/cloud/compute/v1/accelerator_types/rest/client.rb +2 -2
- 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/client.rb +2 -2
- 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/client.rb +2 -2
- 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/client.rb +1 -1
- 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/client.rb +2 -2
- 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/compute_pb.rb +671 -3
- data/lib/google/cloud/compute/v1/disk_types/rest/client.rb +2 -2
- 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/client.rb +3 -3
- 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/client.rb +1 -1
- 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/client.rb +1 -1
- 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/client.rb +1 -1
- 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/client.rb +2 -2
- 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/client.rb +1 -1
- 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/client.rb +1 -1
- 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/client.rb +2 -2
- 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/client.rb +2 -2
- 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/client.rb +1 -1
- 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/client.rb +1 -1
- 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/client.rb +2 -2
- 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/client.rb +1 -1
- 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/client.rb +10 -10
- 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/client.rb +4 -4
- 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/client.rb +1 -1
- 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/client.rb +7 -5
- 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/client.rb +2 -2
- 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/client.rb +1 -1
- 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/client.rb +1 -1
- 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/client.rb +1 -1
- 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/client.rb +1 -1
- 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/client.rb +2 -2
- 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/credentials.rb +52 -0
- data/lib/google/cloud/compute/v1/network_edge_security_services/rest/client.rb +679 -0
- data/lib/google/cloud/compute/v1/network_edge_security_services/rest/service_stub.rb +348 -0
- data/lib/google/cloud/compute/v1/network_edge_security_services/rest.rb +33 -0
- data/lib/google/cloud/compute/v1/network_edge_security_services.rb +47 -0
- data/lib/google/cloud/compute/v1/network_endpoint_groups/rest/client.rb +3 -3
- 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/credentials.rb +52 -0
- data/lib/google/cloud/compute/v1/network_firewall_policies/rest/client.rb +1552 -0
- data/lib/google/cloud/compute/v1/network_firewall_policies/rest/service_stub.rb +998 -0
- data/lib/google/cloud/compute/v1/network_firewall_policies/rest.rb +33 -0
- data/lib/google/cloud/compute/v1/network_firewall_policies.rb +47 -0
- data/lib/google/cloud/compute/v1/networks/rest/client.rb +2 -2
- 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/client.rb +3 -3
- 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/client.rb +2 -2
- 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/client.rb +2 -2
- 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/client.rb +2 -2
- 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/client.rb +2 -2
- 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/client.rb +1 -1
- 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/client.rb +2 -2
- 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/client.rb +1 -1
- 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/client.rb +1 -1
- 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/client.rb +2 -2
- 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/client.rb +1 -1
- 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/client.rb +1 -1
- 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/client.rb +1 -1
- 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/client.rb +1 -1
- 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/client.rb +9 -9
- 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/client.rb +2 -2
- 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/client.rb +1 -1
- 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/credentials.rb +52 -0
- data/lib/google/cloud/compute/v1/region_network_firewall_policies/rest/client.rb +1670 -0
- data/lib/google/cloud/compute/v1/region_network_firewall_policies/rest/service_stub.rb +1073 -0
- data/lib/google/cloud/compute/v1/region_network_firewall_policies/rest.rb +33 -0
- data/lib/google/cloud/compute/v1/region_network_firewall_policies.rb +47 -0
- data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/client.rb +1 -1
- 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/client.rb +1 -1
- 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/credentials.rb +52 -0
- data/lib/google/cloud/compute/v1/region_security_policies/rest/client.rb +676 -0
- data/lib/google/cloud/compute/v1/region_security_policies/rest/service_stub.rb +349 -0
- data/lib/google/cloud/compute/v1/region_security_policies/rest.rb +33 -0
- data/lib/google/cloud/compute/v1/region_security_policies.rb +47 -0
- data/lib/google/cloud/compute/v1/region_ssl_certificates/rest/client.rb +1 -1
- 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/client.rb +1 -1
- 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/client.rb +88 -1
- data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/service_stub.rb +249 -99
- data/lib/google/cloud/compute/v1/region_target_https_proxies.rb +3 -0
- data/lib/google/cloud/compute/v1/region_url_maps/rest/client.rb +1 -1
- 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/client.rb +1 -1
- 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/client.rb +2 -2
- 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/client.rb +2 -2
- 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/client.rb +3 -3
- 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/client.rb +1 -1
- 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/client.rb +97 -5
- data/lib/google/cloud/compute/v1/security_policies/rest/service_stub.rb +368 -174
- data/lib/google/cloud/compute/v1/security_policies.rb +3 -0
- data/lib/google/cloud/compute/v1/service_attachments/rest/client.rb +2 -2
- 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/client.rb +1 -1
- 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/client.rb +2 -2
- 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/client.rb +2 -2
- 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/client.rb +3 -3
- 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/client.rb +1 -1
- 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/client.rb +2 -2
- 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/client.rb +86 -2
- data/lib/google/cloud/compute/v1/target_https_proxies/rest/service_stub.rb +371 -178
- data/lib/google/cloud/compute/v1/target_https_proxies.rb +3 -0
- data/lib/google/cloud/compute/v1/target_instances/rest/client.rb +2 -2
- 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/client.rb +2 -2
- 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/client.rb +85 -1
- data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/service_stub.rb +307 -136
- data/lib/google/cloud/compute/v1/target_ssl_proxies.rb +3 -0
- data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/client.rb +1 -1
- 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/client.rb +2 -2
- 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/client.rb +2 -2
- 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/client.rb +2 -2
- 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/client.rb +2 -2
- 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/client.rb +1 -1
- 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/client.rb +1 -1
- data/lib/google/cloud/compute/v1/zones/rest/service_stub.rb +57 -29
- data/lib/google/cloud/compute/v1/zones.rb +3 -0
- data/lib/google/cloud/compute/v1.rb +4 -0
- data/proto_docs/google/cloud/compute/v1/compute.rb +1946 -229
- metadata +32 -12
@@ -55,10 +55,17 @@ module Google
|
|
55
55
|
def add_association 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_association_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,23 +75,6 @@ module Google
|
|
68
75
|
result
|
69
76
|
end
|
70
77
|
|
71
|
-
##
|
72
|
-
# GRPC transcoding helper method for the add_association REST call
|
73
|
-
#
|
74
|
-
# @param request_pb [::Google::Cloud::Compute::V1::AddAssociationFirewallPolicyRequest]
|
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_association_request request_pb
|
79
|
-
uri = "/compute/v1/locations/global/firewallPolicies/#{request_pb.firewall_policy}/addAssociation"
|
80
|
-
body = request_pb.firewall_policy_association_resource.to_json
|
81
|
-
query_string_params = {}
|
82
|
-
query_string_params["replaceExistingAssociation"] = request_pb.replace_existing_association.to_s if request_pb.has_replace_existing_association?
|
83
|
-
query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
|
84
|
-
|
85
|
-
[uri, body, query_string_params]
|
86
|
-
end
|
87
|
-
|
88
78
|
##
|
89
79
|
# Baseline implementation for the add_rule REST call
|
90
80
|
#
|
@@ -102,10 +92,17 @@ module Google
|
|
102
92
|
def add_rule request_pb, options = nil
|
103
93
|
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
104
94
|
|
105
|
-
|
106
|
-
|
95
|
+
verb, uri, query_string_params, body = transcode_add_rule_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,
|
107
104
|
uri: uri,
|
108
|
-
body: body,
|
105
|
+
body: body || "",
|
109
106
|
params: query_string_params,
|
110
107
|
options: options
|
111
108
|
)
|
@@ -115,22 +112,6 @@ module Google
|
|
115
112
|
result
|
116
113
|
end
|
117
114
|
|
118
|
-
##
|
119
|
-
# GRPC transcoding helper method for the add_rule REST call
|
120
|
-
#
|
121
|
-
# @param request_pb [::Google::Cloud::Compute::V1::AddRuleFirewallPolicyRequest]
|
122
|
-
# A request object representing the call parameters. Required.
|
123
|
-
# @return [Array(String, [String, nil], Hash{String => String})]
|
124
|
-
# Uri, Body, Query string parameters
|
125
|
-
def transcode_add_rule_request request_pb
|
126
|
-
uri = "/compute/v1/locations/global/firewallPolicies/#{request_pb.firewall_policy}/addRule"
|
127
|
-
body = request_pb.firewall_policy_rule_resource.to_json
|
128
|
-
query_string_params = {}
|
129
|
-
query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
|
130
|
-
|
131
|
-
[uri, body, query_string_params]
|
132
|
-
end
|
133
|
-
|
134
115
|
##
|
135
116
|
# Baseline implementation for the clone_rules REST call
|
136
117
|
#
|
@@ -148,9 +129,17 @@ module Google
|
|
148
129
|
def clone_rules request_pb, options = nil
|
149
130
|
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
150
131
|
|
151
|
-
|
152
|
-
|
132
|
+
verb, uri, query_string_params, body = transcode_clone_rules_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,
|
153
141
|
uri: uri,
|
142
|
+
body: body || "",
|
154
143
|
params: query_string_params,
|
155
144
|
options: options
|
156
145
|
)
|
@@ -160,23 +149,6 @@ module Google
|
|
160
149
|
result
|
161
150
|
end
|
162
151
|
|
163
|
-
##
|
164
|
-
# GRPC transcoding helper method for the clone_rules REST call
|
165
|
-
#
|
166
|
-
# @param request_pb [::Google::Cloud::Compute::V1::CloneRulesFirewallPolicyRequest]
|
167
|
-
# A request object representing the call parameters. Required.
|
168
|
-
# @return [Array(String, [String, nil], Hash{String => String})]
|
169
|
-
# Uri, Body, Query string parameters
|
170
|
-
def transcode_clone_rules_request request_pb
|
171
|
-
uri = "/compute/v1/locations/global/firewallPolicies/#{request_pb.firewall_policy}/cloneRules"
|
172
|
-
body = nil
|
173
|
-
query_string_params = {}
|
174
|
-
query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
|
175
|
-
query_string_params["sourceFirewallPolicy"] = request_pb.source_firewall_policy.to_s if request_pb.has_source_firewall_policy?
|
176
|
-
|
177
|
-
[uri, body, query_string_params]
|
178
|
-
end
|
179
|
-
|
180
152
|
##
|
181
153
|
# Baseline implementation for the delete REST call
|
182
154
|
#
|
@@ -194,9 +166,17 @@ module Google
|
|
194
166
|
def delete request_pb, options = nil
|
195
167
|
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
196
168
|
|
197
|
-
|
198
|
-
|
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,
|
199
178
|
uri: uri,
|
179
|
+
body: body || "",
|
200
180
|
params: query_string_params,
|
201
181
|
options: options
|
202
182
|
)
|
@@ -206,22 +186,6 @@ module Google
|
|
206
186
|
result
|
207
187
|
end
|
208
188
|
|
209
|
-
##
|
210
|
-
# GRPC transcoding helper method for the delete REST call
|
211
|
-
#
|
212
|
-
# @param request_pb [::Google::Cloud::Compute::V1::DeleteFirewallPolicyRequest]
|
213
|
-
# A request object representing the call parameters. Required.
|
214
|
-
# @return [Array(String, [String, nil], Hash{String => String})]
|
215
|
-
# Uri, Body, Query string parameters
|
216
|
-
def transcode_delete_request request_pb
|
217
|
-
uri = "/compute/v1/locations/global/firewallPolicies/#{request_pb.firewall_policy}"
|
218
|
-
body = nil
|
219
|
-
query_string_params = {}
|
220
|
-
query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
|
221
|
-
|
222
|
-
[uri, body, query_string_params]
|
223
|
-
end
|
224
|
-
|
225
189
|
##
|
226
190
|
# Baseline implementation for the get REST call
|
227
191
|
#
|
@@ -239,9 +203,18 @@ module Google
|
|
239
203
|
def get request_pb, options = nil
|
240
204
|
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
241
205
|
|
242
|
-
uri,
|
243
|
-
|
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,
|
244
215
|
uri: uri,
|
216
|
+
body: body || "",
|
217
|
+
params: query_string_params,
|
245
218
|
options: options
|
246
219
|
)
|
247
220
|
result = ::Google::Cloud::Compute::V1::FirewallPolicy.decode_json response.body, ignore_unknown_fields: true
|
@@ -250,21 +223,6 @@ module Google
|
|
250
223
|
result
|
251
224
|
end
|
252
225
|
|
253
|
-
##
|
254
|
-
# GRPC transcoding helper method for the get REST call
|
255
|
-
#
|
256
|
-
# @param request_pb [::Google::Cloud::Compute::V1::GetFirewallPolicyRequest]
|
257
|
-
# A request object representing the call parameters. Required.
|
258
|
-
# @return [Array(String, [String, nil], Hash{String => String})]
|
259
|
-
# Uri, Body, Query string parameters
|
260
|
-
def transcode_get_request request_pb
|
261
|
-
uri = "/compute/v1/locations/global/firewallPolicies/#{request_pb.firewall_policy}"
|
262
|
-
body = nil
|
263
|
-
query_string_params = {}
|
264
|
-
|
265
|
-
[uri, body, query_string_params]
|
266
|
-
end
|
267
|
-
|
268
226
|
##
|
269
227
|
# Baseline implementation for the get_association REST call
|
270
228
|
#
|
@@ -282,9 +240,17 @@ module Google
|
|
282
240
|
def get_association request_pb, options = nil
|
283
241
|
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
284
242
|
|
285
|
-
|
286
|
-
|
243
|
+
verb, uri, query_string_params, body = transcode_get_association_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,
|
287
252
|
uri: uri,
|
253
|
+
body: body || "",
|
288
254
|
params: query_string_params,
|
289
255
|
options: options
|
290
256
|
)
|
@@ -294,22 +260,6 @@ module Google
|
|
294
260
|
result
|
295
261
|
end
|
296
262
|
|
297
|
-
##
|
298
|
-
# GRPC transcoding helper method for the get_association REST call
|
299
|
-
#
|
300
|
-
# @param request_pb [::Google::Cloud::Compute::V1::GetAssociationFirewallPolicyRequest]
|
301
|
-
# A request object representing the call parameters. Required.
|
302
|
-
# @return [Array(String, [String, nil], Hash{String => String})]
|
303
|
-
# Uri, Body, Query string parameters
|
304
|
-
def transcode_get_association_request request_pb
|
305
|
-
uri = "/compute/v1/locations/global/firewallPolicies/#{request_pb.firewall_policy}/getAssociation"
|
306
|
-
body = nil
|
307
|
-
query_string_params = {}
|
308
|
-
query_string_params["name"] = request_pb.name.to_s if request_pb.has_name?
|
309
|
-
|
310
|
-
[uri, body, query_string_params]
|
311
|
-
end
|
312
|
-
|
313
263
|
##
|
314
264
|
# Baseline implementation for the get_iam_policy REST call
|
315
265
|
#
|
@@ -327,9 +277,17 @@ module Google
|
|
327
277
|
def get_iam_policy request_pb, options = nil
|
328
278
|
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
329
279
|
|
330
|
-
|
331
|
-
|
280
|
+
verb, uri, query_string_params, body = transcode_get_iam_policy_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,
|
332
289
|
uri: uri,
|
290
|
+
body: body || "",
|
333
291
|
params: query_string_params,
|
334
292
|
options: options
|
335
293
|
)
|
@@ -339,22 +297,6 @@ module Google
|
|
339
297
|
result
|
340
298
|
end
|
341
299
|
|
342
|
-
##
|
343
|
-
# GRPC transcoding helper method for the get_iam_policy REST call
|
344
|
-
#
|
345
|
-
# @param request_pb [::Google::Cloud::Compute::V1::GetIamPolicyFirewallPolicyRequest]
|
346
|
-
# A request object representing the call parameters. Required.
|
347
|
-
# @return [Array(String, [String, nil], Hash{String => String})]
|
348
|
-
# Uri, Body, Query string parameters
|
349
|
-
def transcode_get_iam_policy_request request_pb
|
350
|
-
uri = "/compute/v1/locations/global/firewallPolicies/#{request_pb.resource}/getIamPolicy"
|
351
|
-
body = nil
|
352
|
-
query_string_params = {}
|
353
|
-
query_string_params["optionsRequestedPolicyVersion"] = request_pb.options_requested_policy_version.to_s if request_pb.has_options_requested_policy_version?
|
354
|
-
|
355
|
-
[uri, body, query_string_params]
|
356
|
-
end
|
357
|
-
|
358
300
|
##
|
359
301
|
# Baseline implementation for the get_rule REST call
|
360
302
|
#
|
@@ -372,9 +314,17 @@ module Google
|
|
372
314
|
def get_rule request_pb, options = nil
|
373
315
|
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
374
316
|
|
375
|
-
|
376
|
-
|
317
|
+
verb, uri, query_string_params, body = transcode_get_rule_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,
|
377
326
|
uri: uri,
|
327
|
+
body: body || "",
|
378
328
|
params: query_string_params,
|
379
329
|
options: options
|
380
330
|
)
|
@@ -384,22 +334,6 @@ module Google
|
|
384
334
|
result
|
385
335
|
end
|
386
336
|
|
387
|
-
##
|
388
|
-
# GRPC transcoding helper method for the get_rule REST call
|
389
|
-
#
|
390
|
-
# @param request_pb [::Google::Cloud::Compute::V1::GetRuleFirewallPolicyRequest]
|
391
|
-
# A request object representing the call parameters. Required.
|
392
|
-
# @return [Array(String, [String, nil], Hash{String => String})]
|
393
|
-
# Uri, Body, Query string parameters
|
394
|
-
def transcode_get_rule_request request_pb
|
395
|
-
uri = "/compute/v1/locations/global/firewallPolicies/#{request_pb.firewall_policy}/getRule"
|
396
|
-
body = nil
|
397
|
-
query_string_params = {}
|
398
|
-
query_string_params["priority"] = request_pb.priority.to_s if request_pb.has_priority?
|
399
|
-
|
400
|
-
[uri, body, query_string_params]
|
401
|
-
end
|
402
|
-
|
403
337
|
##
|
404
338
|
# Baseline implementation for the insert REST call
|
405
339
|
#
|
@@ -417,10 +351,17 @@ module Google
|
|
417
351
|
def insert request_pb, options = nil
|
418
352
|
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
419
353
|
|
420
|
-
|
421
|
-
|
354
|
+
verb, uri, query_string_params, body = transcode_insert_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,
|
422
363
|
uri: uri,
|
423
|
-
body: body,
|
364
|
+
body: body || "",
|
424
365
|
params: query_string_params,
|
425
366
|
options: options
|
426
367
|
)
|
@@ -430,23 +371,6 @@ module Google
|
|
430
371
|
result
|
431
372
|
end
|
432
373
|
|
433
|
-
##
|
434
|
-
# GRPC transcoding helper method for the insert REST call
|
435
|
-
#
|
436
|
-
# @param request_pb [::Google::Cloud::Compute::V1::InsertFirewallPolicyRequest]
|
437
|
-
# A request object representing the call parameters. Required.
|
438
|
-
# @return [Array(String, [String, nil], Hash{String => String})]
|
439
|
-
# Uri, Body, Query string parameters
|
440
|
-
def transcode_insert_request request_pb
|
441
|
-
uri = "/compute/v1/locations/global/firewallPolicies"
|
442
|
-
body = request_pb.firewall_policy_resource.to_json
|
443
|
-
query_string_params = {}
|
444
|
-
query_string_params["parentId"] = request_pb.parent_id.to_s if request_pb.has_parent_id?
|
445
|
-
query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
|
446
|
-
|
447
|
-
[uri, body, query_string_params]
|
448
|
-
end
|
449
|
-
|
450
374
|
##
|
451
375
|
# Baseline implementation for the list REST call
|
452
376
|
#
|
@@ -464,9 +388,17 @@ module Google
|
|
464
388
|
def list request_pb, options = nil
|
465
389
|
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
466
390
|
|
467
|
-
|
468
|
-
|
391
|
+
verb, uri, query_string_params, body = transcode_list_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,
|
469
400
|
uri: uri,
|
401
|
+
body: body || "",
|
470
402
|
params: query_string_params,
|
471
403
|
options: options
|
472
404
|
)
|
@@ -476,27 +408,6 @@ module Google
|
|
476
408
|
result
|
477
409
|
end
|
478
410
|
|
479
|
-
##
|
480
|
-
# GRPC transcoding helper method for the list REST call
|
481
|
-
#
|
482
|
-
# @param request_pb [::Google::Cloud::Compute::V1::ListFirewallPoliciesRequest]
|
483
|
-
# A request object representing the call parameters. Required.
|
484
|
-
# @return [Array(String, [String, nil], Hash{String => String})]
|
485
|
-
# Uri, Body, Query string parameters
|
486
|
-
def transcode_list_request request_pb
|
487
|
-
uri = "/compute/v1/locations/global/firewallPolicies"
|
488
|
-
body = nil
|
489
|
-
query_string_params = {}
|
490
|
-
query_string_params["filter"] = request_pb.filter.to_s if request_pb.has_filter?
|
491
|
-
query_string_params["maxResults"] = request_pb.max_results.to_s if request_pb.has_max_results?
|
492
|
-
query_string_params["orderBy"] = request_pb.order_by.to_s if request_pb.has_order_by?
|
493
|
-
query_string_params["pageToken"] = request_pb.page_token.to_s if request_pb.has_page_token?
|
494
|
-
query_string_params["parentId"] = request_pb.parent_id.to_s if request_pb.has_parent_id?
|
495
|
-
query_string_params["returnPartialSuccess"] = request_pb.return_partial_success.to_s if request_pb.has_return_partial_success?
|
496
|
-
|
497
|
-
[uri, body, query_string_params]
|
498
|
-
end
|
499
|
-
|
500
411
|
##
|
501
412
|
# Baseline implementation for the list_associations REST call
|
502
413
|
#
|
@@ -514,9 +425,17 @@ module Google
|
|
514
425
|
def list_associations request_pb, options = nil
|
515
426
|
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
516
427
|
|
517
|
-
|
518
|
-
|
428
|
+
verb, uri, query_string_params, body = transcode_list_associations_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,
|
519
437
|
uri: uri,
|
438
|
+
body: body || "",
|
520
439
|
params: query_string_params,
|
521
440
|
options: options
|
522
441
|
)
|
@@ -526,22 +445,6 @@ module Google
|
|
526
445
|
result
|
527
446
|
end
|
528
447
|
|
529
|
-
##
|
530
|
-
# GRPC transcoding helper method for the list_associations REST call
|
531
|
-
#
|
532
|
-
# @param request_pb [::Google::Cloud::Compute::V1::ListAssociationsFirewallPolicyRequest]
|
533
|
-
# A request object representing the call parameters. Required.
|
534
|
-
# @return [Array(String, [String, nil], Hash{String => String})]
|
535
|
-
# Uri, Body, Query string parameters
|
536
|
-
def transcode_list_associations_request request_pb
|
537
|
-
uri = "/compute/v1/locations/global/firewallPolicies/listAssociations"
|
538
|
-
body = nil
|
539
|
-
query_string_params = {}
|
540
|
-
query_string_params["targetResource"] = request_pb.target_resource.to_s if request_pb.has_target_resource?
|
541
|
-
|
542
|
-
[uri, body, query_string_params]
|
543
|
-
end
|
544
|
-
|
545
448
|
##
|
546
449
|
# Baseline implementation for the move REST call
|
547
450
|
#
|
@@ -559,9 +462,17 @@ module Google
|
|
559
462
|
def move request_pb, options = nil
|
560
463
|
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
561
464
|
|
562
|
-
|
563
|
-
|
465
|
+
verb, uri, query_string_params, body = transcode_move_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,
|
564
474
|
uri: uri,
|
475
|
+
body: body || "",
|
565
476
|
params: query_string_params,
|
566
477
|
options: options
|
567
478
|
)
|
@@ -571,23 +482,6 @@ module Google
|
|
571
482
|
result
|
572
483
|
end
|
573
484
|
|
574
|
-
##
|
575
|
-
# GRPC transcoding helper method for the move REST call
|
576
|
-
#
|
577
|
-
# @param request_pb [::Google::Cloud::Compute::V1::MoveFirewallPolicyRequest]
|
578
|
-
# A request object representing the call parameters. Required.
|
579
|
-
# @return [Array(String, [String, nil], Hash{String => String})]
|
580
|
-
# Uri, Body, Query string parameters
|
581
|
-
def transcode_move_request request_pb
|
582
|
-
uri = "/compute/v1/locations/global/firewallPolicies/#{request_pb.firewall_policy}/move"
|
583
|
-
body = nil
|
584
|
-
query_string_params = {}
|
585
|
-
query_string_params["parentId"] = request_pb.parent_id.to_s if request_pb.has_parent_id?
|
586
|
-
query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
|
587
|
-
|
588
|
-
[uri, body, query_string_params]
|
589
|
-
end
|
590
|
-
|
591
485
|
##
|
592
486
|
# Baseline implementation for the patch REST call
|
593
487
|
#
|
@@ -605,10 +499,17 @@ module Google
|
|
605
499
|
def patch request_pb, options = nil
|
606
500
|
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
607
501
|
|
608
|
-
|
609
|
-
|
502
|
+
verb, uri, query_string_params, body = transcode_patch_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,
|
610
511
|
uri: uri,
|
611
|
-
body: body,
|
512
|
+
body: body || "",
|
612
513
|
params: query_string_params,
|
613
514
|
options: options
|
614
515
|
)
|
@@ -618,22 +519,6 @@ module Google
|
|
618
519
|
result
|
619
520
|
end
|
620
521
|
|
621
|
-
##
|
622
|
-
# GRPC transcoding helper method for the patch REST call
|
623
|
-
#
|
624
|
-
# @param request_pb [::Google::Cloud::Compute::V1::PatchFirewallPolicyRequest]
|
625
|
-
# A request object representing the call parameters. Required.
|
626
|
-
# @return [Array(String, [String, nil], Hash{String => String})]
|
627
|
-
# Uri, Body, Query string parameters
|
628
|
-
def transcode_patch_request request_pb
|
629
|
-
uri = "/compute/v1/locations/global/firewallPolicies/#{request_pb.firewall_policy}"
|
630
|
-
body = request_pb.firewall_policy_resource.to_json
|
631
|
-
query_string_params = {}
|
632
|
-
query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
|
633
|
-
|
634
|
-
[uri, body, query_string_params]
|
635
|
-
end
|
636
|
-
|
637
522
|
##
|
638
523
|
# Baseline implementation for the patch_rule REST call
|
639
524
|
#
|
@@ -651,10 +536,17 @@ module Google
|
|
651
536
|
def patch_rule request_pb, options = nil
|
652
537
|
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
653
538
|
|
654
|
-
|
655
|
-
|
539
|
+
verb, uri, query_string_params, body = transcode_patch_rule_request request_pb
|
540
|
+
query_string_params = if query_string_params.any?
|
541
|
+
query_string_params.to_h { |p| p.split("=", 2) }
|
542
|
+
else
|
543
|
+
{}
|
544
|
+
end
|
545
|
+
|
546
|
+
response = @client_stub.make_http_request(
|
547
|
+
verb,
|
656
548
|
uri: uri,
|
657
|
-
body: body,
|
549
|
+
body: body || "",
|
658
550
|
params: query_string_params,
|
659
551
|
options: options
|
660
552
|
)
|
@@ -664,23 +556,6 @@ module Google
|
|
664
556
|
result
|
665
557
|
end
|
666
558
|
|
667
|
-
##
|
668
|
-
# GRPC transcoding helper method for the patch_rule REST call
|
669
|
-
#
|
670
|
-
# @param request_pb [::Google::Cloud::Compute::V1::PatchRuleFirewallPolicyRequest]
|
671
|
-
# A request object representing the call parameters. Required.
|
672
|
-
# @return [Array(String, [String, nil], Hash{String => String})]
|
673
|
-
# Uri, Body, Query string parameters
|
674
|
-
def transcode_patch_rule_request request_pb
|
675
|
-
uri = "/compute/v1/locations/global/firewallPolicies/#{request_pb.firewall_policy}/patchRule"
|
676
|
-
body = request_pb.firewall_policy_rule_resource.to_json
|
677
|
-
query_string_params = {}
|
678
|
-
query_string_params["priority"] = request_pb.priority.to_s if request_pb.has_priority?
|
679
|
-
query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
|
680
|
-
|
681
|
-
[uri, body, query_string_params]
|
682
|
-
end
|
683
|
-
|
684
559
|
##
|
685
560
|
# Baseline implementation for the remove_association REST call
|
686
561
|
#
|
@@ -698,9 +573,17 @@ module Google
|
|
698
573
|
def remove_association request_pb, options = nil
|
699
574
|
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
700
575
|
|
701
|
-
|
702
|
-
|
576
|
+
verb, uri, query_string_params, body = transcode_remove_association_request request_pb
|
577
|
+
query_string_params = if query_string_params.any?
|
578
|
+
query_string_params.to_h { |p| p.split("=", 2) }
|
579
|
+
else
|
580
|
+
{}
|
581
|
+
end
|
582
|
+
|
583
|
+
response = @client_stub.make_http_request(
|
584
|
+
verb,
|
703
585
|
uri: uri,
|
586
|
+
body: body || "",
|
704
587
|
params: query_string_params,
|
705
588
|
options: options
|
706
589
|
)
|
@@ -710,23 +593,6 @@ module Google
|
|
710
593
|
result
|
711
594
|
end
|
712
595
|
|
713
|
-
##
|
714
|
-
# GRPC transcoding helper method for the remove_association REST call
|
715
|
-
#
|
716
|
-
# @param request_pb [::Google::Cloud::Compute::V1::RemoveAssociationFirewallPolicyRequest]
|
717
|
-
# A request object representing the call parameters. Required.
|
718
|
-
# @return [Array(String, [String, nil], Hash{String => String})]
|
719
|
-
# Uri, Body, Query string parameters
|
720
|
-
def transcode_remove_association_request request_pb
|
721
|
-
uri = "/compute/v1/locations/global/firewallPolicies/#{request_pb.firewall_policy}/removeAssociation"
|
722
|
-
body = nil
|
723
|
-
query_string_params = {}
|
724
|
-
query_string_params["name"] = request_pb.name.to_s if request_pb.has_name?
|
725
|
-
query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
|
726
|
-
|
727
|
-
[uri, body, query_string_params]
|
728
|
-
end
|
729
|
-
|
730
596
|
##
|
731
597
|
# Baseline implementation for the remove_rule REST call
|
732
598
|
#
|
@@ -744,9 +610,17 @@ module Google
|
|
744
610
|
def remove_rule request_pb, options = nil
|
745
611
|
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
746
612
|
|
747
|
-
|
748
|
-
|
613
|
+
verb, uri, query_string_params, body = transcode_remove_rule_request request_pb
|
614
|
+
query_string_params = if query_string_params.any?
|
615
|
+
query_string_params.to_h { |p| p.split("=", 2) }
|
616
|
+
else
|
617
|
+
{}
|
618
|
+
end
|
619
|
+
|
620
|
+
response = @client_stub.make_http_request(
|
621
|
+
verb,
|
749
622
|
uri: uri,
|
623
|
+
body: body || "",
|
750
624
|
params: query_string_params,
|
751
625
|
options: options
|
752
626
|
)
|
@@ -756,23 +630,6 @@ module Google
|
|
756
630
|
result
|
757
631
|
end
|
758
632
|
|
759
|
-
##
|
760
|
-
# GRPC transcoding helper method for the remove_rule REST call
|
761
|
-
#
|
762
|
-
# @param request_pb [::Google::Cloud::Compute::V1::RemoveRuleFirewallPolicyRequest]
|
763
|
-
# A request object representing the call parameters. Required.
|
764
|
-
# @return [Array(String, [String, nil], Hash{String => String})]
|
765
|
-
# Uri, Body, Query string parameters
|
766
|
-
def transcode_remove_rule_request request_pb
|
767
|
-
uri = "/compute/v1/locations/global/firewallPolicies/#{request_pb.firewall_policy}/removeRule"
|
768
|
-
body = nil
|
769
|
-
query_string_params = {}
|
770
|
-
query_string_params["priority"] = request_pb.priority.to_s if request_pb.has_priority?
|
771
|
-
query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
|
772
|
-
|
773
|
-
[uri, body, query_string_params]
|
774
|
-
end
|
775
|
-
|
776
633
|
##
|
777
634
|
# Baseline implementation for the set_iam_policy REST call
|
778
635
|
#
|
@@ -790,10 +647,18 @@ module Google
|
|
790
647
|
def set_iam_policy request_pb, options = nil
|
791
648
|
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
792
649
|
|
793
|
-
uri,
|
794
|
-
|
650
|
+
verb, uri, query_string_params, body = transcode_set_iam_policy_request request_pb
|
651
|
+
query_string_params = if query_string_params.any?
|
652
|
+
query_string_params.to_h { |p| p.split("=", 2) }
|
653
|
+
else
|
654
|
+
{}
|
655
|
+
end
|
656
|
+
|
657
|
+
response = @client_stub.make_http_request(
|
658
|
+
verb,
|
795
659
|
uri: uri,
|
796
|
-
body: body,
|
660
|
+
body: body || "",
|
661
|
+
params: query_string_params,
|
797
662
|
options: options
|
798
663
|
)
|
799
664
|
result = ::Google::Cloud::Compute::V1::Policy.decode_json response.body, ignore_unknown_fields: true
|
@@ -802,21 +667,6 @@ module Google
|
|
802
667
|
result
|
803
668
|
end
|
804
669
|
|
805
|
-
##
|
806
|
-
# GRPC transcoding helper method for the set_iam_policy REST call
|
807
|
-
#
|
808
|
-
# @param request_pb [::Google::Cloud::Compute::V1::SetIamPolicyFirewallPolicyRequest]
|
809
|
-
# A request object representing the call parameters. Required.
|
810
|
-
# @return [Array(String, [String, nil], Hash{String => String})]
|
811
|
-
# Uri, Body, Query string parameters
|
812
|
-
def transcode_set_iam_policy_request request_pb
|
813
|
-
uri = "/compute/v1/locations/global/firewallPolicies/#{request_pb.resource}/setIamPolicy"
|
814
|
-
body = request_pb.global_organization_set_policy_request_resource.to_json
|
815
|
-
query_string_params = {}
|
816
|
-
|
817
|
-
[uri, body, query_string_params]
|
818
|
-
end
|
819
|
-
|
820
670
|
##
|
821
671
|
# Baseline implementation for the test_iam_permissions REST call
|
822
672
|
#
|
@@ -834,10 +684,18 @@ module Google
|
|
834
684
|
def test_iam_permissions request_pb, options = nil
|
835
685
|
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
836
686
|
|
837
|
-
uri,
|
838
|
-
|
687
|
+
verb, uri, query_string_params, body = transcode_test_iam_permissions_request request_pb
|
688
|
+
query_string_params = if query_string_params.any?
|
689
|
+
query_string_params.to_h { |p| p.split("=", 2) }
|
690
|
+
else
|
691
|
+
{}
|
692
|
+
end
|
693
|
+
|
694
|
+
response = @client_stub.make_http_request(
|
695
|
+
verb,
|
839
696
|
uri: uri,
|
840
|
-
body: body,
|
697
|
+
body: body || "",
|
698
|
+
params: query_string_params,
|
841
699
|
options: options
|
842
700
|
)
|
843
701
|
result = ::Google::Cloud::Compute::V1::TestPermissionsResponse.decode_json response.body, ignore_unknown_fields: true
|
@@ -846,7 +704,369 @@ module Google
|
|
846
704
|
result
|
847
705
|
end
|
848
706
|
|
707
|
+
|
708
|
+
private
|
709
|
+
|
710
|
+
##
|
711
|
+
# @private
|
712
|
+
#
|
713
|
+
# GRPC transcoding helper method for the add_association REST call
|
714
|
+
#
|
715
|
+
# @param request_pb [::Google::Cloud::Compute::V1::AddAssociationFirewallPolicyRequest]
|
716
|
+
# A request object representing the call parameters. Required.
|
717
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
718
|
+
# Uri, Body, Query string parameters
|
719
|
+
def transcode_add_association_request request_pb
|
720
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
721
|
+
.with_bindings(
|
722
|
+
uri_method: :post,
|
723
|
+
uri_template: "/compute/v1/locations/global/firewallPolicies/{firewall_policy}/addAssociation",
|
724
|
+
body: "firewall_policy_association_resource",
|
725
|
+
matches: [
|
726
|
+
["firewall_policy", %r{[^/]+}, false]
|
727
|
+
]
|
728
|
+
)
|
729
|
+
transcoder.transcode request_pb
|
730
|
+
end
|
731
|
+
|
732
|
+
##
|
733
|
+
# @private
|
734
|
+
#
|
735
|
+
# GRPC transcoding helper method for the add_rule REST call
|
736
|
+
#
|
737
|
+
# @param request_pb [::Google::Cloud::Compute::V1::AddRuleFirewallPolicyRequest]
|
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_add_rule_request request_pb
|
742
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
743
|
+
.with_bindings(
|
744
|
+
uri_method: :post,
|
745
|
+
uri_template: "/compute/v1/locations/global/firewallPolicies/{firewall_policy}/addRule",
|
746
|
+
body: "firewall_policy_rule_resource",
|
747
|
+
matches: [
|
748
|
+
["firewall_policy", %r{[^/]+}, false]
|
749
|
+
]
|
750
|
+
)
|
751
|
+
transcoder.transcode request_pb
|
752
|
+
end
|
753
|
+
|
754
|
+
##
|
755
|
+
# @private
|
756
|
+
#
|
757
|
+
# GRPC transcoding helper method for the clone_rules REST call
|
758
|
+
#
|
759
|
+
# @param request_pb [::Google::Cloud::Compute::V1::CloneRulesFirewallPolicyRequest]
|
760
|
+
# A request object representing the call parameters. Required.
|
761
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
762
|
+
# Uri, Body, Query string parameters
|
763
|
+
def transcode_clone_rules_request request_pb
|
764
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
765
|
+
.with_bindings(
|
766
|
+
uri_method: :post,
|
767
|
+
uri_template: "/compute/v1/locations/global/firewallPolicies/{firewall_policy}/cloneRules",
|
768
|
+
matches: [
|
769
|
+
["firewall_policy", %r{[^/]+}, false]
|
770
|
+
]
|
771
|
+
)
|
772
|
+
transcoder.transcode request_pb
|
773
|
+
end
|
774
|
+
|
775
|
+
##
|
776
|
+
# @private
|
777
|
+
#
|
778
|
+
# GRPC transcoding helper method for the delete REST call
|
779
|
+
#
|
780
|
+
# @param request_pb [::Google::Cloud::Compute::V1::DeleteFirewallPolicyRequest]
|
781
|
+
# A request object representing the call parameters. Required.
|
782
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
783
|
+
# Uri, Body, Query string parameters
|
784
|
+
def transcode_delete_request request_pb
|
785
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
786
|
+
.with_bindings(
|
787
|
+
uri_method: :delete,
|
788
|
+
uri_template: "/compute/v1/locations/global/firewallPolicies/{firewall_policy}",
|
789
|
+
matches: [
|
790
|
+
["firewall_policy", %r{[^/]+}, false]
|
791
|
+
]
|
792
|
+
)
|
793
|
+
transcoder.transcode request_pb
|
794
|
+
end
|
795
|
+
|
796
|
+
##
|
797
|
+
# @private
|
798
|
+
#
|
799
|
+
# GRPC transcoding helper method for the get REST call
|
800
|
+
#
|
801
|
+
# @param request_pb [::Google::Cloud::Compute::V1::GetFirewallPolicyRequest]
|
802
|
+
# A request object representing the call parameters. Required.
|
803
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
804
|
+
# Uri, Body, Query string parameters
|
805
|
+
def transcode_get_request request_pb
|
806
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
807
|
+
.with_bindings(
|
808
|
+
uri_method: :get,
|
809
|
+
uri_template: "/compute/v1/locations/global/firewallPolicies/{firewall_policy}",
|
810
|
+
matches: [
|
811
|
+
["firewall_policy", %r{[^/]+}, false]
|
812
|
+
]
|
813
|
+
)
|
814
|
+
transcoder.transcode request_pb
|
815
|
+
end
|
816
|
+
|
817
|
+
##
|
818
|
+
# @private
|
819
|
+
#
|
820
|
+
# GRPC transcoding helper method for the get_association REST call
|
821
|
+
#
|
822
|
+
# @param request_pb [::Google::Cloud::Compute::V1::GetAssociationFirewallPolicyRequest]
|
823
|
+
# A request object representing the call parameters. Required.
|
824
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
825
|
+
# Uri, Body, Query string parameters
|
826
|
+
def transcode_get_association_request request_pb
|
827
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
828
|
+
.with_bindings(
|
829
|
+
uri_method: :get,
|
830
|
+
uri_template: "/compute/v1/locations/global/firewallPolicies/{firewall_policy}/getAssociation",
|
831
|
+
matches: [
|
832
|
+
["firewall_policy", %r{[^/]+}, false]
|
833
|
+
]
|
834
|
+
)
|
835
|
+
transcoder.transcode request_pb
|
836
|
+
end
|
837
|
+
|
849
838
|
##
|
839
|
+
# @private
|
840
|
+
#
|
841
|
+
# GRPC transcoding helper method for the get_iam_policy REST call
|
842
|
+
#
|
843
|
+
# @param request_pb [::Google::Cloud::Compute::V1::GetIamPolicyFirewallPolicyRequest]
|
844
|
+
# A request object representing the call parameters. Required.
|
845
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
846
|
+
# Uri, Body, Query string parameters
|
847
|
+
def transcode_get_iam_policy_request request_pb
|
848
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
849
|
+
.with_bindings(
|
850
|
+
uri_method: :get,
|
851
|
+
uri_template: "/compute/v1/locations/global/firewallPolicies/{resource}/getIamPolicy",
|
852
|
+
matches: [
|
853
|
+
["resource", %r{[^/]+}, false]
|
854
|
+
]
|
855
|
+
)
|
856
|
+
transcoder.transcode request_pb
|
857
|
+
end
|
858
|
+
|
859
|
+
##
|
860
|
+
# @private
|
861
|
+
#
|
862
|
+
# GRPC transcoding helper method for the get_rule REST call
|
863
|
+
#
|
864
|
+
# @param request_pb [::Google::Cloud::Compute::V1::GetRuleFirewallPolicyRequest]
|
865
|
+
# A request object representing the call parameters. Required.
|
866
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
867
|
+
# Uri, Body, Query string parameters
|
868
|
+
def transcode_get_rule_request request_pb
|
869
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
870
|
+
.with_bindings(
|
871
|
+
uri_method: :get,
|
872
|
+
uri_template: "/compute/v1/locations/global/firewallPolicies/{firewall_policy}/getRule",
|
873
|
+
matches: [
|
874
|
+
["firewall_policy", %r{[^/]+}, false]
|
875
|
+
]
|
876
|
+
)
|
877
|
+
transcoder.transcode request_pb
|
878
|
+
end
|
879
|
+
|
880
|
+
##
|
881
|
+
# @private
|
882
|
+
#
|
883
|
+
# GRPC transcoding helper method for the insert REST call
|
884
|
+
#
|
885
|
+
# @param request_pb [::Google::Cloud::Compute::V1::InsertFirewallPolicyRequest]
|
886
|
+
# A request object representing the call parameters. Required.
|
887
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
888
|
+
# Uri, Body, Query string parameters
|
889
|
+
def transcode_insert_request request_pb
|
890
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
891
|
+
.with_bindings(
|
892
|
+
uri_method: :post,
|
893
|
+
uri_template: "/compute/v1/locations/global/firewallPolicies",
|
894
|
+
body: "firewall_policy_resource",
|
895
|
+
matches: []
|
896
|
+
)
|
897
|
+
transcoder.transcode request_pb
|
898
|
+
end
|
899
|
+
|
900
|
+
##
|
901
|
+
# @private
|
902
|
+
#
|
903
|
+
# GRPC transcoding helper method for the list REST call
|
904
|
+
#
|
905
|
+
# @param request_pb [::Google::Cloud::Compute::V1::ListFirewallPoliciesRequest]
|
906
|
+
# A request object representing the call parameters. Required.
|
907
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
908
|
+
# Uri, Body, Query string parameters
|
909
|
+
def transcode_list_request request_pb
|
910
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
911
|
+
.with_bindings(
|
912
|
+
uri_method: :get,
|
913
|
+
uri_template: "/compute/v1/locations/global/firewallPolicies",
|
914
|
+
matches: []
|
915
|
+
)
|
916
|
+
transcoder.transcode request_pb
|
917
|
+
end
|
918
|
+
|
919
|
+
##
|
920
|
+
# @private
|
921
|
+
#
|
922
|
+
# GRPC transcoding helper method for the list_associations REST call
|
923
|
+
#
|
924
|
+
# @param request_pb [::Google::Cloud::Compute::V1::ListAssociationsFirewallPolicyRequest]
|
925
|
+
# A request object representing the call parameters. Required.
|
926
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
927
|
+
# Uri, Body, Query string parameters
|
928
|
+
def transcode_list_associations_request request_pb
|
929
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
930
|
+
.with_bindings(
|
931
|
+
uri_method: :get,
|
932
|
+
uri_template: "/compute/v1/locations/global/firewallPolicies/listAssociations",
|
933
|
+
matches: []
|
934
|
+
)
|
935
|
+
transcoder.transcode request_pb
|
936
|
+
end
|
937
|
+
|
938
|
+
##
|
939
|
+
# @private
|
940
|
+
#
|
941
|
+
# GRPC transcoding helper method for the move REST call
|
942
|
+
#
|
943
|
+
# @param request_pb [::Google::Cloud::Compute::V1::MoveFirewallPolicyRequest]
|
944
|
+
# A request object representing the call parameters. Required.
|
945
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
946
|
+
# Uri, Body, Query string parameters
|
947
|
+
def transcode_move_request request_pb
|
948
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
949
|
+
.with_bindings(
|
950
|
+
uri_method: :post,
|
951
|
+
uri_template: "/compute/v1/locations/global/firewallPolicies/{firewall_policy}/move",
|
952
|
+
matches: [
|
953
|
+
["firewall_policy", %r{[^/]+}, false]
|
954
|
+
]
|
955
|
+
)
|
956
|
+
transcoder.transcode request_pb
|
957
|
+
end
|
958
|
+
|
959
|
+
##
|
960
|
+
# @private
|
961
|
+
#
|
962
|
+
# GRPC transcoding helper method for the patch REST call
|
963
|
+
#
|
964
|
+
# @param request_pb [::Google::Cloud::Compute::V1::PatchFirewallPolicyRequest]
|
965
|
+
# A request object representing the call parameters. Required.
|
966
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
967
|
+
# Uri, Body, Query string parameters
|
968
|
+
def transcode_patch_request request_pb
|
969
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
970
|
+
.with_bindings(
|
971
|
+
uri_method: :patch,
|
972
|
+
uri_template: "/compute/v1/locations/global/firewallPolicies/{firewall_policy}",
|
973
|
+
body: "firewall_policy_resource",
|
974
|
+
matches: [
|
975
|
+
["firewall_policy", %r{[^/]+}, false]
|
976
|
+
]
|
977
|
+
)
|
978
|
+
transcoder.transcode request_pb
|
979
|
+
end
|
980
|
+
|
981
|
+
##
|
982
|
+
# @private
|
983
|
+
#
|
984
|
+
# GRPC transcoding helper method for the patch_rule REST call
|
985
|
+
#
|
986
|
+
# @param request_pb [::Google::Cloud::Compute::V1::PatchRuleFirewallPolicyRequest]
|
987
|
+
# A request object representing the call parameters. Required.
|
988
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
989
|
+
# Uri, Body, Query string parameters
|
990
|
+
def transcode_patch_rule_request request_pb
|
991
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
992
|
+
.with_bindings(
|
993
|
+
uri_method: :post,
|
994
|
+
uri_template: "/compute/v1/locations/global/firewallPolicies/{firewall_policy}/patchRule",
|
995
|
+
body: "firewall_policy_rule_resource",
|
996
|
+
matches: [
|
997
|
+
["firewall_policy", %r{[^/]+}, false]
|
998
|
+
]
|
999
|
+
)
|
1000
|
+
transcoder.transcode request_pb
|
1001
|
+
end
|
1002
|
+
|
1003
|
+
##
|
1004
|
+
# @private
|
1005
|
+
#
|
1006
|
+
# GRPC transcoding helper method for the remove_association REST call
|
1007
|
+
#
|
1008
|
+
# @param request_pb [::Google::Cloud::Compute::V1::RemoveAssociationFirewallPolicyRequest]
|
1009
|
+
# A request object representing the call parameters. Required.
|
1010
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
1011
|
+
# Uri, Body, Query string parameters
|
1012
|
+
def transcode_remove_association_request request_pb
|
1013
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
1014
|
+
.with_bindings(
|
1015
|
+
uri_method: :post,
|
1016
|
+
uri_template: "/compute/v1/locations/global/firewallPolicies/{firewall_policy}/removeAssociation",
|
1017
|
+
matches: [
|
1018
|
+
["firewall_policy", %r{[^/]+}, false]
|
1019
|
+
]
|
1020
|
+
)
|
1021
|
+
transcoder.transcode request_pb
|
1022
|
+
end
|
1023
|
+
|
1024
|
+
##
|
1025
|
+
# @private
|
1026
|
+
#
|
1027
|
+
# GRPC transcoding helper method for the remove_rule REST call
|
1028
|
+
#
|
1029
|
+
# @param request_pb [::Google::Cloud::Compute::V1::RemoveRuleFirewallPolicyRequest]
|
1030
|
+
# A request object representing the call parameters. Required.
|
1031
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
1032
|
+
# Uri, Body, Query string parameters
|
1033
|
+
def transcode_remove_rule_request request_pb
|
1034
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
1035
|
+
.with_bindings(
|
1036
|
+
uri_method: :post,
|
1037
|
+
uri_template: "/compute/v1/locations/global/firewallPolicies/{firewall_policy}/removeRule",
|
1038
|
+
matches: [
|
1039
|
+
["firewall_policy", %r{[^/]+}, false]
|
1040
|
+
]
|
1041
|
+
)
|
1042
|
+
transcoder.transcode request_pb
|
1043
|
+
end
|
1044
|
+
|
1045
|
+
##
|
1046
|
+
# @private
|
1047
|
+
#
|
1048
|
+
# GRPC transcoding helper method for the set_iam_policy REST call
|
1049
|
+
#
|
1050
|
+
# @param request_pb [::Google::Cloud::Compute::V1::SetIamPolicyFirewallPolicyRequest]
|
1051
|
+
# A request object representing the call parameters. Required.
|
1052
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
1053
|
+
# Uri, Body, Query string parameters
|
1054
|
+
def transcode_set_iam_policy_request request_pb
|
1055
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
1056
|
+
.with_bindings(
|
1057
|
+
uri_method: :post,
|
1058
|
+
uri_template: "/compute/v1/locations/global/firewallPolicies/{resource}/setIamPolicy",
|
1059
|
+
body: "global_organization_set_policy_request_resource",
|
1060
|
+
matches: [
|
1061
|
+
["resource", %r{[^/]+}, false]
|
1062
|
+
]
|
1063
|
+
)
|
1064
|
+
transcoder.transcode request_pb
|
1065
|
+
end
|
1066
|
+
|
1067
|
+
##
|
1068
|
+
# @private
|
1069
|
+
#
|
850
1070
|
# GRPC transcoding helper method for the test_iam_permissions REST call
|
851
1071
|
#
|
852
1072
|
# @param request_pb [::Google::Cloud::Compute::V1::TestIamPermissionsFirewallPolicyRequest]
|
@@ -854,11 +1074,16 @@ module Google
|
|
854
1074
|
# @return [Array(String, [String, nil], Hash{String => String})]
|
855
1075
|
# Uri, Body, Query string parameters
|
856
1076
|
def transcode_test_iam_permissions_request request_pb
|
857
|
-
|
858
|
-
|
859
|
-
|
860
|
-
|
861
|
-
|
1077
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
1078
|
+
.with_bindings(
|
1079
|
+
uri_method: :post,
|
1080
|
+
uri_template: "/compute/v1/locations/global/firewallPolicies/{resource}/testIamPermissions",
|
1081
|
+
body: "test_permissions_request_resource",
|
1082
|
+
matches: [
|
1083
|
+
["resource", %r{[^/]+}, false]
|
1084
|
+
]
|
1085
|
+
)
|
1086
|
+
transcoder.transcode request_pb
|
862
1087
|
end
|
863
1088
|
end
|
864
1089
|
end
|