google-cloud-compute-v1 2.4.0 → 2.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (118) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/compute/v1/accelerator_types/rest/client.rb +52 -3
  3. data/lib/google/cloud/compute/v1/addresses/rest/client.rb +116 -3
  4. data/lib/google/cloud/compute/v1/autoscalers/rest/client.rb +116 -3
  5. data/lib/google/cloud/compute/v1/backend_buckets/rest/client.rb +421 -1
  6. data/lib/google/cloud/compute/v1/backend_buckets/rest/service_stub.rb +182 -0
  7. data/lib/google/cloud/compute/v1/backend_services/rest/client.rb +420 -3
  8. data/lib/google/cloud/compute/v1/backend_services/rest/service_stub.rb +120 -0
  9. data/lib/google/cloud/compute/v1/compute_pb.rb +79 -1
  10. data/lib/google/cloud/compute/v1/disk_types/rest/client.rb +52 -3
  11. data/lib/google/cloud/compute/v1/disks/rest/client.rb +292 -3
  12. data/lib/google/cloud/compute/v1/external_vpn_gateways/rest/client.rb +97 -1
  13. data/lib/google/cloud/compute/v1/firewall_policies/rest/client.rb +289 -1
  14. data/lib/google/cloud/compute/v1/firewalls/rest/client.rb +97 -1
  15. data/lib/google/cloud/compute/v1/forwarding_rules/rest/client.rb +132 -3
  16. data/lib/google/cloud/compute/v1/global_addresses/rest/client.rb +97 -1
  17. data/lib/google/cloud/compute/v1/global_forwarding_rules/rest/client.rb +113 -1
  18. data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest/client.rb +114 -2
  19. data/lib/google/cloud/compute/v1/global_operations/rest/client.rb +84 -3
  20. data/lib/google/cloud/compute/v1/global_organization_operations/rest/client.rb +49 -1
  21. data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest/client.rb +81 -1
  22. data/lib/google/cloud/compute/v1/health_checks/rest/client.rb +116 -3
  23. data/lib/google/cloud/compute/v1/image_family_views/rest/client.rb +16 -0
  24. data/lib/google/cloud/compute/v1/images/rest/client.rb +177 -1
  25. data/lib/google/cloud/compute/v1/instance_group_managers/rest/client.rb +327 -6
  26. data/lib/google/cloud/compute/v1/instance_groups/rest/client.rb +149 -4
  27. data/lib/google/cloud/compute/v1/instance_templates/rest/client.rb +132 -3
  28. data/lib/google/cloud/compute/v1/instances/rest/client.rb +845 -4
  29. data/lib/google/cloud/compute/v1/instances/rest/service_stub.rb +62 -0
  30. data/lib/google/cloud/compute/v1/interconnect_attachments/rest/client.rb +116 -3
  31. data/lib/google/cloud/compute/v1/interconnect_locations/rest/client.rb +33 -1
  32. data/lib/google/cloud/compute/v1/interconnect_remote_locations/rest/client.rb +33 -1
  33. data/lib/google/cloud/compute/v1/interconnects/rest/client.rb +206 -2
  34. data/lib/google/cloud/compute/v1/interconnects/rest/service_stub.rb +60 -0
  35. data/lib/google/cloud/compute/v1/license_codes/rest/client.rb +32 -0
  36. data/lib/google/cloud/compute/v1/licenses/rest/client.rb +113 -1
  37. data/lib/google/cloud/compute/v1/machine_images/rest/client.rb +113 -1
  38. data/lib/google/cloud/compute/v1/machine_types/rest/client.rb +52 -3
  39. data/lib/google/cloud/compute/v1/network_attachments/rest/client.rb +236 -3
  40. data/lib/google/cloud/compute/v1/network_attachments/rest/service_stub.rb +62 -0
  41. data/lib/google/cloud/compute/v1/network_edge_security_services/rest/client.rb +83 -2
  42. data/lib/google/cloud/compute/v1/network_endpoint_groups/rest/client.rb +149 -4
  43. data/lib/google/cloud/compute/v1/network_firewall_policies/rest/client.rb +257 -1
  44. data/lib/google/cloud/compute/v1/networks/rest/client.rb +178 -2
  45. data/lib/google/cloud/compute/v1/node_groups/rest/client.rb +229 -4
  46. data/lib/google/cloud/compute/v1/node_templates/rest/client.rb +132 -3
  47. data/lib/google/cloud/compute/v1/node_types/rest/client.rb +52 -3
  48. data/lib/google/cloud/compute/v1/packet_mirrorings/rest/client.rb +116 -3
  49. data/lib/google/cloud/compute/v1/projects/rest/client.rb +210 -2
  50. data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/client.rb +282 -4
  51. data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/service_stub.rb +120 -0
  52. data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/client.rb +304 -3
  53. data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/service_stub.rb +122 -0
  54. data/lib/google/cloud/compute/v1/region_autoscalers/rest/client.rb +97 -1
  55. data/lib/google/cloud/compute/v1/region_backend_services/rest/client.rb +445 -1
  56. data/lib/google/cloud/compute/v1/region_backend_services/rest/service_stub.rb +184 -0
  57. data/lib/google/cloud/compute/v1/region_commitments/rest/client.rb +84 -3
  58. data/lib/google/cloud/compute/v1/region_disk_types/rest/client.rb +33 -1
  59. data/lib/google/cloud/compute/v1/region_disks/rest/client.rb +273 -1
  60. data/lib/google/cloud/compute/v1/region_health_check_services/rest/client.rb +81 -1
  61. data/lib/google/cloud/compute/v1/region_health_checks/rest/client.rb +97 -1
  62. data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/client.rb +308 -4
  63. data/lib/google/cloud/compute/v1/region_instance_groups/rest/client.rb +66 -2
  64. data/lib/google/cloud/compute/v1/region_instance_templates/rest/client.rb +65 -1
  65. data/lib/google/cloud/compute/v1/region_instances/rest/client.rb +16 -0
  66. data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/client.rb +378 -4
  67. data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/service_stub.rb +185 -0
  68. data/lib/google/cloud/compute/v1/region_network_firewall_policies/rest/client.rb +273 -1
  69. data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/client.rb +65 -1
  70. data/lib/google/cloud/compute/v1/region_operations/rest/client.rb +65 -1
  71. data/lib/google/cloud/compute/v1/region_security_policies/rest/client.rb +497 -5
  72. data/lib/google/cloud/compute/v1/region_security_policies/rest/service_stub.rb +246 -0
  73. data/lib/google/cloud/compute/v1/region_ssl_certificates/rest/client.rb +65 -1
  74. data/lib/google/cloud/compute/v1/region_ssl_policies/rest/client.rb +98 -2
  75. data/lib/google/cloud/compute/v1/region_target_http_proxies/rest/client.rb +81 -1
  76. data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/client.rb +113 -1
  77. data/lib/google/cloud/compute/v1/region_target_tcp_proxies/rest/client.rb +65 -1
  78. data/lib/google/cloud/compute/v1/region_url_maps/rest/client.rb +113 -1
  79. data/lib/google/cloud/compute/v1/regions/rest/client.rb +33 -1
  80. data/lib/google/cloud/compute/v1/reservations/rest/client.rb +164 -3
  81. data/lib/google/cloud/compute/v1/resource_policies/rest/client.rb +148 -3
  82. data/lib/google/cloud/compute/v1/rest.rb +1 -0
  83. data/lib/google/cloud/compute/v1/routers/rest/client.rb +261 -4
  84. data/lib/google/cloud/compute/v1/routers/rest/service_stub.rb +61 -0
  85. data/lib/google/cloud/compute/v1/routes/rest/client.rb +65 -1
  86. data/lib/google/cloud/compute/v1/security_policies/rest/client.rb +203 -6
  87. data/lib/google/cloud/compute/v1/service_attachments/rest/client.rb +148 -3
  88. data/lib/google/cloud/compute/v1/snapshot_settings_service/credentials.rb +52 -0
  89. data/lib/google/cloud/compute/v1/snapshot_settings_service/rest/client.rb +480 -0
  90. data/lib/google/cloud/compute/v1/snapshot_settings_service/rest/service_stub.rb +167 -0
  91. data/lib/google/cloud/compute/v1/snapshot_settings_service/rest.rb +51 -0
  92. data/lib/google/cloud/compute/v1/snapshot_settings_service.rb +47 -0
  93. data/lib/google/cloud/compute/v1/snapshots/rest/client.rb +129 -1
  94. data/lib/google/cloud/compute/v1/ssl_certificates/rest/client.rb +84 -3
  95. data/lib/google/cloud/compute/v1/ssl_policies/rest/client.rb +117 -4
  96. data/lib/google/cloud/compute/v1/subnetworks/rest/client.rb +197 -4
  97. data/lib/google/cloud/compute/v1/target_grpc_proxies/rest/client.rb +81 -1
  98. data/lib/google/cloud/compute/v1/target_http_proxies/rest/client.rb +116 -3
  99. data/lib/google/cloud/compute/v1/target_https_proxies/rest/client.rb +180 -3
  100. data/lib/google/cloud/compute/v1/target_instances/rest/client.rb +188 -3
  101. data/lib/google/cloud/compute/v1/target_instances/rest/service_stub.rb +62 -0
  102. data/lib/google/cloud/compute/v1/target_pools/rest/client.rb +284 -3
  103. data/lib/google/cloud/compute/v1/target_pools/rest/service_stub.rb +62 -0
  104. data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/client.rb +145 -1
  105. data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/client.rb +116 -3
  106. data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/client.rb +100 -3
  107. data/lib/google/cloud/compute/v1/url_maps/rest/client.rb +148 -3
  108. data/lib/google/cloud/compute/v1/version.rb +1 -1
  109. data/lib/google/cloud/compute/v1/vpn_gateways/rest/client.rb +132 -3
  110. data/lib/google/cloud/compute/v1/vpn_tunnels/rest/client.rb +100 -3
  111. data/lib/google/cloud/compute/v1/zone_operations/rest/client.rb +65 -1
  112. data/lib/google/cloud/compute/v1/zones/rest/client.rb +33 -1
  113. data/lib/google/cloud/compute/v1.rb +1 -0
  114. data/proto_docs/google/api/client.rb +13 -0
  115. data/proto_docs/google/api/field_behavior.rb +14 -0
  116. data/proto_docs/google/cloud/compute/v1/compute.rb +1654 -196
  117. data/proto_docs/google/protobuf/any.rb +144 -0
  118. metadata +11 -5
