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

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

Overview

GRPC transcoding helper methods for the Routers 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/routers/rest/grpc_transcoding.rb', line 32

def transcode_aggregated_list request_pb
  uri = "/compute/v1/projects/#{request_pb.project}/aggregated/routers"
  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/routers/rest/grpc_transcoding.rb', line 50

def transcode_delete request_pb
  uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/routers/#{request_pb.router}"
  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_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



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

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

  [uri, body, query_string_params]
end

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



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

def transcode_get_nat_mapping_info request_pb
  uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/routers/#{request_pb.router}/getNatMappingInfo"
  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_get_router_status(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



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

def transcode_get_router_status request_pb
  uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/routers/#{request_pb.router}/getRouterStatus"
  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



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

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



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

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



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

def transcode_patch request_pb
  uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/routers/#{request_pb.router}"
  body = request_pb.router_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_preview(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



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

def transcode_preview request_pb
  uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/routers/#{request_pb.router}/preview"
  body = request_pb.router_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



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

def transcode_update request_pb
  uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/routers/#{request_pb.router}"
  body = request_pb.router_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