google-cloud-compute-v1 1.2.0 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/compute/v1/compute_pb.rb +577 -1
  3. data/lib/google/cloud/compute/v1/disks/rest/client.rb +1 -1
  4. data/lib/google/cloud/compute/v1/firewall_policies/rest/service_stub.rb +1 -1
  5. data/lib/google/cloud/compute/v1/instances/rest/client.rb +3 -1
  6. data/lib/google/cloud/compute/v1/network_edge_security_services/credentials.rb +52 -0
  7. data/lib/google/cloud/compute/v1/network_edge_security_services/rest/client.rb +679 -0
  8. data/lib/google/cloud/compute/v1/network_edge_security_services/rest/service_stub.rb +279 -0
  9. data/lib/google/cloud/compute/v1/network_edge_security_services/rest.rb +33 -0
  10. data/lib/google/cloud/compute/v1/network_edge_security_services.rb +44 -0
  11. data/lib/google/cloud/compute/v1/network_firewall_policies/credentials.rb +52 -0
  12. data/lib/google/cloud/compute/v1/network_firewall_policies/rest/client.rb +1552 -0
  13. data/lib/google/cloud/compute/v1/network_firewall_policies/rest/service_stub.rb +778 -0
  14. data/lib/google/cloud/compute/v1/network_firewall_policies/rest.rb +33 -0
  15. data/lib/google/cloud/compute/v1/network_firewall_policies.rb +44 -0
  16. data/lib/google/cloud/compute/v1/region_network_firewall_policies/credentials.rb +52 -0
  17. data/lib/google/cloud/compute/v1/region_network_firewall_policies/rest/client.rb +1670 -0
  18. data/lib/google/cloud/compute/v1/region_network_firewall_policies/rest/service_stub.rb +823 -0
  19. data/lib/google/cloud/compute/v1/region_network_firewall_policies/rest.rb +33 -0
  20. data/lib/google/cloud/compute/v1/region_network_firewall_policies.rb +44 -0
  21. data/lib/google/cloud/compute/v1/region_security_policies/credentials.rb +52 -0
  22. data/lib/google/cloud/compute/v1/region_security_policies/rest/client.rb +676 -0
  23. data/lib/google/cloud/compute/v1/region_security_policies/rest/service_stub.rb +276 -0
  24. data/lib/google/cloud/compute/v1/region_security_policies/rest.rb +33 -0
  25. data/lib/google/cloud/compute/v1/region_security_policies.rb +44 -0
  26. data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/client.rb +87 -0
  27. data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/service_stub.rb +46 -0
  28. data/lib/google/cloud/compute/v1/security_policies/rest/client.rb +86 -0
  29. data/lib/google/cloud/compute/v1/security_policies/rest/service_stub.rb +50 -0
  30. data/lib/google/cloud/compute/v1/version.rb +1 -1
  31. data/lib/google/cloud/compute/v1.rb +4 -0
  32. data/proto_docs/google/cloud/compute/v1/compute.rb +1562 -65
  33. metadata +22 -2