@@ -40,6 +40,44 @@ module Google
40
40
  raise_faraday_errors: false
41
41
  end
42
42
 
43
+ ##
44
+ # Baseline implementation for the attach_network_endpoints REST call
45
+ #
46
+ # @param request_pb [::Google::Cloud::Compute::V1::AttachNetworkEndpointsRegionNetworkEndpointGroupRequest]
47
+ # A request object representing the call parameters. Required.
48
+ # @param options [::Gapic::CallOptions]
49
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
50
+ #
51
+ # @yield [result, operation] Access the result along with the TransportOperation object
52
+ # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
53
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
54
+ #
55
+ # @return [::Google::Cloud::Compute::V1::Operation]
56
+ # A result object deserialized from the server's reply
57
+ def attach_network_endpoints request_pb, options = nil
58
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
59
+
60
+ verb, uri, query_string_params, body = ServiceStub.transcode_attach_network_endpoints_request request_pb
61
+ query_string_params = if query_string_params.any?
62
+ query_string_params.to_h { |p| p.split "=", 2 }
63
+ else
64
+ {}
65
+ end
66
+
67
+ response = @client_stub.make_http_request(
68
+ verb,
69
+ uri: uri,
70
+ body: body || "",
71
+ params: query_string_params,
72
+ options: options
73
+ )
74
+ operation = ::Gapic::Rest::TransportOperation.new response
75
+ result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
76
+
77
+ yield result, operation if block_given?
78
+ result
79
+ end
80
+
43
81
  ##
