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

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

Overview

GRPC transcoding helper methods for the Instances REST API.

Instance Method Summary collapse

Instance Method Details

#transcode_add_access_config(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
# File 'lib/google/cloud/compute/v1/instances/rest/grpc_transcoding.rb', line 32

def transcode_add_access_config request_pb
  uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/addAccessConfig"
  body = request_pb.access_config_resource.to_json
  query_string_params = {}
  query_string_params["networkInterface"] = request_pb.network_interface.to_s
  query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?

  [uri, body, query_string_params]
end

#transcode_add_resource_policies(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



46
47
48
49
50
51
52
53
# File 'lib/google/cloud/compute/v1/instances/rest/grpc_transcoding.rb', line 46

def transcode_add_resource_policies request_pb
  uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/addResourcePolicies"
  body = request_pb.instances_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

#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



59
60
61
62
63
64
65
66
67
68
69
70
71
# File 'lib/google/cloud/compute/v1/instances/rest/grpc_transcoding.rb', line 59

def transcode_aggregated_list request_pb
  uri = "/compute/v1/projects/#{request_pb.project}/aggregated/instances"
  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_attach_disk(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



77
78
79
80
81
82
83
84
85
# File 'lib/google/cloud/compute/v1/instances/rest/grpc_transcoding.rb', line 77

def transcode_attach_disk request_pb
  uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/attachDisk"
  body = request_pb.attached_disk_resource.to_json
  query_string_params = {}
  query_string_params["forceAttach"] = request_pb.force_attach.to_s if request_pb.has_force_attach?
  query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?

  [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



91
92
93
94
95
96
97
98
# File 'lib/google/cloud/compute/v1/instances/rest/grpc_transcoding.rb', line 91

def transcode_delete request_pb
  uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}"
  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_delete_access_config(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



104
105
106
107
108
109
110
111
112
113
# File 'lib/google/cloud/compute/v1/instances/rest/grpc_transcoding.rb', line 104

def transcode_delete_access_config request_pb
  uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/deleteAccessConfig"
  body = nil
  query_string_params = {}
  query_string_params["accessConfig"] = request_pb.access_config.to_s
  query_string_params["networkInterface"] = request_pb.network_interface.to_s
  query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?

  [uri, body, query_string_params]
end

#transcode_detach_disk(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



119
120
121
122
123
124
125
126
127
# File 'lib/google/cloud/compute/v1/instances/rest/grpc_transcoding.rb', line 119

def transcode_detach_disk request_pb
  uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/detachDisk"
  body = nil
  query_string_params = {}
  query_string_params["deviceName"] = request_pb.device_name.to_s
  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



133
134
135
136
137
138
139
# File 'lib/google/cloud/compute/v1/instances/rest/grpc_transcoding.rb', line 133

def transcode_get request_pb
  uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}"
  body = nil
  query_string_params = {}

  [uri, body, query_string_params]
end

#transcode_get_guest_attributes(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



145
146
147
148
149
150
151
152
153
# File 'lib/google/cloud/compute/v1/instances/rest/grpc_transcoding.rb', line 145

def transcode_get_guest_attributes request_pb
  uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/getGuestAttributes"
  body = nil
  query_string_params = {}
  query_string_params["queryPath"] = request_pb.query_path.to_s if request_pb.has_query_path?
  query_string_params["variableKey"] = request_pb.variable_key.to_s if request_pb.has_variable_key?

  [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



159
160
161
162
163
164
165
166
# File 'lib/google/cloud/compute/v1/instances/rest/grpc_transcoding.rb', line 159

def transcode_get_iam_policy request_pb
  uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{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_get_screenshot(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



172
173
174
175
176
177
178
# File 'lib/google/cloud/compute/v1/instances/rest/grpc_transcoding.rb', line 172

def transcode_get_screenshot request_pb
  uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/screenshot"
  body = nil
  query_string_params = {}

  [uri, body, query_string_params]
end

#transcode_get_serial_port_output(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



184
185
186
187
188
189
190
191
192
# File 'lib/google/cloud/compute/v1/instances/rest/grpc_transcoding.rb', line 184

def transcode_get_serial_port_output request_pb
  uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/serialPort"
  body = nil
  query_string_params = {}
  query_string_params["port"] = request_pb.port.to_s if request_pb.has_port?
  query_string_params["start"] = request_pb.start.to_s if request_pb.has_start?

  [uri, body, query_string_params]
end

#transcode_get_shielded_instance_identity(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



198
199
200
201
202
203
204
# File 'lib/google/cloud/compute/v1/instances/rest/grpc_transcoding.rb', line 198

def transcode_get_shielded_instance_identity request_pb
  uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/getShieldedInstanceIdentity"
  body = nil
  query_string_params = {}

  [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



210
211
212
213
214
215
216
217
218
# File 'lib/google/cloud/compute/v1/instances/rest/grpc_transcoding.rb', line 210

def transcode_insert request_pb
  uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances"
  body = request_pb.instance_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["sourceInstanceTemplate"] = request_pb.source_instance_template.to_s if request_pb.has_source_instance_template?

  [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



224
225
226
227
228
229
230
231
232
233
234
235
# File 'lib/google/cloud/compute/v1/instances/rest/grpc_transcoding.rb', line 224

def transcode_list request_pb
  uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances"
  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_referrers(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



241
242
243
244
245
246
247
248
249
250
251
252
# File 'lib/google/cloud/compute/v1/instances/rest/grpc_transcoding.rb', line 241

def transcode_list_referrers request_pb
  uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/referrers"
  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_remove_resource_policies(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



258
259
260
261
262
263
264
265
# File 'lib/google/cloud/compute/v1/instances/rest/grpc_transcoding.rb', line 258

def transcode_remove_resource_policies request_pb
  uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/removeResourcePolicies"
  body = request_pb.instances_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

#transcode_reset(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



271
272
273
274
275
276
277
278
# File 'lib/google/cloud/compute/v1/instances/rest/grpc_transcoding.rb', line 271

def transcode_reset request_pb
  uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/reset"
  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_set_deletion_protection(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



284
285
286
287
288
289
290
291
292
# File 'lib/google/cloud/compute/v1/instances/rest/grpc_transcoding.rb', line 284

def transcode_set_deletion_protection request_pb
  uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.resource}/setDeletionProtection"
  body = nil
  query_string_params = {}
  query_string_params["deletionProtection"] = request_pb.deletion_protection.to_s if request_pb.has_deletion_protection?
  query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?

  [uri, body, query_string_params]
end

#transcode_set_disk_auto_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



298
299
300
301
302
303
304
305
306
307
# File 'lib/google/cloud/compute/v1/instances/rest/grpc_transcoding.rb', line 298

def transcode_set_disk_auto_delete request_pb
  uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/setDiskAutoDelete"
  body = nil
  query_string_params = {}
  query_string_params["autoDelete"] = request_pb.auto_delete.to_s
  query_string_params["deviceName"] = request_pb.device_name.to_s
  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



313
314
315
316
317
318
319
# File 'lib/google/cloud/compute/v1/instances/rest/grpc_transcoding.rb', line 313

def transcode_set_iam_policy request_pb
  uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.resource}/setIamPolicy"
  body = request_pb.zone_set_policy_request_resource.to_json
  query_string_params = {}

  [uri, body, query_string_params]
end

#transcode_set_labels(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



325
326
327
328
329
330
331
332
# File 'lib/google/cloud/compute/v1/instances/rest/grpc_transcoding.rb', line 325

def transcode_set_labels request_pb
  uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/setLabels"
  body = request_pb.instances_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

#transcode_set_machine_resources(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



338
339
340
341
342
343
344
345
# File 'lib/google/cloud/compute/v1/instances/rest/grpc_transcoding.rb', line 338

def transcode_set_machine_resources request_pb
  uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/setMachineResources"
  body = request_pb.instances_set_machine_resources_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_set_machine_type(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



351
352
353
354
355
356
357
358
# File 'lib/google/cloud/compute/v1/instances/rest/grpc_transcoding.rb', line 351

def transcode_set_machine_type request_pb
  uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/setMachineType"
  body = request_pb.instances_set_machine_type_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_set_metadata(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



364
365
366
367
368
369
370
371
# File 'lib/google/cloud/compute/v1/instances/rest/grpc_transcoding.rb', line 364

def  request_pb
  uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/setMetadata"
  body = request_pb..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_set_min_cpu_platform(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



377
378
379
380
381
382
383
384
# File 'lib/google/cloud/compute/v1/instances/rest/grpc_transcoding.rb', line 377

def transcode_set_min_cpu_platform request_pb
  uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/setMinCpuPlatform"
  body = request_pb.instances_set_min_cpu_platform_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_set_scheduling(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



390
391
392
393
394
395
396
397
# File 'lib/google/cloud/compute/v1/instances/rest/grpc_transcoding.rb', line 390

def transcode_set_scheduling request_pb
  uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/setScheduling"
  body = request_pb.scheduling_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_set_service_account(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



403
404
405
406
407
408
409
410
# File 'lib/google/cloud/compute/v1/instances/rest/grpc_transcoding.rb', line 403

def  request_pb
  uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/setServiceAccount"
  body = request_pb..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_set_shielded_instance_integrity_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



416
417
418
419
420
421
422
423
# File 'lib/google/cloud/compute/v1/instances/rest/grpc_transcoding.rb', line 416

def transcode_set_shielded_instance_integrity_policy request_pb
  uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/setShieldedInstanceIntegrityPolicy"
  body = request_pb.shielded_instance_integrity_policy_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_set_tags(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



429
430
431
432
433
434
435
436
# File 'lib/google/cloud/compute/v1/instances/rest/grpc_transcoding.rb', line 429

def transcode_set_tags request_pb
  uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/setTags"
  body = request_pb.tags_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_simulate_maintenance_event(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



442
443
444
445
446
447
448
# File 'lib/google/cloud/compute/v1/instances/rest/grpc_transcoding.rb', line 442

def transcode_simulate_maintenance_event request_pb
  uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/simulateMaintenanceEvent"
  body = nil
  query_string_params = {}

  [uri, body, query_string_params]
end

#transcode_start(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



454
455
456
457
458
459
460
461
# File 'lib/google/cloud/compute/v1/instances/rest/grpc_transcoding.rb', line 454

def transcode_start request_pb
  uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/start"
  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_start_with_encryption_key(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



467
468
469
470
471
472
473
474
# File 'lib/google/cloud/compute/v1/instances/rest/grpc_transcoding.rb', line 467

def transcode_start_with_encryption_key request_pb
  uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/startWithEncryptionKey"
  body = request_pb.instances_start_with_encryption_key_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_stop(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



480
481
482
483
484
485
486
487
# File 'lib/google/cloud/compute/v1/instances/rest/grpc_transcoding.rb', line 480

def transcode_stop request_pb
  uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/stop"
  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_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



493
494
495
496
497
498
499
# File 'lib/google/cloud/compute/v1/instances/rest/grpc_transcoding.rb', line 493

def transcode_test_iam_permissions request_pb
  uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.resource}/testIamPermissions"
  body = request_pb.test_permissions_request_resource.to_json
  query_string_params = {}

  [uri, body, query_string_params]
end

#transcode_update(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



505
506
507
508
509
510
511
512
513
514
# File 'lib/google/cloud/compute/v1/instances/rest/grpc_transcoding.rb', line 505

def transcode_update request_pb
  uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}"
  body = request_pb.instance_resource.to_json
  query_string_params = {}
  query_string_params["minimalAction"] = request_pb.minimal_action.to_s if request_pb.has_minimal_action?
  query_string_params["mostDisruptiveAllowedAction"] = request_pb.most_disruptive_allowed_action.to_s if request_pb.has_most_disruptive_allowed_action?
  query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?

  [uri, body, query_string_params]
end

#transcode_update_access_config(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



520
521
522
523
524
525
526
527
528
# File 'lib/google/cloud/compute/v1/instances/rest/grpc_transcoding.rb', line 520

def transcode_update_access_config request_pb
  uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/updateAccessConfig"
  body = request_pb.access_config_resource.to_json
  query_string_params = {}
  query_string_params["networkInterface"] = request_pb.network_interface.to_s
  query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?

  [uri, body, query_string_params]
end

#transcode_update_display_device(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



534
535
536
537
538
539
540
541
# File 'lib/google/cloud/compute/v1/instances/rest/grpc_transcoding.rb', line 534

def transcode_update_display_device request_pb
  uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/updateDisplayDevice"
  body = request_pb.display_device_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_update_network_interface(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



547
548
549
550
551
552
553
554
555
# File 'lib/google/cloud/compute/v1/instances/rest/grpc_transcoding.rb', line 547

def transcode_update_network_interface request_pb
  uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/updateNetworkInterface"
  body = request_pb.network_interface_resource.to_json
  query_string_params = {}
  query_string_params["networkInterface"] = request_pb.network_interface.to_s
  query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?

  [uri, body, query_string_params]
end

#transcode_update_shielded_instance_config(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



561
562
563
564
565
566
567
568
# File 'lib/google/cloud/compute/v1/instances/rest/grpc_transcoding.rb', line 561

def transcode_update_shielded_instance_config request_pb
  uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/updateShieldedInstanceConfig"
  body = request_pb.shielded_instance_config_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