Module: Google::Cloud::Compute::V1::Subnetworks::Rest::GrpcTranscoding

Extended by:
GrpcTranscoding
Included in:
GrpcTranscoding
Defined in:
lib/google/cloud/compute/v1/subnetworks/rest/grpc_transcoding.rb

Overview

GRPC transcoding helper methods for the Subnetworks REST API.

Instance Method Summary collapse

Instance Method Details

#transcode_aggregated_list(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})

Returns Uri, Body, Query string parameters.

Parameters:

Returns:

  • (Array(String, [String, nil], Hash{String => String}))

    Uri, Body, Query string parameters



32
33
34
35
36
37
38
39
40
41
42
43
44
# File 'lib/google/cloud/compute/v1/subnetworks/rest/grpc_transcoding.rb', line 32

def transcode_aggregated_list request_pb
  uri = "/compute/v1/projects/#{request_pb.project}/aggregated/subnetworks"
  body = nil
  query_string_params = {}
  query_string_params["filter"] = request_pb.filter.to_s if request_pb.has_filter?
  query_string_params["includeAllScopes"] = request_pb.include_all_scopes.to_s if request_pb.has_include_all_scopes?
  query_string_params["maxResults"] = request_pb.max_results.to_s if request_pb.has_max_results?
  query_string_params["orderBy"] = request_pb.order_by.to_s if request_pb.has_order_by?
  query_string_params["pageToken"] = request_pb.page_token.to_s if request_pb.has_page_token?
  query_string_params["returnPartialSuccess"] = request_pb.return_partial_success.to_s if request_pb.has_return_partial_success?

  [uri, body, query_string_params]
end

#transcode_delete(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})

Returns Uri, Body, Query string parameters.

Parameters:

Returns:

  • (Array(String, [String, nil], Hash{String => String}))

    Uri, Body, Query string parameters



50
51
52
53
54
55
56
57
# File 'lib/google/cloud/compute/v1/subnetworks/rest/grpc_transcoding.rb', line 50

def transcode_delete request_pb
  uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/subnetworks/#{request_pb.subnetwork}"
  body = nil
  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

#transcode_expand_ip_cidr_range(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})

Returns Uri, Body, Query string parameters.

Parameters:

Returns:

  • (Array(String, [String, nil], Hash{String => String}))

    Uri, Body, Query string parameters



63
64
65
66
67
68
69
70
# File 'lib/google/cloud/compute/v1/subnetworks/rest/grpc_transcoding.rb', line 63

def transcode_expand_ip_cidr_range request_pb
  uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/subnetworks/#{request_pb.subnetwork}/expandIpCidrRange"
  body = request_pb.subnetworks_expand_ip_cidr_range_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

#transcode_get(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})

Returns Uri, Body, Query string parameters.

Parameters:

Returns:

  • (Array(String, [String, nil], Hash{String => String}))

    Uri, Body, Query string parameters



76
77
78
79
80
81
82
# File 'lib/google/cloud/compute/v1/subnetworks/rest/grpc_transcoding.rb', line 76

def transcode_get request_pb
  uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/subnetworks/#{request_pb.subnetwork}"
  body = nil
  query_string_params = {}

  [uri, body, query_string_params]
end

#transcode_get_iam_policy(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})

Returns Uri, Body, Query string parameters.

Parameters:

Returns:

  • (Array(String, [String, nil], Hash{String => String}))

    Uri, Body, Query string parameters



88
89
90
91
92
93
94
95
# File 'lib/google/cloud/compute/v1/subnetworks/rest/grpc_transcoding.rb', line 88

def transcode_get_iam_policy request_pb
  uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/subnetworks/#{request_pb.resource}/getIamPolicy"
  body = nil
  query_string_params = {}
  query_string_params["optionsRequestedPolicyVersion"] = request_pb.options_requested_policy_version.to_s if request_pb.has_options_requested_policy_version?

  [uri, body, query_string_params]
end

#transcode_insert(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})

Returns Uri, Body, Query string parameters.

Parameters:

Returns:

  • (Array(String, [String, nil], Hash{String => String}))

    Uri, Body, Query string parameters



101
102
103
104
105
106
107
108
# File 'lib/google/cloud/compute/v1/subnetworks/rest/grpc_transcoding.rb', line 101

def transcode_insert request_pb
  uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/subnetworks"
  body = request_pb.subnetwork_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

#transcode_list(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})

Returns Uri, Body, Query string parameters.

Parameters:

Returns:

  • (Array(String, [String, nil], Hash{String => String}))

    Uri, Body, Query string parameters