44
82
  # Baseline implementation for the delete REST call
45
83
  #
@@ -78,6 +116,44 @@ module Google
78
116
  result
79
117
  end
80
118
 
119
+ ##
120
+ # Baseline implementation for the detach_network_endpoints REST call
121
+ #
122
+ # @param request_pb [::Google::Cloud::Compute::V1::DetachNetworkEndpointsRegionNetworkEndpointGroupRequest]
123
+ # A request object representing the call parameters. Required.
124
+ # @param options [::Gapic::CallOptions]
125
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
126
+ #
127
+ # @yield [result, operation] Access the result along with the TransportOperation object
128
+ # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
129
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
130
+ #
131
+ # @return [::Google::Cloud::Compute::V1::Operation]
132
+ # A result object deserialized from the server's reply
133
+ def detach_network_endpoints request_pb, options = nil
134
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
135
+
136
+ verb, uri, query_string_params, body = ServiceStub.transcode_detach_network_endpoints_request request_pb
137
+ query_string_params = if query_string_params.any?
138
+ query_string_params.to_h { |p| p.split "=", 2 }
139
+ else
140
+ {}
141
+ end
142
+
143
+ response = @client_stub.make_http_request(
144
+ verb,
145
+ uri: uri,
146
+ body: body || "",
147
+ params: query_string_params,
148
+ options: options
149
+ )
150
+ operation = ::Gapic::Rest::TransportOperation.new response
151
+ result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
152
+
153
+ yield result, operation if block_given?
154
+ result
155
+ end
156
+
81
157
  ##
82
158
  # Baseline implementation for the get REST call
83
159
  #
@@ -192,6 +268,68 @@ module Google
192
268
  result
193
269
  end
194
270
 
