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

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

Overview

GRPC transcoding helper methods for the Images REST API.

Instance Method Summary collapse

Instance Method Details

#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



32
33
34
35
36
37
38
39
# File 'lib/google/cloud/compute/v1/images/rest/grpc_transcoding.rb', line 32

def transcode_delete request_pb
  uri = "/compute/v1/projects/#{request_pb.project}/global/images/#{request_pb.image}"
  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_deprecate(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



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

def transcode_deprecate request_pb
  uri = "/compute/v1/projects/#{request_pb.project}/global/images/#{request_pb.image}/deprecate"
  body = request_pb.deprecation_status_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



58
59
60
61
62
63
64
# File 'lib/google/cloud/compute/v1/images/rest/grpc_transcoding.rb', line 58

def transcode_get request_pb
  uri = "/compute/v1/projects/#{request_pb.project}/global/images/#{request_pb.image}"
  body = nil
  query_string_params = {}

  [uri, body, query_string_params]
end

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



70
71
72
73
74
75
76
# File 'lib/google/cloud/compute/v1/images/rest/grpc_transcoding.rb', line 70

def transcode_get_from_family request_pb
  uri = "/compute/v1/projects/#{request_pb.project}/global/images/family/#{request_pb.family}"
  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



82
83
84
85
86
87
88
89
# File 'lib/google/cloud/compute/v1/images/rest/grpc_transcoding.rb', line 82

def transcode_get_iam_policy request_pb
  uri = "/compute/v1/projects/#{request_pb.project}/global/images/#{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



95
96
97
98
99
100
101
102
103
# File 'lib/google/cloud/compute/v1/images/rest/grpc_transcoding.rb', line 95

def transcode_insert request_pb
  uri = "/compute/v1/projects/#{request_pb.project}/global/images"
  body = request_pb.image_resource.to_json
  query_string_params = {}
  query_string_params["forceCreate"] = request_pb.force_create.to_s if request_pb.has_force_create?
  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



109
110
111
112
113
114
115
116
117
118
119
120
# File 'lib/google/cloud/compute/v1/images/rest/grpc_transcoding.rb', line 109

def transcode_list request_pb
  uri = "/compute/v1/projects/#{request_pb.project}/global/images"
  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



126
127
128
129
130
131
132
133
# File 'lib/google/cloud/compute/v1/images/rest/grpc_transcoding.rb', line 126

def transcode_patch request_pb
  uri = "/compute/v1/projects/#{request_pb.project}/global/images/#{request_pb.image}"
  body = request_pb.image_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_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



139
140
141
142
143
144
145
# File 'lib/google/cloud/compute/v1/images/rest/grpc_transcoding.rb', line 139

def transcode_set_iam_policy request_pb
  uri = "/compute/v1/projects/#{request_pb.project}/global/images/#{request_pb.resource}/setIamPolicy"
  body = request_pb.global_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



151
152
153
154
155
156
157
# File 'lib/google/cloud/compute/v1/images/rest/grpc_transcoding.rb', line 151

def transcode_set_labels request_pb
  uri = "/compute/v1/projects/#{request_pb.project}/global/images/#{request_pb.resource}/setLabels"
  body = request_pb.global_set_labels_request_resource.to_json
  query_string_params = {}

  [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



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

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

  [uri, body, query_string_params]
end