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
@@ -0,0 +1,167 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 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 SnapshotSettingsService
26
+ module Rest
27
+ ##
28
+ # REST service stub for the SnapshotSettingsService 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
+ numeric_enums: false,
40
+ raise_faraday_errors: false
41
+ end
42
+
43
+ ##
44
+ # Baseline implementation for the get REST call
45
+ #
46
+ # @param request_pb [::Google::Cloud::Compute::V1::GetSnapshotSettingRequest]
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::SnapshotSettings]
53
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
54
+ #
55
+ # @return [::Google::Cloud::Compute::V1::SnapshotSettings]
56
+ # A result object deserialized from the server's reply
57
+ def get 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_get_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::SnapshotSettings.decode_json response.body, ignore_unknown_fields: true
76
+
77
+ yield result, operation if block_given?
78
+ result
79
+ end
80
+
81
+ ##
82
+ # Baseline implementation for the patch REST call
83
+ #
84
+ # @param request_pb [::Google::Cloud::Compute::V1::PatchSnapshotSettingRequest]
85
+ # A request object representing the call parameters. Required.
86
+ # @param options [::Gapic::CallOptions]
87
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
88
+ #
89
+ # @yield [result, operation] Access the result along with the TransportOperation object
90
+ # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
91
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
92
+ #
93
+ # @return [::Google::Cloud::Compute::V1::Operation]
94
+ # A result object deserialized from the server's reply
95
+ def patch request_pb, options = nil
96
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
97
+
98
+ verb, uri, query_string_params, body = ServiceStub.transcode_patch_request request_pb
99
+ query_string_params = if query_string_params.any?
100
+ query_string_params.to_h { |p| p.split "=", 2 }
101
+ else
102
+ {}
103
+ end
104
+
105
+ response = @client_stub.make_http_request(
106
+ verb,
107
+ uri: uri,
108
+ body: body || "",
109
+ params: query_string_params,
110
+ options: options
111
+ )
112
+ operation = ::Gapic::Rest::TransportOperation.new response
113
+ result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
114
+
115
+ yield result, operation if block_given?
116
+ result
117
+ end
118
+
119
+ ##
120
+ # @private
121
+ #
122
+ # GRPC transcoding helper method for the get REST call
123
+ #
124
+ # @param request_pb [::Google::Cloud::Compute::V1::GetSnapshotSettingRequest]
125
+ # A request object representing the call parameters. Required.
126
+ # @return [Array(String, [String, nil], Hash{String => String})]
127
+ # Uri, Body, Query string parameters
128
+ def self.transcode_get_request request_pb
129
+ transcoder = Gapic::Rest::GrpcTranscoder.new
130
+ .with_bindings(
131
+ uri_method: :get,
132
+ uri_template: "/compute/v1/projects/{project}/global/snapshotSettings",
133
+ matches: [
134
+ ["project", %r{^[^/]+/?$}, false]
135
+ ]
136
+ )
137
+ transcoder.transcode request_pb
138
+ end
139
+
140
+ ##
141
+ # @private
142
+ #
143
+ # GRPC transcoding helper method for the patch REST call
144
+ #
145
+ # @param request_pb [::Google::Cloud::Compute::V1::PatchSnapshotSettingRequest]
146
+ # A request object representing the call parameters. Required.
147
+ # @return [Array(String, [String, nil], Hash{String => String})]
148
+ # Uri, Body, Query string parameters
149
+ def self.transcode_patch_request request_pb
150
+ transcoder = Gapic::Rest::GrpcTranscoder.new
151
+ .with_bindings(
152
+ uri_method: :patch,
153
+ uri_template: "/compute/v1/projects/{project}/global/snapshotSettings",
154
+ body: "snapshot_settings_resource",
155
+ matches: [
156
+ ["project", %r{^[^/]+/?$}, false]
157
+ ]
158
+ )
159
+ transcoder.transcode request_pb
160
+ end
161
+ end
162
+ end
163
+ end
164
+ end
165
+ end
166
+ end
167
+ end
@@ -0,0 +1,51 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 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/rest"
20
+ require "gapic/config"
21
+ require "gapic/config/method"
22
+
23
+ require "google/cloud/compute/v1/version"
24
+
25
+ require "google/cloud/compute/v1/snapshot_settings_service/credentials"
26
+ require "google/cloud/compute/v1/snapshot_settings_service/rest/client"
27
+
28
+ module Google
29
+ module Cloud
30
+ module Compute
31
+ module V1
32
+ ##
33
+ # The SnapshotSettings API.
34
+ #
35
+ # To load this service and instantiate a REST client:
36
+ #
37
+ # require "google/cloud/compute/v1/snapshot_settings_service/rest"
38
+ # client = ::Google::Cloud::Compute::V1::SnapshotSettingsService::Rest::Client.new
39
+ #
40
+ module SnapshotSettingsService
41
+ # Client for the REST transport
42
+ module Rest
43
+ end
44
+ end
45
+ end
46
+ end
47
+ end
48
+ end
49
+
50
+ helper_path = ::File.join __dir__, "rest", "helpers.rb"
51
+ require "google/cloud/compute/v1/snapshot_settings_service/rest/helpers" if ::File.file? helper_path
@@ -0,0 +1,47 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 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/snapshot_settings_service/credentials"
25
+ require "google/cloud/compute/v1/snapshot_settings_service/rest"
26
+
27
+ module Google
28
+ module Cloud
29
+ module Compute
30
+ module V1
31
+ ##
32
+ # The SnapshotSettings API.
33
+ #
34
+ # @example Load this service and instantiate a REST client
35
+ #
36
+ # require "google/cloud/compute/v1/snapshot_settings_service/rest"
37
+ # client = ::Google::Cloud::Compute::V1::SnapshotSettingsService::Rest::Client.new
38
+ #
39
+ module SnapshotSettingsService
40
+ end
41
+ end
42
+ end
43
+ end
44
+ end
45
+
46
+ helper_path = ::File.join __dir__, "snapshot_settings_service", "helpers.rb"
47
+ require "google/cloud/compute/v1/snapshot_settings_service/helpers" if ::File.file? helper_path
@@ -203,6 +203,22 @@ module Google
203
203
  # @return [::Gapic::GenericLRO::Operation]