271
+ ##
272
+ # Baseline implementation for the list_network_endpoints REST call
273
+ #
274
+ # @param request_pb [::Google::Cloud::Compute::V1::ListNetworkEndpointsRegionNetworkEndpointGroupsRequest]
275
+ # A request object representing the call parameters. Required.
276
+ # @param options [::Gapic::CallOptions]
277
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
278
+ #
279
+ # @yield [result, operation] Access the result along with the TransportOperation object
280
+ # @yieldparam result [::Google::Cloud::Compute::V1::NetworkEndpointGroupsListNetworkEndpoints]
281
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
282
+ #
283
+ # @return [::Google::Cloud::Compute::V1::NetworkEndpointGroupsListNetworkEndpoints]
284
+ # A result object deserialized from the server's reply
285
+ def list_network_endpoints request_pb, options = nil
286
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
287
+
288
+ verb, uri, query_string_params, body = ServiceStub.transcode_list_network_endpoints_request request_pb
289
+ query_string_params = if query_string_params.any?
290
+ query_string_params.to_h { |p| p.split "=", 2 }
291
+ else
292
+ {}
293
+ end
294
+
295
+ response = @client_stub.make_http_request(
296
+ verb,
297
+ uri: uri,
298
+ body: body || "",
299
+ params: query_string_params,
300
+ options: options
301
+ )
302
+ operation = ::Gapic::Rest::TransportOperation.new response
303
+ result = ::Google::Cloud::Compute::V1::NetworkEndpointGroupsListNetworkEndpoints.decode_json response.body, ignore_unknown_fields: true
304
+
305
+ yield result, operation if block_given?
306
+ result
307
+ end
308
+
309
+ ##
310
+ # @private
311
+ #
312
+ # GRPC transcoding helper method for the attach_network_endpoints REST call
313
+ #
314
+ # @param request_pb [::Google::Cloud::Compute::V1::AttachNetworkEndpointsRegionNetworkEndpointGroupRequest]
315
+ # A request object representing the call parameters. Required.
316
+ # @return [Array(String, [String, nil], Hash{String => String})]
317
+ # Uri, Body, Query string parameters
318
+ def self.transcode_attach_network_endpoints_request request_pb
319
+ transcoder = Gapic::Rest::GrpcTranscoder.new
320
+ .with_bindings(
321
+ uri_method: :post,
322
+ uri_template: "/compute/v1/projects/{project}/regions/{region}/networkEndpointGroups/{network_endpoint_group}/attachNetworkEndpoints",
323
+ body: "region_network_endpoint_groups_attach_endpoints_request_resource",
324
+ matches: [
325
+ ["project", %r{^[^/]+/?$}, false],
326
+ ["region", %r{^[^/]+/?$}, false],
327
+ ["network_endpoint_group", %r{^[^/]+/?$}, false]
328
+ ]
329
+ )
330
+ transcoder.transcode request_pb
331
+ end
332
+
195
333
  ##
196
334
  # @private
197
335
  #
@@ -215,6 +353,30 @@ module Google
215
353
  transcoder.transcode request_pb
216
354
  end
217
355
 
356
+ ##
357
+ # @private
358
+ #
359
+ # GRPC transcoding helper method for the detach_network_endpoints REST call
360
+ #
361
+ # @param request_pb [::Google::Cloud::Compute::V1::DetachNetworkEndpointsRegionNetworkEndpointGroupRequest]
362
+ # A request object representing the call parameters. Required.
363
+ # @return [Array(String, [String, nil], Hash{String => String})]
364
+ # Uri, Body, Query string parameters
365
+ def self.transcode_detach_network_endpoints_request request_pb
366
+ transcoder = Gapic::Rest::GrpcTranscoder.new
367
+ .with_bindings(
368
+ uri_method: :post,
369
+ uri_template: "/compute/v1/projects/{project}/regions/{region}/networkEndpointGroups/{network_endpoint_group}/detachNetworkEndpoints",
370
+ body: "region_network_endpoint_groups_detach_endpoints_request_resource",
371
+ matches: [
372
+ ["project", %r{^[^/]+/?$}, false],
373
+ ["region", %r{^[^/]+/?$}, false],
374
+ ["network_endpoint_group", %r{^[^/]+/?$}, false]
375
+ ]
376
+ )
377
+ transcoder.transcode request_pb
378
+ end
379
+
218
380
  ##
219
381
  # @private
220
382
  #
@@ -282,6 +444,29 @@ module Google
282
444
  )
283
445
  transcoder.transcode request_pb
284
446
  end