@@ -0,0 +1,279 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2022 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "google/cloud/compute/v1/compute_pb"
20
+
21
+ module Google
22
+ module Cloud
23
+ module Compute
24
+ module V1
25
+ module NetworkEdgeSecurityServices
26
+ module Rest
27
+ ##
28
+ # REST service stub for the NetworkEdgeSecurityServices service.
29
+ # service stub contains baseline method implementations
30
+ # including transcoding, making the REST call and deserialing the response
31
+ #
32
+ class ServiceStub
33
+ def initialize endpoint:, credentials:
34
+ # These require statements are intentionally placed here to initialize
35
+ # the REST modules only when it's required.
36
+ require "gapic/rest"
37
+
38
+ @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, credentials: credentials
39
+ end
40
+
41
+ ##
42
+ # Baseline implementation for the aggregated_list REST call
43
+ #
44
+ # @param request_pb [::Google::Cloud::Compute::V1::AggregatedListNetworkEdgeSecurityServicesRequest]
45
+ # A request object representing the call parameters. Required.
46
+ # @param options [::Gapic::CallOptions]
47
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
48
+ #
49
+ # @yield [result, response] Access the result along with the Faraday response object
50
+ # @yieldparam result [::Google::Cloud::Compute::V1::NetworkEdgeSecurityServiceAggregatedList]
51
+ # @yieldparam response [::Faraday::Response]
52
+ #
53
+ # @return [::Google::Cloud::Compute::V1::NetworkEdgeSecurityServiceAggregatedList]
54
+ # A result object deserialized from the server's reply
55
+ def aggregated_list request_pb, options = nil
56
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
57
+
58
+ uri, _body, query_string_params = transcode_aggregated_list_request request_pb
59
+ response = @client_stub.make_get_request(
60
+ uri: uri,
61
+ params: query_string_params,
62
+ options: options
63
+ )
64
+ result = ::Google::Cloud::Compute::V1::NetworkEdgeSecurityServiceAggregatedList.decode_json response.body, ignore_unknown_fields: true
65
+
66
+ yield result, response if block_given?
67
+ result
68
+ end
69
+
70
+ ##
71
+ # GRPC transcoding helper method for the aggregated_list REST call
72
+ #
73
+ # @param request_pb [::Google::Cloud::Compute::V1::AggregatedListNetworkEdgeSecurityServicesRequest]
74
+ # A request object representing the call parameters. Required.
75
+ # @return [Array(String, [String, nil], Hash{String => String})]
76
+ # Uri, Body, Query string parameters
77
+ def transcode_aggregated_list_request request_pb
78
+ uri = "/compute/v1/projects/#{request_pb.project}/aggregated/networkEdgeSecurityServices"
79
+ body = nil
80
+ query_string_params = {}
81
+ query_string_params["filter"] = request_pb.filter.to_s if request_pb.has_filter?
82
+ query_string_params["includeAllScopes"] = request_pb.include_all_scopes.to_s if request_pb.has_include_all_scopes?
83
+ query_string_params["maxResults"] = request_pb.max_results.to_s if request_pb.has_max_results?
84
+ query_string_params["orderBy"] = request_pb.order_by.to_s if request_pb.has_order_by?
85
+ query_string_params["pageToken"] = request_pb.page_token.to_s if request_pb.has_page_token?
86
+ query_string_params["returnPartialSuccess"] = request_pb.return_partial_success.to_s if request_pb.has_return_partial_success?
87
+
88
+ [uri, body, query_string_params]
89
+ end
90
+
91
+ ##
92
+ # Baseline implementation for the delete REST call
93
+ #
94
+ # @param request_pb [::Google::Cloud::Compute::V1::DeleteNetworkEdgeSecurityServiceRequest]
95
+ # A request object representing the call parameters. Required.
96
+ # @param options [::Gapic::CallOptions]
97
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
98
+ #
99
+ # @yield [result, response] Access the result along with the Faraday response object
100
+ # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
101
+ # @yieldparam response [::Faraday::Response]
102
+ #
103
+ # @return [::Google::Cloud::Compute::V1::Operation]
104
+ # A result object deserialized from the server's reply
105
+ def delete request_pb, options = nil
106
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
107
+
108
+ uri, _body, query_string_params = transcode_delete_request request_pb
109
+ response = @client_stub.make_delete_request(
110
+ uri: uri,
111
+ params: query_string_params,
112
+ options: options
113
+ )
114
+ result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
115
+
116
+ yield result, response if block_given?
117
+ result
118
+ end
119
+
120
+ ##
121
+ # GRPC transcoding helper method for the delete REST call
122
+ #
123
+ # @param request_pb [::Google::Cloud::Compute::V1::DeleteNetworkEdgeSecurityServiceRequest]
124
+ # A request object representing the call parameters. Required.
125
+ # @return [Array(String, [String, nil], Hash{String => String})]
126
+ # Uri, Body, Query string parameters
127
+ def transcode_delete_request request_pb
128
+ uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/networkEdgeSecurityServices/#{request_pb.network_edge_security_service}"
129
+ body = nil
130
+ query_string_params = {}
131
+ query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
132
+
133
+ [uri, body, query_string_params]
134
+ end
135
+
136
+ ##
137
+ # Baseline implementation for the get REST call
138
+ #
139
+ # @param request_pb [::Google::Cloud::Compute::V1::GetNetworkEdgeSecurityServiceRequest]
140
+ # A request object representing the call parameters. Required.
141
+ # @param options [::Gapic::CallOptions]
142
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
143
+ #
144
+ # @yield [result, response] Access the result along with the Faraday response object
145
+ # @yieldparam result [::Google::Cloud::Compute::V1::NetworkEdgeSecurityService]
146
+ # @yieldparam response [::Faraday::Response]
147
+ #
148
+ # @return [::Google::Cloud::Compute::V1::NetworkEdgeSecurityService]
149
+ # A result object deserialized from the server's reply
150
+ def get request_pb, options = nil
151
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
152
+
153
+ uri, _body, _query_string_params = transcode_get_request request_pb
154
+ response = @client_stub.make_get_request(
155
+ uri: uri,
156
+ options: options
157
+ )
158
+ result = ::Google::Cloud::Compute::V1::NetworkEdgeSecurityService.decode_json response.body, ignore_unknown_fields: true
159
+
160
+ yield result, response if block_given?
161
+ result
162
+ end
163
+
164
+ ##
165
+ # GRPC transcoding helper method for the get REST call
166
+ #
167
+ # @param request_pb [::Google::Cloud::Compute::V1::GetNetworkEdgeSecurityServiceRequest]
168
+ # A request object representing the call parameters. Required.
169
+ # @return [Array(String, [String, nil], Hash{String => String})]
170
+ # Uri, Body, Query string parameters
171
+ def transcode_get_request request_pb
172
+ uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/networkEdgeSecurityServices/#{request_pb.network_edge_security_service}"
173
+ body = nil
174
+ query_string_params = {}
175
+
176
+ [uri, body, query_string_params]
177
+ end
178
+
179
+ ##
180
+ # Baseline implementation for the insert REST call
181
+ #
182
+ # @param request_pb [::Google::Cloud::Compute::V1::InsertNetworkEdgeSecurityServiceRequest]
183
+ # A request object representing the call parameters. Required.
184
+ # @param options [::Gapic::CallOptions]
185
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
186
+ #
187
+ # @yield [result, response] Access the result along with the Faraday response object
188
+ # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
189
+ # @yieldparam response [::Faraday::Response]
190
+ #
191
+ # @return [::Google::Cloud::Compute::V1::Operation]
192
+ # A result object deserialized from the server's reply
193
+ def insert request_pb, options = nil
194
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
195
+
196
+ uri, body, query_string_params = transcode_insert_request request_pb
197
+ response = @client_stub.make_post_request(
198
+ uri: uri,
199
+ body: body,
200
+ params: query_string_params,
201
+ options: options
202
+ )
203
+ result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
204
+
205
+ yield result, response if block_given?
206
+ result
207
+ end
208
+
209
+ ##
210
+ # GRPC transcoding helper method for the insert REST call
211
+ #
212
+ # @param request_pb [::Google::Cloud::Compute::V1::InsertNetworkEdgeSecurityServiceRequest]
213
+ # A request object representing the call parameters. Required.
214
+ # @return [Array(String, [String, nil], Hash{String => String})]
215
+ # Uri, Body, Query string parameters
216
+ def transcode_insert_request request_pb
217
+ uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/networkEdgeSecurityServices"
218
+ body = request_pb.network_edge_security_service_resource.to_json
219
+ query_string_params = {}
220
+ query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
221
+ query_string_params["validateOnly"] = request_pb.validate_only.to_s if request_pb.has_validate_only?
222
+
223
+ [uri, body, query_string_params]
224
+ end
225
+
226
+ ##
227
+ # Baseline implementation for the patch REST call
228
+ #
229
+ # @param request_pb [::Google::Cloud::Compute::V1::PatchNetworkEdgeSecurityServiceRequest]
230
+ # A request object representing the call parameters. Required.
231
+ # @param options [::Gapic::CallOptions]
232
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
233
+ #
234
+ # @yield [result, response] Access the result along with the Faraday response object
235
+ # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
236
+ # @yieldparam response [::Faraday::Response]
237
+ #
238
+ # @return [::Google::Cloud::Compute::V1::Operation]
239
+ # A result object deserialized from the server's reply
240
+ def patch request_pb, options = nil
241
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
242
+
243
+ uri, body, query_string_params = transcode_patch_request request_pb
244
+ response = @client_stub.make_patch_request(
245
+ uri: uri,
246
+ body: body,
247
+ params: query_string_params,
248
+ options: options
249
+ )
250
+ result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
251
+
252
+ yield result, response if block_given?
253
+ result
254
+ end
255
+
256
+ ##
257
+ # GRPC transcoding helper method for the patch REST call
258
+ #
259
+ # @param request_pb [::Google::Cloud::Compute::V1::PatchNetworkEdgeSecurityServiceRequest]
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_patch_request request_pb
264
+ uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/networkEdgeSecurityServices/#{request_pb.network_edge_security_service}"
265
+ body = request_pb.network_edge_security_service_resource.to_json
266
+ query_string_params = {}
267
+ query_string_params["paths"] = request_pb.paths.to_s if request_pb.has_paths?
268
+ query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
269
+ query_string_params["updateMask"] = request_pb.update_mask.to_s if request_pb.has_update_mask?
270
+
271
+ [uri, body, query_string_params]
272
+ end
273
+ end
274
+ end
275
+ end
276
+ end
277
+ end
278
+ end
279
+ end
@@ -0,0 +1,33 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2022 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "google/cloud/compute/v1/network_edge_security_services/rest/client"
20
+
21
+ module Google
22
+ module Cloud
23
+ module Compute
24
+ module V1
25
+ module NetworkEdgeSecurityServices
26
+ # Client for the REST transport
27
+ module Rest
28
+ end
29
+ end
30
+ end
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,44 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2022 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "gapic/config"
20
+ require "gapic/config/method"
21
+
22
+ require "google/cloud/compute/v1/version"
23
+
24
+ require "google/cloud/compute/v1/network_edge_security_services/credentials"
25
+ require "google/cloud/compute/v1/network_edge_security_services/rest"
26
+
27
+ module Google
28
+ module Cloud
29
+ module Compute
30
+ module V1
31
+ # To load this service and instantiate a REST client:
32
+ #
33
+ # require "google/cloud/compute/v1/network_edge_security_services"
34
+ # client = ::Google::Cloud::Compute::V1::NetworkEdgeSecurityServices::Rest::Client.new
35
+ #
36
+ module NetworkEdgeSecurityServices
37
+ end
38
+ end
39
+ end
40
+ end
41
+ end
42
+
43
+ helper_path = ::File.join __dir__, "network_edge_security_services", "helpers.rb"
44
+ require "google/cloud/compute/v1/network_edge_security_services/helpers" if ::File.file? helper_path
@@ -0,0 +1,52 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2022 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "googleauth"
20
+
21
+ module Google
22
+ module Cloud
23
+ module Compute
24
+ module V1
25
+ module NetworkFirewallPolicies
26
+ # Credentials for the NetworkFirewallPolicies API.
27
+ class Credentials < ::Google::Auth::Credentials
28
+ self.scope = [
29
+ "https://www.googleapis.com/auth/compute",
30
+ "https://www.googleapis.com/auth/cloud-platform"
31
+ ]
32
+ self.env_vars = [
33
+ "COMPUTE_CREDENTIALS",
34
+ "COMPUTE_KEYFILE",
35
+ "GOOGLE_CLOUD_CREDENTIALS",
36
+ "GOOGLE_CLOUD_KEYFILE",
37
+ "GCLOUD_KEYFILE",
38
+ "COMPUTE_CREDENTIALS_JSON",
39
+ "COMPUTE_KEYFILE_JSON",
40
+ "GOOGLE_CLOUD_CREDENTIALS_JSON",
41
+ "GOOGLE_CLOUD_KEYFILE_JSON",
42
+ "GCLOUD_KEYFILE_JSON"
43
+ ]
44
+ self.paths = [
45
+ "~/.config/google_cloud/application_default_credentials.json"
46
+ ]
47
+ end
48
+ end
49
+ end
50
+ end
51
+ end
52
+ end