114
115
116
117
118
119
120
121
122
123
124
125
# File 'lib/google/cloud/compute/v1/subnetworks/rest/grpc_transcoding.rb', line 114

def transcode_list request_pb
  uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/subnetworks"
  body = nil
  query_string_params = {}
  query_string_params["filter"] = request_pb.filter.to_s if request_pb.has_filter?
  query_string_params["maxResults"] = request_pb.max_results.to_s if request_pb.has_max_results?
  query_string_params["orderBy"] = request_pb.order_by.to_s if request_pb.has_order_by?
  query_string_params["pageToken"] = request_pb.page_token.to_s if request_pb.has_page_token?
  query_string_params["returnPartialSuccess"] = request_pb.return_partial_success.to_s if request_pb.has_return_partial_success?

  [uri, body, query_string_params]
end

#transcode_list_usable(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})

Returns Uri, Body, Query string parameters.

Parameters:

Returns:

  • (Array(String, [String, nil], Hash{String => String}))

    Uri, Body, Query string parameters



131
132
133
134
135
136
137
138
139
140
141
142
# File 'lib/google/cloud/compute/v1/subnetworks/rest/grpc_transcoding.rb', line 131

def transcode_list_usable request_pb
  uri = "/compute/v1/projects/#{request_pb.project}/aggregated/subnetworks/listUsable"
  body = nil
  query_string_params = {}
  query_string_params["filter"] = request_pb.filter.to_s if request_pb.has_filter?
  query_string_params["maxResults"] = request_pb.max_results.to_s if request_pb.has_max_results?
  query_string_params["orderBy"] = request_pb.order_by.to_s if request_pb.has_order_by?
  query_string_params["pageToken"] = request_pb.page_token.to_s if request_pb.has_page_token?
  query_string_params["returnPartialSuccess"] = request_pb.return_partial_success.to_s if request_pb.has_return_partial_success?

  [uri, body, query_string_params]
end

#transcode_patch(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})

Returns Uri, Body, Query string parameters.

Parameters:

Returns:

  • (Array(String, [String, nil], Hash{String => String}))

    Uri, Body, Query string parameters



148
149
150
151
152
153
154
155
156
# File 'lib/google/cloud/compute/v1/subnetworks/rest/grpc_transcoding.rb', line 148

def transcode_patch request_pb
  uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/subnetworks/#{request_pb.subnetwork}"
  body = request_pb.subnetwork_resource.to_json
  query_string_params = {}
  query_string_params["drainTimeoutSeconds"] = request_pb.drain_timeout_seconds.to_s if request_pb.has_drain_timeout_seconds?
  query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?

  [uri, body, query_string_params]
end

#transcode_set_iam_policy(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})

Returns Uri, Body, Query string parameters.

Parameters:

Returns:

  • (Array(String, [String, nil], Hash{String => String}))

    Uri, Body, Query string parameters



162
163
164
165
166
167
168
# File 'lib/google/cloud/compute/v1/subnetworks/rest/grpc_transcoding.rb', line 162

def transcode_set_iam_policy request_pb
  uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/subnetworks/#{request_pb.resource}/setIamPolicy"
  body = request_pb.region_set_policy_request_resource.to_json
  query_string_params = {}

  [uri, body, query_string_params]
end

#transcode_set_private_ip_google_access(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})

Returns Uri, Body, Query string parameters.

Parameters:

Returns:

  • (Array(String, [String, nil], Hash{String => String}))

    Uri, Body, Query string parameters



174
175
176
177
178
179
180
181
# File 'lib/google/cloud/compute/v1/subnetworks/rest/grpc_transcoding.rb', line 174

def transcode_set_private_ip_google_access request_pb
  uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/subnetworks/#{request_pb.subnetwork}/setPrivateIpGoogleAccess"
  body = request_pb.subnetworks_set_private_ip_google_access_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

#transcode_test_iam_permissions(request_pb) ⇒ Array(String, [String, nil], Hash{String => String})

Returns Uri, Body, Query string parameters.

Parameters:

Returns:

  • (Array(String, [String, nil], Hash{String => String}))

    Uri, Body, Query string parameters



187
188
189
190
191
192
193
# File 'lib/google/cloud/compute/v1/subnetworks/rest/grpc_transcoding.rb', line 187

def transcode_test_iam_permissions request_pb
  uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/subnetworks/#{request_pb.resource}/testIamPermissions"
  body = request_pb.test_permissions_request_resource.to_json
  query_string_params = {}

  [uri, body, query_string_params]
end