447
+
448
+ ##
449
+ # @private
450
+ #
451
+ # GRPC transcoding helper method for the list_network_endpoints REST call
452
+ #
453
+ # @param request_pb [::Google::Cloud::Compute::V1::ListNetworkEndpointsRegionNetworkEndpointGroupsRequest]
454
+ # A request object representing the call parameters. Required.
455
+ # @return [Array(String, [String, nil], Hash{String => String})]
456
+ # Uri, Body, Query string parameters
457
+ def self.transcode_list_network_endpoints_request request_pb
458
+ transcoder = Gapic::Rest::GrpcTranscoder.new
459
+ .with_bindings(
460
+ uri_method: :post,
461
+ uri_template: "/compute/v1/projects/{project}/regions/{region}/networkEndpointGroups/{network_endpoint_group}/listNetworkEndpoints",
462
+ matches: [
463
+ ["project", %r{^[^/]+/?$}, false],
464
+ ["region", %r{^[^/]+/?$}, false],
465
+ ["network_endpoint_group", %r{^[^/]+/?$}, false]
466
+ ]
467
+ )
468
+ transcoder.transcode request_pb
469
+ end
285
470
  end
286
471
  end
287
472
  end
@@ -236,6 +236,22 @@ module Google
236
236
  # @return [::Gapic::GenericLRO::Operation]
237
237
  #
238
238
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
239
+ #
240
+ # @example Basic example
241
+ # require "google/cloud/compute/v1"
242
+ #
243
+ # # Create a client object. The client can be reused for multiple calls.
244
+ # client = Google::Cloud::Compute::V1::RegionNetworkFirewallPolicies::Rest::Client.new
245
+ #
246
+ # # Create a request. To set request fields, pass in keyword arguments.
247
+ # request = Google::Cloud::Compute::V1::AddAssociationRegionNetworkFirewallPolicyRequest.new
248
+ #
249
+ # # Call the add_association method.
250
+ # result = client.add_association request
251
+ #
252
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
253
+ # p result
254
+ #
239
255
  def add_association request, options = nil
240
256
  raise ::ArgumentError, "request must be provided" if request.nil?
241
257
 
@@ -319,6 +335,22 @@ module Google
319
335
  # @return [::Gapic::GenericLRO::Operation]
320
336
  #
321
337
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
338
+ #
339
+ # @example Basic example
340
+ # require "google/cloud/compute/v1"
341
+ #
342
+ # # Create a client object. The client can be reused for multiple calls.
343
+ # client = Google::Cloud::Compute::V1::RegionNetworkFirewallPolicies::Rest::Client.new
344
+ #
345
+ # # Create a request. To set request fields, pass in keyword arguments.
346
+ # request = Google::Cloud::Compute::V1::AddRuleRegionNetworkFirewallPolicyRequest.new
347
+ #
348
+ # # Call the add_rule method.
349
+ # result = client.add_rule request
350
+ #
351
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
352
+ # p result
353
+ #
322
354
  def add_rule request, options = nil
323
355
  raise ::ArgumentError, "request must be provided" if request.nil?
324
356
 
@@ -398,6 +430,22 @@ module Google
398
430
  # @return [::Gapic::GenericLRO::Operation]
399
431
  #
400
432
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
433
+ #
434
+ # @example Basic example
435
+ # require "google/cloud/compute/v1"
436
+ #
437
+ # # Create a client object. The client can be reused for multiple calls.
438
+ # client = Google::Cloud::Compute::V1::RegionNetworkFirewallPolicies::Rest::Client.new
439
+ #
440
+ # # Create a request. To set request fields, pass in keyword arguments.
441
+ # request = Google::Cloud::Compute::V1::CloneRulesRegionNetworkFirewallPolicyRequest.new
442
+ #
443
+ # # Call the clone_rules method.
444
+ # result = client.clone_rules request
445
+ #
446
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
447
+ # p result
448
+ #
401
449
  def clone_rules request, options = nil
402
450
  raise ::ArgumentError, "request must be provided" if request.nil?
403
451
 
@@ -475,6 +523,22 @@ module Google
475
523
  # @return [::Gapic::GenericLRO::Operation]
476
524
  #
477
525
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
526
+ #
527
+ # @example Basic example
528
+ # require "google/cloud/compute/v1"
529
+ #
530
+ # # Create a client object. The client can be reused for multiple calls.
531
+ # client = Google::Cloud::Compute::V1::RegionNetworkFirewallPolicies::Rest::Client.new
532
+ #
533
+ # # Create a request. To set request fields, pass in keyword arguments.
534
+ # request = Google::Cloud::Compute::V1::DeleteRegionNetworkFirewallPolicyRequest.new
535
+ #
536
+ # # Call the delete method.
537
+ # result = client.delete request
538
+ #
539
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
540
+ # p result
541
+ #
478
542
  def delete request, options = nil
479
543
  raise ::ArgumentError, "request must be provided" if request.nil?