204
204
  #
205
205
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
206
+ #
207
+ # @example Basic example
208
+ # require "google/cloud/compute/v1"
209
+ #
210
+ # # Create a client object. The client can be reused for multiple calls.
211
+ # client = Google::Cloud::Compute::V1::Snapshots::Rest::Client.new
212
+ #
213
+ # # Create a request. To set request fields, pass in keyword arguments.
214
+ # request = Google::Cloud::Compute::V1::DeleteSnapshotRequest.new
215
+ #
216
+ # # Call the delete method.
217
+ # result = client.delete request
218
+ #
219
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
220
+ # p result
221
+ #
206
222
  def delete request, options = nil
207
223
  raise ::ArgumentError, "request must be provided" if request.nil?
208
224
 
@@ -275,6 +291,22 @@ module Google
275
291
  # @return [::Google::Cloud::Compute::V1::Snapshot]
276
292
  #
277
293
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
294
+ #
295
+ # @example Basic example
296
+ # require "google/cloud/compute/v1"
297
+ #
298
+ # # Create a client object. The client can be reused for multiple calls.
299
+ # client = Google::Cloud::Compute::V1::Snapshots::Rest::Client.new
300
+ #
301
+ # # Create a request. To set request fields, pass in keyword arguments.
302
+ # request = Google::Cloud::Compute::V1::GetSnapshotRequest.new
303
+ #
304
+ # # Call the get method.
305
+ # result = client.get request
306
+ #
307
+ # # The returned object is of type Google::Cloud::Compute::V1::Snapshot.
308
+ # p result
309
+ #
278
310
  def get request, options = nil
279
311
  raise ::ArgumentError, "request must be provided" if request.nil?
280
312
 
@@ -341,6 +373,22 @@ module Google
341
373
  # @return [::Google::Cloud::Compute::V1::Policy]
342
374
  #
