lib/google/cloud/compute/v1/region_disks/rest/grpc_transcoding.rb in google-cloud-compute-v1-0.1.0 vs lib/google/cloud/compute/v1/region_disks/rest/grpc_transcoding.rb in google-cloud-compute-v1-0.2.0
- old
+ new
@@ -31,10 +31,11 @@
# Uri, Body, Query string parameters
def transcode_add_resource_policies request_pb
uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/disks/#{request_pb.disk}/addResourcePolicies"
body = request_pb.region_disks_add_resource_policies_request_resource.to_json
query_string_params = {}
+ query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
[uri, body, query_string_params]
end
# @param request_pb [::Google::Cloud::Compute::V1::CreateSnapshotRegionDiskRequest]
@@ -43,10 +44,11 @@
# Uri, Body, Query string parameters
def transcode_create_snapshot request_pb
uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/disks/#{request_pb.disk}/createSnapshot"
body = request_pb.snapshot_resource.to_json
query_string_params = {}
+ query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
[uri, body, query_string_params]
end
# @param request_pb [::Google::Cloud::Compute::V1::DeleteRegionDiskRequest]
@@ -93,10 +95,12 @@
# Uri, Body, Query string parameters
def transcode_insert request_pb
uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/disks"
body = request_pb.disk_resource.to_json
query_string_params = {}
+ query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
+ query_string_params["sourceImage"] = request_pb.source_image.to_s if request_pb.has_source_image?
[uri, body, query_string_params]
end
# @param request_pb [::Google::Cloud::Compute::V1::ListRegionDisksRequest]
@@ -122,10 +126,11 @@
# Uri, Body, Query string parameters
def transcode_remove_resource_policies request_pb
uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/disks/#{request_pb.disk}/removeResourcePolicies"
body = request_pb.region_disks_remove_resource_policies_request_resource.to_json
query_string_params = {}
+ query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
[uri, body, query_string_params]
end
# @param request_pb [::Google::Cloud::Compute::V1::ResizeRegionDiskRequest]
@@ -134,10 +139,11 @@
# Uri, Body, Query string parameters
def transcode_resize request_pb
uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/disks/#{request_pb.disk}/resize"
body = request_pb.region_disks_resize_request_resource.to_json
query_string_params = {}
+ query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
[uri, body, query_string_params]
end
# @param request_pb [::Google::Cloud::Compute::V1::SetIamPolicyRegionDiskRequest]
@@ -158,9 +164,10 @@
# Uri, Body, Query string parameters
def transcode_set_labels request_pb
uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/disks/#{request_pb.resource}/setLabels"
body = request_pb.region_set_labels_request_resource.to_json
query_string_params = {}
+ query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
[uri, body, query_string_params]
end
# @param request_pb [::Google::Cloud::Compute::V1::TestIamPermissionsRegionDiskRequest]