480
544
 
@@ -550,6 +614,22 @@ module Google
550
614
  # @return [::Google::Cloud::Compute::V1::FirewallPolicy]
551
615
  #
552
616
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
617
+ #
618
+ # @example Basic example
619
+ # require "google/cloud/compute/v1"
620
+ #
621
+ # # Create a client object. The client can be reused for multiple calls.
622
+ # client = Google::Cloud::Compute::V1::RegionNetworkFirewallPolicies::Rest::Client.new
623
+ #
624
+ # # Create a request. To set request fields, pass in keyword arguments.
625
+ # request = Google::Cloud::Compute::V1::GetRegionNetworkFirewallPolicyRequest.new
626
+ #
627
+ # # Call the get method.
628
+ # result = client.get request
629
+ #
630
+ # # The returned object is of type Google::Cloud::Compute::V1::FirewallPolicy.
631
+ # p result
632
+ #
553
633
  def get request, options = nil
554
634
  raise ::ArgumentError, "request must be provided" if request.nil?
555
635
 
@@ -618,6 +698,22 @@ module Google
618
698
  # @return [::Google::Cloud::Compute::V1::FirewallPolicyAssociation]
619
699
  #
620
700
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
701
+ #
702
+ # @example Basic example
703
+ # require "google/cloud/compute/v1"
704
+ #
705
+ # # Create a client object. The client can be reused for multiple calls.
706
+ # client = Google::Cloud::Compute::V1::RegionNetworkFirewallPolicies::Rest::Client.new
707
+ #
708
+ # # Create a request. To set request fields, pass in keyword arguments.
709
+ # request = Google::Cloud::Compute::V1::GetAssociationRegionNetworkFirewallPolicyRequest.new
710
+ #
711
+ # # Call the get_association method.
712
+ # result = client.get_association request
713
+ #
714
+ # # The returned object is of type Google::Cloud::Compute::V1::FirewallPolicyAssociation.
715
+ # p result
716
+ #
621
717
  def get_association request, options = nil
622
718
  raise ::ArgumentError, "request must be provided" if request.nil?
623
719
 
@@ -684,6 +780,22 @@ module Google
684
780
  # @return [::Google::Cloud::Compute::V1::RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse]
685
781
  #
686
782
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
783
+ #
784
+ # @example Basic example
785
+ # require "google/cloud/compute/v1"
786
+ #
787
+ # # Create a client object. The client can be reused for multiple calls.
788
+ # client = Google::Cloud::Compute::V1::RegionNetworkFirewallPolicies::Rest::Client.new
789
+ #
790
+ # # Create a request. To set request fields, pass in keyword arguments.
791
+ # request = Google::Cloud::Compute::V1::GetEffectiveFirewallsRegionNetworkFirewallPolicyRequest.new
792
+ #
793
+ # # Call the get_effective_firewalls method.
794
+ # result = client.get_effective_firewalls request
795
+ #
796
+ # # The returned object is of type Google::Cloud::Compute::V1::RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse.
797
+ # p result
798
+ #
687
799
  def get_effective_firewalls request, options = nil
688
800
  raise ::ArgumentError, "request must be provided" if request.nil?
689
801
 
@@ -752,6 +864,22 @@ module Google
752
864
  # @return [::Google::Cloud::Compute::V1::Policy]
753
865
  #
754
866
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
867
+ #
868
+ # @example Basic example
869
+ # require "google/cloud/compute/v1"
870
+ #
871
+ # # Create a client object. The client can be reused for multiple calls.
872
+ # client = Google::Cloud::Compute::V1::RegionNetworkFirewallPolicies::Rest::Client.new
873
+ #
874
+ # # Create a request. To set request fields, pass in keyword arguments.
875
+ # request = Google::Cloud::Compute::V1::GetIamPolicyRegionNetworkFirewallPolicyRequest.new
876
+ #
877
+ # # Call the get_iam_policy method.
878
+ # result = client.get_iam_policy request
879
+ #
880
+ # # The returned object is of type Google::Cloud::Compute::V1::Policy.
881
+ # p result
882
+ #
755
883
  def get_iam_policy request, options = nil
756
884
  raise ::ArgumentError, "request must be provided" if request.nil?
757
885
 
@@ -820,6 +948,22 @@ module Google
820
948
  # @return [::Google::Cloud::Compute::V1::FirewallPolicyRule]
821
949
  #
