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

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

Overview

GRPC transcoding helper methods for the NodeGroups REST API.

Instance Method Summary collapse

Instance Method Details

#transcode_add_nodes(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/node_groups/rest/grpc_transcoding.rb', line 32

def transcode_add_nodes request_pb
  uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/nodeGroups/#{request_pb.node_group}/addNodes"
  body = request_pb.node_groups_add_nodes_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



45
46
47
48
49
50
51
52
53
54
55
56
57
# File 'lib/google/cloud/compute/v1/node_groups/rest/grpc_transcoding.rb', line 45

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



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

def transcode_delete request_pb
  uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/nodeGroups/#{request_pb.node_group}"
  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_nodes(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
83
# File 'lib/google/cloud/compute/v1/node_groups/rest/grpc_transcoding.rb', line 76

def transcode_delete_nodes request_pb
  uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/nodeGroups/#{request_pb.node_group}/deleteNodes"
  body = request_pb.node_groups_delete_nodes_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



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

def transcode_get request_pb
  uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/nodeGroups/#{request_pb.node_group}"
  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



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

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



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

def transcode_insert request_pb
  uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/nodeGroups"
  body = request_pb.node_group_resource.to_json
  query_string_params = {}
  query_string_params["initialNodeCount"] = request_pb.initial_node_count.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_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



128
129
130
131
132
133
134
135
136
137
138
139
# File 'lib/google/cloud/compute/v1/node_groups/rest/grpc_transcoding.rb', line 128

def transcode_list request_pb
  uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/nodeGroups"
  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_nodes(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
154
155
156
# File 'lib/google/cloud/compute/v1/node_groups/rest/grpc_transcoding.rb', line 145

def transcode_list_nodes request_pb
  uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/nodeGroups/#{request_pb.node_group}/listNodes"
  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



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

def transcode_patch request_pb
  uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/nodeGroups/#{request_pb.node_group}"
  body = request_pb.node_group_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



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

def transcode_set_iam_policy request_pb
  uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/nodeGroups/#{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_node_template(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
194
# File 'lib/google/cloud/compute/v1/node_groups/rest/grpc_transcoding.rb', line 187

def transcode_set_node_template request_pb
  uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/nodeGroups/#{request_pb.node_group}/setNodeTemplate"
  body = request_pb.node_groups_set_node_template_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



200
201
202
203
204
205
206
# File 'lib/google/cloud/compute/v1/node_groups/rest/grpc_transcoding.rb', line 200

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

  [uri, body, query_string_params]
end