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

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

Overview

GRPC transcoding helper methods for the FirewallPolicies REST API.

Instance Method Summary collapse

Instance Method Details

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

def transcode_add_association request_pb
  uri = "/compute/v1/locations/global/firewallPolicies/#{request_pb.firewall_policy}/addAssociation"
  body = request_pb.firewall_policy_association_resource.to_json
  query_string_params = {}

  [uri, body, query_string_params]
end

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



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

def transcode_add_rule request_pb
  uri = "/compute/v1/locations/global/firewallPolicies/#{request_pb.firewall_policy}/addRule"
  body = request_pb.firewall_policy_rule_resource.to_json
  query_string_params = {}

  [uri, body, query_string_params]
end

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



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

def transcode_clone_rules request_pb
  uri = "/compute/v1/locations/global/firewallPolicies/#{request_pb.firewall_policy}/cloneRules"
  body = nil
  query_string_params = {}
  query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
  query_string_params["sourceFirewallPolicy"] = request_pb.source_firewall_policy.to_s if request_pb.has_source_firewall_policy?

  [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



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

def transcode_delete request_pb
  uri = "/compute/v1/locations/global/firewallPolicies/#{request_pb.firewall_policy}"
  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



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

def transcode_get request_pb
  uri = "/compute/v1/locations/global/firewallPolicies/#{request_pb.firewall_policy}"
  body = nil
  query_string_params = {}

  [uri, body, query_string_params]
end

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

def transcode_get_association request_pb
  uri = "/compute/v1/locations/global/firewallPolicies/#{request_pb.firewall_policy}/getAssociation"
  body = nil
  query_string_params = {}
  query_string_params["name"] = request_pb.name.to_s if request_pb.has_name?

  [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



108
109
110
111
112
113
114
115
# File 'lib/google/cloud/compute/v1/firewall_policies/rest/grpc_transcoding.rb', line 108

def transcode_get_iam_policy request_pb
  uri = "/compute/v1/locations/global/firewallPolicies/#{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_rule(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



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

def transcode_get_rule request_pb
  uri = "/compute/v1/locations/global/firewallPolicies/#{request_pb.firewall_policy}/getRule"
  body = nil
  query_string_params = {}
  query_string_params["priority"] = request_pb.priority.to_s if request_pb.has_priority?

  [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



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

def transcode_insert request_pb
  uri = "/compute/v1/locations/global/firewallPolicies"
  body = request_pb.firewall_policy_resource.to_json
  query_string_params = {}

  [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



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

def transcode_list request_pb
  uri = "/compute/v1/locations/global/firewallPolicies"
  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["parentId"] = request_pb.parent_id.to_s if request_pb.has_parent_id?
  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_associations(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



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

def transcode_list_associations request_pb
  uri = "/compute/v1/locations/global/firewallPolicies/listAssociations"
  body = nil
  query_string_params = {}
  query_string_params["targetResource"] = request_pb.target_resource.to_s if request_pb.has_target_resource?

  [uri, body, query_string_params]
end

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



177
178
179
180
181
182
183
184
185
# File 'lib/google/cloud/compute/v1/firewall_policies/rest/grpc_transcoding.rb', line 177

def transcode_move request_pb
  uri = "/compute/v1/locations/global/firewallPolicies/#{request_pb.firewall_policy}/move"
  body = nil
  query_string_params = {}
  query_string_params["parentId"] = request_pb.parent_id.to_s if request_pb.has_parent_id?
  query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?

  [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



191
192
193
194
195
196
197
# File 'lib/google/cloud/compute/v1/firewall_policies/rest/grpc_transcoding.rb', line 191

def transcode_patch request_pb
  uri = "/compute/v1/locations/global/firewallPolicies/#{request_pb.firewall_policy}"
  body = request_pb.firewall_policy_resource.to_json
  query_string_params = {}

  [uri, body, query_string_params]
end

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



203
204
205
206
207
208
209
# File 'lib/google/cloud/compute/v1/firewall_policies/rest/grpc_transcoding.rb', line 203

def transcode_patch_rule request_pb
  uri = "/compute/v1/locations/global/firewallPolicies/#{request_pb.firewall_policy}/patchRule"
  body = request_pb.firewall_policy_rule_resource.to_json
  query_string_params = {}

  [uri, body, query_string_params]
end

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



215
216
217
218
219
220
221
222
223
# File 'lib/google/cloud/compute/v1/firewall_policies/rest/grpc_transcoding.rb', line 215

def transcode_remove_association request_pb
  uri = "/compute/v1/locations/global/firewallPolicies/#{request_pb.firewall_policy}/removeAssociation"
  body = nil
  query_string_params = {}
  query_string_params["name"] = request_pb.name.to_s if request_pb.has_name?
  query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?

  [uri, body, query_string_params]
end

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



229
230
231
232
233
234
235
236
237
# File 'lib/google/cloud/compute/v1/firewall_policies/rest/grpc_transcoding.rb', line 229

def transcode_remove_rule request_pb
  uri = "/compute/v1/locations/global/firewallPolicies/#{request_pb.firewall_policy}/removeRule"
  body = nil
  query_string_params = {}
  query_string_params["priority"] = request_pb.priority.to_s if request_pb.has_priority?
  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



243
244
245
246
247
248
249
# File 'lib/google/cloud/compute/v1/firewall_policies/rest/grpc_transcoding.rb', line 243

def transcode_set_iam_policy request_pb
  uri = "/compute/v1/locations/global/firewallPolicies/#{request_pb.resource}/setIamPolicy"
  body = request_pb.global_organization_set_policy_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



255
256
257
258
259
260
261
# File 'lib/google/cloud/compute/v1/firewall_policies/rest/grpc_transcoding.rb', line 255

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

  [uri, body, query_string_params]
end