343
375
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
376
+ #
377
+ # @example Basic example
378
+ # require "google/cloud/compute/v1"
379
+ #
380
+ # # Create a client object. The client can be reused for multiple calls.
381
+ # client = Google::Cloud::Compute::V1::Snapshots::Rest::Client.new
382
+ #
383
+ # # Create a request. To set request fields, pass in keyword arguments.
384
+ # request = Google::Cloud::Compute::V1::GetIamPolicySnapshotRequest.new
385
+ #
386
+ # # Call the get_iam_policy method.
387
+ # result = client.get_iam_policy request
388
+ #
389
+ # # The returned object is of type Google::Cloud::Compute::V1::Policy.
390
+ # p result
391
+ #
344
392
  def get_iam_policy request, options = nil
345
393
  raise ::ArgumentError, "request must be provided" if request.nil?
346
394
 
@@ -407,6 +455,22 @@ module Google
407
455
  # @return [::Gapic::GenericLRO::Operation]
408
456
  #
409
457
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
458
+ #
459
+ # @example Basic example
460
+ # require "google/cloud/compute/v1"
461
+ #
462
+ # # Create a client object. The client can be reused for multiple calls.
463
+ # client = Google::Cloud::Compute::V1::Snapshots::Rest::Client.new
464
+ #
465
+ # # Create a request. To set request fields, pass in keyword arguments.
466
+ # request = Google::Cloud::Compute::V1::InsertSnapshotRequest.new
467
+ #
468
+ # # Call the insert method.
469
+ # result = client.insert request
470
+ #
471
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
472
+ # p result
473
+ #
410
474
  def insert request, options = nil
411
475
  raise ::ArgumentError, "request must be provided" if request.nil?
412
476
 
@@ -469,7 +533,7 @@ module Google
469
533
  # the default parameter values, pass an empty Hash as a request object (see above).
470
534
  #
471
535
  # @param filter [::String]
472
- # 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`.
536
+ # 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.
473
537
  # @param max_results [::Integer]
474
538
  # 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`)
475
539
  # @param order_by [::String]
@@ -487,6 +551,22 @@ module Google
487
551
  # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::Snapshot>]
488
552
  #
489
553
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
554
+ #
555
+ # @example Basic example
556
+ # require "google/cloud/compute/v1"
557
+ #
558
+ # # Create a client object. The client can be reused for multiple calls.
559
+ # client = Google::Cloud::Compute::V1::Snapshots::Rest::Client.new
560
+ #
561
+ # # Create a request. To set request fields, pass in keyword arguments.
562
+ # request = Google::Cloud::Compute::V1::ListSnapshotsRequest.new
563
+ #
564
+ # # Call the list method.
565
+ # result = client.list request
566
+ #
567
+ # # The returned object is of type Google::Cloud::Compute::V1::SnapshotList.
568
+ # p result
569
+ #
490
570
  def list request, options = nil
491
571
  raise ::ArgumentError, "request must be provided" if request.nil?
492
572
 
@@ -554,6 +634,22 @@ module Google
554
634
  # @return [::Google::Cloud::Compute::V1::Policy]
555
635
  #
556
636
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
637
+ #
638
+ # @example Basic example
639
+ # require "google/cloud/compute/v1"
640
+ #
641
+ # # Create a client object. The client can be reused for multiple calls.
642
+ # client = Google::Cloud::Compute::V1::Snapshots::Rest::Client.new
643
+ #
644
+ # # Create a request. To set request fields, pass in keyword arguments.
645
+ # request = Google::Cloud::Compute::V1::SetIamPolicySnapshotRequest.new
646
+ #
647
+ # # Call the set_iam_policy method.
648
+ # result = client.set_iam_policy request
649
+ #
650
+ # # The returned object is of type Google::Cloud::Compute::V1::Policy.
651
+ # p result
652
+ #
557
653
  def set_iam_policy request, options = nil
558
654
  raise ::ArgumentError, "request must be provided" if request.nil?
559
655
 
@@ -620,6 +716,22 @@ module Google
620
716
  # @return [::Gapic::GenericLRO::Operation]
621
717
  #
