google-cloud-compute-v1 1.4.0 → 1.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (174) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +5 -5
  3. data/lib/google/cloud/compute/v1/accelerator_types/rest/service_stub.rb +90 -52
  4. data/lib/google/cloud/compute/v1/accelerator_types.rb +5 -0
  5. data/lib/google/cloud/compute/v1/addresses/rest/service_stub.rb +156 -89
  6. data/lib/google/cloud/compute/v1/addresses.rb +3 -0
  7. data/lib/google/cloud/compute/v1/autoscalers/rest/service_stub.rb +222 -129
  8. data/lib/google/cloud/compute/v1/autoscalers.rb +3 -0
  9. data/lib/google/cloud/compute/v1/backend_buckets/rest/service_stub.rb +285 -161
  10. data/lib/google/cloud/compute/v1/backend_buckets.rb +3 -0
  11. data/lib/google/cloud/compute/v1/backend_services/rest/service_stub.rb +383 -221
  12. data/lib/google/cloud/compute/v1/backend_services.rb +3 -0
  13. data/lib/google/cloud/compute/v1/disk_types/rest/service_stub.rb +90 -52
  14. data/lib/google/cloud/compute/v1/disk_types.rb +3 -0
  15. data/lib/google/cloud/compute/v1/disks/rest/service_stub.rb +429 -240
  16. data/lib/google/cloud/compute/v1/disks.rb +3 -0
  17. data/lib/google/cloud/compute/v1/external_vpn_gateways/rest/service_stub.rb +189 -102
  18. data/lib/google/cloud/compute/v1/external_vpn_gateways.rb +3 -0
  19. data/lib/google/cloud/compute/v1/firewall_policies/rest/service_stub.rb +555 -330
  20. data/lib/google/cloud/compute/v1/firewall_policies.rb +3 -0
  21. data/lib/google/cloud/compute/v1/firewalls/rest/service_stub.rb +187 -104
  22. data/lib/google/cloud/compute/v1/firewalls.rb +3 -0
  23. data/lib/google/cloud/compute/v1/forwarding_rules/rest/service_stub.rb +258 -146
  24. data/lib/google/cloud/compute/v1/forwarding_rules.rb +3 -0
  25. data/lib/google/cloud/compute/v1/global_addresses/rest/service_stub.rb +121 -66
  26. data/lib/google/cloud/compute/v1/global_addresses.rb +3 -0
  27. data/lib/google/cloud/compute/v1/global_forwarding_rules/rest/service_stub.rb +221 -122
  28. data/lib/google/cloud/compute/v1/global_forwarding_rules.rb +3 -0
  29. data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest/service_stub.rb +219 -126
  30. data/lib/google/cloud/compute/v1/global_network_endpoint_groups.rb +3 -0
  31. data/lib/google/cloud/compute/v1/global_operations/rest/service_stub.rb +154 -86
  32. data/lib/google/cloud/compute/v1/global_operations.rb +3 -0
  33. data/lib/google/cloud/compute/v1/global_organization_operations/rest/service_stub.rb +84 -49
  34. data/lib/google/cloud/compute/v1/global_organization_operations.rb +3 -0
  35. data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest/service_stub.rb +154 -85
  36. data/lib/google/cloud/compute/v1/global_public_delegated_prefixes.rb +3 -0
  37. data/lib/google/cloud/compute/v1/health_checks/rest/service_stub.rb +218 -127
  38. data/lib/google/cloud/compute/v1/health_checks.rb +3 -0
  39. data/lib/google/cloud/compute/v1/image_family_views/rest/service_stub.rb +27 -7
  40. data/lib/google/cloud/compute/v1/image_family_views.rb +3 -0
  41. data/lib/google/cloud/compute/v1/images/rest/service_stub.rb +354 -194
  42. data/lib/google/cloud/compute/v1/images.rb +3 -0
  43. data/lib/google/cloud/compute/v1/instance_group_managers/rest/service_stub.rb +664 -381
  44. data/lib/google/cloud/compute/v1/instance_group_managers.rb +3 -0
  45. data/lib/google/cloud/compute/v1/instance_groups/rest/service_stub.rb +292 -169
  46. data/lib/google/cloud/compute/v1/instance_groups.rb +3 -0
  47. data/lib/google/cloud/compute/v1/instance_templates/rest/service_stub.rb +221 -120
  48. data/lib/google/cloud/compute/v1/instance_templates.rb +3 -0
  49. data/lib/google/cloud/compute/v1/instances/rest/service_stub.rb +1503 -845
  50. data/lib/google/cloud/compute/v1/instances.rb +3 -0
  51. data/lib/google/cloud/compute/v1/interconnect_attachments/rest/service_stub.rb +190 -109
  52. data/lib/google/cloud/compute/v1/interconnect_attachments.rb +3 -0
  53. data/lib/google/cloud/compute/v1/interconnect_locations/rest/service_stub.rb +57 -29
  54. data/lib/google/cloud/compute/v1/interconnect_locations.rb +3 -0
  55. data/lib/google/cloud/compute/v1/interconnects/rest/service_stub.rb +187 -102
  56. data/lib/google/cloud/compute/v1/interconnects.rb +3 -0
  57. data/lib/google/cloud/compute/v1/license_codes/rest/service_stub.rb +60 -25
  58. data/lib/google/cloud/compute/v1/license_codes.rb +3 -0
  59. data/lib/google/cloud/compute/v1/licenses/rest/service_stub.rb +221 -120
  60. data/lib/google/cloud/compute/v1/licenses.rb +3 -0
  61. data/lib/google/cloud/compute/v1/machine_images/rest/service_stub.rb +221 -121
  62. data/lib/google/cloud/compute/v1/machine_images.rb +3 -0
  63. data/lib/google/cloud/compute/v1/machine_types/rest/service_stub.rb +90 -52
  64. data/lib/google/cloud/compute/v1/machine_types.rb +3 -0
  65. data/lib/google/cloud/compute/v1/network_edge_security_services/rest/service_stub.rb +158 -89
  66. data/lib/google/cloud/compute/v1/network_edge_security_services.rb +3 -0
  67. data/lib/google/cloud/compute/v1/network_endpoint_groups/rest/service_stub.rb +293 -168
  68. data/lib/google/cloud/compute/v1/network_endpoint_groups.rb +3 -0
  69. data/lib/google/cloud/compute/v1/network_firewall_policies/rest/service_stub.rb +513 -293
  70. data/lib/google/cloud/compute/v1/network_firewall_policies.rb +3 -0
  71. data/lib/google/cloud/compute/v1/networks/rest/service_stub.rb +350 -202
  72. data/lib/google/cloud/compute/v1/networks.rb +3 -0
  73. data/lib/google/cloud/compute/v1/node_groups/rest/service_stub.rb +428 -242
  74. data/lib/google/cloud/compute/v1/node_groups.rb +3 -0
  75. data/lib/google/cloud/compute/v1/node_templates/rest/service_stub.rb +259 -143
  76. data/lib/google/cloud/compute/v1/node_templates.rb +3 -0
  77. data/lib/google/cloud/compute/v1/node_types/rest/service_stub.rb +90 -52
  78. data/lib/google/cloud/compute/v1/node_types.rb +3 -0
  79. data/lib/google/cloud/compute/v1/packet_mirrorings/rest/service_stub.rb +225 -126
  80. data/lib/google/cloud/compute/v1/packet_mirrorings.rb +3 -0
  81. data/lib/google/cloud/compute/v1/projects/rest/service_stub.rb +406 -238
  82. data/lib/google/cloud/compute/v1/projects.rb +3 -0
  83. data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/service_stub.rb +154 -85
  84. data/lib/google/cloud/compute/v1/public_advertised_prefixes.rb +3 -0
  85. data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/service_stub.rb +190 -108
  86. data/lib/google/cloud/compute/v1/public_delegated_prefixes.rb +3 -0
  87. data/lib/google/cloud/compute/v1/region_autoscalers/rest/service_stub.rb +191 -106
  88. data/lib/google/cloud/compute/v1/region_autoscalers.rb +3 -0
  89. data/lib/google/cloud/compute/v1/region_backend_services/rest/service_stub.rb +228 -122
  90. data/lib/google/cloud/compute/v1/region_backend_services.rb +3 -0
  91. data/lib/google/cloud/compute/v1/region_commitments/rest/service_stub.rb +157 -92
  92. data/lib/google/cloud/compute/v1/region_commitments.rb +3 -0
  93. data/lib/google/cloud/compute/v1/region_disk_types/rest/service_stub.rb +59 -29
  94. data/lib/google/cloud/compute/v1/region_disk_types.rb +3 -0
  95. data/lib/google/cloud/compute/v1/region_disks/rest/service_stub.rb +398 -216
  96. data/lib/google/cloud/compute/v1/region_disks.rb +3 -0
  97. data/lib/google/cloud/compute/v1/region_health_check_services/rest/service_stub.rb +159 -85
  98. data/lib/google/cloud/compute/v1/region_health_check_services.rb +3 -0
  99. data/lib/google/cloud/compute/v1/region_health_checks/rest/service_stub.rb +193 -104
  100. data/lib/google/cloud/compute/v1/region_health_checks.rb +3 -0
  101. data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/service_stub.rb +633 -358
  102. data/lib/google/cloud/compute/v1/region_instance_group_managers.rb +3 -0
  103. data/lib/google/cloud/compute/v1/region_instance_groups/rest/service_stub.rb +127 -71
  104. data/lib/google/cloud/compute/v1/region_instance_groups.rb +3 -0
  105. data/lib/google/cloud/compute/v1/region_instances/rest/service_stub.rb +26 -9
  106. data/lib/google/cloud/compute/v1/region_instances.rb +3 -0
  107. data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/service_stub.rb +125 -66
  108. data/lib/google/cloud/compute/v1/region_network_endpoint_groups.rb +3 -0
  109. data/lib/google/cloud/compute/v1/region_network_firewall_policies/rest/service_stub.rb +561 -311
  110. data/lib/google/cloud/compute/v1/region_network_firewall_policies.rb +3 -0
  111. data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/service_stub.rb +125 -66
  112. data/lib/google/cloud/compute/v1/region_notification_endpoints.rb +3 -0
  113. data/lib/google/cloud/compute/v1/region_operations/rest/service_stub.rb +127 -63
  114. data/lib/google/cloud/compute/v1/region_operations.rb +3 -0
  115. data/lib/google/cloud/compute/v1/region_security_policies/rest/service_stub.rb +159 -86
  116. data/lib/google/cloud/compute/v1/region_security_policies.rb +3 -0
  117. data/lib/google/cloud/compute/v1/region_ssl_certificates/rest/service_stub.rb +125 -66
  118. data/lib/google/cloud/compute/v1/region_ssl_certificates.rb +3 -0
  119. data/lib/google/cloud/compute/v1/region_target_http_proxies/rest/service_stub.rb +159 -85
  120. data/lib/google/cloud/compute/v1/region_target_http_proxies.rb +3 -0
  121. data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/service_stub.rb +227 -123
  122. data/lib/google/cloud/compute/v1/region_target_https_proxies.rb +3 -0
  123. data/lib/google/cloud/compute/v1/region_url_maps/rest/service_stub.rb +228 -122
  124. data/lib/google/cloud/compute/v1/region_url_maps.rb +3 -0
  125. data/lib/google/cloud/compute/v1/regions/rest/service_stub.rb +57 -29
  126. data/lib/google/cloud/compute/v1/regions.rb +3 -0
  127. data/lib/google/cloud/compute/v1/reservations/rest/service_stub.rb +327 -183
  128. data/lib/google/cloud/compute/v1/reservations.rb +3 -0
  129. data/lib/google/cloud/compute/v1/resource_policies/rest/service_stub.rb +259 -143
  130. data/lib/google/cloud/compute/v1/resource_policies.rb +3 -0
  131. data/lib/google/cloud/compute/v1/routers/rest/service_stub.rb +326 -184
  132. data/lib/google/cloud/compute/v1/routers.rb +3 -0
  133. data/lib/google/cloud/compute/v1/routes/rest/service_stub.rb +121 -66
  134. data/lib/google/cloud/compute/v1/routes.rb +3 -0
  135. data/lib/google/cloud/compute/v1/security_policies/rest/service_stub.rb +346 -206
  136. data/lib/google/cloud/compute/v1/security_policies.rb +3 -0
  137. data/lib/google/cloud/compute/v1/service_attachments/rest/service_stub.rb +293 -162
  138. data/lib/google/cloud/compute/v1/service_attachments.rb +3 -0
  139. data/lib/google/cloud/compute/v1/snapshots/rest/service_stub.rb +255 -138
  140. data/lib/google/cloud/compute/v1/snapshots.rb +3 -0
  141. data/lib/google/cloud/compute/v1/ssl_certificates/rest/service_stub.rb +152 -89
  142. data/lib/google/cloud/compute/v1/ssl_certificates.rb +3 -0
  143. data/lib/google/cloud/compute/v1/ssl_policies/rest/service_stub.rb +185 -107
  144. data/lib/google/cloud/compute/v1/ssl_policies.rb +3 -0
  145. data/lib/google/cloud/compute/v1/subnetworks/rest/service_stub.rb +392 -223
  146. data/lib/google/cloud/compute/v1/subnetworks.rb +3 -0
  147. data/lib/google/cloud/compute/v1/target_grpc_proxies/rest/service_stub.rb +154 -85
  148. data/lib/google/cloud/compute/v1/target_grpc_proxies.rb +3 -0
  149. data/lib/google/cloud/compute/v1/target_http_proxies/rest/service_stub.rb +218 -127
  150. data/lib/google/cloud/compute/v1/target_http_proxies.rb +3 -0
  151. data/lib/google/cloud/compute/v1/target_https_proxies/rest/service_stub.rb +350 -203
  152. data/lib/google/cloud/compute/v1/target_https_proxies.rb +3 -0
  153. data/lib/google/cloud/compute/v1/target_instances/rest/service_stub.rb +156 -89
  154. data/lib/google/cloud/compute/v1/target_instances.rb +3 -0
  155. data/lib/google/cloud/compute/v1/target_pools/rest/service_stub.rb +361 -203
  156. data/lib/google/cloud/compute/v1/target_pools.rb +3 -0
  157. data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/service_stub.rb +286 -161
  158. data/lib/google/cloud/compute/v1/target_ssl_proxies.rb +3 -0
  159. data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/service_stub.rb +187 -104
  160. data/lib/google/cloud/compute/v1/target_tcp_proxies.rb +3 -0
  161. data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/service_stub.rb +156 -89
  162. data/lib/google/cloud/compute/v1/target_vpn_gateways.rb +3 -0
  163. data/lib/google/cloud/compute/v1/url_maps/rest/service_stub.rb +285 -164
  164. data/lib/google/cloud/compute/v1/url_maps.rb +3 -0
  165. data/lib/google/cloud/compute/v1/version.rb +1 -1
  166. data/lib/google/cloud/compute/v1/vpn_gateways/rest/service_stub.rb +259 -143
  167. data/lib/google/cloud/compute/v1/vpn_gateways.rb +3 -0
  168. data/lib/google/cloud/compute/v1/vpn_tunnels/rest/service_stub.rb +156 -89
  169. data/lib/google/cloud/compute/v1/vpn_tunnels.rb +3 -0
  170. data/lib/google/cloud/compute/v1/zone_operations/rest/service_stub.rb +127 -63
  171. data/lib/google/cloud/compute/v1/zone_operations.rb +3 -0
  172. data/lib/google/cloud/compute/v1/zones/rest/service_stub.rb +57 -29
  173. data/lib/google/cloud/compute/v1/zones.rb +3 -0
  174. metadata +11 -11