822
950
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
951
+ #
952
+ # @example Basic example
953
+ # require "google/cloud/compute/v1"
954
+ #
955
+ # # Create a client object. The client can be reused for multiple calls.
956
+ # client = Google::Cloud::Compute::V1::RegionNetworkFirewallPolicies::Rest::Client.new
957
+ #
958
+ # # Create a request. To set request fields, pass in keyword arguments.
959
+ # request = Google::Cloud::Compute::V1::GetRuleRegionNetworkFirewallPolicyRequest.new
960
+ #
961
+ # # Call the get_rule method.
962
+ # result = client.get_rule request
963
+ #
964
+ # # The returned object is of type Google::Cloud::Compute::V1::FirewallPolicyRule.
965
+ # p result
966
+ #
823
967
  def get_rule request, options = nil
824
968
  raise ::ArgumentError, "request must be provided" if request.nil?
825
969
 
@@ -888,6 +1032,22 @@ module Google
888
1032
  # @return [::Gapic::GenericLRO::Operation]
889
1033
  #
890
1034
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1035
+ #
1036
+ # @example Basic example
1037
+ # require "google/cloud/compute/v1"
1038
+ #
1039
+ # # Create a client object. The client can be reused for multiple calls.
1040
+ # client = Google::Cloud::Compute::V1::RegionNetworkFirewallPolicies::Rest::Client.new
1041
+ #
1042
+ # # Create a request. To set request fields, pass in keyword arguments.
1043
+ # request = Google::Cloud::Compute::V1::InsertRegionNetworkFirewallPolicyRequest.new
1044
+ #
1045
+ # # Call the insert method.
1046
+ # result = client.insert request
1047
+ #
1048
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
1049
+ # p result
1050
+ #
891
1051
  def insert request, options = nil
892
1052
  raise ::ArgumentError, "request must be provided" if request.nil?
893
1053
 
@@ -951,7 +1111,7 @@ module Google
951
1111
  # the default parameter values, pass an empty Hash as a request object (see above).
952
1112
  #
953
1113
  # @param filter [::String]
954
- # A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`.
1114
+ # A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions.
955
1115
  # @param max_results [::Integer]
956
1116
  # The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
957
1117
  # @param order_by [::String]
@@ -971,6 +1131,22 @@ module Google
971
1131
  # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::FirewallPolicy>]
972
1132
  #
973
1133
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1134
+ #
1135
+ # @example Basic example
1136
+ # require "google/cloud/compute/v1"
1137
+ #
1138
+ # # Create a client object. The client can be reused for multiple calls.
1139
+ # client = Google::Cloud::Compute::V1::RegionNetworkFirewallPolicies::Rest::Client.new
1140
+ #
1141
+ # # Create a request. To set request fields, pass in keyword arguments.
1142
+ # request = Google::Cloud::Compute::V1::ListRegionNetworkFirewallPoliciesRequest.new
1143
+ #
1144
+ # # Call the list method.
1145
+ # result = client.list request
1146
+ #
1147
+ # # The returned object is of type Google::Cloud::Compute::V1::FirewallPolicyList.
1148
+ # p result
1149
+ #
974
1150
  def list request, options = nil
975
1151
  raise ::ArgumentError, "request must be provided" if request.nil?
976
1152
 
@@ -1042,6 +1218,22 @@ module Google
1042
1218
  # @return [::Gapic::GenericLRO::Operation]
1043
1219
  #
1044
1220
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1221
+ #
1222
+ # @example Basic example
1223
+ # require "google/cloud/compute/v1"
1224
+ #
1225
+ # # Create a client object. The client can be reused for multiple calls.
1226
+ # client = Google::Cloud::Compute::V1::RegionNetworkFirewallPolicies::Rest::Client.new
1227
+ #
1228
+ # # Create a request. To set request fields, pass in keyword arguments.
1229
+ # request = Google::Cloud::Compute::V1::PatchRegionNetworkFirewallPolicyRequest.new
1230
+ #
1231
+ # # Call the patch method.
1232
+ # result = client.patch request
1233
+ #
1234
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
1235
+ # p result
1236
+ #
1045
1237
  def patch request, options = nil
1046
1238
  raise ::ArgumentError, "request must be provided" if request.nil?
1047
1239
 
@@ -1123,6 +1315,22 @@ module Google
1123
1315
  # @return [::Gapic::GenericLRO::Operation]
1124
1316
  #
1125
1317
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1318
+ #
1319
+ # @example Basic example
1320
+ # require "google/cloud/compute/v1"
1321
+ #
1322
+ # # Create a client object. The client can be reused for multiple calls.
1323
+ # client = Google::Cloud::Compute::V1::RegionNetworkFirewallPolicies::Rest::Client.new
1324
+ #
1325
+ # # Create a request. To set request fields, pass in keyword arguments.
1326
+ # request = Google::Cloud::Compute::V1::PatchRuleRegionNetworkFirewallPolicyRequest.new
1327
+ #
1328
+ # # Call the patch_rule method.
1329
+ # result = client.patch_rule request
1330
+ #
1331
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
1332
+ # p result
1333
+ #
1126
1334
  def patch_rule request, options = nil