622
718
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
719
+ #
720
+ # @example Basic example
721
+ # require "google/cloud/compute/v1"
722
+ #
723
+ # # Create a client object. The client can be reused for multiple calls.
724
+ # client = Google::Cloud::Compute::V1::Snapshots::Rest::Client.new
725
+ #
726
+ # # Create a request. To set request fields, pass in keyword arguments.
727
+ # request = Google::Cloud::Compute::V1::SetLabelsSnapshotRequest.new
728
+ #
729
+ # # Call the set_labels method.
730
+ # result = client.set_labels request
731
+ #
732
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
733
+ # p result
734
+ #
623
735
  def set_labels request, options = nil
624
736
  raise ::ArgumentError, "request must be provided" if request.nil?
625
737
 
@@ -694,6 +806,22 @@ module Google
694
806
  # @return [::Google::Cloud::Compute::V1::TestPermissionsResponse]
695
807
  #
696
808
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
809
+ #
810
+ # @example Basic example
811
+ # require "google/cloud/compute/v1"
812
+ #
813
+ # # Create a client object. The client can be reused for multiple calls.
814
+ # client = Google::Cloud::Compute::V1::Snapshots::Rest::Client.new
815
+ #
816
+ # # Create a request. To set request fields, pass in keyword arguments.
817
+ # request = Google::Cloud::Compute::V1::TestIamPermissionsSnapshotRequest.new
818
+ #
819
+ # # Call the test_iam_permissions method.
820
+ # result = client.test_iam_permissions request
821
+ #
822
+ # # The returned object is of type Google::Cloud::Compute::V1::TestPermissionsResponse.
823
+ # p result
824
+ #
697
825
  def test_iam_permissions request, options = nil
698
826
  raise ::ArgumentError, "request must be provided" if request.nil?
699
827
 
@@ -179,13 +179,13 @@ module Google
179
179
  # @param options [::Gapic::CallOptions, ::Hash]
180
180
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
181
181
  #
182
- # @overload aggregated_list(filter: nil, include_all_scopes: nil, max_results: nil, order_by: nil, page_token: nil, project: nil, return_partial_success: nil)
182
+ # @overload aggregated_list(filter: nil, include_all_scopes: nil, max_results: nil, order_by: nil, page_token: nil, project: nil, return_partial_success: nil, service_project_number: nil)
183
183
  # Pass arguments to `aggregated_list` via keyword arguments. Note that at
184
184
  # least one keyword argument is required. To specify no parameters, or to keep all
185
185
  # the default parameter values, pass an empty Hash as a request object (see above).
186
186
  #
187
187
  # @param filter [::String]
188
- # 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`.
188
+ # 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.
189
189
  # @param include_all_scopes [::Boolean]
190
190
  # Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
191
191
  # @param max_results [::Integer]
@@ -198,6 +198,7 @@ module Google
198
198
  # Name of the project scoping this request.
199
199
  # @param return_partial_success [::Boolean]
200
200
  # Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
201
+ # @param service_project_number [::Integer]
201
202
  # @yield [result, operation] Access the result along with the TransportOperation object
202
203
  # @yieldparam result [::Gapic::Rest::PagedEnumerable<::String, ::Google::Cloud::Compute::V1::SslCertificatesScopedList>]
203
204
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -205,6 +206,22 @@ module Google
205
206
  # @return [::Gapic::Rest::PagedEnumerable<::String, ::Google::Cloud::Compute::V1::SslCertificatesScopedList>]
206
207
  #
207
208
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
209
+ #
210
+ # @example Basic example
211
+ # require "google/cloud/compute/v1"
212
+ #
213
+ # # Create a client object. The client can be reused for multiple calls.
214
+ # client = Google::Cloud::Compute::V1::SslCertificates::Rest::Client.new
215
+ #
216
+ # # Create a request. To set request fields, pass in keyword arguments.
217
+ # request = Google::Cloud::Compute::V1::AggregatedListSslCertificatesRequest.new
218
+ #
219
+ # # Call the aggregated_list method.
220
+ # result = client.aggregated_list request
221
+ #
222
+ # # The returned object is of type Google::Cloud::Compute::V1::SslCertificateAggregatedList.
223
+ # p result
224
+ #
208
225
  def aggregated_list request, options = nil