@@ -55,10 +55,17 @@ module Google
55
55
  def add_nodes request_pb, options = nil
56
56
  raise ::ArgumentError, "request must be provided" if request_pb.nil?
57
57
 
58
- uri, body, query_string_params = transcode_add_nodes_request request_pb
59
- response = @client_stub.make_post_request(
58
+ verb, uri, query_string_params, body = transcode_add_nodes_request request_pb
59
+ query_string_params = if query_string_params.any?
60
+ query_string_params.to_h { |p| p.split("=", 2) }
61
+ else
62
+ {}
63
+ end
64
+
65
+ response = @client_stub.make_http_request(
66
+ verb,
60
67
  uri: uri,
61
- body: body,
68
+ body: body || "",
62
69
  params: query_string_params,
63
70
  options: options
64
71
  )
@@ -68,22 +75,6 @@ module Google
68
75
  result
69
76
  end
70
77
 
71
- ##
72
- # GRPC transcoding helper method for the add_nodes REST call
73
- #
74
- # @param request_pb [::Google::Cloud::Compute::V1::AddNodesNodeGroupRequest]
75
- # A request object representing the call parameters. Required.
76
- # @return [Array(String, [String, nil], Hash{String => String})]
77
- # Uri, Body, Query string parameters
78
- def transcode_add_nodes_request request_pb
79
- uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/nodeGroups/#{request_pb.node_group}/addNodes"
80
- body = request_pb.node_groups_add_nodes_request_resource.to_json
81
- query_string_params = {}
82
- query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
83
-
84
- [uri, body, query_string_params]
85
- end
86
-
87
78
  ##
88
79
  # Baseline implementation for the aggregated_list REST call
89
80
  #
@@ -101,9 +92,17 @@ module Google
101
92
  def aggregated_list request_pb, options = nil
102
93
  raise ::ArgumentError, "request must be provided" if request_pb.nil?
103
94
 
104
- uri, _body, query_string_params = transcode_aggregated_list_request request_pb
105
- response = @client_stub.make_get_request(
95
+ verb, uri, query_string_params, body = transcode_aggregated_list_request request_pb
96
+ query_string_params = if query_string_params.any?
97
+ query_string_params.to_h { |p| p.split("=", 2) }
98
+ else
99
+ {}
100
+ end
101
+
102
+ response = @client_stub.make_http_request(
103
+ verb,
106
104
  uri: uri,
105
+ body: body || "",
107
106
  params: query_string_params,
108
107
  options: options
109
108
  )
@@ -113,27 +112,6 @@ module Google
113
112
  result
114
113
  end
115
114
 
116
- ##
117
- # GRPC transcoding helper method for the aggregated_list REST call
118
- #
119
- # @param request_pb [::Google::Cloud::Compute::V1::AggregatedListNodeGroupsRequest]
120
- # A request object representing the call parameters. Required.
121
- # @return [Array(String, [String, nil], Hash{String => String})]
122
- # Uri, Body, Query string parameters
123
- def transcode_aggregated_list_request request_pb
124
- uri = "/compute/v1/projects/#{request_pb.project}/aggregated/nodeGroups"
125
- body = nil
126
- query_string_params = {}
127
- query_string_params["filter"] = request_pb.filter.to_s if request_pb.has_filter?
128
- query_string_params["includeAllScopes"] = request_pb.include_all_scopes.to_s if request_pb.has_include_all_scopes?
129
- query_string_params["maxResults"] = request_pb.max_results.to_s if request_pb.has_max_results?
130
- query_string_params["orderBy"] = request_pb.order_by.to_s if request_pb.has_order_by?
131
- query_string_params["pageToken"] = request_pb.page_token.to_s if request_pb.has_page_token?
132
- query_string_params["returnPartialSuccess"] = request_pb.return_partial_success.to_s if request_pb.has_return_partial_success?
133
-
134
- [uri, body, query_string_params]
135
- end
136
-
137
115
  ##
138
116
  # Baseline implementation for the delete REST call
139
117
  #
@@ -151,9 +129,17 @@ module Google
151
129
  def delete request_pb, options = nil
152
130
  raise ::ArgumentError, "request must be provided" if request_pb.nil?
153
131
 
154
- uri, _body, query_string_params = transcode_delete_request request_pb
155
- response = @client_stub.make_delete_request(
132
+ verb, uri, query_string_params, body = transcode_delete_request request_pb
133
+ query_string_params = if query_string_params.any?
134
+ query_string_params.to_h { |p| p.split("=", 2) }
135
+ else
136
+ {}
137
+ end
138
+
139
+ response = @client_stub.make_http_request(
140
+ verb,
156
141
  uri: uri,
142
+ body: body || "",
157
143
  params: query_string_params,
158
144
  options: options
159
145
  )
@@ -163,22 +149,6 @@ module Google
163
149
  result
164
150
  end
165
151
 
166
- ##
167
- # GRPC transcoding helper method for the delete REST call
168
- #
169
- # @param request_pb [::Google::Cloud::Compute::V1::DeleteNodeGroupRequest]
170
- # A request object representing the call parameters. Required.
171
- # @return [Array(String, [String, nil], Hash{String => String})]
172
- # Uri, Body, Query string parameters
173
- def transcode_delete_request request_pb
174
- uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/nodeGroups/#{request_pb.node_group}"
175
- body = nil
176
- query_string_params = {}
177
- query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
178
-
179
- [uri, body, query_string_params]
180
- end
181
-
182
152
  ##
183
153
  # Baseline implementation for the delete_nodes REST call
184
154
  #
@@ -196,10 +166,17 @@ module Google
196
166
  def delete_nodes request_pb, options = nil
197
167
  raise ::ArgumentError, "request must be provided" if request_pb.nil?
198
168
 
199
- uri, body, query_string_params = transcode_delete_nodes_request request_pb
200
- response = @client_stub.make_post_request(
169
+ verb, uri, query_string_params, body = transcode_delete_nodes_request request_pb
170
+ query_string_params = if query_string_params.any?
171
+ query_string_params.to_h { |p| p.split("=", 2) }
172
+ else
173
+ {}
174
+ end
175
+
176
+ response = @client_stub.make_http_request(
177
+ verb,
201
178
  uri: uri,
202
- body: body,
179
+ body: body || "",
203
180
  params: query_string_params,
204
181
  options: options
205
182
  )
@@ -209,22 +186,6 @@ module Google
209
186
  result
210
187
  end
211
188
 
212
- ##
213
- # GRPC transcoding helper method for the delete_nodes REST call
214
- #
215
- # @param request_pb [::Google::Cloud::Compute::V1::DeleteNodesNodeGroupRequest]
216
- # A request object representing the call parameters. Required.
217
- # @return [Array(String, [String, nil], Hash{String => String})]
218
- # Uri, Body, Query string parameters
219
- def transcode_delete_nodes_request request_pb
220
- uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/nodeGroups/#{request_pb.node_group}/deleteNodes"
221
- body = request_pb.node_groups_delete_nodes_request_resource.to_json
222
- query_string_params = {}
223
- query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
224
-
225
- [uri, body, query_string_params]
226
- end
227
-
228
189
  ##
229
190
  # Baseline implementation for the get REST call
230
191
  #
@@ -242,9 +203,18 @@ module Google
242
203
  def get request_pb, options = nil
243
204
  raise ::ArgumentError, "request must be provided" if request_pb.nil?
244
205
 
245
- uri, _body, _query_string_params = transcode_get_request request_pb
246
- response = @client_stub.make_get_request(
206
+ verb, uri, query_string_params, body = transcode_get_request request_pb
207
+ query_string_params = if query_string_params.any?
208
+ query_string_params.to_h { |p| p.split("=", 2) }
209
+ else
210
+ {}
211
+ end
212
+
213
+ response = @client_stub.make_http_request(
214
+ verb,
247
215
  uri: uri,
216
+ body: body || "",
217
+ params: query_string_params,
248
218
  options: options
249
219
  )
250
220
  result = ::Google::Cloud::Compute::V1::NodeGroup.decode_json response.body, ignore_unknown_fields: true
@@ -253,21 +223,6 @@ module Google
253
223
  result
254
224
  end
255
225
 
256
- ##
257
- # GRPC transcoding helper method for the get REST call
258
- #
259
- # @param request_pb [::Google::Cloud::Compute::V1::GetNodeGroupRequest]
260
- # A request object representing the call parameters. Required.
261
- # @return [Array(String, [String, nil], Hash{String => String})]
262
- # Uri, Body, Query string parameters
263
- def transcode_get_request request_pb
264
- uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/nodeGroups/#{request_pb.node_group}"
265
- body = nil
266
- query_string_params = {}
267
-
268
- [uri, body, query_string_params]
269
- end
270
-
271
226
  ##
272
227
  # Baseline implementation for the get_iam_policy REST call
273
228
  #
@@ -285,9 +240,17 @@ module Google
285
240
  def get_iam_policy request_pb, options = nil
286
241
  raise ::ArgumentError, "request must be provided" if request_pb.nil?
287
242
 
288
- uri, _body, query_string_params = transcode_get_iam_policy_request request_pb
289
- response = @client_stub.make_get_request(
243
+ verb, uri, query_string_params, body = transcode_get_iam_policy_request request_pb
244
+ query_string_params = if query_string_params.any?
245
+ query_string_params.to_h { |p| p.split("=", 2) }
246
+ else
247
+ {}
248
+ end
249
+
250
+ response = @client_stub.make_http_request(
251
+ verb,
290
252
  uri: uri,
253
+ body: body || "",
291
254
  params: query_string_params,
292
255
  options: options
293
256
  )
@@ -297,22 +260,6 @@ module Google
297
260
  result
298
261
  end
299
262
 
300
- ##
301
- # GRPC transcoding helper method for the get_iam_policy REST call
302
- #
303
- # @param request_pb [::Google::Cloud::Compute::V1::GetIamPolicyNodeGroupRequest]
304
- # A request object representing the call parameters. Required.
305
- # @return [Array(String, [String, nil], Hash{String => String})]
306
- # Uri, Body, Query string parameters
307
- def transcode_get_iam_policy_request request_pb
308
- uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/nodeGroups/#{request_pb.resource}/getIamPolicy"
309
- body = nil
310
- query_string_params = {}
311
- query_string_params["optionsRequestedPolicyVersion"] = request_pb.options_requested_policy_version.to_s if request_pb.has_options_requested_policy_version?
312
-
313
- [uri, body, query_string_params]
314
- end
315
-
316
263
  ##
317
264
  # Baseline implementation for the insert REST call
318
265
  #
@@ -330,10 +277,17 @@ module Google
330
277
  def insert request_pb, options = nil
331
278
  raise ::ArgumentError, "request must be provided" if request_pb.nil?
332
279
 
333
- uri, body, query_string_params = transcode_insert_request request_pb
334
- response = @client_stub.make_post_request(
280
+ verb, uri, query_string_params, body = transcode_insert_request request_pb
281
+ query_string_params = if query_string_params.any?
282
+ query_string_params.to_h { |p| p.split("=", 2) }
283
+ else
284
+ {}
285
+ end
286
+
287
+ response = @client_stub.make_http_request(
288
+ verb,
335
289
  uri: uri,
336
- body: body,
290
+ body: body || "",
337
291
  params: query_string_params,
338
292
  options: options
339
293
  )
@@ -343,23 +297,6 @@ module Google
343
297
  result
344
298
  end
345
299
 
346
- ##
347
- # GRPC transcoding helper method for the insert REST call
348
- #
349
- # @param request_pb [::Google::Cloud::Compute::V1::InsertNodeGroupRequest]
350
- # A request object representing the call parameters. Required.
351
- # @return [Array(String, [String, nil], Hash{String => String})]
352
- # Uri, Body, Query string parameters
353
- def transcode_insert_request request_pb
354
- uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/nodeGroups"
355
- body = request_pb.node_group_resource.to_json
356
- query_string_params = {}
357
- query_string_params["initialNodeCount"] = request_pb.initial_node_count.to_s
358
- query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
359
-
360
- [uri, body, query_string_params]
361
- end
362
-
363
300
  ##
364
301
  # Baseline implementation for the list REST call
365
302
  #
@@ -377,9 +314,17 @@ module Google
377
314
  def list request_pb, options = nil
378
315
  raise ::ArgumentError, "request must be provided" if request_pb.nil?
379
316
 
380
- uri, _body, query_string_params = transcode_list_request request_pb
381
- response = @client_stub.make_get_request(
317
+ verb, uri, query_string_params, body = transcode_list_request request_pb
318
+ query_string_params = if query_string_params.any?
319
+ query_string_params.to_h { |p| p.split("=", 2) }
320
+ else
321
+ {}
322
+ end
323
+
324
+ response = @client_stub.make_http_request(
325
+ verb,
382
326
  uri: uri,
327
+ body: body || "",
383
328
  params: query_string_params,
384
329
  options: options
385
330
  )
@@ -389,26 +334,6 @@ module Google
389
334
  result
390
335
  end
391
336
 
392
- ##
393
- # GRPC transcoding helper method for the list REST call
394
- #
395
- # @param request_pb [::Google::Cloud::Compute::V1::ListNodeGroupsRequest]
396
- # A request object representing the call parameters. Required.
397
- # @return [Array(String, [String, nil], Hash{String => String})]
398
- # Uri, Body, Query string parameters
399
- def transcode_list_request request_pb
400
- uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/nodeGroups"
401
- body = nil
402
- query_string_params = {}
403
- query_string_params["filter"] = request_pb.filter.to_s if request_pb.has_filter?
404
- query_string_params["maxResults"] = request_pb.max_results.to_s if request_pb.has_max_results?
405
- query_string_params["orderBy"] = request_pb.order_by.to_s if request_pb.has_order_by?
406
- query_string_params["pageToken"] = request_pb.page_token.to_s if request_pb.has_page_token?
407
- query_string_params["returnPartialSuccess"] = request_pb.return_partial_success.to_s if request_pb.has_return_partial_success?
408
-
409
- [uri, body, query_string_params]
410
- end
411
-
412
337
  ##
413
338
  # Baseline implementation for the list_nodes REST call
414
339
  #
@@ -426,9 +351,17 @@ module Google
426
351
  def list_nodes request_pb, options = nil
427
352
  raise ::ArgumentError, "request must be provided" if request_pb.nil?
428
353
 
429
- uri, _body, query_string_params = transcode_list_nodes_request request_pb
430
- response = @client_stub.make_post_request(
354
+ verb, uri, query_string_params, body = transcode_list_nodes_request request_pb
355
+ query_string_params = if query_string_params.any?
356
+ query_string_params.to_h { |p| p.split("=", 2) }
357
+ else
358
+ {}
359
+ end
360
+
361
+ response = @client_stub.make_http_request(
362
+ verb,
431
363
  uri: uri,
364
+ body: body || "",
432
365
  params: query_string_params,
433
366
  options: options
434
367
  )
@@ -438,26 +371,6 @@ module Google
438
371
  result
439
372
  end
440
373
 
441
- ##
442
- # GRPC transcoding helper method for the list_nodes REST call
443
- #
444
- # @param request_pb [::Google::Cloud::Compute::V1::ListNodesNodeGroupsRequest]
445
- # A request object representing the call parameters. Required.
446
- # @return [Array(String, [String, nil], Hash{String => String})]
447
- # Uri, Body, Query string parameters
448
- def transcode_list_nodes_request request_pb
449
- uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/nodeGroups/#{request_pb.node_group}/listNodes"
450
- body = nil
451
- query_string_params = {}
452
- query_string_params["filter"] = request_pb.filter.to_s if request_pb.has_filter?
453
- query_string_params["maxResults"] = request_pb.max_results.to_s if request_pb.has_max_results?
454
- query_string_params["orderBy"] = request_pb.order_by.to_s if request_pb.has_order_by?
455
- query_string_params["pageToken"] = request_pb.page_token.to_s if request_pb.has_page_token?
456
- query_string_params["returnPartialSuccess"] = request_pb.return_partial_success.to_s if request_pb.has_return_partial_success?
457
-
458
- [uri, body, query_string_params]
459
- end
460
-
461
374
  ##
462
375
  # Baseline implementation for the patch REST call
463
376
  #
@@ -475,10 +388,17 @@ module Google
475
388
  def patch request_pb, options = nil
476
389
  raise ::ArgumentError, "request must be provided" if request_pb.nil?
477
390
 
478
- uri, body, query_string_params = transcode_patch_request request_pb
479
- response = @client_stub.make_patch_request(
391
+ verb, uri, query_string_params, body = transcode_patch_request request_pb
392
+ query_string_params = if query_string_params.any?
393
+ query_string_params.to_h { |p| p.split("=", 2) }
394
+ else
395
+ {}
396
+ end
397
+
398
+ response = @client_stub.make_http_request(
399
+ verb,
480
400
  uri: uri,
481
- body: body,
401
+ body: body || "",
482
402
  params: query_string_params,
483
403
  options: options
484
404
  )
@@ -488,22 +408,6 @@ module Google
488
408
  result
489
409
  end
490
410
 
491
- ##
492
- # GRPC transcoding helper method for the patch REST call
493
- #
494
- # @param request_pb [::Google::Cloud::Compute::V1::PatchNodeGroupRequest]
495
- # A request object representing the call parameters. Required.
496
- # @return [Array(String, [String, nil], Hash{String => String})]
497
- # Uri, Body, Query string parameters
498
- def transcode_patch_request request_pb
499
- uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/nodeGroups/#{request_pb.node_group}"
500
- body = request_pb.node_group_resource.to_json
501
- query_string_params = {}
502
- query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
503
-
504
- [uri, body, query_string_params]
505
- end
506
-
507
411
  ##
508
412
  # Baseline implementation for the set_iam_policy REST call
509
413
  #
@@ -521,10 +425,18 @@ module Google
521
425
  def set_iam_policy request_pb, options = nil
522
426
  raise ::ArgumentError, "request must be provided" if request_pb.nil?
523
427
 
524
- uri, body, _query_string_params = transcode_set_iam_policy_request request_pb
525
- response = @client_stub.make_post_request(
428
+ verb, uri, query_string_params, body = transcode_set_iam_policy_request request_pb
429
+ query_string_params = if query_string_params.any?
430
+ query_string_params.to_h { |p| p.split("=", 2) }
431
+ else
432
+ {}
433
+ end
434
+
435
+ response = @client_stub.make_http_request(
436
+ verb,
526
437
  uri: uri,
527
- body: body,
438
+ body: body || "",
439
+ params: query_string_params,
528
440
  options: options
529
441
  )
530
442
  result = ::Google::Cloud::Compute::V1::Policy.decode_json response.body, ignore_unknown_fields: true
@@ -533,21 +445,6 @@ module Google
533
445
  result
534
446
  end
535
447
 
536
- ##
537
- # GRPC transcoding helper method for the set_iam_policy REST call
538
- #
539
- # @param request_pb [::Google::Cloud::Compute::V1::SetIamPolicyNodeGroupRequest]
540
- # A request object representing the call parameters. Required.
541
- # @return [Array(String, [String, nil], Hash{String => String})]
542
- # Uri, Body, Query string parameters
543
- def transcode_set_iam_policy_request request_pb
544
- uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/nodeGroups/#{request_pb.resource}/setIamPolicy"
545
- body = request_pb.zone_set_policy_request_resource.to_json
546
- query_string_params = {}
547
-
548
- [uri, body, query_string_params]
549
- end
550
-
551
448
  ##
552
449
  # Baseline implementation for the set_node_template REST call
553
450
  #
@@ -565,10 +462,17 @@ module Google
565
462
  def set_node_template request_pb, options = nil
566
463
  raise ::ArgumentError, "request must be provided" if request_pb.nil?
567
464
 
568
- uri, body, query_string_params = transcode_set_node_template_request request_pb
569
- response = @client_stub.make_post_request(
465
+ verb, uri, query_string_params, body = transcode_set_node_template_request request_pb
466
+ query_string_params = if query_string_params.any?
467
+ query_string_params.to_h { |p| p.split("=", 2) }
468
+ else
469
+ {}
470
+ end
471
+
472
+ response = @client_stub.make_http_request(
473
+ verb,
570
474
  uri: uri,
571
- body: body,
475
+ body: body || "",
572
476
  params: query_string_params,
573
477
  options: options
574
478
  )
@@ -578,22 +482,6 @@ module Google
578
482
  result
579
483
  end
580
484
 
581
- ##
582
- # GRPC transcoding helper method for the set_node_template REST call
583
- #
584
- # @param request_pb [::Google::Cloud::Compute::V1::SetNodeTemplateNodeGroupRequest]
585
- # A request object representing the call parameters. Required.
586
- # @return [Array(String, [String, nil], Hash{String => String})]
587
- # Uri, Body, Query string parameters
588
- def transcode_set_node_template_request request_pb
589
- uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/nodeGroups/#{request_pb.node_group}/setNodeTemplate"
590
- body = request_pb.node_groups_set_node_template_request_resource.to_json
591
- query_string_params = {}
592
- query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
593
-
594
- [uri, body, query_string_params]
595
- end
596
-
597
485
  ##
598
486
  # Baseline implementation for the test_iam_permissions REST call
599
487
  #
@@ -611,10 +499,18 @@ module Google
611
499
  def test_iam_permissions request_pb, options = nil
612
500
  raise ::ArgumentError, "request must be provided" if request_pb.nil?
613
501
 
614
- uri, body, _query_string_params = transcode_test_iam_permissions_request request_pb
615
- response = @client_stub.make_post_request(
502
+ verb, uri, query_string_params, body = transcode_test_iam_permissions_request request_pb
503
+ query_string_params = if query_string_params.any?
504
+ query_string_params.to_h { |p| p.split("=", 2) }
505
+ else
506
+ {}
507
+ end
508
+
509
+ response = @client_stub.make_http_request(
510
+ verb,
616
511
  uri: uri,
617
- body: body,
512
+ body: body || "",
513
+ params: query_string_params,
618
514
  options: options
619
515
  )
620
516
  result = ::Google::Cloud::Compute::V1::TestPermissionsResponse.decode_json response.body, ignore_unknown_fields: true
@@ -623,7 +519,290 @@ module Google
623
519
  result
624
520
  end
625
521
 
522
+
523
+ private
524
+
525
+ ##
526
+ # @private
527
+ #
528
+ # GRPC transcoding helper method for the add_nodes REST call
529
+ #
530
+ # @param request_pb [::Google::Cloud::Compute::V1::AddNodesNodeGroupRequest]
531
+ # A request object representing the call parameters. Required.
532
+ # @return [Array(String, [String, nil], Hash{String => String})]
533
+ # Uri, Body, Query string parameters
534
+ def transcode_add_nodes_request request_pb
535
+ transcoder = Gapic::Rest::GrpcTranscoder.new
536
+ .with_bindings(
537
+ uri_method: :post,
538
+ uri_template: "/compute/v1/projects/{project}/zones/{zone}/nodeGroups/{node_group}/addNodes",
539
+ body: "node_groups_add_nodes_request_resource",
540
+ matches: [
541
+ ["project", %r{[^/]+}, false],
542
+ ["zone", %r{[^/]+}, false],
543
+ ["node_group", %r{[^/]+}, false]
544
+ ]
545
+ )
546
+ transcoder.transcode request_pb
547
+ end
548
+
549
+ ##
550
+ # @private
551
+ #
552
+ # GRPC transcoding helper method for the aggregated_list REST call
553
+ #
554
+ # @param request_pb [::Google::Cloud::Compute::V1::AggregatedListNodeGroupsRequest]
555
+ # A request object representing the call parameters. Required.
556
+ # @return [Array(String, [String, nil], Hash{String => String})]
557
+ # Uri, Body, Query string parameters
558
+ def transcode_aggregated_list_request request_pb
559
+ transcoder = Gapic::Rest::GrpcTranscoder.new
560
+ .with_bindings(
561
+ uri_method: :get,
562
+ uri_template: "/compute/v1/projects/{project}/aggregated/nodeGroups",
563
+ matches: [
564
+ ["project", %r{[^/]+}, false]
565
+ ]
566
+ )
567
+ transcoder.transcode request_pb
568
+ end
569
+
570
+ ##
571
+ # @private
572
+ #
573
+ # GRPC transcoding helper method for the delete REST call
574
+ #
575
+ # @param request_pb [::Google::Cloud::Compute::V1::DeleteNodeGroupRequest]
576
+ # A request object representing the call parameters. Required.
577
+ # @return [Array(String, [String, nil], Hash{String => String})]
578
+ # Uri, Body, Query string parameters
579
+ def transcode_delete_request request_pb
580
+ transcoder = Gapic::Rest::GrpcTranscoder.new
581
+ .with_bindings(
582
+ uri_method: :delete,
583
+ uri_template: "/compute/v1/projects/{project}/zones/{zone}/nodeGroups/{node_group}",
584
+ matches: [
585
+ ["project", %r{[^/]+}, false],
586
+ ["zone", %r{[^/]+}, false],
587
+ ["node_group", %r{[^/]+}, false]
588
+ ]
589
+ )
590
+ transcoder.transcode request_pb
591
+ end
592
+
593
+ ##
594
+ # @private
595
+ #
596
+ # GRPC transcoding helper method for the delete_nodes REST call
597
+ #
598
+ # @param request_pb [::Google::Cloud::Compute::V1::DeleteNodesNodeGroupRequest]
599
+ # A request object representing the call parameters. Required.
600
+ # @return [Array(String, [String, nil], Hash{String => String})]
601
+ # Uri, Body, Query string parameters
602
+ def transcode_delete_nodes_request request_pb
603
+ transcoder = Gapic::Rest::GrpcTranscoder.new
604
+ .with_bindings(
605
+ uri_method: :post,
606
+ uri_template: "/compute/v1/projects/{project}/zones/{zone}/nodeGroups/{node_group}/deleteNodes",
607
+ body: "node_groups_delete_nodes_request_resource",
608
+ matches: [
609
+ ["project", %r{[^/]+}, false],
610
+ ["zone", %r{[^/]+}, false],
611
+ ["node_group", %r{[^/]+}, false]
612
+ ]
613
+ )
614
+ transcoder.transcode request_pb
615
+ end
616
+
617
+ ##
618
+ # @private
619
+ #
620
+ # GRPC transcoding helper method for the get REST call
621
+ #
622
+ # @param request_pb [::Google::Cloud::Compute::V1::GetNodeGroupRequest]
623
+ # A request object representing the call parameters. Required.
624
+ # @return [Array(String, [String, nil], Hash{String => String})]
625
+ # Uri, Body, Query string parameters
626
+ def transcode_get_request request_pb
627
+ transcoder = Gapic::Rest::GrpcTranscoder.new
628
+ .with_bindings(
629
+ uri_method: :get,
630
+ uri_template: "/compute/v1/projects/{project}/zones/{zone}/nodeGroups/{node_group}",
631
+ matches: [
632
+ ["project", %r{[^/]+}, false],
633
+ ["zone", %r{[^/]+}, false],
634
+ ["node_group", %r{[^/]+}, false]
635
+ ]
636
+ )
637
+ transcoder.transcode request_pb
638
+ end
639
+
640
+ ##
641
+ # @private
642
+ #
643
+ # GRPC transcoding helper method for the get_iam_policy REST call
644
+ #
645
+ # @param request_pb [::Google::Cloud::Compute::V1::GetIamPolicyNodeGroupRequest]
646
+ # A request object representing the call parameters. Required.
647
+ # @return [Array(String, [String, nil], Hash{String => String})]
648
+ # Uri, Body, Query string parameters
649
+ def transcode_get_iam_policy_request request_pb
650
+ transcoder = Gapic::Rest::GrpcTranscoder.new
651
+ .with_bindings(
652
+ uri_method: :get,
653
+ uri_template: "/compute/v1/projects/{project}/zones/{zone}/nodeGroups/{resource}/getIamPolicy",
654
+ matches: [
655
+ ["project", %r{[^/]+}, false],
656
+ ["zone", %r{[^/]+}, false],
657
+ ["resource", %r{[^/]+}, false]
658
+ ]
659
+ )
660
+ transcoder.transcode request_pb
661
+ end
662
+
663
+ ##
664
+ # @private
665
+ #
666
+ # GRPC transcoding helper method for the insert REST call
667
+ #
668
+ # @param request_pb [::Google::Cloud::Compute::V1::InsertNodeGroupRequest]
669
+ # A request object representing the call parameters. Required.
670
+ # @return [Array(String, [String, nil], Hash{String => String})]
671
+ # Uri, Body, Query string parameters
672
+ def transcode_insert_request request_pb
673
+ transcoder = Gapic::Rest::GrpcTranscoder.new
674
+ .with_bindings(
675
+ uri_method: :post,
676
+ uri_template: "/compute/v1/projects/{project}/zones/{zone}/nodeGroups",
677
+ body: "node_group_resource",
678
+ matches: [
679
+ ["project", %r{[^/]+}, false],
680
+ ["zone", %r{[^/]+}, false]
681
+ ]
682
+ )
683
+ transcoder.transcode request_pb
684
+ end
685
+
686
+ ##
687
+ # @private
688
+ #
689
+ # GRPC transcoding helper method for the list REST call
690
+ #
691
+ # @param request_pb [::Google::Cloud::Compute::V1::ListNodeGroupsRequest]
692
+ # A request object representing the call parameters. Required.
693
+ # @return [Array(String, [String, nil], Hash{String => String})]
694
+ # Uri, Body, Query string parameters
695
+ def transcode_list_request request_pb
696
+ transcoder = Gapic::Rest::GrpcTranscoder.new
697
+ .with_bindings(
698
+ uri_method: :get,
699
+ uri_template: "/compute/v1/projects/{project}/zones/{zone}/nodeGroups",
700
+ matches: [
701
+ ["project", %r{[^/]+}, false],
702
+ ["zone", %r{[^/]+}, false]
703
+ ]
704
+ )
705
+ transcoder.transcode request_pb
706
+ end
707
+
708
+ ##
709
+ # @private
710
+ #
711
+ # GRPC transcoding helper method for the list_nodes REST call
712
+ #
713
+ # @param request_pb [::Google::Cloud::Compute::V1::ListNodesNodeGroupsRequest]
714
+ # A request object representing the call parameters. Required.
715
+ # @return [Array(String, [String, nil], Hash{String => String})]
716
+ # Uri, Body, Query string parameters
717
+ def transcode_list_nodes_request request_pb
718
+ transcoder = Gapic::Rest::GrpcTranscoder.new
719
+ .with_bindings(
720
+ uri_method: :post,
721
+ uri_template: "/compute/v1/projects/{project}/zones/{zone}/nodeGroups/{node_group}/listNodes",
722
+ matches: [
723
+ ["project", %r{[^/]+}, false],
724
+ ["zone", %r{[^/]+}, false],
725
+ ["node_group", %r{[^/]+}, false]
726
+ ]
727
+ )
728
+ transcoder.transcode request_pb
729
+ end
730
+
626
731
  ##
732
+ # @private
733
+ #
734
+ # GRPC transcoding helper method for the patch REST call
735
+ #
736
+ # @param request_pb [::Google::Cloud::Compute::V1::PatchNodeGroupRequest]
737
+ # A request object representing the call parameters. Required.
738
+ # @return [Array(String, [String, nil], Hash{String => String})]
739
+ # Uri, Body, Query string parameters
740
+ def transcode_patch_request request_pb
741
+ transcoder = Gapic::Rest::GrpcTranscoder.new
742
+ .with_bindings(
743
+ uri_method: :patch,
744
+ uri_template: "/compute/v1/projects/{project}/zones/{zone}/nodeGroups/{node_group}",
745
+ body: "node_group_resource",
746
+ matches: [
747
+ ["project", %r{[^/]+}, false],
748
+ ["zone", %r{[^/]+}, false],
749
+ ["node_group", %r{[^/]+}, false]
750
+ ]
751
+ )
752
+ transcoder.transcode request_pb
753
+ end
754
+
755
+ ##
756
+ # @private
757
+ #
758
+ # GRPC transcoding helper method for the set_iam_policy REST call
759
+ #
760
+ # @param request_pb [::Google::Cloud::Compute::V1::SetIamPolicyNodeGroupRequest]
761
+ # A request object representing the call parameters. Required.
762
+ # @return [Array(String, [String, nil], Hash{String => String})]
763
+ # Uri, Body, Query string parameters
764
+ def transcode_set_iam_policy_request request_pb
765
+ transcoder = Gapic::Rest::GrpcTranscoder.new
766
+ .with_bindings(
767
+ uri_method: :post,
768
+ uri_template: "/compute/v1/projects/{project}/zones/{zone}/nodeGroups/{resource}/setIamPolicy",
769
+ body: "zone_set_policy_request_resource",
770
+ matches: [
771
+ ["project", %r{[^/]+}, false],
772
+ ["zone", %r{[^/]+}, false],
773
+ ["resource", %r{[^/]+}, false]
774
+ ]
775
+ )
776
+ transcoder.transcode request_pb
777
+ end
778
+
779
+ ##
780
+ # @private
781
+ #
782
+ # GRPC transcoding helper method for the set_node_template REST call
783
+ #
784
+ # @param request_pb [::Google::Cloud::Compute::V1::SetNodeTemplateNodeGroupRequest]
785
+ # A request object representing the call parameters. Required.
786
+ # @return [Array(String, [String, nil], Hash{String => String})]
787
+ # Uri, Body, Query string parameters
788
+ def transcode_set_node_template_request request_pb
789
+ transcoder = Gapic::Rest::GrpcTranscoder.new
790
+ .with_bindings(
791
+ uri_method: :post,
792
+ uri_template: "/compute/v1/projects/{project}/zones/{zone}/nodeGroups/{node_group}/setNodeTemplate",
793
+ body: "node_groups_set_node_template_request_resource",
794
+ matches: [
795
+ ["project", %r{[^/]+}, false],
796
+ ["zone", %r{[^/]+}, false],
797
+ ["node_group", %r{[^/]+}, false]
798
+ ]
799
+ )
800
+ transcoder.transcode request_pb
801
+ end
802
+
803
+ ##
804
+ # @private
805
+ #
627
806
  # GRPC transcoding helper method for the test_iam_permissions REST call
628
807
  #
629
808
  # @param request_pb [::Google::Cloud::Compute::V1::TestIamPermissionsNodeGroupRequest]
@@ -631,11 +810,18 @@ module Google
631
810
  # @return [Array(String, [String, nil], Hash{String => String})]
632
811
  # Uri, Body, Query string parameters
633
812
  def transcode_test_iam_permissions_request request_pb
634
- uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/nodeGroups/#{request_pb.resource}/testIamPermissions"
635
- body = request_pb.test_permissions_request_resource.to_json
636
- query_string_params = {}
637
-
638
- [uri, body, query_string_params]
813
+ transcoder = Gapic::Rest::GrpcTranscoder.new
814
+ .with_bindings(
815
+ uri_method: :post,
816
+ uri_template: "/compute/v1/projects/{project}/zones/{zone}/nodeGroups/{resource}/testIamPermissions",
817
+ body: "test_permissions_request_resource",
818
+ matches: [
819
+ ["project", %r{[^/]+}, false],
820
+ ["zone", %r{[^/]+}, false],
821
+ ["resource", %r{[^/]+}, false]
822
+ ]
823
+ )
824
+ transcoder.transcode request_pb
639
825
  end
640
826
  end
641
827
  end