1127
1335
  raise ::ArgumentError, "request must be provided" if request.nil?
1128
1336
 
@@ -1202,6 +1410,22 @@ module Google
1202
1410
  # @return [::Gapic::GenericLRO::Operation]
1203
1411
  #
1204
1412
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1413
+ #
1414
+ # @example Basic example
1415
+ # require "google/cloud/compute/v1"
1416
+ #
1417
+ # # Create a client object. The client can be reused for multiple calls.
1418
+ # client = Google::Cloud::Compute::V1::RegionNetworkFirewallPolicies::Rest::Client.new
1419
+ #
1420
+ # # Create a request. To set request fields, pass in keyword arguments.
1421
+ # request = Google::Cloud::Compute::V1::RemoveAssociationRegionNetworkFirewallPolicyRequest.new
1422
+ #
1423
+ # # Call the remove_association method.
1424
+ # result = client.remove_association request
1425
+ #
1426
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
1427
+ # p result
1428
+ #
1205
1429
  def remove_association request, options = nil
1206
1430
  raise ::ArgumentError, "request must be provided" if request.nil?
1207
1431
 
@@ -1281,6 +1505,22 @@ module Google
1281
1505
  # @return [::Gapic::GenericLRO::Operation]
1282
1506
  #
1283
1507
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1508
+ #
1509
+ # @example Basic example
1510
+ # require "google/cloud/compute/v1"
1511
+ #
1512
+ # # Create a client object. The client can be reused for multiple calls.
1513
+ # client = Google::Cloud::Compute::V1::RegionNetworkFirewallPolicies::Rest::Client.new
1514
+ #
1515
+ # # Create a request. To set request fields, pass in keyword arguments.
1516
+ # request = Google::Cloud::Compute::V1::RemoveRuleRegionNetworkFirewallPolicyRequest.new
1517
+ #
1518
+ # # Call the remove_rule method.
1519
+ # result = client.remove_rule request
1520
+ #
1521
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
1522
+ # p result
1523
+ #
1284
1524
  def remove_rule request, options = nil
1285
1525
  raise ::ArgumentError, "request must be provided" if request.nil?
1286
1526
 
@@ -1358,6 +1598,22 @@ module Google
1358
1598
  # @return [::Google::Cloud::Compute::V1::Policy]
1359
1599
  #
1360
1600
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1601
+ #
1602
+ # @example Basic example
1603
+ # require "google/cloud/compute/v1"
1604
+ #
1605
+ # # Create a client object. The client can be reused for multiple calls.
1606
+ # client = Google::Cloud::Compute::V1::RegionNetworkFirewallPolicies::Rest::Client.new
1607
+ #
1608
+ # # Create a request. To set request fields, pass in keyword arguments.
1609
+ # request = Google::Cloud::Compute::V1::SetIamPolicyRegionNetworkFirewallPolicyRequest.new
1610
+ #
1611
+ # # Call the set_iam_policy method.
1612
+ # result = client.set_iam_policy request
1613
+ #
1614
+ # # The returned object is of type Google::Cloud::Compute::V1::Policy.
1615
+ # p result
1616
+ #
1361
1617
  def set_iam_policy request, options = nil
1362
1618
  raise ::ArgumentError, "request must be provided" if request.nil?
1363
1619
 
@@ -1426,6 +1682,22 @@ module Google
1426
1682
  # @return [::Google::Cloud::Compute::V1::TestPermissionsResponse]
1427
1683
  #
1428
1684
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1685
+ #
1686
+ # @example Basic example
1687
+ # require "google/cloud/compute/v1"
1688
+ #
1689
+ # # Create a client object. The client can be reused for multiple calls.
1690
+ # client = Google::Cloud::Compute::V1::RegionNetworkFirewallPolicies::Rest::Client.new
1691
+ #
1692
+ # # Create a request. To set request fields, pass in keyword arguments.
1693
+ # request = Google::Cloud::Compute::V1::TestIamPermissionsRegionNetworkFirewallPolicyRequest.new
1694
+ #
1695
+ # # Call the test_iam_permissions method.
1696
+ # result = client.test_iam_permissions request
1697
+ #
1698
+ # # The returned object is of type Google::Cloud::Compute::V1::TestPermissionsResponse.
1699
+ # p result
1700
+ #
1429
1701
  def test_iam_permissions request, options = nil
1430
1702
  raise ::ArgumentError, "request must be provided" if request.nil?
1431
1703