209
226
  raise ::ArgumentError, "request must be provided" if request.nil?
210
227
 
@@ -272,6 +289,22 @@ module Google
272
289
  # @return [::Gapic::GenericLRO::Operation]
273
290
  #
274
291
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
292
+ #
293
+ # @example Basic example
294
+ # require "google/cloud/compute/v1"
295
+ #
296
+ # # Create a client object. The client can be reused for multiple calls.
297
+ # client = Google::Cloud::Compute::V1::SslCertificates::Rest::Client.new
298
+ #
299
+ # # Create a request. To set request fields, pass in keyword arguments.
300
+ # request = Google::Cloud::Compute::V1::DeleteSslCertificateRequest.new
301
+ #
302
+ # # Call the delete method.
303
+ # result = client.delete request
304
+ #
305
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
306
+ # p result
307
+ #
275
308
  def delete request, options = nil
276
309
  raise ::ArgumentError, "request must be provided" if request.nil?
277
310
 
@@ -344,6 +377,22 @@ module Google
344
377
  # @return [::Google::Cloud::Compute::V1::SslCertificate]
345
378
  #
346
379
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
380
+ #
381
+ # @example Basic example
382
+ # require "google/cloud/compute/v1"
383
+ #
384
+ # # Create a client object. The client can be reused for multiple calls.
385
+ # client = Google::Cloud::Compute::V1::SslCertificates::Rest::Client.new
386
+ #
387
+ # # Create a request. To set request fields, pass in keyword arguments.
388
+ # request = Google::Cloud::Compute::V1::GetSslCertificateRequest.new
389
+ #
390
+ # # Call the get method.
391
+ # result = client.get request
392
+ #
393
+ # # The returned object is of type Google::Cloud::Compute::V1::SslCertificate.
394
+ # p result
395
+ #
347
396
  def get request, options = nil
348
397
  raise ::ArgumentError, "request must be provided" if request.nil?
349
398
 
@@ -410,6 +459,22 @@ module Google
410
459
  # @return [::Gapic::GenericLRO::Operation]
411
460
  #
412
461
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
462
+ #
463
+ # @example Basic example
464
+ # require "google/cloud/compute/v1"
465
+ #
466
+ # # Create a client object. The client can be reused for multiple calls.
467
+ # client = Google::Cloud::Compute::V1::SslCertificates::Rest::Client.new
468
+ #
469
+ # # Create a request. To set request fields, pass in keyword arguments.
470
+ # request = Google::Cloud::Compute::V1::InsertSslCertificateRequest.new
471
+ #
472
+ # # Call the insert method.
473
+ # result = client.insert request
474
+ #
475
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
476
+ # p result
477
+ #
413
478
  def insert request, options = nil
414
479
  raise ::ArgumentError, "request must be provided" if request.nil?
415
480
 
@@ -472,7 +537,7 @@ module Google
472
537
  # the default parameter values, pass an empty Hash as a request object (see above).
473
538
  #
474
539
  # @param filter [::String]
475
- # 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`.
540
+ # 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.
476
541
  # @param max_results [::Integer]
477
542
  # 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`)
478
543
  # @param order_by [::String]
@@ -490,6 +555,22 @@ module Google
490
555
  # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::SslCertificate>]
491
556
  #
492
557
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
558
+ #
559
+ # @example Basic example
560
+ # require "google/cloud/compute/v1"
561
+ #
562
+ # # Create a client object. The client can be reused for multiple calls.
563
+ # client = Google::Cloud::Compute::V1::SslCertificates::Rest::Client.new
564
+ #
565
+ # # Create a request. To set request fields, pass in keyword arguments.
566
+ # request = Google::Cloud::Compute::V1::ListSslCertificatesRequest.new
567
+ #
568
+ # # Call the list method.
569
+ # result = client.list request
570
+ #
571
+ # # The returned object is of type Google::Cloud::Compute::V1::SslCertificateList.
572
+ # p result
573
+ #
493
574
  def list request, options = nil
494
575
  raise ::ArgumentError, "request must be provided" if request.nil?
495
576